@masuidrive/ticket
Version:
Real-time ticket tracking viewer with Vite + Express
1 lines • 148 kB
JavaScript
import{aH as Te,aI as Je,_ as nt,g as Qe,s as Ke,a as je,b as _e,q as tr,p as er,H as rr,V as ir,D as ar,E as nr,F as or,y as sr,l as be,ak as Ne,c as Le,aJ as ye,d as lr,aK as hr,aL as fr}from"./index-Dx6vtHci.js";import{p as cr}from"./chunk-353BL4L5-Bxn1nyWJ.js";import{I as gr}from"./chunk-AACKK3MU-Dd4qF9nX.js";import{p as ur}from"./treemap-75Q7IDZK-CEL1iO74.js";import{c as Pe}from"./cytoscape.esm-Copgxxlq.js";import"./_baseUniq-BY0GNPBR.js";import"./_basePickBy-CNg76yYF.js";import"./clone-DlYf83-I.js";var Ge={exports:{}},ve={exports:{}},pe={exports:{}},xe;function dr(){return xe||(xe=1,function(C,X){(function(G,L){C.exports=L()})(Te,function(){return function(A){var G={};function L(g){if(G[g])return G[g].exports;var h=G[g]={i:g,l:!1,exports:{}};return A[g].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=A,L.c=G,L.i=function(g){return g},L.d=function(g,h,a){L.o(g,h)||Object.defineProperty(g,h,{configurable:!1,enumerable:!0,get:a})},L.n=function(g){var h=g&&g.__esModule?function(){return g.default}:function(){return g};return L.d(h,"a",h),h},L.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)},L.p="",L(L.s=28)}([function(A,G,L){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g},function(A,G,L){var g=L(2),h=L(8),a=L(9);function r(f,i,u){g.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=i}r.prototype=Object.create(g.prototype);for(var e in g)r[e]=g[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,i){for(var u=this.getOtherEnd(f),t=i.getGraphManager().getRoot();;){if(u.getOwner()==i)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,G,L){function g(h){this.vGraphObject=h}A.exports=g},function(A,G,L){var g=L(2),h=L(10),a=L(13),r=L(0),e=L(16),f=L(5);function i(t,s,o,c){o==null&&c==null&&(c=s),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}i.prototype=Object.create(g.prototype);for(var u in g)i[u]=g[u];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},i.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},i.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},i.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},i.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},i.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},i.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},i.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+e.nextDouble()*(c-o)+o;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+e.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i},function(A,G,L){var g=L(0);function h(){}for(var a in g)h[a]=g[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h},function(A,G,L){function g(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(h){this.x=h},g.prototype.setY=function(h){this.y=h},g.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=g},function(A,G,L){var g=L(2),h=L(10),a=L(0),r=L(7),e=L(3),f=L(1),i=L(13),u=L(12),t=L(11);function s(c,l,T){g.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(g.prototype);for(var o in g)s[o]=g[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var v=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),v,d=T.length,N=0;N<d;N++)v=T[N],v.isInterGraph?this.graphManager.remove(v):v.source.owner.remove(v);var S=this.nodes.indexOf(l);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(c instanceof f){var v=c;if(v==null)throw"Edge is null!";if(!(v.source!=null&&v.target!=null))throw"Source and/or target is null!";if(!(v.source.owner!=null&&v.target.owner!=null&&v.source.owner==this&&v.target.owner==this))throw"Source and/or target owner is invalid!";var M=v.source.edges.indexOf(v),P=v.target.edges.indexOf(v);if(!(M>-1&&P>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(M,1),v.target!=v.source&&v.target.edges.splice(P,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,v,d,N=this.getNodes(),S=N.length,M=0;M<S;M++){var P=N[M];T=P.getTop(),v=P.getLeft(),c>T&&(c=T),l>v&&(l=v)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,v=h.MAX_VALUE,d=-h.MAX_VALUE,N,S,M,P,K,Y=this.nodes,Z=Y.length,D=0;D<Z;D++){var rt=Y[D];c&&rt.child!=null&&rt.updateBounds(),N=rt.getLeft(),S=rt.getRight(),M=rt.getTop(),P=rt.getBottom(),l>N&&(l=N),T<S&&(T=S),v>M&&(v=M),d<P&&(d=P)}var n=new i(l,v,T-l,d-v);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?K=Y[0].getParent().paddingLeft:K=this.margin,this.left=n.x-K,this.right=n.x+n.width+K,this.top=n.y-K,this.bottom=n.y+n.height+K},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,v=h.MAX_VALUE,d=-h.MAX_VALUE,N,S,M,P,K=c.length,Y=0;Y<K;Y++){var Z=c[Y];N=Z.getLeft(),S=Z.getRight(),M=Z.getTop(),P=Z.getBottom(),l>N&&(l=N),T<S&&(T=S),v>M&&(v=M),d<P&&(d=P)}var D=new i(l,v,T-l,d-v);return D},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,v=0;v<T;v++){var d=l[v];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,v=this.nodes[0],d,N,S=v.withChildren();for(S.forEach(function(D){l.push(D),T.add(D)});l.length!==0;){v=l.shift(),d=v.getEdges();for(var M=d.length,P=0;P<M;P++){var K=d[P];if(N=K.getOtherEndInGraph(v,this),N!=null&&!T.has(N)){var Y=N.withChildren();Y.forEach(function(D){l.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},A.exports=s},function(A,G,L){var g,h=L(1);function a(r){g=L(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,e,f,i,u){if(f==null&&i==null&&u==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{u=f,i=e,f=r;var t=i.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,u);if(f.isInterGraph=!0,f.source=i,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var i,u=f.length,t=0;t<u;t++)i=f[t],e.remove(i);var s=[];s=s.concat(e.getNodes());var o;u=s.length;for(var t=0;t<u;t++)o=s[t],e.remove(o);e==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(e);this.graphs.splice(c,1),e.parent=null}else if(r instanceof h){if(i=r,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],e=this.getGraphs(),f=e.length,i=0;i<f;i++)r=r.concat(e[i].getNodes());this.allNodes=r}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],e=this.getGraphs();e.length;for(var f=0;f<e.length;f++)r=r.concat(e[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(r,e){if(!(r!=null&&e!=null))throw"assert failed";if(r==e)return!0;var f=r.getOwner(),i;do{if(i=f.getParent(),i==null)break;if(i==e)return!0;if(f=i.getOwner(),f==null)break}while(!0);f=e.getOwner();do{if(i=f.getParent(),i==null)break;if(i==r)return!0;if(f=i.getOwner(),f==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var r,e,f,i,u,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],e=r.source,f=r.target,r.lca=null,r.sourceInLca=e,r.targetInLca=f,e==f){r.lca=e.getOwner();continue}for(i=e.getOwner();r.lca==null;){for(r.targetInLca=f,u=f.getOwner();r.lca==null;){if(u==i){r.lca=u;break}if(u==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=u.getParent(),u=r.targetInLca.getOwner()}if(i==this.rootGraph)break;r.lca==null&&(r.sourceInLca=i.getParent(),i=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(r,e){if(r==e)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var i=e.getOwner();do{if(i==null)break;if(i==f)return i;i=i.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},a.prototype.calcInclusionTreeDepths=function(r,e){r==null&&e==null&&(r=this.rootGraph,e=1);for(var f,i=r.getNodes(),u=i.length,t=0;t<u;t++)f=i[t],f.inclusionTreeDepth=e,f.child!=null&&this.calcInclusionTreeDepths(f.child,e+1)},a.prototype.includesInvalidEdge=function(){for(var r,e=[],f=this.edges.length,i=0;i<f;i++)r=this.edges[i],this.isOneAncestorOfOther(r.source,r.target)&&e.push(r);for(var i=0;i<e.length;i++)this.remove(e[i]);return!1},A.exports=a},function(A,G,L){var g=L(12);function h(){}h.calcSeparationAmount=function(a,r,e,f){if(!a.intersects(r))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,r,i),e[0]=Math.min(a.getRight(),r.getRight())-Math.max(a.x,r.x),e[1]=Math.min(a.getBottom(),r.getBottom())-Math.max(a.y,r.y),a.getX()<=r.getX()&&a.getRight()>=r.getRight()?e[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(e[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(e[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var u=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(u=1);var t=u*e[0],s=e[1]/u;e[0]<s?s=e[0]:t=e[1],e[0]=-1*i[0]*(s/2+f),e[1]=-1*i[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(a,r,e){a.getCenterX()<r.getCenterX()?e[0]=-1:e[0]=1,a.getCenterY()<r.getCenterY()?e[1]=-1:e[1]=1},h.getIntersection2=function(a,r,e){var f=a.getCenterX(),i=a.getCenterY(),u=r.getCenterX(),t=r.getCenterY();if(a.intersects(r))return e[0]=f,e[1]=i,e[2]=u,e[3]=t,!0;var s=a.getX(),o=a.getY(),c=a.getRight(),l=a.getX(),T=a.getBottom(),v=a.getRight(),d=a.getWidthHalf(),N=a.getHeightHalf(),S=r.getX(),M=r.getY(),P=r.getRight(),K=r.getX(),Y=r.getBottom(),Z=r.getRight(),D=r.getWidthHalf(),rt=r.getHeightHalf(),n=!1,m=!1;if(f===u){if(i>t)return e[0]=f,e[1]=o,e[2]=u,e[3]=Y,!1;if(i<t)return e[0]=f,e[1]=T,e[2]=u,e[3]=M,!1}else if(i===t){if(f>u)return e[0]=s,e[1]=i,e[2]=P,e[3]=t,!1;if(f<u)return e[0]=c,e[1]=i,e[2]=S,e[3]=t,!1}else{var p=a.height/a.width,E=r.height/r.width,y=(t-i)/(u-f),I=void 0,w=void 0,R=void 0,W=void 0,x=void 0,q=void 0;if(-p===y?f>u?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):p===y&&(f>u?(e[0]=s,e[1]=o,n=!0):(e[0]=v,e[1]=T,n=!0)),-E===y?u>f?(e[2]=K,e[3]=Y,m=!0):(e[2]=P,e[3]=M,m=!0):E===y&&(u>f?(e[2]=S,e[3]=M,m=!0):(e[2]=Z,e[3]=Y,m=!0)),n&&m)return!1;if(f>u?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,e[0]=R,e[1]=W;break;case 2:R=v,W=i+d*y,e[0]=R,e[1]=W;break;case 3:W=T,R=f+N/y,e[0]=R,e[1]=W;break;case 4:R=l,W=i+-d*y,e[0]=R,e[1]=W;break}if(!m)switch(w){case 1:q=M,x=u+-rt/y,e[2]=x,e[3]=q;break;case 2:x=Z,q=t+D*y,e[2]=x,e[3]=q;break;case 3:q=Y,x=u+rt/y,e[2]=x,e[3]=q;break;case 4:x=K,q=t+-D*y,e[2]=x,e[3]=q;break}}return!1},h.getCardinalDirection=function(a,r,e){return a>r?e:1+e%4},h.getIntersection=function(a,r,e,f){if(f==null)return this.getIntersection2(a,r,e);var i=a.x,u=a.y,t=r.x,s=r.y,o=e.x,c=e.y,l=f.x,T=f.y,v=void 0,d=void 0,N=void 0,S=void 0,M=void 0,P=void 0,K=void 0,Y=void 0,Z=void 0;return N=s-u,M=i-t,K=t*u-i*s,S=T-c,P=o-l,Y=l*c-o*T,Z=N*P-S*M,Z===0?null:(v=(M*Y-P*K)/Z,d=(S*K-N*Y)/Z,new g(v,d))},h.angleOfVector=function(a,r,e,f){var i=void 0;return a!==e?(i=Math.atan((f-r)/(e-a)),e<a?i+=Math.PI:f<r&&(i+=this.TWO_PI)):f<r?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},h.doIntersect=function(a,r,e,f){var i=a.x,u=a.y,t=r.x,s=r.y,o=e.x,c=e.y,l=f.x,T=f.y,v=(t-i)*(T-c)-(l-o)*(s-u);if(v===0)return!1;var d=((T-c)*(l-i)+(o-l)*(T-u))/v,N=((u-s)*(l-i)+(t-i)*(T-u))/v;return 0<d&&d<1&&0<N&&N<1},h.findCircleLineIntersections=function(a,r,e,f,i,u,t){var s=(e-a)*(e-a)+(f-r)*(f-r),o=2*((a-i)*(e-a)+(r-u)*(f-r)),c=(a-i)*(a-i)+(r-u)*(r-u)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),v=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:v>=0&&v<=1?[v]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h},function(A,G,L){function g(){}g.sign=function(h){return h>0?1:h<0?-1:0},g.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},g.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=g},function(A,G,L){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g},function(A,G,L){var g=function(){function i(u,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,t,s){return t&&i(u.prototype,t),s&&i(u,s),u}}();function h(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}var a=function(u){return{value:u,next:null,prev:null}},r=function(u,t,s,o){return u!==null?u.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=u,t.next=s,o.length++,t},e=function(u,t){var s=u.prev,o=u.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,u.prev=u.next=null,t.length--,u},f=function(){function i(u){var t=this;h(this,i),this.length=0,this.head=null,this.tail=null,u!=null&&u.forEach(function(s){return t.push(s)})}return g(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,a(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,a(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return r(null,a(t),this.head,this)}},{key:"remove",value:function(t){return e(t,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),i}();A.exports=f},function(A,G,L){function g(h,a,r){this.x=null,this.y=null,h==null&&a==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&r==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.getLocation=function(){return new g(this.x,this.y)},g.prototype.setLocation=function(h,a,r){h.constructor.name=="Point"&&a==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof a=="number"&&r==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},g.prototype.move=function(h,a){this.x=h,this.y=a},g.prototype.translate=function(h,a){this.x+=h,this.y+=a},g.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},g.prototype.toString=function(){return new g().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=g},function(A,G,L){function g(h,a,r,e){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&r!=null&&e!=null&&(this.x=h,this.y=a,this.width=r,this.height=e)}g.prototype.getX=function(){return this.x},g.prototype.setX=function(h){this.x=h},g.prototype.getY=function(){return this.y},g.prototype.setY=function(h){this.y=h},g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(h){this.width=h},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(h){this.height=h},g.prototype.getRight=function(){return this.x+this.width},g.prototype.getBottom=function(){return this.y+this.height},g.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},g.prototype.getCenterX=function(){return this.x+this.width/2},g.prototype.getMinX=function(){return this.getX()},g.prototype.getMaxX=function(){return this.getX()+this.width},g.prototype.getCenterY=function(){return this.y+this.height/2},g.prototype.getMinY=function(){return this.getY()},g.prototype.getMaxY=function(){return this.getY()+this.height},g.prototype.getWidthHalf=function(){return this.width/2},g.prototype.getHeightHalf=function(){return this.height/2},A.exports=g},function(A,G,L){var g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var r=typeof a>"u"?"undefined":g(a);return a==null||r!="object"&&r!="function"},A.exports=h},function(A,G,L){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=L(0),a=L(7),r=L(3),e=L(1),f=L(6),i=L(5),u=L(17),t=L(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new a(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new e(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var v=c.vGraphObject;v.update(c)}}else if(o instanceof e){var d=o;if(d.vGraphObject!=null){var N=d.vGraphObject;N.update(d)}}else if(o instanceof f){var S=o;if(S.vGraphObject!=null){var M=S.vGraphObject;M.update(S)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new i(0,0));else{var c=new u,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),v,d=0;d<T.length;d++)v=T[d],v.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),v=0;v<T.length;v++)c=T[v],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,v=0;v<l.length;v++)l[v].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,N=[],S=new Map,M=[];for(M=M.concat(l);M.length>0&&c;){for(N.push(M[0]);N.length>0&&c;){var P=N[0];N.splice(0,1),d.add(P);for(var K=P.getEdges(),v=0;v<K.length;v++){var Y=K[v].getOtherEnd(P);if(S.get(P)!=Y)if(!d.has(Y))N.push(Y),S.set(Y,P);else{c=!1;break}}}if(!c)o=[];else{var Z=[].concat(g(d));o.push(Z);for(var v=0;v<Z.length;v++){var D=Z[v],rt=M.indexOf(D);rt>-1&&M.splice(rt,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),v=0;v<o.bendpoints.length;v++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var N=this.newEdge(null);this.graphManager.add(N,l,d),c.add(d),l=d}var N=this.newEdge(null);return this.graphManager.add(N,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(g(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),v=0;v<T.length;v++){var d=T[v],N=new i(d.getCenterX(),d.getCenterY()),S=l.bendpoints.get(v);S.x=N.x,S.y=N.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var v=c;if(o<=50){var d=c/l;v-=(c-d)/50*(50-o)}else{var N=c*T;v+=(N-c)/50*(o-50)}return v}else{var S,M;return o<=50?(S=9*c/500,M=c/10):(S=9*c/50,M=-8*c),S*o+M}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,v=!1,d=null;(c.length==1||c.length==2)&&(v=!0,d=c[0]);for(var N=0;N<c.length;N++){var S=c[N],M=S.getNeighborsList().size;T.set(S,S.getNeighborsList().size),M==1&&l.push(S)}var P=[];for(P=P.concat(l);!v;){var K=[];K=K.concat(P),P=[];for(var N=0;N<c.length;N++){var S=c[N],Y=c.indexOf(S);Y>=0&&c.splice(Y,1);var Z=S.getNeighborsList();Z.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(v=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s},function(A,G,L){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g},function(A,G,L){var g=L(5);function h(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/e),r},h.prototype.transformY=function(a){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/e),r},h.prototype.inverseTransformX=function(a){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/e),r},h.prototype.inverseTransformY=function(a){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/e),r},h.prototype.inverseTransformPoint=function(a){var r=new g(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},A.exports=h},function(A,G,L){function g(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=L(15),a=L(4),r=L(0),e=L(8),f=L(9);function i(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}i.prototype=Object.create(h.prototype);for(var u in h)i[u]=h[u];i.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,v,d=this.getGraphManager().getAllEdges(),N=0;N<d.length;N++)t=d[N],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+v-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,v=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<v.length;o++)l=v[o],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(o=0;o<v.length;o++)for(l=v[o],c=o+1;c<v.length;c++)T=v[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},i.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},i.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,v,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),v=T*(t.lengthX/l),d=T*(t.lengthY/l),o.springForceX+=v,o.springForceY+=d,c.springForceX-=v,c.springForceY-=d)},i.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),v,d,N,S,M,P,K;if(o.intersects(c)){e.calcSeparationAmount(o,c,l,a.DEFAULT_EDGE_LENGTH/2),P=2*l[0],K=2*l[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*P,t.repulsionForceY-=Y*K,s.repulsionForceX+=Y*P,s.repulsionForceY+=Y*K}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(v=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(e.getIntersection(o,c,T),v=T[2]-T[0],d=T[3]-T[1]),Math.abs(v)<a.MIN_REPULSION_DIST&&(v=f.sign(v)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=f.sign(d)*a.MIN_REPULSION_DIST),N=v*v+d*d,S=Math.sqrt(N),M=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/N,P=M*v/S,K=M*d/S,t.repulsionForceX-=P,t.repulsionForceY-=K,s.repulsionForceX+=P,s.repulsionForceY+=K},i.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,v,d,N;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,v=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(N=s.getEstimatedSize()*this.gravityRangeFactor,(v>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(v>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,v=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=l;d++)for(var N=T;N<=v;N++)this.grid[d][N].push(t),t.setGridCoordinates(c,l,T,v)},i.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,v=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var N=t.startY-1;N<t.finishY+2;N++)if(!(d<0||N<0||d>=v.length||N>=v[0].length)){for(var S=0;S<v[d][N].length;S++)if(T=v[d][N][S],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var M=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);M<=this.repulsionRange&&P<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(g(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},i.prototype.calcRepulsionRange=function(){return 0},A.exports=i},function(A,G,L){var g=L(1),h=L(4);function a(e,f,i){g.call(this,e,f,i),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(g.prototype);for(var r in g)a[r]=g[r];A.exports=a},function(A,G,L){var g=L(3),h=L(4);function a(e,f,i,u){g.call(this,e,f,i,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}a.prototype=Object.create(g.prototype);for(var r in g)a[r]=g[r];a.prototype.setGridCoordinates=function(e,f,i,u){this.startX=e,this.finishX=f,this.startY=i,this.finishY=u},A.exports=a},function(A,G,L){function g(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}g.prototype.getWidth=function(){return this.width},g.prototype.setWidth=function(h){this.width=h},g.prototype.getHeight=function(){return this.height},g.prototype.setHeight=function(h){this.height=h},A.exports=g},function(A,G,L){var g=L(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(a,r){var e=g.createID(a);this.contains(e)||(this.map[e]=r,this.keys.push(a))},h.prototype.contains=function(a){return g.createID(a),this.map[a]!=null},h.prototype.get=function(a){var r=g.createID(a);return this.map[r]},h.prototype.keySet=function(){return this.keys},A.exports=h},function(A,G,L){var g=L(14);function h(){this.set={}}h.prototype.add=function(a){var r=g.createID(a);this.contains(r)||(this.set[r]=a)},h.prototype.remove=function(a){delete this.set[g.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[g.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var r=Object.keys(this.set),e=r.length,f=0;f<e;f++)a.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var r=a.length,e=0;e<r;e++){var f=a[e];this.add(f)}},A.exports=h},function(A,G,L){function g(){}g.multMat=function(h,a){for(var r=[],e=0;e<h.length;e++){r[e]=[];for(var f=0;f<a[0].length;f++){r[e][f]=0;for(var i=0;i<h[0].length;i++)r[e][f]+=h[e][i]*a[i][f]}}return r},g.transpose=function(h){for(var a=[],r=0;r<h[0].length;r++){a[r]=[];for(var e=0;e<h.length;e++)a[r][e]=h[e][r]}return a},g.multCons=function(h,a){for(var r=[],e=0;e<h.length;e++)r[e]=h[e]*a;return r},g.minusOp=function(h,a){for(var r=[],e=0;e<h.length;e++)r[e]=h[e]-a[e];return r},g.dotProduct=function(h,a){for(var r=0,e=0;e<h.length;e++)r+=h[e]*a[e];return r},g.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},g.normalize=function(h){for(var a=[],r=this.mag(h),e=0;e<h.length;e++)a[e]=h[e]/r;return a},g.multGamma=function(h){for(var a=[],r=0,e=0;e<h.length;e++)r+=h[e];r*=-1/h.length;for(var f=0;f<h.length;f++)a[f]=r+h[f];return a},g.multL=function(h,a,r){for(var e=[],f=[],i=[],u=0;u<a[0].length;u++){for(var t=0,s=0;s<a.length;s++)t+=-.5*a[s][u]*h[s];f[u]=t}for(var o=0;o<r.length;o++){for(var c=0,l=0;l<r.length;l++)c+=r[o][l]*f[l];i[o]=c}for(var T=0;T<a.length;T++){for(var v=0,d=0;d<a[0].length;d++)v+=a[T][d]*i[d];e[T]=v}return e},A.exports=g},function(A,G,L){var g=function(){function e(f,i){for(var u=0;u<i.length;u++){var t=i[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,i,u){return i&&e(f.prototype,i),u&&e(f,u),f}}();function h(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function")}var a=L(11),r=function(){function e(f,i){h(this,e),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;f instanceof a?u=f.size():u=f.length,this._quicksort(f,0,u-1)}return g(e,[{key:"_quicksort",value:function(i,u,t){if(u<t){var s=this._partition(i,u,t);this._quicksort(i,u,s),this._quicksort(i,s+1,t)}}},{key:"_partition",value:function(i,u,t){for(var s=this._get(i,u),o=u,c=t;;){for(;this.compareFunction(s,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,o),s);)o++;if(o<c)this._swap(i,o,c),o++,c--;else return c}}},{key:"_get",value:function(i,u){return i instanceof a?i.get_object_at(u):i[u]}},{key:"_set",value:function(i,u,t){i instanceof a?i.set_object_at(u,t):i[u]=t}},{key:"_swap",value:function(i,u,t){var s=this._get(i,u);this._set(i,u,this._get(i,t