f7cloud_client/apps/text/js/cose-bilkent-S5V4N54A-C7c-PUyn.chunk.mjs
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

3 lines
80 KiB
JavaScript

import{_ as W,l as V,d as gt}from"./mermaid.core-BxtrgwOm.chunk.mjs";import{c as tt}from"./cytoscape.esm-D2wQNSMa.chunk.mjs";import{g as lt}from"./emoji-picker-B23JpFV7.chunk.mjs";import"./index-CYtgifWR.chunk.mjs";import"./NcLoadingIcon-zQCGdPwE.chunk.mjs";import"./vue.runtime.esm-fahCO3eG.chunk.mjs";import"./index-DxwFe63_.chunk.mjs";var j={exports:{}},z={exports:{}},q={exports:{}},ut=q.exports,$;function ct(){return $||($=1,(function(x,X){(function(_,L){x.exports=L()})(ut,function(){return(function(_){var L={};function T(n){if(L[n])return L[n].exports;var e=L[n]={i:n,l:!1,exports:{}};return _[n].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=_,T.c=L,T.i=function(n){return n},T.d=function(n,e,t){T.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return T.d(e,"a",e),e},T.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},T.p="",T(T.s=26)})([function(_,L,T){function n(){}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,_.exports=n},function(_,L,T){var n=T(2),e=T(8),t=T(9);function i(a,o,p){n.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=a,this.target=o}i.prototype=Object.create(n.prototype);for(var h in n)i[h]=n[h];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(a){if(this.source===a)return this.target;if(this.target===a)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(a,o){for(var p=this.getOtherEnd(a),r=o.getGraphManager().getRoot();;){if(p.getOwner()==o)return p;if(p.getOwner()==r)break;p=p.getOwner().getParent()}return null},i.prototype.updateLength=function(){var a=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),a),this.isOverlapingSourceAndTarget||(this.lengthX=a[0]-a[2],this.lengthY=a[1]-a[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))},i.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)},_.exports=i},function(_,L,T){function n(e){this.vGraphObject=e}_.exports=n},function(_,L,T){var n=T(2),e=T(10),t=T(13),i=T(0),h=T(16),a=T(4);function o(r,l,g,f){g==null&&f==null&&(f=l),n.call(this,f),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=f,this.edges=[],this.graphManager=r,g!=null&&l!=null?this.rect=new t(l.x,l.y,g.width,g.height):this.rect=new t}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(r){this.rect.width=r},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(r){this.rect.height=r},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 a(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new a(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(r,l){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=l.width,this.rect.height=l.height},o.prototype.setCenter=function(r,l){this.rect.x=r-this.rect.width/2,this.rect.y=l-this.rect.height/2},o.prototype.setLocation=function(r,l){this.rect.x=r,this.rect.y=l},o.prototype.moveBy=function(r,l){this.rect.x+=r,this.rect.y+=l},o.prototype.getEdgeListToNode=function(r){var l=[],g=this;return g.edges.forEach(function(f){if(f.target==r){if(f.source!=g)throw"Incorrect edge source!";l.push(f)}}),l},o.prototype.getEdgesBetween=function(r){var l=[],g=this;return g.edges.forEach(function(f){if(!(f.source==g||f.target==g))throw"Incorrect edge source and/or target";(f.target==r||f.source==r)&&l.push(f)}),l},o.prototype.getNeighborsList=function(){var r=new Set,l=this;return l.edges.forEach(function(g){if(g.source==l)r.add(g.target);else{if(g.target!=l)throw"Incorrect incidency!";r.add(g.source)}}),r},o.prototype.withChildren=function(){var r=new Set,l,g;if(r.add(this),this.child!=null)for(var f=this.child.getNodes(),E=0;E<f.length;E++)l=f[E],g=l.withChildren(),g.forEach(function(y){r.add(y)});return r},o.prototype.getNoOfChildren=function(){var r=0,l;if(this.child==null)r=1;else for(var g=this.child.getNodes(),f=0;f<g.length;f++)l=g[f],r+=l.getNoOfChildren();return r==0&&(r=1),r},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 r,l,g=-i.INITIAL_WORLD_BOUNDARY,f=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+h.nextDouble()*(f-g)+g;var E=-i.INITIAL_WORLD_BOUNDARY,y=i.INITIAL_WORLD_BOUNDARY;l=i.WORLD_CENTER_Y+h.nextDouble()*(y-E)+E,this.rect.x=r,this.rect.y=l},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var l=r.getRight()-r.getLeft(),g=r.getBottom()-r.getTop();this.labelWidth>l&&(this.rect.x-=(this.labelWidth-l)/2,this.setWidth(this.labelWidth)),this.labelHeight>g&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-g)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-g),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(r){var l=this.rect.x;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var g=this.rect.y;g>i.WORLD_BOUNDARY?g=i.WORLD_BOUNDARY:g<-i.WORLD_BOUNDARY&&(g=-i.WORLD_BOUNDARY);var f=new a(l,g),E=r.inverseTransformPoint(f);this.setLocation(E.x,E.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()},_.exports=o},function(_,L,T){function n(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}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},_.exports=n},function(_,L,T){var n=T(2),e=T(10),t=T(0),i=T(6),h=T(3),a=T(1),o=T(13),p=T(12),r=T(11);function l(f,E,y){n.call(this,y),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=f,E!=null&&E instanceof i?this.graphManager=E:E!=null&&E instanceof Layout&&(this.graphManager=E.graphManager)}l.prototype=Object.create(n.prototype);for(var g in n)l[g]=n[g];l.prototype.getNodes=function(){return this.nodes},l.prototype.getEdges=function(){return this.edges},l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getParent=function(){return this.parent},l.prototype.getLeft=function(){return this.left},l.prototype.getRight=function(){return this.right},l.prototype.getTop=function(){return this.top},l.prototype.getBottom=function(){return this.bottom},l.prototype.isConnected=function(){return this.isConnected},l.prototype.add=function(f,E,y){if(E==null&&y==null){var d=f;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(d)>-1)throw"Node already in graph!";return d.owner=this,this.getNodes().push(d),d}else{var N=f;if(!(this.getNodes().indexOf(E)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(E.owner==y.owner&&E.owner==this))throw"Both owners must be this graph!";return E.owner!=y.owner?null:(N.source=E,N.target=y,N.isInterGraph=!1,this.getEdges().push(N),E.edges.push(N),y!=E&&y.edges.push(N),N)}},l.prototype.remove=function(f){var E=f;if(f instanceof h){if(E==null)throw"Node is null!";if(!(E.owner!=null&&E.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=E.edges.slice(),d,N=y.length,v=0;v<N;v++)d=y[v],d.isInterGraph?this.graphManager.remove(d):d.source.owner.remove(d);var I=this.nodes.indexOf(E);if(I==-1)throw"Node not in owner node list!";this.nodes.splice(I,1)}else if(f instanceof a){var d=f;if(d==null)throw"Edge is null!";if(!(d.source!=null&&d.target!=null))throw"Source and/or target is null!";if(!(d.source.owner!=null&&d.target.owner!=null&&d.source.owner==this&&d.target.owner==this))throw"Source and/or target owner is invalid!";var s=d.source.edges.indexOf(d),u=d.target.edges.indexOf(d);if(!(s>-1&&u>-1))throw"Source and/or target doesn't know this edge!";d.source.edges.splice(s,1),d.target!=d.source&&d.target.edges.splice(u,1);var I=d.source.owner.getEdges().indexOf(d);if(I==-1)throw"Not in owner's edge list!";d.source.owner.getEdges().splice(I,1)}},l.prototype.updateLeftTop=function(){for(var f=e.MAX_VALUE,E=e.MAX_VALUE,y,d,N,v=this.getNodes(),I=v.length,s=0;s<I;s++){var u=v[s];y=u.getTop(),d=u.getLeft(),f>y&&(f=y),E>d&&(E=d)}return f==e.MAX_VALUE?null:(v[0].getParent().paddingLeft!=null?N=v[0].getParent().paddingLeft:N=this.margin,this.left=E-N,this.top=f-N,new p(this.left,this.top))},l.prototype.updateBounds=function(f){for(var E=e.MAX_VALUE,y=-e.MAX_VALUE,d=e.MAX_VALUE,N=-e.MAX_VALUE,v,I,s,u,c,A=this.nodes,m=A.length,O=0;O<m;O++){var D=A[O];f&&D.child!=null&&D.updateBounds(),v=D.getLeft(),I=D.getRight(),s=D.getTop(),u=D.getBottom(),E>v&&(E=v),y<I&&(y=I),d>s&&(d=s),N<u&&(N=u)}var w=new o(E,d,y-E,N-d);E==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),A[0].getParent().paddingLeft!=null?c=A[0].getParent().paddingLeft:c=this.margin,this.left=w.x-c,this.right=w.x+w.width+c,this.top=w.y-c,this.bottom=w.y+w.height+c},l.calculateBounds=function(f){for(var E=e.MAX_VALUE,y=-e.MAX_VALUE,d=e.MAX_VALUE,N=-e.MAX_VALUE,v,I,s,u,c=f.length,A=0;A<c;A++){var m=f[A];v=m.getLeft(),I=m.getRight(),s=m.getTop(),u=m.getBottom(),E>v&&(E=v),y<I&&(y=I),d>s&&(d=s),N<u&&(N=u)}var O=new o(E,d,y-E,N-d);return O},l.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){for(var f=0,E=this.nodes,y=E.length,d=0;d<y;d++){var N=E[d];f+=N.calcEstimatedSize()}return f==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=f/Math.sqrt(this.nodes.length),this.estimatedSize},l.prototype.updateConnected=function(){var f=this;if(this.nodes.length==0){this.isConnected=!0;return}var E=new r,y=new Set,d=this.nodes[0],N,v,I=d.withChildren();for(I.forEach(function(O){E.push(O),y.add(O)});E.length!==0;){d=E.shift(),N=d.getEdges();for(var s=N.length,u=0;u<s;u++){var c=N[u];if(v=c.getOtherEndInGraph(d,this),v!=null&&!y.has(v)){var A=v.withChildren();A.forEach(function(O){E.push(O),y.add(O)})}}}if(this.isConnected=!1,y.size>=this.nodes.length){var m=0;y.forEach(function(O){O.owner==f&&m++}),m==this.nodes.length&&(this.isConnected=!0)}},_.exports=l},function(_,L,T){var n,e=T(1);function t(i){n=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),h=this.layout.newNode(null),a=this.add(i,h);return this.setRootGraph(a),this.rootGraph},t.prototype.add=function(i,h,a,o,p){if(a==null&&o==null&&p==null){if(i==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return i.parent=h,h.child=i,i}else{p=a,o=h,a=i;var r=o.getOwner(),l=p.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(l!=null&&l.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==l)return a.isInterGraph=!1,r.add(a,o,p);if(a.isInterGraph=!0,a.source=o,a.target=p,this.edges.indexOf(a)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(a),!(a.source!=null&&a.target!=null))throw"Edge source and/or target is null!";if(!(a.source.edges.indexOf(a)==-1&&a.target.edges.indexOf(a)==-1))throw"Edge already in source and/or target incidency list!";return a.source.edges.push(a),a.target.edges.push(a),a}},t.prototype.remove=function(i){if(i instanceof n){var h=i;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var a=[];a=a.concat(h.getEdges());for(var o,p=a.length,r=0;r<p;r++)o=a[r],h.remove(o);var l=[];l=l.concat(h.getNodes());var g;p=l.length;for(var r=0;r<p;r++)g=l[r],h.remove(g);h==this.rootGraph&&this.setRootGraph(null);var f=this.graphs.indexOf(h);this.graphs.splice(f,1),h.parent=null}else if(i instanceof e){if(o=i,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 f=o.source.edges.indexOf(o);if(o.source.edges.splice(f,1),f=o.target.edges.indexOf(o),o.target.edges.splice(f,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 f=o.source.owner.getGraphManager().edges.indexOf(o);o.source.owner.getGraphManager().edges.splice(f,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 i=[],h=this.getGraphs(),a=h.length,o=0;o<a;o++)i=i.concat(h[o].getNodes());this.allNodes=i}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){var i=[],h=this.getGraphs();h.length;for(var a=0;a<h.length;a++)i=i.concat(h[a].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,h){if(!(i!=null&&h!=null))throw"assert failed";if(i==h)return!0;var a=i.getOwner(),o;do{if(o=a.getParent(),o==null)break;if(o==h)return!0;if(a=o.getOwner(),a==null)break}while(!0);a=h.getOwner();do{if(o=a.getParent(),o==null)break;if(o==i)return!0;if(a=o.getOwner(),a==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,h,a,o,p,r=this.getAllEdges(),l=r.length,g=0;g<l;g++){if(i=r[g],h=i.source,a=i.target,i.lca=null,i.sourceInLca=h,i.targetInLca=a,h==a){i.lca=h.getOwner();continue}for(o=h.getOwner();i.lca==null;){for(i.targetInLca=a,p=a.getOwner();i.lca==null;){if(p==o){i.lca=p;break}if(p==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=p.getParent(),p=i.targetInLca.getOwner()}if(o==this.rootGraph)break;i.lca==null&&(i.sourceInLca=o.getParent(),o=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,h){if(i==h)return i.getOwner();var a=i.getOwner();do{if(a==null)break;var o=h.getOwner();do{if(o==null)break;if(o==a)return o;o=o.getParent().getOwner()}while(!0);a=a.getParent().getOwner()}while(!0);return a},t.prototype.calcInclusionTreeDepths=function(i,h){i==null&&h==null&&(i=this.rootGraph,h=1);for(var a,o=i.getNodes(),p=o.length,r=0;r<p;r++)a=o[r],a.inclusionTreeDepth=h,a.child!=null&&this.calcInclusionTreeDepths(a.child,h+1)},t.prototype.includesInvalidEdge=function(){for(var i,h=this.edges.length,a=0;a<h;a++)if(i=this.edges[a],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},_.exports=t},function(_,L,T){var n=T(0);function e(){}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,_.exports=e},function(_,L,T){var n=T(12);function e(){}e.calcSeparationAmount=function(t,i,h,a){if(!t.intersects(i))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,o),h[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),h[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?h[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(h[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?h[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(h[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var p=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(p=1);var r=p*h[0],l=h[1]/p;h[0]<l?l=h[0]:r=h[1],h[0]=-1*o[0]*(l/2+a),h[1]=-1*o[1]*(r/2+a)},e.decideDirectionsForOverlappingNodes=function(t,i,h){t.getCenterX()<i.getCenterX()?h[0]=-1:h[0]=1,t.getCenterY()<i.getCenterY()?h[1]=-1:h[1]=1},e.getIntersection2=function(t,i,h){var a=t.getCenterX(),o=t.getCenterY(),p=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return h[0]=a,h[1]=o,h[2]=p,h[3]=r,!0;var l=t.getX(),g=t.getY(),f=t.getRight(),E=t.getX(),y=t.getBottom(),d=t.getRight(),N=t.getWidthHalf(),v=t.getHeightHalf(),I=i.getX(),s=i.getY(),u=i.getRight(),c=i.getX(),A=i.getBottom(),m=i.getRight(),O=i.getWidthHalf(),D=i.getHeightHalf(),w=!1,R=!1;if(a===p){if(o>r)return h[0]=a,h[1]=g,h[2]=p,h[3]=A,!1;if(o<r)return h[0]=a,h[1]=y,h[2]=p,h[3]=s,!1}else if(o===r){if(a>p)return h[0]=l,h[1]=o,h[2]=u,h[3]=r,!1;if(a<p)return h[0]=f,h[1]=o,h[2]=I,h[3]=r,!1}else{var F=t.height/t.width,b=i.height/i.width,C=(r-o)/(p-a),M=void 0,G=void 0,P=void 0,S=void 0,U=void 0,Y=void 0;if(-F===C?a>p?(h[0]=E,h[1]=y,w=!0):(h[0]=f,h[1]=g,w=!0):F===C&&(a>p?(h[0]=l,h[1]=g,w=!0):(h[0]=d,h[1]=y,w=!0)),-b===C?p>a?(h[2]=c,h[3]=A,R=!0):(h[2]=u,h[3]=s,R=!0):b===C&&(p>a?(h[2]=I,h[3]=s,R=!0):(h[2]=m,h[3]=A,R=!0)),w&&R)return!1;if(a>p?o>r?(M=this.getCardinalDirection(F,C,4),G=this.getCardinalDirection(b,C,2)):(M=this.getCardinalDirection(-F,C,3),G=this.getCardinalDirection(-b,C,1)):o>r?(M=this.getCardinalDirection(-F,C,1),G=this.getCardinalDirection(-b,C,3)):(M=this.getCardinalDirection(F,C,2),G=this.getCardinalDirection(b,C,4)),!w)switch(M){case 1:S=g,P=a+-v/C,h[0]=P,h[1]=S;break;case 2:P=d,S=o+N*C,h[0]=P,h[1]=S;break;case 3:S=y,P=a+v/C,h[0]=P,h[1]=S;break;case 4:P=E,S=o+-N*C,h[0]=P,h[1]=S;break}if(!R)switch(G){case 1:Y=s,U=p+-D/C,h[2]=U,h[3]=Y;break;case 2:U=m,Y=r+O*C,h[2]=U,h[3]=Y;break;case 3:Y=A,U=p+D/C,h[2]=U,h[3]=Y;break;case 4:U=c,Y=r+-O*C,h[2]=U,h[3]=Y;break}}return!1},e.getCardinalDirection=function(t,i,h){return t>i?h:1+h%4},e.getIntersection=function(t,i,h,a){if(a==null)return this.getIntersection2(t,i,h);var o=t.x,p=t.y,r=i.x,l=i.y,g=h.x,f=h.y,E=a.x,y=a.y,d=void 0,N=void 0,v=void 0,I=void 0,s=void 0,u=void 0,c=void 0,A=void 0,m=void 0;return v=l-p,s=o-r,c=r*p-o*l,I=y-f,u=g-E,A=E*f-g*y,m=v*u-I*s,m===0?null:(d=(s*A-u*c)/m,N=(I*c-v*A)/m,new n(d,N))},e.angleOfVector=function(t,i,h,a){var o=void 0;return t!==h?(o=Math.atan((a-i)/(h-t)),h<t?o+=Math.PI:a<i&&(o+=this.TWO_PI)):a<i?o=this.ONE_AND_HALF_PI:o=this.HALF_PI,o},e.doIntersect=function(t,i,h,a){var o=t.x,p=t.y,r=i.x,l=i.y,g=h.x,f=h.y,E=a.x,y=a.y,d=(r-o)*(y-f)-(E-g)*(l-p);if(d===0)return!1;var N=((y-f)*(E-o)+(g-E)*(y-p))/d,v=((p-l)*(E-o)+(r-o)*(y-p))/d;return 0<N&&N<1&&0<v&&v<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,_.exports=e},function(_,L,T){function n(){}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)},_.exports=n},function(_,L,T){function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,_.exports=n},function(_,L,T){var n=(function(){function o(p,r){for(var l=0;l<r.length;l++){var g=r[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,r,l){return r&&o(p.prototype,r),l&&o(p,l),p}})();function e(o,p){if(!(o instanceof p))throw new TypeError("Cannot call a class as a function")}var t=function(o){return{value:o,next:null,prev:null}},i=function(o,p,r,l){return o!==null?o.next=p:l.head=p,r!==null?r.prev=p:l.tail=p,p.prev=o,p.next=r,l.length++,p},h=function(o,p){var r=o.prev,l=o.next;return r!==null?r.next=l:p.head=l,l!==null?l.prev=r:p.tail=r,o.prev=o.next=null,p.length--,o},a=(function(){function o(p){var r=this;e(this,o),this.length=0,this.head=null,this.tail=null,p?.forEach(function(l){return r.push(l)})}return n(o,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(p,r){return i(r.prev,t(p),r,this)}},{key:"insertAfter",value:function(p,r){return i(r,t(p),r.next,this)}},{key:"insertNodeBefore",value:function(p,r){return i(r.prev,p,r,this)}},{key:"insertNodeAfter",value:function(p,r){return i(r,p,r.next,this)}},{key:"push",value:function(p){return i(this.tail,t(p),null,this)}},{key:"unshift",value:function(p){return i(null,t(p),this.head,this)}},{key:"remove",value:function(p){return h(p,this)}},{key:"pop",value:function(){return h(this.tail,this).value}},{key:"popNode",value:function(){return h(this.tail,this)}},{key:"shift",value:function(){return h(this.head,this).value}},{key:"shiftNode",value:function(){return h(this.head,this)}},{key:"get_object_at",value:function(p){if(p<=this.length()){for(var r=1,l=this.head;r<p;)l=l.next,r++;return l.value}}},{key:"set_object_at",value:function(p,r){if(p<=this.length()){for(var l=1,g=this.head;l<p;)g=g.next,l++;g.value=r}}}]),o})();_.exports=a},function(_,L,T){function n(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}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,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==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+"]"},_.exports=n},function(_,L,T){function n(e,t,i,h){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&h!=null&&(this.x=e,this.y=t,this.width=i,this.height=h)}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},_.exports=n},function(_,L,T){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(){}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 i=typeof t>"u"?"undefined":n(t);return t==null||i!="object"&&i!="function"},_.exports=e},function(_,L,T){function n(g){if(Array.isArray(g)){for(var f=0,E=Array(g.length);f<g.length;f++)E[f]=g[f];return E}else return Array.from(g)}var e=T(0),t=T(6),i=T(3),h=T(1),a=T(5),o=T(4),p=T(17),r=T(27);function l(g){r.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,g!=null&&(this.isRemoteUse=g)}l.RANDOM_SEED=1,l.prototype=Object.create(r.prototype),l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},l.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},l.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},l.prototype.newGraphManager=function(){var g=new t(this);return this.graphManager=g,g},l.prototype.newGraph=function(g){return new a(null,this.graphManager,g)},l.prototype.newNode=function(g){return new i(this.graphManager,g)},l.prototype.newEdge=function(g){return new h(null,null,g)},l.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},l.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var g;return this.checkLayoutSuccess()?g=!1:g=this.layout(),e.ANIMATE==="during"?!1:(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},l.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},l.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),f=0;f<g.length;f++)g[f];for(var E=this.graphManager.getRoot().getNodes(),f=0;f<E.length;f++)E[f];this.update(this.graphManager.getRoot())}},l.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof i){var f=g;if(f.getChild()!=null)for(var E=f.getChild().getNodes(),y=0;y<E.length;y++)update(E[y]);if(f.vGraphObject!=null){var d=f.vGraphObject;d.update(f)}}else if(g instanceof h){var N=g;if(N.vGraphObject!=null){var v=N.vGraphObject;v.update(N)}}else if(g instanceof a){var I=g;if(I.vGraphObject!=null){var s=I.vGraphObject;s.update(I)}}},l.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)},l.prototype.transform=function(g){if(g==null)this.transform(new o(0,0));else{var f=new p,E=this.graphManager.getRoot().updateLeftTop();if(E!=null){f.setWorldOrgX(g.x),f.setWorldOrgY(g.y),f.setDeviceOrgX(E.x),f.setDeviceOrgY(E.y);for(var y=this.getAllNodes(),d,N=0;N<y.length;N++)d=y[N],d.transform(f)}}},l.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var f,E,y=g.getNodes(),d=0;d<y.length;d++)f=y[d],E=f.getChild(),E==null||E.getNodes().length==0?f.scatter():(this.positionNodesRandomly(E),f.updateBounds())},l.prototype.getFlatForest=function(){for(var g=[],f=!0,E=this.graphManager.getRoot().getNodes(),y=!0,d=0;d<E.length;d++)E[d].getChild()!=null&&(y=!1);if(!y)return g;var N=new Set,v=[],I=new Map,s=[];for(s=s.concat(E);s.length>0&&f;){for(v.push(s[0]);v.length>0&&f;){var u=v[0];v.splice(0,1),N.add(u);for(var c=u.getEdges(),d=0;d<c.length;d++){var A=c[d].getOtherEnd(u);if(I.get(u)!=A)if(!N.has(A))v.push(A),I.set(A,u);else{f=!1;break}}}if(!f)g=[];else{var m=[].concat(n(N));g.push(m);for(var d=0;d<m.length;d++){var O=m[d],D=s.indexOf(O);D>-1&&s.splice(D,1)}N=new Set,I=new Map}}return g},l.prototype.createDummyNodesForBendpoints=function(g){for(var f=[],E=g.source,y=this.graphManager.calcLowestCommonAncestor(g.source,g.target),d=0;d<g.bendpoints.length;d++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),y.add(N);var v=this.newEdge(null);this.graphManager.add(v,E,N),f.add(N),E=N}var v=this.newEdge(null);return this.graphManager.add(v,E,g.target),this.edgeToDummyNodes.set(g,f),g.isInterGraph()?this.graphManager.remove(g):y.remove(g),f},l.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(n(this.edgeToDummyNodes.keys())).concat(g);for(var f=0;f<g.length;f++){var E=g[f];if(E.bendpoints.length>0){for(var y=this.edgeToDummyNodes.get(E),d=0;d<y.length;d++){var N=y[d],v=new o(N.getCenterX(),N.getCenterY()),I=E.bendpoints.get(d);I.x=v.x,I.y=v.y,N.getOwner().remove(N)}this.graphManager.add(E,E.source,E.target)}}},l.transform=function(g,f,E,y){if(E!=null&&y!=null){var d=f;if(g<=50){var N=f/E;d-=(f-N)/50*(50-g)}else{var v=f*y;d+=(v-f)/50*(g-50)}return d}else{var I,s;return g<=50?(I=9*f/500,s=f/10):(I=9*f/50,s=-8*f),I*g+s}},l.findCenterOfTree=function(g){var f=[];f=f.concat(g);var E=[],y=new Map,d=!1,N=null;(f.length==1||f.length==2)&&(d=!0,N=f[0]);for(var v=0;v<f.length;v++){var I=f[v],s=I.getNeighborsList().size;y.set(I,I.getNeighborsList().size),s==1&&E.push(I)}var u=[];for(u=u.concat(E);!d;){var c=[];c=c.concat(u),u=[];for(var v=0;v<f.length;v++){var I=f[v],A=f.indexOf(I);A>=0&&f.splice(A,1);var m=I.getNeighborsList();m.forEach(function(w){if(E.indexOf(w)<0){var R=y.get(w),F=R-1;F==1&&u.push(w),y.set(w,F)}})}E=E.concat(u),(f.length==1||f.length==2)&&(d=!0,N=f[0])}return N},l.prototype.setGraphManager=function(g){this.graphManager=g},_.exports=l},function(_,L,T){function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},_.exports=n},function(_,L,T){var n=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}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 i=0,h=this.lworldExtX;return h!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/h),i},e.prototype.transformY=function(t){var i=0,h=this.lworldExtY;return h!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/h),i},e.prototype.inverseTransformX=function(t){var i=0,h=this.ldeviceExtX;return h!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/h),i},e.prototype.inverseTransformY=function(t){var i=0,h=this.ldeviceExtY;return h!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/h),i},e.prototype.inverseTransformPoint=function(t){var i=new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},_.exports=e},function(_,L,T){function n(r){if(Array.isArray(r)){for(var l=0,g=Array(r.length);l<r.length;l++)g[l]=r[l];return g}else return Array.from(r)}var e=T(15),t=T(7),i=T(0),h=T(8),a=T(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}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 r,l,g,f,E,y,d=this.getGraphManager().getAllEdges(),N=0;N<d.length;N++)r=d[N],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(g=r.getSource(),f=r.getTarget(),E=r.getSourceInLca().getEstimatedSize(),y=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=E+y-2*i.SIMPLE_NODE_SIZE),l=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*l))},o.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-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):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-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 r=this.getAllEdges(),l,g=0;g<r.length;g++)l=r[g],this.calcSpringForce(l,l.idealLength)},o.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g,f,E,y,d=this.getAllNodes(),N;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),N=new Set,g=0;g<d.length;g++)E=d[g],this.calculateRepulsionForceOfANode(E,N,r,l),N.add(E);else for(g=0;g<d.length;g++)for(E=d[g],f=g+1;f<d.length;f++)y=d[f],E.getOwner()==y.getOwner()&&this.calcRepulsionForce(E,y)},o.prototype.calcGravitationalForces=function(){for(var r,l=this.getAllNodesToApplyGravitation(),g=0;g<l.length;g++)r=l[g],this.calcGravitationalForce(r)},o.prototype.moveNodes=function(){for(var r=this.getAllNodes(),l,g=0;g<r.length;g++)l=r[g],l.move()},o.prototype.calcSpringForce=function(r,l){var g=r.getSource(),f=r.getTarget(),E,y,d,N;if(this.uniformLeafNodeSizes&&g.getChild()==null&&f.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;E=r.getLength(),E!=0&&(y=this.springConstant*(E-l),d=y*(r.lengthX/E),N=y*(r.lengthY/E),g.springForceX+=d,g.springForceY+=N,f.springForceX-=d,f.springForceY-=N)},o.prototype.calcRepulsionForce=function(r,l){var g=r.getRect(),f=l.getRect(),E=new Array(2),y=new Array(4),d,N,v,I,s,u,c;if(g.intersects(f)){h.calcSeparationAmount(g,f,E,t.DEFAULT_EDGE_LENGTH/2),u=2*E[0],c=2*E[1];var A=r.noOfChildren*l.noOfChildren/(r.noOfChildren+l.noOfChildren);r.repulsionForceX-=A*u,r.repulsionForceY-=A*c,l.repulsionForceX+=A*u,l.repulsionForceY+=A*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&l.getChild()==null?(d=f.getCenterX()-g.getCenterX(),N=f.getCenterY()-g.getCenterY()):(h.getIntersection(g,f,y),d=y[2]-y[0],N=y[3]-y[1]),Math.abs(d)<t.MIN_REPULSION_DIST&&(d=a.sign(d)*t.MIN_REPULSION_DIST),Math.abs(N)<t.MIN_REPULSION_DIST&&(N=a.sign(N)*t.MIN_REPULSION_DIST),v=d*d+N*N,I=Math.sqrt(v),s=this.repulsionConstant*r.noOfChildren*l.noOfChildren/v,u=s*d/I,c=s*N/I,r.repulsionForceX-=u,r.repulsionForceY-=c,l.repulsionForceX+=u,l.repulsionForceY+=c},o.prototype.calcGravitationalForce=function(r){var l,g,f,E,y,d,N,v;l=r.getOwner(),g=(l.getRight()+l.getLeft())/2,f=(l.getTop()+l.getBottom())/2,E=r.getCenterX()-g,y=r.getCenterY()-f,d=Math.abs(E)+r.getWidth()/2,N=Math.abs(y)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(v=l.getEstimatedSize()*this.gravityRangeFactor,(d>v||N>v)&&(r.gravitationForceX=-this.gravityConstant*E,r.gravitationForceY=-this.gravityConstant*y)):(v=l.getEstimatedSize()*this.compoundGravityRangeFactor,(d>v||N>v)&&(r.gravitationForceX=-this.gravityConstant*E*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},o.prototype.isConverged=function(){var r,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||l},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 r,l=this.graphManager.getAllNodes(),g=0;g<l.length;g++)r=l[g],r.noOfChildren=r.getNoOfChildren()},o.prototype.calcGrid=function(r){var l=0,g=0;l=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),g=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var f=new Array(l),E=0;E<l;E++)f[E]=new Array(g);for(var E=0;E<l;E++)for(var y=0;y<g;y++)f[E][y]=new Array;return f},o.prototype.addNodeToGrid=function(r,l,g){var f=0,E=0,y=0,d=0;f=parseInt(Math.floor((r.getRect().x-l)/this.repulsionRange)),E=parseInt(Math.floor((r.getRect().width+r.getRect().x-l)/this.repulsionRange)),y=parseInt(Math.floor((r.getRect().y-g)/this.repulsionRange)),d=parseInt(Math.floor((r.getRect().height+r.getRect().y-g)/this.repulsionRange));for(var N=f;N<=E;N++)for(var v=y;v<=d;v++)this.grid[N][v].push(r),r.setGridCoordinates(f,E,y,d)},o.prototype.updateGrid=function(){var r,l,g=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<g.length;r++)l=g[r],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},o.prototype.calculateRepulsionForceOfANode=function(r,l,g,f){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&g||f){var E=new Set;r.surrounding=new Array;for(var y,d=this.grid,N=r.startX-1;N<r.finishX+2;N++)for(var v=r.startY-1;v<r.finishY+2;v++)if(!(N<0||v<0||N>=d.length||v>=d[0].length)){for(var I=0;I<d[N][v].length;I++)if(y=d[N][v][I],!(r.getOwner()!=y.getOwner()||r==y)&&!l.has(y)&&!E.has(y)){var s=Math.abs(r.getCenterX()-y.getCenterX())-(r.getWidth()/2+y.getWidth()/2),u=Math.abs(r.getCenterY()-y.getCenterY())-(r.getHeight()/2+y.getHeight()/2);s<=this.repulsionRange&&u<=this.repulsionRange&&E.add(y)}}r.surrounding=[].concat(n(E))}for(N=0;N<r.surrounding.length;N++)this.calcRepulsionForce(r,r.surrounding[N])},o.prototype.calcRepulsionRange=function(){return 0},_.exports=o},function(_,L,T){var n=T(1),e=T(7);function t(h,a,o){n.call(this,h,a,o),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(n.prototype);for(var i in n)t[i]=n[i];_.exports=t},function(_,L,T){var n=T(3);function e(i,h,a,o){n.call(this,i,h,a,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=[]}e.prototype=Object.create(n.prototype);for(var t in n)e[t]=n[t];e.prototype.setGridCoordinates=function(i,h,a,o){this.startX=i,this.finishX=h,this.startY=a,this.finishY=o},_.exports=e},function(_,L,T){function n(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=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},_.exports=n},function(_,L,T){var n=T(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var h=n.createID(t);this.contains(h)||(this.map[h]=i,this.keys.push(t))},e.prototype.contains=function(t){return n.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=n.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},_.exports=e},function(_,L,T){var n=T(14);function e(){this.set={}}e.prototype.add=function(t){var i=n.createID(t);this.contains(i)||(this.set[i]=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 i=Object.keys(this.set),h=i.length,a=0;a<h;a++)t.push(this.set[i[a]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,h=0;h<i;h++){var a=t[h];this.add(a)}},_.exports=e},function(_,L,T){var n=(function(){function h(a,o){for(var p=0;p<o.length;p++){var r=o[p];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}return function(a,o,p){return o&&h(a.prototype,o),p&&h(a,p),a}})();function e(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}var t=T(11),i=(function(){function h(a,o){e(this,h),(o!==null||o!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var p=void 0;a instanceof t?p=a.size():p=a.length,this._quicksort(a,0,p-1)}return n(h,[{key:"_quicksort",value:function(a,o,p){if(o<p){var r=this._partition(a,o,p);this._quicksort(a,o,r),this._quicksort(a,r+1,p)}}},{key:"_partition",value:function(a,o,p){for(var r=this._get(a,o),l=o,g=p;;){for(;this.compareFunction(r,this._get(a,g));)g--;for(;this.compareFunction(this._get(a,l),r);)l++;if(l<g)this._swap(a,l,g),l++,g--;else return g}}},{key:"_get",value:function(a,o){return a instanceof t?a.get_object_at(o):a[o]}},{key:"_set",value:function(a,o,p){a instanceof t?a.set_object_at(o,p):a[o]=p}},{key:"_swap",value:function(a,o,p){var r=this._get(a,o);this._set(a,o,this._get(a,p)),this._set(a,p,r)}},{key:"_defaultCompareFunction",value:function(a,o){return o>a}}]),h})();_.exports=i},function(_,L,T){var n=(function(){function i(h,a){for(var o=0;o<a.length;o++){var p=a[o];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return function(h,a,o){return a&&i(h.prototype,a),o&&i(h,o),h}})();function e(i,h){if(!(i instanceof h))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(h,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=h,this.sequence2=a,this.match_score=o,this.mismatch_penalty=p,this.gap_penalty=r,this.iMax=h.length+1,this.jMax=a.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var g=0;g<this.jMax;g++)this.grid[l][g]=0}this.tracebackGrid=new Array(this.iMax);for(var f=0;f<this.iMax;f++){this.tracebackGrid[f]=new Array(this.jMax);for(var E=0;E<this.jMax;E++)this.tracebackGrid[f][E]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return n(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var h=1;h<this.jMax;h++)this.grid[0][h]=this.grid[0][h-1]+this.gap_penalty,this.tracebackGrid[0][h]=[!1,!1,!0];for(var a=1;a<this.iMax;a++)this.grid[a][0]=this.grid[a-1][0]+this.gap_penalty,this.tracebackGrid[a][0]=[!1,!0,!1];for(var o=1;o<this.iMax;o++)for(var p=1;p<this.jMax;p++){var r=void 0;this.sequence1[o-1]===this.sequence2[p-1]?r=this.grid[o-1][p-1]+this.match_score:r=this.grid[o-1][p-1]+this.mismatch_penalty;var l=this.grid[o-1][p]+this.gap_penalty,g=this.grid[o][p-1]+this.gap_penalty,f=[r,l,g],E=this.arrayAllMaxIndexes(f);this.grid[o][p]=f[E[0]],this.tracebackGrid[o][p]=[E.includes(0),E.includes(1),E.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var h=[];for(h.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});h[0];){var a=h[0],o=this.tracebackGrid[a.pos[0]][a.pos[1]];o[0]&&h.push({pos:[a.pos[0]-1,a.pos[1]-1],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),o[1]&&h.push({pos:[a.pos[0]-1,a.pos[1]],seq1:this.sequence1[a.pos[0]-1]+a.seq1,seq2:"-"+a.seq2}),o[2]&&h.push({pos:[a.pos[0],a.pos[1]-1],seq1:"-"+a.seq1,seq2:this.sequence2[a.pos[1]-1]+a.seq2}),a.pos[0]===0&&a.pos[1]===0&&this.alignments.push({sequence1:a.seq1,sequence2:a.seq2}),h.shift()}return this.alignments}},{key:"getAllIndexes",value:function(h,a){for(var o=[],p=-1;(p=h.indexOf(a,p+1))!==-1;)o.push(p);return o}},{key:"arrayAllMaxIndexes",value:function(h){return this.getAllIndexes(h,Math.max.apply(null,h))}}]),i})();_.exports=t},function(_,L,T){var n=function(){};n.FDLayout=T(18),n.FDLayoutConstants=T(7),n.FDLayoutEdge=T(19),n.FDLayoutNode=T(20),n.DimensionD=T(21),n.HashMap=T(22),n.HashSet=T(23),n.IGeometry=T(8),n.IMath=T(9),n.Integer=T(10),n.Point=T(12),n.PointD=T(4),n.RandomSeed=T(16),n.RectangleD=T(13),n.Transform=T(17),n.UniqueIDGeneretor=T(14),n.Quicksort=T(24),n.LinkedList=T(11),n.LGraphObject=T(2),n.LGraph=T(5),n.LEdge=T(1),n.LGraphManager=T(6),n.LNode=T(3),n.Layout=T(15),n.LayoutConstants=T(0),n.NeedlemanWunsch=T(25),_.exports=n},function(_,L,T){function n(){this.listeners=[]}var e=n.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var h=this.listeners.length;h>=0;h--){var a=this.listeners[h];a.event===t&&a.callback===i&&this.listeners.splice(h,1)}},e.emit=function(t,i){for(var h=0;h<this.listeners.length;h++){var a=this.listeners[h];t===a.event&&a.callback(i)}},_.exports=n}])})})(q)),q.exports}var dt=z.exports,K;function pt(){return K||(K=1,(function(x,X){(function(_,L){x.exports=L(ct())})(dt,function(_){return(function(L){var T={};function n(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return L[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=T,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)})([function(L,T){L.exports=_},function(L,T,n){var e=n(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,L.exports=t},function(L,T,n){var e=n(0).FDLayoutEdge;function t(h,a,o){e.call(this,h,a,o)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];L.exports=t},function(L,T,n){var e=n(0).LGraph;function t(h,a,o){e.call(this,h,a,o)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];L.exports=t},function(L,T,n){var e=n(0).LGraphManager;function t(h){e.call(this,h)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];L.exports=t},function(L,T,n){var e=n(0).FDLayoutNode,t=n(0).IMath;function i(a,o,p,r){e.call(this,a,o,p,r)}i.prototype=Object.create(e.prototype);for(var h in e)i[h]=e[h];i.prototype.move=function(){var a=this.graphManager.getLayout();this.displacementX=a.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=a.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementX=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>a.coolingFactor*a.maxNodeDisplacement&&(this.displacementY=a.coolingFactor*a.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),a.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(a,o){for(var p=this.getChild().getNodes(),r,l=0;l<p.length;l++)r=p[l],r.getChild()==null?(r.moveBy(a,o),r.displacementX+=a,r.displacementY+=o):r.propogateDisplacementToChildren(a,o)},i.prototype.setPred1=function(a){this.pred1=a},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(a){this.next=a},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(a){this.processed=a},i.prototype.isProcessed=function(){return processed},L.exports=i},function(L,T,n){var e=n(0).FDLayout,t=n(4),i=n(3),h=n(5),a=n(2),o=n(1),p=n(0).FDLayoutConstants,r=n(0).LayoutConstants,l=n(0).Point,g=n(0).PointD,f=n(0).Layout,E=n(0).Integer,y=n(0).IGeometry,d=n(0).LGraph,N=n(0).Transform;function v(){e.call(this),this.toBeTiled={}}v.prototype=Object.create(e.prototype);for(var I in e)v[I]=e[I];v.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},v.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},v.prototype.newNode=function(s){return new h(this.graphManager,s)},v.prototype.newEdge=function(s){return new a(null,null,s)},v.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/p.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=p.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(u)}}else{var c=this.getFlatForest();if(c.length>0)this.positionNodesRadially(c);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(O){return s.has(O)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%p.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(m){return s.has(m)});this.graphManager.setAllNodesToApplyGravitation(u),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,A=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,A),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),u={},c=0;c<s.length;c++){var A=s[c].rect,m=s[c].id;u[m]={id:m,x:A.getCenterX(),y:A.getCenterY(),w:A.width,h:A.height}}return u},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(p.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],u,c=this.graphManager.getGraphs(),A=c.length,m;for(m=0;m<A;m++)u=c[m],u.updateConnected(),u.isConnected||(s=s.concat(u.getNodes()));return s},v.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var u=new Set,c;for(c=0;c<s.length;c++){var A=s[c];if(!u.has(A)){var m=A.getSource(),O=A.getTarget();if(m==O)A.getBendpoints().push(new g),A.getBendpoints().push(new g),this.createDummyNodesForBendpoints(A),u.add(A);else{var D=[];if(D=D.concat(m.getEdgeListToNode(O)),D=D.concat(O.getEdgeListToNode(m)),!u.has(D[0])){if(D.length>1){var w;for(w=0;w<D.length;w++){var R=D[w];R.getBendpoints().push(new g),this.createDummyNodesForBendpoints(R)}}D.forEach(function(F){u.add(F)})}}}if(u.size==s.length)break}},v.prototype.positionNodesRadially=function(s){for(var u=new l(0,0),c=Math.ceil(Math.sqrt(s.length)),A=0,m=0,O=0,D=new g(0,0),w=0;w<s.length;w++){w%c==0&&(O=0,m=A,w!=0&&(m+=o.DEFAULT_COMPONENT_SEPERATION),A=0);var R=s[w],F=f.findCenterOfTree(R);u.x=O,u.y=m,D=v.radialLayout(R,F,u),D.y>A&&(A=Math.floor(D.y)),O=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new g(r.WORLD_CENTER_X-D.x/2,r.WORLD_CENTER_Y-D.y/2))},v.radialLayout=function(s,u,c){var A=Math.max(this.maxDiagonalInTree(s),o.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(u,null,0,359,0,A);var m=d.calculateBounds(s),O=new N;O.setDeviceOrgX(m.getMinX()),O.setDeviceOrgY(m.getMinY()),O.setWorldOrgX(c.x),O.setWorldOrgY(c.y);for(var D=0;D<s.length;D++){var w=s[D];w.transform(O)}var R=new g(m.getMaxX(),m.getMaxY());return O.inverseTransformPoint(R)},v.branchRadialLayout=function(s,u,c,A,m,O){var D=(A-c+1)/2;D<0&&(D+=180);var w=(D+c)%360,R=w*y.TWO_PI/360,F=m*Math.cos(R),b=m*Math.sin(R);s.setCenter(F,b);var C=[];C=C.concat(s.getEdges());var M=C.length;u!=null&&M--;for(var G=0,P=C.length,S,U=s.getEdgesBetween(u);U.length>1;){var Y=U[0];U.splice(0,1);var B=C.indexOf(Y);B>=0&&C.splice(B,1),P--,M--}u!=null?S=(C.indexOf(U[0])+1)%P:S=0;for(var H=Math.abs(A-c)/M,k=S;G!=M;k=++k%P){var Z=C[k].getOtherEnd(s);if(Z!=u){var Q=(c+G*H)%360,ht=(Q+H)%360;v.branchRadialLayout(Z,s,Q,ht,m+O,O),G++}}},v.maxDiagonalInTree=function(s){for(var u=E.MIN_VALUE,c=0;c<s.length;c++){var A=s[c],m=A.getDiagonal();m>u&&(u=m)}return u},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var s=this,u={};this.memberGroups={},this.idToDummyNode={};for(var c=[],A=this.graphManager.getAllNodes(),m=0;m<A.length;m++){var O=A[m],D=O.getParent();this.getNodeDegreeWithChildren(O)===0&&(D.id==null||!this.getToBeTiled(D))&&c.push(O)}for(var m=0;m<c.length;m++){var O=c[m],w=O.getParent().id;typeof u[w]>"u"&&(u[w]=[]),u[w]=u[w].concat(O)}Object.keys(u).forEach(function(R){if(u[R].length>1){var F="DummyCompound_"+R;s.memberGroups[F]=u[R];var b=u[R][0].getParent(),C=new h(s.graphManager);C.id=F,C.paddingLeft=b.paddingLeft||0,C.paddingRight=b.paddingRight||0,C.paddingBottom=b.paddingBottom||0,C.paddingTop=b.paddingTop||0,s.idToDummyNode[F]=C;var M=s.getGraphManager().add(s.newGraph(),C),G=b.getChild();G.add(C);for(var P=0;P<u[R].length;P++){var S=u[R][P];G.remove(S),M.add(S)}}})},v.prototype.clearCompounds=function(){var s={},u={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)u[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,u)},v.prototype.clearZeroDegreeMembers=function(){var s=this,u=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var A=s.idToDummyNode[c];u[c]=s.tileNodes(s.memberGroups[c],A.paddingLeft+A.paddingRight),A.rect.width=u[c].width,A.rect.height=u[c].height})},v.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var u=this.compoundOrder[s],c=u.id,A=u.paddingLeft,m=u.paddingTop;this.adjustLocations(this.tiledMemberPack[c],u.rect.x,u.rect.y,A,m)}},v.prototype.repopulateZeroDegreeMembers=function(){var s=this,u=this.tiledZeroDegreePack;Object.keys(u).forEach(function(c){var A=s.idToDummyNode[c],m=A.paddingLeft,O=A.paddingTop;s.adjustLocations(u[c],A.rect.x,A.rect.y,m,O)})},v.prototype.getToBeTiled=function(s){var u=s.id;if(this.toBeTiled[u]!=null)return this.toBeTiled[u];var c=s.getChild();if(c==null)return this.toBeTiled[u]=!1,!1;for(var A=c.getNodes(),m=0;m<A.length;m++){var O=A[m];if(this.getNodeDegree(O)>0)return this.toBeTiled[u]=!1,!1;if(O.getChild()==null){this.toBeTiled[O.id]=!1;continue}if(!this.getToBeTiled(O))return this.toBeTiled[u]=!1,!1}return this.toBeTiled[u]=!0,!0},v.prototype.getNodeDegree=function(s){s.id;for(var u=s.getEdges(),c=0,A=0;A<u.length;A++){var m=u[A];m.getSource().id!==m.getTarget().id&&(c=c+1)}return c},v.prototype.getNodeDegreeWithChildren=function(s){var u=this.getNodeDegree(s);if(s.getChild()==null)return u;for(var c=s.getChild().getNodes(),A=0;A<c.length;A++){var m=c[A];u+=this.getNodeDegreeWithChildren(m)}return u},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(s){for(var u=0;u<s.length;u++){var c=s[u];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},v.prototype.adjustLocations=function(s,u,c,A,m){u+=A,c+=m;for(var O=u,D=0;D<s.rows.length;D++){var w=s.rows[D];u=O;for(var R=0,F=0;F<w.length;F++){var b=w[F];b.rect.x=u,b.rect.y=c,u+=b.rect.width+s.horizontalPadding,b.rect.height>R&&(R=b.rect.height)}c+=R+s.verticalPadding}},v.prototype.tileCompoundMembers=function(s,u){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(A){var m=u[A];c.tiledMemberPack[A]=c.tileNodes(s[A],m.paddingLeft+m.paddingRight),m.rect.width=c.tiledMemberPack[A].width,m.rect.height=c.tiledMemberPack[A].height})},v.prototype.tileNodes=function(s,u){var c=o.TILING_PADDING_VERTICAL,A=o.TILING_PADDING_HORIZONTAL,m={rows:[],rowWidth:[],rowHeight:[],width:0,height:u,verticalPadding:c,horizontalPadding:A};s.sort(function(w,R){return w.rect.width*w.rect.height>R.rect.width*R.rect.height?-1:w.rect.width*w.rect.height<R.rect.width*R.rect.height?1:0});for(var O=0;O<s.length;O++){var D=s[O];m.rows.length==0?this.insertNodeToRow(m,D,0,u):this.canAddHorizontal(m,D.rect.width,D.rect.height)?this.insertNodeToRow(m,D,this.getShortestRowIndex(m),u):this.insertNodeToRow(m,D,m.rows.length,u),this.shiftToLastRow(m)}return m},v.prototype.insertNodeToRow=function(s,u,c,A){var m=A;if(c==s.rows.length){var O=[];s.rows.push(O),s.rowWidth.push(m),s.rowHeight.push(0)}var D=s.rowWidth[c]+u.rect.width;s.rows[c].length>0&&(D+=s.horizontalPadding),s.rowWidth[c]=D,s.width<D&&(s.width=D);var w=u.rect.height;c>0&&(w+=s.verticalPadding);var R=0;w>s.rowHeight[c]&&(R=s.rowHeight[c],s.rowHeight[c]=w,R=s.rowHeight[c]-R),s.height+=R,s.rows[c].push(u)},v.prototype.getShortestRowIndex=function(s){for(var u=-1,c=Number.MAX_VALUE,A=0;A<s.rows.length;A++)s.rowWidth[A]<c&&(u=A,c=s.rowWidth[A]);return u},v.prototype.getLongestRowIndex=function(s){for(var u=-1,c=Number.MIN_VALUE,A=0;A<s.rows.length;A++)s.rowWidth[A]>c&&(u=A,c=s.rowWidth[A]);return u},v.prototype.canAddHorizontal=function(s,u,c){var A=this.getShortestRowIndex(s);if(A<0)return!0;var m=s.rowWidth[A];if(m+s.horizontalPadding+u<=s.width)return!0;var O=0;s.rowHeight[A]<c&&A>0&&(O=c+s.verticalPadding-s.rowHeight[A]);var D;s.width-m>=u+s.horizontalPadding?D=(s.height+O)/(m+u+s.horizontalPadding):D=(s.height+O)/s.width,O=c+s.verticalPadding;var w;return s.width<u?w=(s.height+O)/u:w=(s.height+O)/s.width,w<1&&(w=1/w),D<1&&(D=1/D),D<w},v.prototype.shiftToLastRow=function(s){var u=this.getLongestRowIndex(s),c=s.rowWidth.length-1,A=s.rows[u],m=A[A.length-1],O=m.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>O&&u!=c){A.splice(-1,1),s.rows[c].push(m),s.rowWidth[u]=s.rowWidth[u]-O,s.rowWidth[c]=s.rowWidth[c]+O,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var D=Number.MIN_VALUE,w=0;w<A.length;w++)A[w].height>D&&(D=A[w].height);u>0&&(D+=s.verticalPadding);var R=s.rowHeight[u]+s.rowHeight[c];s.rowHeight[u]=D,s.rowHeight[c]<m.height+s.verticalPadding&&(s.rowHeight[c]=m.height+s.verticalPadding);var F=s.rowHeight[u]+s.rowHeight[c];s.height+=F-R,this.shiftToLastRow(s)}},v.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var s=[],u=!0,c;u;){var A=this.graphManager.getAllNodes(),m=[];u=!1;for(var O=0;O<A.length;O++)c=A[O],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(m.push([c,c.getEdges()[0],c.getOwner()]),u=!0);if(u==!0){for(var D=[],w=0;w<m.length;w++)m[w][0].getEdges().length==1&&(D.push(m[w]),m[w][0].getOwner().remove(m[w][0]));s.push(D),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},v.prototype.growTree=function(s){for(var u=s.length,c=s[u-1],A,m=0;m<c.length;m++)A=c[m],this.findPlaceforPrunedNode(A),A[2].add(A[0]),A[2].add(A[1],A[1].source,A[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(s){var u,c,A=s[0];A==s[1].source?c=s[1].target:c=s[1].source;var m=c.startX,O=c.finishX,D=c.startY,w=c.finishY,R=0,F=0,b=0,C=0,M=[R,b,F,C];if(D>0)for(var G=m;G<=O;G++)M[0]+=this.grid[G][D-1].length+this.grid[G][D].length-1;if(O<this.grid.length-1)for(var G=D;G<=w;G++)M[1]+=this.grid[O+1][G].length+this.grid[O][G].length-1;if(w<this.grid[0].length-1)for(var G=m;G<=O;G++)M[2]+=this.grid[G][w+1].length+this.grid[G][w].length-1;if(m>0)for(var G=D;G<=w;G++)M[3]+=this.grid[m-1][G].length+this.grid[m][G].length-1;for(var P=E.MAX_VALUE,S,U,Y=0;Y<M.length;Y++)M[Y]<P?(P=M[Y],S=1,U=Y):M[Y]==P&&S++;if(S==3&&P==0)M[0]==0&&M[1]==0&&M[2]==0?u=1:M[0]==0&&M[1]==0&&M[3]==0?u=0:M[0]==0&&M[2]==0&&M[3]==0?u=3:M[1]==0&&M[2]==0&&M[3]==0&&(u=2);else if(S==2&&P==0){var B=Math.floor(Math.random()*2);M[0]==0&&M[1]==0?B==0?u=0:u=1:M[0]==0&&M[2]==0?B==0?u=0:u=2:M[0]==0&&M[3]==0?B==0?u=0:u=3:M[1]==0&&M[2]==0?B==0?u=1:u=2:M[1]==0&&M[3]==0?B==0?u=1:u=3:B==0?u=2:u=3}else if(S==4&&P==0){var B=Math.floor(Math.random()*4);u=B}else u=U;u==0?A.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-p.DEFAULT_EDGE_LENGTH-A.getHeight()/2):u==1?A.setCenter(c.getCenterX()+c.getWidth()/2+p.DEFAULT_EDGE_LENGTH+A.getWidth()/2,c.getCenterY()):u==2?A.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+p.DEFAULT_EDGE_LENGTH+A.getHeight()/2):A.setCenter(c.getCenterX()-c.getWidth()/2-p.DEFAULT_EDGE_LENGTH-A.getWidth()/2,c.getCenterY())},L.exports=v},function(L,T,n){var e={};e.layoutBase=n(0),e.CoSEConstants=n(1),e.CoSEEdge=n(2),e.CoSEGraph=n(3),e.CoSEGraphManager=n(4),e.CoSELayout=n(6),e.CoSENode=n(5),L.exports=e}])})})(z)),z.exports}var ft=j.exports,J;function yt(){return J||(J=1,(function(x,X){(function(_,L){x.exports=L(pt())})(ft,function(_){return(function(L){var T={};function n(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return L[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=L,n.c=T,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)})([function(L,T){L.exports=_},function(L,T,n){var e=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,i=n(0).CoSEConstants,h=n(0).CoSELayout,a=n(0).CoSENode,o=n(0).layoutBase.PointD,p=n(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function l(y,d){var N={};for(var v in y)N[v]=y[v];for(var v in d)N[v]=d[v];return N}function g(y){this.options=l(r,y),f(this.options)}var f=function(y){y.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=y.nodeRepulsion),y.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=y.idealEdgeLength),y.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=y.edgeElasticity),y.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=y.nestingFactor),y.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=y.gravity),y.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=y.numIter),y.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=y.gravityRange),y.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=y.gravityCompound),y.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=y.gravityRangeCompound),y.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=y.initialEnergyOnIncremental),y.quality=="draft"?e.QUALITY=0:y.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=y.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!y.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=y.animate,i.TILE=y.tile,i.TILING_PADDING_VERTICAL=typeof y.tilingPaddingVertical=="function"?y.tilingPaddingVertical.call():y.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof y.tilingPaddingHorizontal=="function"?y.tilingPaddingHorizontal.call():y.tilingPaddingHorizontal};g.prototype.run=function(){var y,d,N=this.options;this.idToLNode={};var v=this.layout=new h,I=this;I.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=v.newGraphManager();this.gm=s;var u=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(u),v);for(var A=0;A<c.length;A++){var m=c[A],O=this.idToLNode[m.data("source")],D=this.idToLNode[m.data("target")];if(O!==D&&O.getEdgesBetween(D).length==0){var w=s.add(v.newEdge(),O,D);w.id=m.id()}}var R=function(b,C){typeof b=="number"&&(b=C);var M=b.data("id"),G=I.idToLNode[M];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},F=function b(){for(var C=function(){N.fit&&N.cy.fit(N.eles,N.padding),y||(y=!0,I.cy.one("layoutready",N.ready),I.cy.trigger({type:"layoutready",layout:I}))},M=I.options.refresh,G,P=0;P<M&&!G;P++)G=I.stopped||I.layout.tick();if(G){v.checkLayoutSuccess()&&!v.isSubLayout&&v.doPostLayout(),v.tilingPostLayout&&v.tilingPostLayout(),v.isLayoutFinished=!0,I.options.eles.nodes().positions(R),C(),I.cy.one("layoutstop",I.options.stop),I.cy.trigger({type:"layoutstop",layout:I}),d&&cancelAnimationFrame(d),y=!1;return}var S=I.layout.getPositionsData();N.eles.nodes().positions(function(U,Y){if(typeof U=="number"&&(U=Y),!U.isParent()){for(var B=U.id(),H=S[B],k=U;H==null&&(H=S[k.data("parent")]||S["DummyCompound_"+k.data("parent")],S[B]=H,k=k.parent()[0],k!=null););return H!=null?{x:H.x,y:H.y}:{x:U.position("x"),y:U.position("y")}}}),C(),d=requestAnimationFrame(b)};return v.addListener("layoutstarted",function(){I.options.animate==="during"&&(d=requestAnimationFrame(F))}),v.runLayout(),this.options.animate!=="during"&&(I.options.eles.nodes().not(":parent").layoutPositions(I,I.options,R),y=!1),this},g.prototype.getTopMostNodes=function(y){for(var d={},N=0;N<y.length;N++)d[y[N].id()]=!0;var v=y.filter(function(I,s){typeof I=="number"&&(I=s);for(var u=I.parent()[0];u!=null;){if(d[u.id()])return!1;u=u.parent()[0]}return!0});return v},g.prototype.processChildrenList=function(y,d,N){for(var v=d.length,I=0;I<v;I++){var s=d[I],u=s.children(),c,A=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=y.add(new a(N.graphManager,new o(s.position("x")-A.w/2,s.position("y")-A.h/2),new p(parseFloat(A.w),parseFloat(A.h)))):c=y.add(new a(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var m=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,O=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,D=s.css("text-halign");c.labelWidth=m,c.labelHeight=O,c.labelPos=D}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),u!=null&&u.length>0){var w;w=N.getGraphManager().add(N.newGraph(),c),this.processChildrenList(w,u,N)}}},g.prototype.stop=function(){return this.stopped=!0,this};var E=function(y){y("layout","cose-bilkent",g)};typeof cytoscape<"u"&&E(cytoscape),L.exports=E}])})})(j)),j.exports}var Et=yt();const vt=lt(Et);tt.use(vt);function et(x,X){x.forEach(_=>{const L={id:_.id,labelText:_.label,height:_.height,width:_.width,padding:_.padding??0};Object.keys(_).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(L[T]=_[T])}),X.add({group:"nodes",data:L,position:{x:_.x??0,y:_.y??0}})})}W(et,"addNodes");function it(x,X){x.forEach(_=>{const L={id:_.id,source:_.start,target:_.end};Object.keys(_).forEach(T=>{["id","start","end"].includes(T)||(L[T]=_[T])}),X.add({group:"edges",data:L})})}W(it,"addEdges");function rt(x){return new Promise(X=>{const _=gt("body").append("div").attr("id","cy").attr("style","display:none"),L=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});_.remove(),et(x.nodes,L),it(x.edges,L),L.nodes().forEach(function(n){n.layoutDimensions=()=>{const e=n.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};L.layout(T).run(),L.ready(n=>{V.info("Cytoscape ready",n),X(L)})})}W(rt,"createCytoscapeInstance");function nt(x){return x.nodes().map(X=>{const _=X.data(),L=X.position(),T={id:_.id,x:L.x,y:L.y};return Object.keys(_).forEach(n=>{n!=="id"&&(T[n]=_[n])}),T})}W(nt,"extractPositionedNodes");function ot(x){return x.edges().map(X=>{const _=X.data(),L=X._private.rscratch,T={id:_.id,source:_.source,target:_.target,startX:L.startX,startY:L.startY,midX:L.midX,midY:L.midY,endX:L.endX,endY:L.endY};return Object.keys(_).forEach(n=>{["id","source","target"].includes(n)||(T[n]=_[n])}),T})}W(ot,"extractPositionedEdges");async function st(x,X){V.debug("Starting cose-bilkent layout algorithm");try{at(x);const _=await rt(x),L=nt(_),T=ot(_);return V.debug(`Layout completed: ${L.length} nodes, ${T.length} edges`),{nodes:L,edges:T}}catch(_){throw V.error("Error in cose-bilkent layout algorithm:",_),_}}W(st,"executeCoseBilkentLayout");function at(x){if(!x)throw new Error("Layout data is required");if(!x.config)throw new Error("Configuration is required in layout data");if(!x.rootNode)throw new Error("Root node is required");if(!x.nodes||!Array.isArray(x.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(x.edges))throw new Error("Edges array is required in layout data");return!0}W(at,"validateLayoutData");var At=W(async(x,X,{insertCluster:_,insertEdge:L,insertEdgeLabel:T,insertMarkers:n,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:h})=>{const a={},o={},p=X.select("g");n(p,x.markers,x.type,x.diagramId);const r=p.insert("g").attr("class","subgraphs"),l=p.insert("g").attr("class","edgePaths"),g=p.insert("g").attr("class","edgeLabels"),f=p.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(x.nodes.map(async d=>{if(d.isGroup){const N={...d};o[d.id]=N,a[d.id]=N,await _(r,d)}else{const N={...d};a[d.id]=N;const v=await e(f,d,{config:x.config,dir:x.direction||"TB"}),I=v.node().getBBox();N.width=I.width,N.height=I.height,N.domId=v,t.debug(`Node ${d.id} dimensions: ${I.width}x${I.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const E={...x,nodes:x.nodes.map(d=>{const N=a[d.id];return{...d,width:N.width,height:N.height}})},y=await st(E,x.config);t.debug("Positioning nodes based on layout results"),y.nodes.forEach(d=>{const N=a[d.id];N?.domId&&(N.domId.attr("transform",`translate(${d.x}, ${d.y})`),N.x=d.x,N.y=d.y,t.debug(`Positioned node ${N.id} at center (${d.x}, ${d.y})`))}),y.edges.forEach(d=>{const N=x.edges.find(v=>v.id===d.id);N&&(N.points=[{x:d.startX,y:d.startY},{x:d.midX,y:d.midY},{x:d.endX,y:d.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(x.edges.map(async d=>{await T(g,d);const N=a[d.start??""],v=a[d.end??""];if(N&&v){const I=y.edges.find(s=>s.id===d.id);if(I){t.debug("APA01 positionedEdge",I);const s={...d},u=L(l,s,o,x.type,N,v,x.diagramId);i(s,u)}else{const s={...d,points:[{x:N.x||0,y:N.y||0},{x:v.x||0,y:v.y||0}]},u=L(l,s,o,x.type,N,v,x.diagramId);i(s,u)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Dt=At;export{Dt as render};
//# sourceMappingURL=cose-bilkent-S5V4N54A-C7c-PUyn.chunk.mjs.map