UNPKG

mermaid

Version:

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

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