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