UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

1 lines 504 kB
import{a as rs}from"./chunk-WVHPJQMP.mjs";import{d as ts}from"./chunk-KMOJB3TB.mjs";import{k as es}from"./chunk-AC3VT7B7.mjs";import"./chunk-TI4EEUUG.mjs";import{F as ta,N as Ji,X as ra,b as Yt,fa as ji,n as Ki,o as Zi,p as Qi,s as Sr}from"./chunk-NQURTBEV.mjs";import"./chunk-6BY5RJGC.mjs";import{a as f,b as Gn,e as Tl}from"./chunk-GTKDMUJJ.mjs";var Ui=Gn((Pa,Vi)=>{"use strict";f(function(e,r){typeof Pa=="object"&&typeof Vi=="object"?Vi.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Pa=="object"?Pa.layoutBase=r():e.layoutBase=r()},"webpackUniversalModuleDefinition")(Pa,function(){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return f(r,"__webpack_require__"),r.m=t,r.c=e,r.i=function(a){return a},r.d=function(a,n,i){r.o(a,n)||Object.defineProperty(a,n,{configurable:!1,enumerable:!0,get:i})},r.n=function(a){var n=a&&a.__esModule?f(function(){return a.default},"getDefault"):f(function(){return a},"getModuleExports");return r.d(n,"a",n),n},r.o=function(a,n){return Object.prototype.hasOwnProperty.call(a,n)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function a(){}f(a,"LayoutConstants"),a.QUALITY=1,a.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,a.DEFAULT_INCREMENTAL=!1,a.DEFAULT_ANIMATION_ON_LAYOUT=!0,a.DEFAULT_ANIMATION_DURING_LAYOUT=!1,a.DEFAULT_ANIMATION_PERIOD=50,a.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,a.DEFAULT_GRAPH_MARGIN=15,a.NODE_DIMENSIONS_INCLUDE_LABELS=!1,a.SIMPLE_NODE_SIZE=40,a.SIMPLE_NODE_HALF_SIZE=a.SIMPLE_NODE_SIZE/2,a.EMPTY_COMPOUND_NODE_SIZE=40,a.MIN_EDGE_LENGTH=1,a.WORLD_BOUNDARY=1e6,a.INITIAL_WORLD_BOUNDARY=a.WORLD_BOUNDARY/1e3,a.WORLD_CENTER_X=1200,a.WORLD_CENTER_Y=900,t.exports=a},function(t,e,r){"use strict";var a=r(2),n=r(8),i=r(9);function s(l,u,h){a.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}f(s,"LEdge"),s.prototype=Object.create(a.prototype);for(var o in a)s[o]=a[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),c=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==c)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.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=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){"use strict";function a(n){this.vGraphObject=n}f(a,"LGraphObject"),t.exports=a},function(t,e,r){"use strict";var a=r(2),n=r(10),i=r(13),s=r(0),o=r(16),l=r(4);function u(c,v,d,g){d==null&&g==null&&(g=v),a.call(this,g),c.graphManager!=null&&(c=c.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=c,d!=null&&v!=null?this.rect=new i(v.x,v.y,d.width,d.height):this.rect=new i}f(u,"LNode"),u.prototype=Object.create(a.prototype);for(var h in a)u[h]=a[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(c){this.rect.width=c},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(c){this.rect.height=c},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(c,v){this.rect.x=c.x,this.rect.y=c.y,this.rect.width=v.width,this.rect.height=v.height},u.prototype.setCenter=function(c,v){this.rect.x=c-this.rect.width/2,this.rect.y=v-this.rect.height/2},u.prototype.setLocation=function(c,v){this.rect.x=c,this.rect.y=v},u.prototype.moveBy=function(c,v){this.rect.x+=c,this.rect.y+=v},u.prototype.getEdgeListToNode=function(c){var v=[],d,g=this;return g.edges.forEach(function(m){if(m.target==c){if(m.source!=g)throw"Incorrect edge source!";v.push(m)}}),v},u.prototype.getEdgesBetween=function(c){var v=[],d,g=this;return g.edges.forEach(function(m){if(!(m.source==g||m.target==g))throw"Incorrect edge source and/or target";(m.target==c||m.source==c)&&v.push(m)}),v},u.prototype.getNeighborsList=function(){var c=new Set,v=this;return v.edges.forEach(function(d){if(d.source==v)c.add(d.target);else{if(d.target!=v)throw"Incorrect incidency!";c.add(d.source)}}),c},u.prototype.withChildren=function(){var c=new Set,v,d;if(c.add(this),this.child!=null)for(var g=this.child.getNodes(),m=0;m<g.length;m++)v=g[m],d=v.withChildren(),d.forEach(function(y){c.add(y)});return c},u.prototype.getNoOfChildren=function(){var c=0,v;if(this.child==null)c=1;else for(var d=this.child.getNodes(),g=0;g<d.length;g++)v=d[g],c+=v.getNoOfChildren();return c==0&&(c=1),c},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.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)},u.prototype.scatter=function(){var c,v,d=-s.INITIAL_WORLD_BOUNDARY,g=s.INITIAL_WORLD_BOUNDARY;c=s.WORLD_CENTER_X+o.nextDouble()*(g-d)+d;var m=-s.INITIAL_WORLD_BOUNDARY,y=s.INITIAL_WORLD_BOUNDARY;v=s.WORLD_CENTER_Y+o.nextDouble()*(y-m)+m,this.rect.x=c,this.rect.y=v},u.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var c=this.getChild();if(c.updateBounds(!0),this.rect.x=c.getLeft(),this.rect.y=c.getTop(),this.setWidth(c.getRight()-c.getLeft()),this.setHeight(c.getBottom()-c.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var v=c.getRight()-c.getLeft(),d=c.getBottom()-c.getTop();this.labelWidth>v&&(this.rect.x-=(this.labelWidth-v)/2,this.setWidth(this.labelWidth)),this.labelHeight>d&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-d)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-d),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(c){var v=this.rect.x;v>s.WORLD_BOUNDARY?v=s.WORLD_BOUNDARY:v<-s.WORLD_BOUNDARY&&(v=-s.WORLD_BOUNDARY);var d=this.rect.y;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var g=new l(v,d),m=c.inverseTransformPoint(g);this.setLocation(m.x,m.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u},function(t,e,r){"use strict";function a(n,i){n==null&&i==null?(this.x=0,this.y=0):(this.x=n,this.y=i)}f(a,"PointD"),a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.setX=function(n){this.x=n},a.prototype.setY=function(n){this.y=n},a.prototype.getDifference=function(n){return new DimensionD(this.x-n.x,this.y-n.y)},a.prototype.getCopy=function(){return new a(this.x,this.y)},a.prototype.translate=function(n){return this.x+=n.width,this.y+=n.height,this},t.exports=a},function(t,e,r){"use strict";var a=r(2),n=r(10),i=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),c=r(11);function v(g,m,y){a.call(this,y),this.estimatedSize=n.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,m!=null&&m instanceof s?this.graphManager=m:m!=null&&m instanceof Layout&&(this.graphManager=m.graphManager)}f(v,"LGraph"),v.prototype=Object.create(a.prototype);for(var d in a)v[d]=a[d];v.prototype.getNodes=function(){return this.nodes},v.prototype.getEdges=function(){return this.edges},v.prototype.getGraphManager=function(){return this.graphManager},v.prototype.getParent=function(){return this.parent},v.prototype.getLeft=function(){return this.left},v.prototype.getRight=function(){return this.right},v.prototype.getTop=function(){return this.top},v.prototype.getBottom=function(){return this.bottom},v.prototype.isConnected=function(){return this.isConnected},v.prototype.add=function(g,m,y){if(m==null&&y==null){var p=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(p)>-1)throw"Node already in graph!";return p.owner=this,this.getNodes().push(p),p}else{var b=g;if(!(this.getNodes().indexOf(m)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(m.owner==y.owner&&m.owner==this))throw"Both owners must be this graph!";return m.owner!=y.owner?null:(b.source=m,b.target=y,b.isInterGraph=!1,this.getEdges().push(b),m.edges.push(b),y!=m&&y.edges.push(b),b)}},v.prototype.remove=function(g){var m=g;if(g instanceof o){if(m==null)throw"Node is null!";if(!(m.owner!=null&&m.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=m.edges.slice(),p,b=y.length,E=0;E<b;E++)p=y[E],p.isInterGraph?this.graphManager.remove(p):p.source.owner.remove(p);var S=this.nodes.indexOf(m);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(g instanceof l){var p=g;if(p==null)throw"Edge is null!";if(!(p.source!=null&&p.target!=null))throw"Source and/or target is null!";if(!(p.source.owner!=null&&p.target.owner!=null&&p.source.owner==this&&p.target.owner==this))throw"Source and/or target owner is invalid!";var w=p.source.edges.indexOf(p),x=p.target.edges.indexOf(p);if(!(w>-1&&x>-1))throw"Source and/or target doesn't know this edge!";p.source.edges.splice(w,1),p.target!=p.source&&p.target.edges.splice(x,1);var S=p.source.owner.getEdges().indexOf(p);if(S==-1)throw"Not in owner's edge list!";p.source.owner.getEdges().splice(S,1)}},v.prototype.updateLeftTop=function(){for(var g=n.MAX_VALUE,m=n.MAX_VALUE,y,p,b,E=this.getNodes(),S=E.length,w=0;w<S;w++){var x=E[w];y=x.getTop(),p=x.getLeft(),g>y&&(g=y),m>p&&(m=p)}return g==n.MAX_VALUE?null:(E[0].getParent().paddingLeft!=null?b=E[0].getParent().paddingLeft:b=this.margin,this.left=m-b,this.top=g-b,new h(this.left,this.top))},v.prototype.updateBounds=function(g){for(var m=n.MAX_VALUE,y=-n.MAX_VALUE,p=n.MAX_VALUE,b=-n.MAX_VALUE,E,S,w,x,T,C=this.nodes,D=C.length,L=0;L<D;L++){var O=C[L];g&&O.child!=null&&O.updateBounds(),E=O.getLeft(),S=O.getRight(),w=O.getTop(),x=O.getBottom(),m>E&&(m=E),y<S&&(y=S),p>w&&(p=w),b<x&&(b=x)}var A=new u(m,p,y-m,b-p);m==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),C[0].getParent().paddingLeft!=null?T=C[0].getParent().paddingLeft:T=this.margin,this.left=A.x-T,this.right=A.x+A.width+T,this.top=A.y-T,this.bottom=A.y+A.height+T},v.calculateBounds=function(g){for(var m=n.MAX_VALUE,y=-n.MAX_VALUE,p=n.MAX_VALUE,b=-n.MAX_VALUE,E,S,w,x,T=g.length,C=0;C<T;C++){var D=g[C];E=D.getLeft(),S=D.getRight(),w=D.getTop(),x=D.getBottom(),m>E&&(m=E),y<S&&(y=S),p>w&&(p=w),b<x&&(b=x)}var L=new u(m,p,y-m,b-p);return L},v.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},v.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},v.prototype.calcEstimatedSize=function(){for(var g=0,m=this.nodes,y=m.length,p=0;p<y;p++){var b=m[p];g+=b.calcEstimatedSize()}return g==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=g/Math.sqrt(this.nodes.length),this.estimatedSize},v.prototype.updateConnected=function(){var g=this;if(this.nodes.length==0){this.isConnected=!0;return}var m=new c,y=new Set,p=this.nodes[0],b,E,S=p.withChildren();for(S.forEach(function(L){m.push(L),y.add(L)});m.length!==0;){p=m.shift(),b=p.getEdges();for(var w=b.length,x=0;x<w;x++){var T=b[x];if(E=T.getOtherEndInGraph(p,this),E!=null&&!y.has(E)){var C=E.withChildren();C.forEach(function(L){m.push(L),y.add(L)})}}}if(this.isConnected=!1,y.size>=this.nodes.length){var D=0;y.forEach(function(L){L.owner==g&&D++}),D==this.nodes.length&&(this.isConnected=!0)}},t.exports=v},function(t,e,r){"use strict";var a,n=r(1);function i(s){a=r(5),this.layout=s,this.graphs=[],this.edges=[]}f(i,"LGraphManager"),i.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},i.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var c=u.getOwner(),v=h.getOwner();if(!(c!=null&&c.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(v!=null&&v.getGraphManager()==this))throw"Target not in this graph mgr!";if(c==v)return l.isInterGraph=!1,c.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},i.prototype.remove=function(s){if(s instanceof a){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,c=0;c<h;c++)u=l[c],o.remove(u);var v=[];v=v.concat(o.getNodes());var d;h=v.length;for(var c=0;c<h;c++)d=v[c],o.remove(d);o==this.rootGraph&&this.setRootGraph(null);var g=this.graphs.indexOf(o);this.graphs.splice(g,1),o.parent=null}else if(s instanceof n){if(u=s,u==null)throw"Edge is null!";if(!u.isInterGraph)throw"Not an inter-graph edge!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.edges.indexOf(u)!=-1&&u.target.edges.indexOf(u)!=-1))throw"Source and/or target doesn't know this edge!";var g=u.source.edges.indexOf(u);if(u.source.edges.splice(g,1),g=u.target.edges.indexOf(u),u.target.edges.splice(g,1),!(u.source.owner!=null&&u.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(u.source.owner.getGraphManager().edges.indexOf(u)==-1)throw"Not in owner graph manager's edge list!";var g=u.source.owner.getGraphManager().edges.indexOf(u);u.source.owner.getGraphManager().edges.splice(g,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<l;u++)s=s.concat(o[u].getNodes());this.allNodes=s}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){for(var s=[],o=this.getGraphs(),l=o.length,u=0;u<o.length;u++)s=s.concat(o[u].getEdges());s=s.concat(this.edges),this.allEdges=s}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(s){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=s},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(s){if(s.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=s,s.parent==null&&(s.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(s,o){if(!(s!=null&&o!=null))throw"assert failed";if(s==o)return!0;var l=s.getOwner(),u;do{if(u=l.getParent(),u==null)break;if(u==o)return!0;if(l=u.getOwner(),l==null)break}while(!0);l=o.getOwner();do{if(u=l.getParent(),u==null)break;if(u==s)return!0;if(l=u.getOwner(),l==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var s,o,l,u,h,c=this.getAllEdges(),v=c.length,d=0;d<v;d++){if(s=c[d],o=s.source,l=s.target,s.lca=null,s.sourceInLca=o,s.targetInLca=l,o==l){s.lca=o.getOwner();continue}for(u=o.getOwner();s.lca==null;){for(s.targetInLca=l,h=l.getOwner();s.lca==null;){if(h==u){s.lca=h;break}if(h==this.rootGraph)break;if(s.lca!=null)throw"assert failed";s.targetInLca=h.getParent(),h=s.targetInLca.getOwner()}if(u==this.rootGraph)break;s.lca==null&&(s.sourceInLca=u.getParent(),u=s.sourceInLca.getOwner())}if(s.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(s,o){if(s==o)return s.getOwner();var l=s.getOwner();do{if(l==null)break;var u=o.getOwner();do{if(u==null)break;if(u==l)return u;u=u.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},i.prototype.calcInclusionTreeDepths=function(s,o){s==null&&o==null&&(s=this.rootGraph,o=1);for(var l,u=s.getNodes(),h=u.length,c=0;c<h;c++)l=u[c],l.inclusionTreeDepth=o,l.child!=null&&this.calcInclusionTreeDepths(l.child,o+1)},i.prototype.includesInvalidEdge=function(){for(var s,o=this.edges.length,l=0;l<o;l++)if(s=this.edges[l],this.isOneAncestorOfOther(s.source,s.target))return!0;return!1},t.exports=i},function(t,e,r){"use strict";var a=r(0);function n(){}f(n,"FDLayoutConstants");for(var i in a)n[i]=a[i];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=n.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,r){"use strict";var a=r(12);function n(){}f(n,"IGeometry"),n.calcSeparationAmount=function(i,s,o,l){if(!i.intersects(s))throw"assert failed";var u=new Array(2);this.decideDirectionsForOverlappingNodes(i,s,u),o[0]=Math.min(i.getRight(),s.getRight())-Math.max(i.x,s.x),o[1]=Math.min(i.getBottom(),s.getBottom())-Math.max(i.y,s.y),i.getX()<=s.getX()&&i.getRight()>=s.getRight()?o[0]+=Math.min(s.getX()-i.getX(),i.getRight()-s.getRight()):s.getX()<=i.getX()&&s.getRight()>=i.getRight()&&(o[0]+=Math.min(i.getX()-s.getX(),s.getRight()-i.getRight())),i.getY()<=s.getY()&&i.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-i.getY(),i.getBottom()-s.getBottom()):s.getY()<=i.getY()&&s.getBottom()>=i.getBottom()&&(o[1]+=Math.min(i.getY()-s.getY(),s.getBottom()-i.getBottom()));var h=Math.abs((s.getCenterY()-i.getCenterY())/(s.getCenterX()-i.getCenterX()));s.getCenterY()===i.getCenterY()&&s.getCenterX()===i.getCenterX()&&(h=1);var c=h*o[0],v=o[1]/h;o[0]<v?v=o[0]:c=o[1],o[0]=-1*u[0]*(v/2+l),o[1]=-1*u[1]*(c/2+l)},n.decideDirectionsForOverlappingNodes=function(i,s,o){i.getCenterX()<s.getCenterX()?o[0]=-1:o[0]=1,i.getCenterY()<s.getCenterY()?o[1]=-1:o[1]=1},n.getIntersection2=function(i,s,o){var l=i.getCenterX(),u=i.getCenterY(),h=s.getCenterX(),c=s.getCenterY();if(i.intersects(s))return o[0]=l,o[1]=u,o[2]=h,o[3]=c,!0;var v=i.getX(),d=i.getY(),g=i.getRight(),m=i.getX(),y=i.getBottom(),p=i.getRight(),b=i.getWidthHalf(),E=i.getHeightHalf(),S=s.getX(),w=s.getY(),x=s.getRight(),T=s.getX(),C=s.getBottom(),D=s.getRight(),L=s.getWidthHalf(),O=s.getHeightHalf(),A=!1,I=!1;if(l===h){if(u>c)return o[0]=l,o[1]=d,o[2]=h,o[3]=C,!1;if(u<c)return o[0]=l,o[1]=y,o[2]=h,o[3]=w,!1}else if(u===c){if(l>h)return o[0]=v,o[1]=u,o[2]=x,o[3]=c,!1;if(l<h)return o[0]=g,o[1]=u,o[2]=S,o[3]=c,!1}else{var M=i.height/i.width,P=s.height/s.width,R=(c-u)/(h-l),k=void 0,B=void 0,F=void 0,U=void 0,V=void 0,G=void 0;if(-M===R?l>h?(o[0]=m,o[1]=y,A=!0):(o[0]=g,o[1]=d,A=!0):M===R&&(l>h?(o[0]=v,o[1]=d,A=!0):(o[0]=p,o[1]=y,A=!0)),-P===R?h>l?(o[2]=T,o[3]=C,I=!0):(o[2]=x,o[3]=w,I=!0):P===R&&(h>l?(o[2]=S,o[3]=w,I=!0):(o[2]=D,o[3]=C,I=!0)),A&&I)return!1;if(l>h?u>c?(k=this.getCardinalDirection(M,R,4),B=this.getCardinalDirection(P,R,2)):(k=this.getCardinalDirection(-M,R,3),B=this.getCardinalDirection(-P,R,1)):u>c?(k=this.getCardinalDirection(-M,R,1),B=this.getCardinalDirection(-P,R,3)):(k=this.getCardinalDirection(M,R,2),B=this.getCardinalDirection(P,R,4)),!A)switch(k){case 1:U=d,F=l+-E/R,o[0]=F,o[1]=U;break;case 2:F=p,U=u+b*R,o[0]=F,o[1]=U;break;case 3:U=y,F=l+E/R,o[0]=F,o[1]=U;break;case 4:F=m,U=u+-b*R,o[0]=F,o[1]=U;break}if(!I)switch(B){case 1:G=w,V=h+-O/R,o[2]=V,o[3]=G;break;case 2:V=D,G=c+L*R,o[2]=V,o[3]=G;break;case 3:G=C,V=h+O/R,o[2]=V,o[3]=G;break;case 4:V=T,G=c+-L*R,o[2]=V,o[3]=G;break}}return!1},n.getCardinalDirection=function(i,s,o){return i>s?o:1+o%4},n.getIntersection=function(i,s,o,l){if(l==null)return this.getIntersection2(i,s,o);var u=i.x,h=i.y,c=s.x,v=s.y,d=o.x,g=o.y,m=l.x,y=l.y,p=void 0,b=void 0,E=void 0,S=void 0,w=void 0,x=void 0,T=void 0,C=void 0,D=void 0;return E=v-h,w=u-c,T=c*h-u*v,S=y-g,x=d-m,C=m*g-d*y,D=E*x-S*w,D===0?null:(p=(w*C-x*T)/D,b=(S*T-E*C)/D,new a(p,b))},n.angleOfVector=function(i,s,o,l){var u=void 0;return i!==o?(u=Math.atan((l-s)/(o-i)),o<i?u+=Math.PI:l<s&&(u+=this.TWO_PI)):l<s?u=this.ONE_AND_HALF_PI:u=this.HALF_PI,u},n.doIntersect=function(i,s,o,l){var u=i.x,h=i.y,c=s.x,v=s.y,d=o.x,g=o.y,m=l.x,y=l.y,p=(c-u)*(y-g)-(m-d)*(v-h);if(p===0)return!1;var b=((y-g)*(m-u)+(d-m)*(y-h))/p,E=((h-v)*(m-u)+(c-u)*(y-h))/p;return 0<b&&b<1&&0<E&&E<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,r){"use strict";function a(){}f(a,"IMath"),a.sign=function(n){return n>0?1:n<0?-1:0},a.floor=function(n){return n<0?Math.ceil(n):Math.floor(n)},a.ceil=function(n){return n<0?Math.floor(n):Math.ceil(n)},t.exports=a},function(t,e,r){"use strict";function a(){}f(a,"Integer"),a.MAX_VALUE=2147483647,a.MIN_VALUE=-2147483648,t.exports=a},function(t,e,r){"use strict";var a=function(){function u(h,c){for(var v=0;v<c.length;v++){var d=c[v];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return f(u,"defineProperties"),function(h,c,v){return c&&u(h.prototype,c),v&&u(h,v),h}}();function n(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}f(n,"_classCallCheck");var i=f(function(h){return{value:h,next:null,prev:null}},"nodeFrom"),s=f(function(h,c,v,d){return h!==null?h.next=c:d.head=c,v!==null?v.prev=c:d.tail=c,c.prev=h,c.next=v,d.length++,c},"add"),o=f(function(h,c){var v=h.prev,d=h.next;return v!==null?v.next=d:c.head=d,d!==null?d.prev=v:c.tail=v,h.prev=h.next=null,c.length--,h},"_remove"),l=function(){function u(h){var c=this;n(this,u),this.length=0,this.head=null,this.tail=null,h?.forEach(function(v){return c.push(v)})}return f(u,"LinkedList"),a(u,[{key:"size",value:f(function(){return this.length},"size")},{key:"insertBefore",value:f(function(c,v){return s(v.prev,i(c),v,this)},"insertBefore")},{key:"insertAfter",value:f(function(c,v){return s(v,i(c),v.next,this)},"insertAfter")},{key:"insertNodeBefore",value:f(function(c,v){return s(v.prev,c,v,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:f(function(c,v){return s(v,c,v.next,this)},"insertNodeAfter")},{key:"push",value:f(function(c){return s(this.tail,i(c),null,this)},"push")},{key:"unshift",value:f(function(c){return s(null,i(c),this.head,this)},"unshift")},{key:"remove",value:f(function(c){return o(c,this)},"remove")},{key:"pop",value:f(function(){return o(this.tail,this).value},"pop")},{key:"popNode",value:f(function(){return o(this.tail,this)},"popNode")},{key:"shift",value:f(function(){return o(this.head,this).value},"shift")},{key:"shiftNode",value:f(function(){return o(this.head,this)},"shiftNode")},{key:"get_object_at",value:f(function(c){if(c<=this.length()){for(var v=1,d=this.head;v<c;)d=d.next,v++;return d.value}},"get_object_at")},{key:"set_object_at",value:f(function(c,v){if(c<=this.length()){for(var d=1,g=this.head;d<c;)g=g.next,d++;g.value=v}},"set_object_at")}]),u}();t.exports=l},function(t,e,r){"use strict";function a(n,i,s){this.x=null,this.y=null,n==null&&i==null&&s==null?(this.x=0,this.y=0):typeof n=="number"&&typeof i=="number"&&s==null?(this.x=n,this.y=i):n.constructor.name=="Point"&&i==null&&s==null&&(s=n,this.x=s.x,this.y=s.y)}f(a,"Point"),a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.getLocation=function(){return new a(this.x,this.y)},a.prototype.setLocation=function(n,i,s){n.constructor.name=="Point"&&i==null&&s==null?(s=n,this.setLocation(s.x,s.y)):typeof n=="number"&&typeof i=="number"&&s==null&&(parseInt(n)==n&&parseInt(i)==i?this.move(n,i):(this.x=Math.floor(n+.5),this.y=Math.floor(i+.5)))},a.prototype.move=function(n,i){this.x=n,this.y=i},a.prototype.translate=function(n,i){this.x+=n,this.y+=i},a.prototype.equals=function(n){if(n.constructor.name=="Point"){var i=n;return this.x==i.x&&this.y==i.y}return this==n},a.prototype.toString=function(){return new a().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=a},function(t,e,r){"use strict";function a(n,i,s,o){this.x=0,this.y=0,this.width=0,this.height=0,n!=null&&i!=null&&s!=null&&o!=null&&(this.x=n,this.y=i,this.width=s,this.height=o)}f(a,"RectangleD"),a.prototype.getX=function(){return this.x},a.prototype.setX=function(n){this.x=n},a.prototype.getY=function(){return this.y},a.prototype.setY=function(n){this.y=n},a.prototype.getWidth=function(){return this.width},a.prototype.setWidth=function(n){this.width=n},a.prototype.getHeight=function(){return this.height},a.prototype.setHeight=function(n){this.height=n},a.prototype.getRight=function(){return this.x+this.width},a.prototype.getBottom=function(){return this.y+this.height},a.prototype.intersects=function(n){return!(this.getRight()<n.x||this.getBottom()<n.y||n.getRight()<this.x||n.getBottom()<this.y)},a.prototype.getCenterX=function(){return this.x+this.width/2},a.prototype.getMinX=function(){return this.getX()},a.prototype.getMaxX=function(){return this.getX()+this.width},a.prototype.getCenterY=function(){return this.y+this.height/2},a.prototype.getMinY=function(){return this.getY()},a.prototype.getMaxY=function(){return this.getY()+this.height},a.prototype.getWidthHalf=function(){return this.width/2},a.prototype.getHeightHalf=function(){return this.height/2},t.exports=a},function(t,e,r){"use strict";var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function n(){}f(n,"UniqueIDGeneretor"),n.lastID=0,n.createID=function(i){return n.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=n.getString(),n.lastID++),i.uniqueID)},n.getString=function(i){return i==null&&(i=n.lastID),"Object#"+i},n.isPrimitive=function(i){var s=typeof i>"u"?"undefined":a(i);return i==null||s!="object"&&s!="function"},t.exports=n},function(t,e,r){"use strict";function a(d){if(Array.isArray(d)){for(var g=0,m=Array(d.length);g<d.length;g++)m[g]=d[g];return m}else return Array.from(d)}f(a,"_toConsumableArray");var n=r(0),i=r(6),s=r(3),o=r(1),l=r(5),u=r(4),h=r(17),c=r(27);function v(d){c.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,d!=null&&(this.isRemoteUse=d)}f(v,"Layout"),v.RANDOM_SEED=1,v.prototype=Object.create(c.prototype),v.prototype.getGraphManager=function(){return this.graphManager},v.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},v.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},v.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},v.prototype.newGraphManager=function(){var d=new i(this);return this.graphManager=d,d},v.prototype.newGraph=function(d){return new l(null,this.graphManager,d)},v.prototype.newNode=function(d){return new s(this.graphManager,d)},v.prototype.newEdge=function(d){return new o(null,null,d)},v.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},v.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var d;return this.checkLayoutSuccess()?d=!1:d=this.layout(),n.ANIMATE==="during"?!1:(d&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,d)},v.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},v.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var d,g=this.graphManager.getAllEdges(),m=0;m<g.length;m++)d=g[m];for(var y,p=this.graphManager.getRoot().getNodes(),m=0;m<p.length;m++)y=p[m];this.update(this.graphManager.getRoot())}},v.prototype.update=function(d){if(d==null)this.update2();else if(d instanceof s){var g=d;if(g.getChild()!=null)for(var m=g.getChild().getNodes(),y=0;y<m.length;y++)update(m[y]);if(g.vGraphObject!=null){var p=g.vGraphObject;p.update(g)}}else if(d instanceof o){var b=d;if(b.vGraphObject!=null){var E=b.vGraphObject;E.update(b)}}else if(d instanceof l){var S=d;if(S.vGraphObject!=null){var w=S.vGraphObject;w.update(S)}}},v.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},v.prototype.transform=function(d){if(d==null)this.transform(new u(0,0));else{var g=new h,m=this.graphManager.getRoot().updateLeftTop();if(m!=null){g.setWorldOrgX(d.x),g.setWorldOrgY(d.y),g.setDeviceOrgX(m.x),g.setDeviceOrgY(m.y);for(var y=this.getAllNodes(),p,b=0;b<y.length;b++)p=y[b],p.transform(g)}}},v.prototype.positionNodesRandomly=function(d){if(d==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var g,m,y=d.getNodes(),p=0;p<y.length;p++)g=y[p],m=g.getChild(),m==null||m.getNodes().length==0?g.scatter():(this.positionNodesRandomly(m),g.updateBounds())},v.prototype.getFlatForest=function(){for(var d=[],g=!0,m=this.graphManager.getRoot().getNodes(),y=!0,p=0;p<m.length;p++)m[p].getChild()!=null&&(y=!1);if(!y)return d;var b=new Set,E=[],S=new Map,w=[];for(w=w.concat(m);w.length>0&&g;){for(E.push(w[0]);E.length>0&&g;){var x=E[0];E.splice(0,1),b.add(x);for(var T=x.getEdges(),p=0;p<T.length;p++){var C=T[p].getOtherEnd(x);if(S.get(x)!=C)if(!b.has(C))E.push(C),S.set(C,x);else{g=!1;break}}}if(!g)d=[];else{var D=[].concat(a(b));d.push(D);for(var p=0;p<D.length;p++){var L=D[p],O=w.indexOf(L);O>-1&&w.splice(O,1)}b=new Set,S=new Map}}return d},v.prototype.createDummyNodesForBendpoints=function(d){for(var g=[],m=d.source,y=this.graphManager.calcLowestCommonAncestor(d.source,d.target),p=0;p<d.bendpoints.length;p++){var b=this.newNode(null);b.setRect(new Point(0,0),new Dimension(1,1)),y.add(b);var E=this.newEdge(null);this.graphManager.add(E,m,b),g.add(b),m=b}var E=this.newEdge(null);return this.graphManager.add(E,m,d.target),this.edgeToDummyNodes.set(d,g),d.isInterGraph()?this.graphManager.remove(d):y.remove(d),g},v.prototype.createBendpointsFromDummyNodes=function(){var d=[];d=d.concat(this.graphManager.getAllEdges()),d=[].concat(a(this.edgeToDummyNodes.keys())).concat(d);for(var g=0;g<d.length;g++){var m=d[g];if(m.bendpoints.length>0){for(var y=this.edgeToDummyNodes.get(m),p=0;p<y.length;p++){var b=y[p],E=new u(b.getCenterX(),b.getCenterY()),S=m.bendpoints.get(p);S.x=E.x,S.y=E.y,b.getOwner().remove(b)}this.graphManager.add(m,m.source,m.target)}}},v.transform=function(d,g,m,y){if(m!=null&&y!=null){var p=g;if(d<=50){var b=g/m;p-=(g-b)/50*(50-d)}else{var E=g*y;p+=(E-g)/50*(d-50)}return p}else{var S,w;return d<=50?(S=9*g/500,w=g/10):(S=9*g/50,w=-8*g),S*d+w}},v.findCenterOfTree=function(d){var g=[];g=g.concat(d);var m=[],y=new Map,p=!1,b=null;(g.length==1||g.length==2)&&(p=!0,b=g[0]);for(var E=0;E<g.length;E++){var S=g[E],w=S.getNeighborsList().size;y.set(S,S.getNeighborsList().size),w==1&&m.push(S)}var x=[];for(x=x.concat(m);!p;){var T=[];T=T.concat(x),x=[];for(var E=0;E<g.length;E++){var S=g[E],C=g.indexOf(S);C>=0&&g.splice(C,1);var D=S.getNeighborsList();D.forEach(function(A){if(m.indexOf(A)<0){var I=y.get(A),M=I-1;M==1&&x.push(A),y.set(A,M)}})}m=m.concat(x),(g.length==1||g.length==2)&&(p=!0,b=g[0])}return b},v.prototype.setGraphManager=function(d){this.graphManager=d},t.exports=v},function(t,e,r){"use strict";function a(){}f(a,"RandomSeed"),a.seed=1,a.x=0,a.nextDouble=function(){return a.x=Math.sin(a.seed++)*1e4,a.x-Math.floor(a.x)},t.exports=a},function(t,e,r){"use strict";var a=r(4);function n(i,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}f(n,"Transform"),n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(i){this.lworldExtX=i},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(i){this.lworldExtY=i},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},n.prototype.transformX=function(i){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/o),s},n.prototype.transformY=function(i){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/o),s},n.prototype.inverseTransformX=function(i){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/o),s},n.prototype.inverseTransformY=function(i){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/o),s},n.prototype.inverseTransformPoint=function(i){var s=new a(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return s},t.exports=n},function(t,e,r){"use strict";function a(c){if(Array.isArray(c)){for(var v=0,d=Array(c.length);v<c.length;v++)d[v]=c[v];return d}else return Array.from(c)}f(a,"_toConsumableArray");var n=r(15),i=r(7),s=r(0),o=r(8),l=r(9);function u(){n.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}f(u,"FDLayout"),u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var c,v,d,g,m,y,p=this.getGraphManager().getAllEdges(),b=0;b<p.length;b++)c=p[b],c.idealLength=this.idealEdgeLength,c.isInterGraph&&(d=c.getSource(),g=c.getTarget(),m=c.getSourceInLca().getEstimatedSize(),y=c.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(c.idealLength+=m+y-2*s.SIMPLE_NODE_SIZE),v=c.getLca().getInclusionTreeDepth(),c.idealLength+=i.DEFAULT_EDGE_LENGTH*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+g.getInclusionTreeDepth()-2*v))},u.prototype.initSpringEmbedder=function(){var c=this.getAllNodes().length;this.incremental?(c>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(c-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(c>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(c-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var c=this.getAllEdges(),v,d=0;d<c.length;d++)v=c[d],this.calcSpringForce(v,v.idealLength)},u.prototype.calcRepulsionForces=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d,g,m,y,p=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&c&&this.updateGrid(),b=new Set,d=0;d<p.length;d++)m=p[d],this.calculateRepulsionForceOfANode(m,b,c,v),b.add(m);else for(d=0;d<p.length;d++)for(m=p[d],g=d+1;g<p.length;g++)y=p[g],m.getOwner()==y.getOwner()&&this.calcRepulsionForce(m,y)},u.prototype.calcGravitationalForces=function(){for(var c,v=this.getAllNodesToApplyGravitation(),d=0;d<v.length;d++)c=v[d],this.calcGravitationalForce(c)},u.prototype.moveNodes=function(){for(var c=this.getAllNodes(),v,d=0;d<c.length;d++)v=c[d],v.move()},u.prototype.calcSpringForce=function(c,v){var d=c.getSource(),g=c.getTarget(),m,y,p,b;if(this.uniformLeafNodeSizes&&d.getChild()==null&&g.getChild()==null)c.updateLengthSimple();else if(c.updateLength(),c.isOverlapingSourceAndTarget)return;m=c.getLength(),m!=0&&(y=this.springConstant*(m-v),p=y*(c.lengthX/m),b=y*(c.lengthY/m),d.springForceX+=p,d.springForceY+=b,g.springForceX-=p,g.springForceY-=b)},u.prototype.calcRepulsionForce=function(c,v){var d=c.getRect(),g=v.getRect(),m=new Array(2),y=new Array(4),p,b,E,S,w,x,T;if(d.intersects(g)){o.calcSeparationAmount(d,g,m,i.DEFAULT_EDGE_LENGTH/2),x=2*m[0],T=2*m[1];var C=c.noOfChildren*v.noOfChildren/(c.noOfChildren+v.noOfChildren);c.repulsionForceX-=C*x,c.repulsionForceY-=C*T,v.repulsionForceX+=C*x,v.repulsionForceY+=C*T}else this.uniformLeafNodeSizes&&c.getChild()==null&&v.getChild()==null?(p=g.getCenterX()-d.getCenterX(),b=g.getCenterY()-d.getCenterY()):(o.getIntersection(d,g,y),p=y[2]-y[0],b=y[3]-y[1]),Math.abs(p)<i.MIN_REPULSION_DIST&&(p=l.sign(p)*i.MIN_REPULSION_DIST),Math.abs(b)<i.MIN_REPULSION_DIST&&(b=l.sign(b)*i.MIN_REPULSION_DIST),E=p*p+b*b,S=Math.sqrt(E),w=this.repulsionConstant*c.noOfChildren*v.noOfChildren/E,x=w*p/S,T=w*b/S,c.repulsionForceX-=x,c.repulsionForceY-=T,v.repulsionForceX+=x,v.repulsionForceY+=T},u.prototype.calcGravitationalForce=function(c){var v,d,g,m,y,p,b,E;v=c.getOwner(),d=(v.getRight()+v.getLeft())/2,g=(v.getTop()+v.getBottom())/2,m=c.getCenterX()-d,y=c.getCenterY()-g,p=Math.abs(m)+c.getWidth()/2,b=Math.abs(y)+c.getHeight()/2,c.getOwner()==this.graphManager.getRoot()?(E=v.getEstimatedSize()*this.gravityRangeFactor,(p>E||b>E)&&(c.gravitationForceX=-this.gravityConstant*m,c.gravitationForceY=-this.gravityConstant*y)):(E=v.getEstimatedSize()*this.compoundGravityRangeFactor,(p>E||b>E)&&(c.gravitationForceX=-this.gravityConstant*m*this.compoundGravityConstant,c.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var c,v=!1;return this.totalIterations>this.maxIterations/3&&(v=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),c=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,c||v},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var c,v=this.graphManager.getAllNodes(),d=0;d<v.length;d++)c=v[d],c.noOfChildren=c.getNoOfChildren()},u.prototype.calcGrid=function(c){var v=0,d=0;v=parseInt(Math.ceil((c.getRight()-c.getLeft())/this.repulsionRange)),d=parseInt(Math.ceil((c.getBottom()-c.getTop())/this.repulsionRange));for(var g=new Array(v),m=0;m<v;m++)g[m]=new Array(d);for(var m=0;m<v;m++)for(var y=0;y<d;y++)g[m][y]=new Array;return g},u.prototype.addNodeToGrid=function(c,v,d){var g=0,m=0,y=0,p=0;g=parseInt(Math.floor((c.getRect().x-v)/this.repulsionRange)),m=parseInt(Math.floor((c.getRect().width+c.getRect().x-v)/this.repulsionRange)),y=parseInt(Math.floor((c.getRect().y-d)/this.repulsionRange)),p=parseInt(Math.floor((c.getRect().height+c.getRect().y-d)/this.repulsionRange));for(var b=g;b<=m;b++)for(var E=y;E<=p;E++)this.grid[b][E].push(c),c.setGridCoordinates(g,m,y,p)},u.prototype.updateGrid=function(){var c,v,d=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),c=0;c<d.length;c++)v=d[c],this.addNodeToGrid(v,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(c,v,d,g){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&d||g){var m=new Set;c.surrounding=new Array;for(var y,p=this.grid,b=c.startX-1;b<c.finishX+2;b++)for(var E=c.startY-1;E<c.finishY+2;E++)if(!(b<0||E<0||b>=p.length||E>=p[0].length)){for(var S=0;S<p[b][E].length;S++)if(y=p[b][E][S],!(c.getOwner()!=y.getOwner()||c==y)&&!v.has(y)&&!m.has(y)){var w=Math.abs(c.getCenterX()-y.getCenterX())-(c.getWidth()/2+y.getWidth()/2),x=Math.abs(c.getCenterY()-y.getCenterY())-(c.getHeight()/2+y.getHeight()/2);w<=this.repulsionRange&&x<=this.repulsionRange&&m.add(y)}}c.surrounding=[].concat(a(m))}for(b=0;b<c.surrounding.length;b++)this.calcRepulsionForce(c,c.surrounding[b])},u.prototype.calcRepulsionRange=function(){return 0},t.exports=u},function(t,e,r){"use strict";var a=r(1),n=r(7);function i(o,l,u){a.call(this,o,l,u),this.idealLength=n.DEFAULT_EDGE_LENGTH}f(i,"FDLayoutEdge"),i.prototype=Object.create(a.prototype);for(var s in a)i[s]=a[s];t.exports=i},function(t,e,r){"use strict";var a=r(3);function n(s,o,l,u){a.call(this,s,o,l,u),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=[]}f(n,"FDLayoutNode"),n.prototype=Object.create(a.prototype);for(var i in a)n[i]=a[i];n.prototype.setGridCoordinates=function(s,o,l,u){this.startX=s,this.finishX=o,this.startY=l,this.finishY=u},t.exports=n},function(t,e,r){"use strict";function a(n,i){this.width=0,this.height=0,n!==null&&i!==null&&(this.height=i,this.width=n)}f(a,"DimensionD"),a.prototype.getWidth=function(){return this.width},a.prototype.setWidth=function(n){this.width=n},a.prototype.getHeight=function(){return this.height},a.prototype.setHeight=function(n){this.height=n},t.exports=a},function(t,e,r){"use strict";var a=r(14);function n(){this.map={},this.keys=[]}f(n,"HashMap"),n.prototype.put=function(i,s){var o=a.createID(i);this.contains(o)||(this.map[o]=s,this.keys.push(i))},n.prototype.contains=function(i){var s=a.createID(i);return this.map[i]!=null},n.prototype.get=function(i){var s=a.createID(i);return this.map[s]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,r){"use strict";var a=r(14);function n(){this.set={}}f(n,"HashSet"),n.prototype.add=function(i){var s=a.createID(i);this.contains(s)||(this.set[s]=i)},n.prototype.remove=function(i){delete this.set[a.createID(i)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(i){return this.set[a.createID(i)]==i},n.prototype.isEmpty=function(){return this.size()===0},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(i){for(var s=Object.keys(this.set),o=s.length,l=0;l<o;l++)i.push(this.set[s[l]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(i){for(var s=i.length,o=0;o<s;o++){var l=i[o];this.add(l)}},t.exports=n},function(t,e,r){"use strict";var a=function(){function o(l,u){for(var h=0;h<u.length;h++){var c=u[h];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(l,c.key,c)}}return f(o,"defineProperties"),function(l,u,h){return u&&o(l.prototype,u),h&&o(l,h),l}}();function n(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}f(n,"_classCallCheck");var i=r(11),s=function(){function o(l,u){n(this,o),(u!==null||u!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var h=void 0;l instanceof i?h=l.size():h=l.length,this._quicksort(l,0,h-1)}return f(o,"Quicksort"),a(o,[{key:"_quicksort",value:f(function(u,h,c){if(h<c){var v=this._partition(u,h,c);this._quicksort(u,h,v),this._quicksort(u,v+1,c)}},"_quicksort")},{key:"_partition",value:f(function(u,h,c){for(var v=this._get(u,h),d=h,g=c;;){for(;this.compareFunction(v,this._get(u,g));)g--;for(;this.compareFunction(this._get(u,d),v);)d++;if(d<g)this._swap(u,d,g),d++,g--;else return g}},"_partition")},{key:"_get",value:f(function(u,h){return u instanceof i?u.get_object_at(h):u[h]},"_get")},{key:"_set",value:f(function(u,h,c){u instanceof i?u.set_object_at(h,c):u[h]=c},"_set")},{key:"_swap",value:f(function(u,h,c){var v=this._get(u,h);this._set(u,h,this._get(u,c)),this._set(u,c,v)},"_swap")},{key:"_defaultCompareFunction",value:f(function(u,h){return h>u},"_defaultCompareFunction")}]),o}();t.exports=s},function(t,e,r){"use strict";var a=function(){function s(o,l){for(var u=0;u<l.length;u++){var h=l[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}return f(s,"defineProperties"),function(o,l,u){return l&&s(o.prototype,l),u&&s(o,u),o}}();function n(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}f(n,"_classCallCheck");var i=function(){function s(o,l){var u=arguments.length>2&&arguments[2]!==void 0?ar