@codragraph/cli 2.1.1 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/dist/cli/ai-context.js +1 -1
- package/dist/cli/analyze.js +19 -2
- package/dist/cli/index.js +2 -1
- package/dist/cli/serve.d.ts +1 -0
- package/dist/cli/serve.js +3 -1
- package/dist/cli/setup.js +36 -19
- package/dist/cli/status.d.ts +13 -0
- package/dist/cli/status.js +99 -0
- package/dist/config/ignore-service.js +2 -0
- package/dist/core/graphstore/cgdb-row-source.js +3 -2
- package/dist/core/group/bridge-db.js +42 -10
- package/dist/core/run-analyze.d.ts +20 -0
- package/dist/core/run-analyze.js +201 -0
- package/dist/core/search/hybrid-search.js +11 -3
- package/dist/mcp/resources.js +2 -2
- package/dist/server/api.d.ts +14 -2
- package/dist/server/api.js +90 -7
- package/dist/server/mcp-http.d.ts +22 -0
- package/dist/server/mcp-http.js +21 -2
- package/dist/server/web-dashboard.d.ts +28 -0
- package/dist/server/web-dashboard.js +61 -0
- package/dist/web/assets/agent-D5lb0zXz.js +1089 -0
- package/dist/web/assets/architectureDiagram-EMZXCZ2Q-CZtc99v_.js +36 -0
- package/dist/web/assets/blockDiagram-IGV67L2C-BtoUp-6Y.js +132 -0
- package/dist/web/assets/c4Diagram-DFAF54RM-C4Hl3J2U.js +10 -0
- package/dist/web/assets/chunk-3GS5O3IE-DkUjU0WD.js +231 -0
- package/dist/web/assets/chunk-3YCYZ6SJ-CQkVgT_z.js +1 -0
- package/dist/web/assets/chunk-7RZVMHOQ-BitYcNVR.js +338 -0
- package/dist/web/assets/chunk-AEOMTBSW-BgTIXPsY.js +1 -0
- package/dist/web/assets/chunk-H3VCZNTA-Cx5XV_aC.js +13 -0
- package/dist/web/assets/chunk-HN6EAY2L-BBnyTNdB.js +1 -0
- package/dist/web/assets/chunk-KSICW3F5-BYzvDLNI.js +15 -0
- package/dist/web/assets/chunk-O5ABG6QK-dHwHzA6n.js +1 -0
- package/dist/web/assets/chunk-PK6DOVAG-CvsEnugt.js +206 -0
- package/dist/web/assets/chunk-RWUO3TPN-BgRTY0_k.js +1 -0
- package/dist/web/assets/chunk-TBF5ZNIQ-DL5stGM1.js +1 -0
- package/dist/web/assets/chunk-TU3PZOEN-RLyvLcv-.js +1 -0
- package/dist/web/assets/classDiagram-PPOCWD7C-DTr8QIOf.js +1 -0
- package/dist/web/assets/classDiagram-v2-23LJLIIU-DTr8QIOf.js +1 -0
- package/dist/web/assets/context-builder-22jU3V56.js +16 -0
- package/dist/web/assets/cose-bilkent-PNC4W37J-DVhePRYg.js +1 -0
- package/dist/web/assets/dagre-E77IOHMT-Dzx0A6ZU.js +4 -0
- package/dist/web/assets/diagram-H7BISOXX-CC9pRew1.js +43 -0
- package/dist/web/assets/diagram-JC5VWROH-Bau_i9tf.js +24 -0
- package/dist/web/assets/diagram-LXUTUG65-D9_FM2Gt.js +10 -0
- package/dist/web/assets/diagram-WEHSV5V5-BMlayouL.js +24 -0
- package/dist/web/assets/erDiagram-GCSMX5X6-C3dhDFA8.js +85 -0
- package/dist/web/assets/flowDiagram-OTCZ4VVT-CWSFWmhr.js +162 -0
- package/dist/web/assets/ganttDiagram-MUNLMDZQ-D3a67Yol.js +292 -0
- package/dist/web/assets/gitGraphDiagram-3HKGZ4G3-7jmry-vM.js +106 -0
- package/dist/web/assets/index-BgeqpYgd.js +1415 -0
- package/dist/web/assets/index-CT0GtFLZ.css +1 -0
- package/dist/web/assets/infoDiagram-MN7RKWGX-G7lhP0Ib.js +2 -0
- package/dist/web/assets/ishikawaDiagram-YMYX4NHK-DUoJvNP2.js +70 -0
- package/dist/web/assets/journeyDiagram-SO5T7YLQ-RMFPNNqz.js +139 -0
- package/dist/web/assets/kanban-definition-LJHFXRCJ-BzpDs1K9.js +89 -0
- package/dist/web/assets/katex-GD7MH7QM-DBQvrix-.js +261 -0
- package/dist/web/assets/mindmap-definition-2EUWGEK5-Bk0O4roa.js +96 -0
- package/dist/web/assets/pieDiagram-3IATQBI2-DKU7kpgS.js +30 -0
- package/dist/web/assets/quadrantDiagram-E256RVCF-BY0TGWCS.js +7 -0
- package/dist/web/assets/requirementDiagram-M5DCFWZL-DLHOVTSv.js +84 -0
- package/dist/web/assets/sankeyDiagram-L3NBLAOT-DVMj5rX2.js +10 -0
- package/dist/web/assets/sequenceDiagram-ZOUHS735-CJC73bV-.js +157 -0
- package/dist/web/assets/stateDiagram-MLPALWAM-BCFyESls.js +1 -0
- package/dist/web/assets/stateDiagram-v2-B5LQ5ZB2-DahzzIca.js +1 -0
- package/dist/web/assets/timeline-definition-5SPVSISX-TRSDRgPw.js +120 -0
- package/dist/web/assets/vennDiagram-IE5QUKF5-DNy7HRBM.js +34 -0
- package/dist/web/assets/wardley-RL74JXVD-BCRCBASE-B-eZEzf9.js +161 -0
- package/dist/web/assets/wardleyDiagram-XU3VSMPF-BP-r1xzR.js +20 -0
- package/dist/web/assets/xychartDiagram-ZHJ5623Y-Dr9r7a35.js +7 -0
- package/dist/web/codragraph-logo-512.png +0 -0
- package/dist/web/codragraph-logo.png +0 -0
- package/dist/web/favicon.png +0 -0
- package/dist/web/index.html +36 -0
- package/hooks/claude/codragraph-hook.cjs +24 -9
- package/hooks/claude/pre-tool-use.sh +6 -1
- package/package.json +3 -1
- package/scripts/build.js +62 -4
- package/scripts/patch-tree-sitter-swift.cjs +0 -1
- package/skills/codragraph-cli.md +1 -1
- package/vendor/leiden/index.cjs +272 -285
- package/vendor/leiden/utils.cjs +264 -274
- package/dist/_shared/lbug/schema-constants.d.ts +0 -16
- package/dist/_shared/lbug/schema-constants.d.ts.map +0 -1
- package/dist/_shared/lbug/schema-constants.js +0 -67
- package/dist/_shared/lbug/schema-constants.js.map +0 -1
- package/dist/core/graphstore/lbug-row-source.d.ts +0 -19
- package/dist/core/graphstore/lbug-row-source.js +0 -141
- package/dist/core/lbug/content-read.d.ts +0 -46
- package/dist/core/lbug/content-read.js +0 -64
- package/dist/core/lbug/csv-generator.d.ts +0 -29
- package/dist/core/lbug/csv-generator.js +0 -492
- package/dist/core/lbug/lbug-adapter.d.ts +0 -176
- package/dist/core/lbug/lbug-adapter.js +0 -1320
- package/dist/core/lbug/pool-adapter.d.ts +0 -93
- package/dist/core/lbug/pool-adapter.js +0 -550
- package/dist/core/lbug/schema.d.ts +0 -62
- package/dist/core/lbug/schema.js +0 -502
- package/dist/mcp/core/lbug-adapter.d.ts +0 -5
- package/dist/mcp/core/lbug-adapter.js +0 -5
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{c as He}from"./chunk-AEOMTBSW-BgTIXPsY.js";import{d as Be}from"./wardley-RL74JXVD-BCRCBASE-B-eZEzf9.js";import{m as A,a7 as Ve,as as ze,p as xe,e as We,s as je,h as $e,n as qe,l as Je,a as Ze,o as Ke,L as Qe,y as ti,O as ei,q as ue,aB as fe,aH as ge,c as ii,i as ri,J as ni,r as oi,aI as ai,aJ as si,a6 as pe}from"./index-BgeqpYgd.js";import{r as Oe}from"./chunk-7RZVMHOQ-BitYcNVR.js";import"./chunk-H3VCZNTA-Cx5XV_aC.js";var we=pe((O,I)=>{A(function(L,M){typeof O=="object"&&typeof I=="object"?I.exports=M():typeof define=="function"&&define.amd?define([],M):typeof O=="object"?O.layoutBase=M():L.layoutBase=M()},"webpackUniversalModuleDefinition")(O,function(){return function(L){var M={};function T(c){if(M[c])return M[c].exports;var d=M[c]={i:c,l:!1,exports:{}};return L[c].call(d.exports,d,d.exports,T),d.l=!0,d.exports}return A(T,"__webpack_require__"),T.m=L,T.c=M,T.i=function(c){return c},T.d=function(c,d,n){T.o(c,d)||Object.defineProperty(c,d,{configurable:!1,enumerable:!0,get:n})},T.n=function(c){var d=c&&c.__esModule?A(function(){return c.default},"getDefault"):A(function(){return c},"getModuleExports");return T.d(d,"a",d),d},T.o=function(c,d){return Object.prototype.hasOwnProperty.call(c,d)},T.p="",T(T.s=28)}([function(L,M,T){function c(){}A(c,"LayoutConstants"),c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,L.exports=c},function(L,M,T){var c=T(2),d=T(8),n=T(9);function e(h,i,f){c.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=h,this.target=i}A(e,"LEdge"),e.prototype=Object.create(c.prototype);for(var t in c)e[t]=c[t];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(h){if(this.source===h)return this.target;if(this.target===h)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(h,i){for(var f=this.getOtherEnd(h),o=i.getGraphManager().getRoot();;){if(f.getOwner()==i)return f;if(f.getOwner()==o)break;f=f.getOwner().getParent()}return null},e.prototype.updateLength=function(){var h=new Array(4);this.isOverlapingSourceAndTarget=d.getIntersection(this.target.getRect(),this.source.getRect(),h),this.isOverlapingSourceAndTarget||(this.lengthX=h[0]-h[2],this.lengthY=h[1]-h[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=e},function(L,M,T){function c(d){this.vGraphObject=d}A(c,"LGraphObject"),L.exports=c},function(L,M,T){var c=T(2),d=T(10),n=T(13),e=T(0),t=T(16),h=T(5);function i(o,r,s,u){s==null&&u==null&&(u=r),c.call(this,u),o.graphManager!=null&&(o=o.graphManager),this.estimatedSize=d.MIN_VALUE,this.inclusionTreeDepth=d.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=o,s!=null&&r!=null?this.rect=new n(r.x,r.y,s.width,s.height):this.rect=new n}A(i,"LNode"),i.prototype=Object.create(c.prototype);for(var f in c)i[f]=c[f];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(o){this.rect.width=o},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(o){this.rect.height=o},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(o,r){this.rect.x=o.x,this.rect.y=o.y,this.rect.width=r.width,this.rect.height=r.height},i.prototype.setCenter=function(o,r){this.rect.x=o-this.rect.width/2,this.rect.y=r-this.rect.height/2},i.prototype.setLocation=function(o,r){this.rect.x=o,this.rect.y=r},i.prototype.moveBy=function(o,r){this.rect.x+=o,this.rect.y+=r},i.prototype.getEdgeListToNode=function(o){var r=[],s=this;return s.edges.forEach(function(u){if(u.target==o){if(u.source!=s)throw"Incorrect edge source!";r.push(u)}}),r},i.prototype.getEdgesBetween=function(o){var r=[],s=this;return s.edges.forEach(function(u){if(!(u.source==s||u.target==s))throw"Incorrect edge source and/or target";(u.target==o||u.source==o)&&r.push(u)}),r},i.prototype.getNeighborsList=function(){var o=new Set,r=this;return r.edges.forEach(function(s){if(s.source==r)o.add(s.target);else{if(s.target!=r)throw"Incorrect incidency!";o.add(s.source)}}),o},i.prototype.withChildren=function(){var o=new Set,r,s;if(o.add(this),this.child!=null)for(var u=this.child.getNodes(),l=0;l<u.length;l++)r=u[l],s=r.withChildren(),s.forEach(function(N){o.add(N)});return o},i.prototype.getNoOfChildren=function(){var o=0,r;if(this.child==null)o=1;else for(var s=this.child.getNodes(),u=0;u<s.length;u++)r=s[u],o+=r.getNoOfChildren();return o==0&&(o=1),o},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var o,r,s=-e.INITIAL_WORLD_BOUNDARY,u=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_X+t.nextDouble()*(u-s)+s;var l=-e.INITIAL_WORLD_BOUNDARY,N=e.INITIAL_WORLD_BOUNDARY;r=e.WORLD_CENTER_Y+t.nextDouble()*(N-l)+l,this.rect.x=o,this.rect.y=r},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var o=this.getChild();if(o.updateBounds(!0),this.rect.x=o.getLeft(),this.rect.y=o.getTop(),this.setWidth(o.getRight()-o.getLeft()),this.setHeight(o.getBottom()-o.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var r=o.getRight()-o.getLeft(),s=o.getBottom()-o.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(r+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>r?(this.rect.x-=(this.labelWidth-r)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(r+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==d.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(o){var r=this.rect.x;r>e.WORLD_BOUNDARY?r=e.WORLD_BOUNDARY:r<-e.WORLD_BOUNDARY&&(r=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var u=new h(r,s),l=o.inverseTransformPoint(u);this.setLocation(l.x,l.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},L.exports=i},function(L,M,T){var c=T(0);function d(){}A(d,"FDLayoutConstants");for(var n in c)d[n]=c[n];d.MAX_ITERATIONS=2500,d.DEFAULT_EDGE_LENGTH=50,d.DEFAULT_SPRING_STRENGTH=.45,d.DEFAULT_REPULSION_STRENGTH=4500,d.DEFAULT_GRAVITY_STRENGTH=.4,d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,d.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,d.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,d.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,d.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,d.COOLING_ADAPTATION_FACTOR=.33,d.ADAPTATION_LOWER_NODE_LIMIT=1e3,d.ADAPTATION_UPPER_NODE_LIMIT=5e3,d.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,d.MAX_NODE_DISPLACEMENT=d.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,d.CONVERGENCE_CHECK_PERIOD=100,d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,d.MIN_EDGE_LENGTH=1,d.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=d},function(L,M,T){function c(d,n){d==null&&n==null?(this.x=0,this.y=0):(this.x=d,this.y=n)}A(c,"PointD"),c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(d){this.x=d},c.prototype.setY=function(d){this.y=d},c.prototype.getDifference=function(d){return new DimensionD(this.x-d.x,this.y-d.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(d){return this.x+=d.width,this.y+=d.height,this},L.exports=c},function(L,M,T){var c=T(2),d=T(10),n=T(0),e=T(7),t=T(3),h=T(1),i=T(13),f=T(12),o=T(11);function r(u,l,N){c.call(this,N),this.estimatedSize=d.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}A(r,"LGraph"),r.prototype=Object.create(c.prototype);for(var s in c)r[s]=c[s];r.prototype.getNodes=function(){return this.nodes},r.prototype.getEdges=function(){return this.edges},r.prototype.getGraphManager=function(){return this.graphManager},r.prototype.getParent=function(){return this.parent},r.prototype.getLeft=function(){return this.left},r.prototype.getRight=function(){return this.right},r.prototype.getTop=function(){return this.top},r.prototype.getBottom=function(){return this.bottom},r.prototype.isConnected=function(){return this.isConnected},r.prototype.add=function(u,l,N){if(l==null&&N==null){var g=u;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var E=u;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(N)>-1))throw"Source or target not in graph!";if(!(l.owner==N.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=N.owner?null:(E.source=l,E.target=N,E.isInterGraph=!1,this.getEdges().push(E),l.edges.push(E),N!=l&&N.edges.push(E),E)}},r.prototype.remove=function(u){var l=u;if(u instanceof t){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var N=l.edges.slice(),g,E=N.length,w=0;w<E;w++)g=N[w],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var _=this.nodes.indexOf(l);if(_==-1)throw"Node not in owner node list!";this.nodes.splice(_,1)}else if(u instanceof h){var g=u;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var U=g.source.edges.indexOf(g),Y=g.target.edges.indexOf(g);if(!(U>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(U,1),g.target!=g.source&&g.target.edges.splice(Y,1);var _=g.source.owner.getEdges().indexOf(g);if(_==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(_,1)}},r.prototype.updateLeftTop=function(){for(var u=d.MAX_VALUE,l=d.MAX_VALUE,N,g,E,w=this.getNodes(),_=w.length,U=0;U<_;U++){var Y=w[U];N=Y.getTop(),g=Y.getLeft(),u>N&&(u=N),l>g&&(l=g)}return u==d.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?E=w[0].getParent().paddingLeft:E=this.margin,this.left=l-E,this.top=u-E,new f(this.left,this.top))},r.prototype.updateBounds=function(u){for(var l=d.MAX_VALUE,N=-d.MAX_VALUE,g=d.MAX_VALUE,E=-d.MAX_VALUE,w,_,U,Y,V,z=this.nodes,q=z.length,b=0;b<q;b++){var nt=z[b];u&&nt.child!=null&&nt.updateBounds(),w=nt.getLeft(),_=nt.getRight(),U=nt.getTop(),Y=nt.getBottom(),l>w&&(l=w),N<_&&(N=_),g>U&&(g=U),E<Y&&(E=Y)}var a=new i(l,g,N-l,E-g);l==d.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),z[0].getParent().paddingLeft!=null?V=z[0].getParent().paddingLeft:V=this.margin,this.left=a.x-V,this.right=a.x+a.width+V,this.top=a.y-V,this.bottom=a.y+a.height+V},r.calculateBounds=function(u){for(var l=d.MAX_VALUE,N=-d.MAX_VALUE,g=d.MAX_VALUE,E=-d.MAX_VALUE,w,_,U,Y,V=u.length,z=0;z<V;z++){var q=u[z];w=q.getLeft(),_=q.getRight(),U=q.getTop(),Y=q.getBottom(),l>w&&(l=w),N<_&&(N=_),g>U&&(g=U),E<Y&&(E=Y)}var b=new i(l,g,N-l,E-g);return b},r.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==d.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){for(var u=0,l=this.nodes,N=l.length,g=0;g<N;g++){var E=l[g];u+=E.calcEstimatedSize()}return u==0?this.estimatedSize=n.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=u/Math.sqrt(this.nodes.length),this.estimatedSize},r.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new o,N=new Set,g=this.nodes[0],E,w,_=g.withChildren();for(_.forEach(function(b){l.push(b),N.add(b)});l.length!==0;){g=l.shift(),E=g.getEdges();for(var U=E.length,Y=0;Y<U;Y++){var V=E[Y];if(w=V.getOtherEndInGraph(g,this),w!=null&&!N.has(w)){var z=w.withChildren();z.forEach(function(b){l.push(b),N.add(b)})}}}if(this.isConnected=!1,N.size>=this.nodes.length){var q=0;N.forEach(function(b){b.owner==u&&q++}),q==this.nodes.length&&(this.isConnected=!0)}},L.exports=r},function(L,M,T){var c,d=T(1);function n(e){c=T(6),this.layout=e,this.graphs=[],this.edges=[]}A(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),h=this.add(e,t);return this.setRootGraph(h),this.rootGraph},n.prototype.add=function(e,t,h,i,f){if(h==null&&i==null&&f==null){if(e==null)throw"Graph is null!";if(t==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(t.child!=null)throw"Already has a child!";return e.parent=t,t.child=e,e}else{f=h,i=t,h=e;var o=i.getOwner(),r=f.getOwner();if(!(o!=null&&o.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(r!=null&&r.getGraphManager()==this))throw"Target not in this graph mgr!";if(o==r)return h.isInterGraph=!1,o.add(h,i,f);if(h.isInterGraph=!0,h.source=i,h.target=f,this.edges.indexOf(h)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(h),!(h.source!=null&&h.target!=null))throw"Edge source and/or target is null!";if(!(h.source.edges.indexOf(h)==-1&&h.target.edges.indexOf(h)==-1))throw"Edge already in source and/or target incidency list!";return h.source.edges.push(h),h.target.edges.push(h),h}},n.prototype.remove=function(e){if(e instanceof c){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw"Invalid parent node!";var h=[];h=h.concat(t.getEdges());for(var i,f=h.length,o=0;o<f;o++)i=h[o],t.remove(i);var r=[];r=r.concat(t.getNodes());var s;f=r.length;for(var o=0;o<f;o++)s=r[o],t.remove(s);t==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(t);this.graphs.splice(u,1),t.parent=null}else if(e instanceof d){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var u=i.source.edges.indexOf(i);if(i.source.edges.splice(u,1),u=i.target.edges.indexOf(i),i.target.edges.splice(u,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var u=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(u,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),h=t.length,i=0;i<h;i++)e=e.concat(t[i].getNodes());this.allNodes=e}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){for(var e=[],t=this.getGraphs(),h=t.length,i=0;i<t.length;i++)e=e.concat(t[i].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(e,t){if(!(e!=null&&t!=null))throw"assert failed";if(e==t)return!0;var h=e.getOwner(),i;do{if(i=h.getParent(),i==null)break;if(i==t)return!0;if(h=i.getOwner(),h==null)break}while(!0);h=t.getOwner();do{if(i=h.getParent(),i==null)break;if(i==e)return!0;if(h=i.getOwner(),h==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var e,t,h,i,f,o=this.getAllEdges(),r=o.length,s=0;s<r;s++){if(e=o[s],t=e.source,h=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=h,t==h){e.lca=t.getOwner();continue}for(i=t.getOwner();e.lca==null;){for(e.targetInLca=h,f=h.getOwner();e.lca==null;){if(f==i){e.lca=f;break}if(f==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=f.getParent(),f=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var h=e.getOwner();do{if(h==null)break;var i=t.getOwner();do{if(i==null)break;if(i==h)return i;i=i.getParent().getOwner()}while(!0);h=h.getParent().getOwner()}while(!0);return h},n.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var h,i=e.getNodes(),f=i.length,o=0;o<f;o++)h=i[o],h.inclusionTreeDepth=t,h.child!=null&&this.calcInclusionTreeDepths(h.child,t+1)},n.prototype.includesInvalidEdge=function(){for(var e,t=[],h=this.edges.length,i=0;i<h;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&t.push(e);for(var i=0;i<t.length;i++)this.remove(t[i]);return!1},L.exports=n},function(L,M,T){var c=T(12);function d(){}A(d,"IGeometry"),d.calcSeparationAmount=function(n,e,t,h){if(!n.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(n,e,i),t[0]=Math.min(n.getRight(),e.getRight())-Math.max(n.x,e.x),t[1]=Math.min(n.getBottom(),e.getBottom())-Math.max(n.y,e.y),n.getX()<=e.getX()&&n.getRight()>=e.getRight()?t[0]+=Math.min(e.getX()-n.getX(),n.getRight()-e.getRight()):e.getX()<=n.getX()&&e.getRight()>=n.getRight()&&(t[0]+=Math.min(n.getX()-e.getX(),e.getRight()-n.getRight())),n.getY()<=e.getY()&&n.getBottom()>=e.getBottom()?t[1]+=Math.min(e.getY()-n.getY(),n.getBottom()-e.getBottom()):e.getY()<=n.getY()&&e.getBottom()>=n.getBottom()&&(t[1]+=Math.min(n.getY()-e.getY(),e.getBottom()-n.getBottom()));var f=Math.abs((e.getCenterY()-n.getCenterY())/(e.getCenterX()-n.getCenterX()));e.getCenterY()===n.getCenterY()&&e.getCenterX()===n.getCenterX()&&(f=1);var o=f*t[0],r=t[1]/f;t[0]<r?r=t[0]:o=t[1],t[0]=-1*i[0]*(r/2+h),t[1]=-1*i[1]*(o/2+h)},d.decideDirectionsForOverlappingNodes=function(n,e,t){n.getCenterX()<e.getCenterX()?t[0]=-1:t[0]=1,n.getCenterY()<e.getCenterY()?t[1]=-1:t[1]=1},d.getIntersection2=function(n,e,t){var h=n.getCenterX(),i=n.getCenterY(),f=e.getCenterX(),o=e.getCenterY();if(n.intersects(e))return t[0]=h,t[1]=i,t[2]=f,t[3]=o,!0;var r=n.getX(),s=n.getY(),u=n.getRight(),l=n.getX(),N=n.getBottom(),g=n.getRight(),E=n.getWidthHalf(),w=n.getHeightHalf(),_=e.getX(),U=e.getY(),Y=e.getRight(),V=e.getX(),z=e.getBottom(),q=e.getRight(),b=e.getWidthHalf(),nt=e.getHeightHalf(),a=!1,v=!1;if(h===f){if(i>o)return t[0]=h,t[1]=s,t[2]=f,t[3]=z,!1;if(i<o)return t[0]=h,t[1]=N,t[2]=f,t[3]=U,!1}else if(i===o){if(h>f)return t[0]=r,t[1]=i,t[2]=Y,t[3]=o,!1;if(h<f)return t[0]=u,t[1]=i,t[2]=_,t[3]=o,!1}else{var m=n.height/n.width,y=e.height/e.width,p=(o-i)/(f-h),R=void 0,x=void 0,D=void 0,X=void 0,H=void 0,W=void 0;if(-m===p?h>f?(t[0]=l,t[1]=N,a=!0):(t[0]=u,t[1]=s,a=!0):m===p&&(h>f?(t[0]=r,t[1]=s,a=!0):(t[0]=g,t[1]=N,a=!0)),-y===p?f>h?(t[2]=V,t[3]=z,v=!0):(t[2]=Y,t[3]=U,v=!0):y===p&&(f>h?(t[2]=_,t[3]=U,v=!0):(t[2]=q,t[3]=z,v=!0)),a&&v)return!1;if(h>f?i>o?(R=this.getCardinalDirection(m,p,4),x=this.getCardinalDirection(y,p,2)):(R=this.getCardinalDirection(-m,p,3),x=this.getCardinalDirection(-y,p,1)):i>o?(R=this.getCardinalDirection(-m,p,1),x=this.getCardinalDirection(-y,p,3)):(R=this.getCardinalDirection(m,p,2),x=this.getCardinalDirection(y,p,4)),!a)switch(R){case 1:X=s,D=h+-w/p,t[0]=D,t[1]=X;break;case 2:D=g,X=i+E*p,t[0]=D,t[1]=X;break;case 3:X=N,D=h+w/p,t[0]=D,t[1]=X;break;case 4:D=l,X=i+-E*p,t[0]=D,t[1]=X;break}if(!v)switch(x){case 1:W=U,H=f+-nt/p,t[2]=H,t[3]=W;break;case 2:H=q,W=o+b*p,t[2]=H,t[3]=W;break;case 3:W=z,H=f+nt/p,t[2]=H,t[3]=W;break;case 4:H=V,W=o+-b*p,t[2]=H,t[3]=W;break}}return!1},d.getCardinalDirection=function(n,e,t){return n>e?t:1+t%4},d.getIntersection=function(n,e,t,h){if(h==null)return this.getIntersection2(n,e,t);var i=n.x,f=n.y,o=e.x,r=e.y,s=t.x,u=t.y,l=h.x,N=h.y,g=void 0,E=void 0,w=void 0,_=void 0,U=void 0,Y=void 0,V=void 0,z=void 0,q=void 0;return w=r-f,U=i-o,V=o*f-i*r,_=N-u,Y=s-l,z=l*u-s*N,q=w*Y-_*U,q===0?null:(g=(U*z-Y*V)/q,E=(_*V-w*z)/q,new c(g,E))},d.angleOfVector=function(n,e,t,h){var i=void 0;return n!==t?(i=Math.atan((h-e)/(t-n)),t<n?i+=Math.PI:h<e&&(i+=this.TWO_PI)):h<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},d.doIntersect=function(n,e,t,h){var i=n.x,f=n.y,o=e.x,r=e.y,s=t.x,u=t.y,l=h.x,N=h.y,g=(o-i)*(N-u)-(l-s)*(r-f);if(g===0)return!1;var E=((N-u)*(l-i)+(s-l)*(N-f))/g,w=((f-r)*(l-i)+(o-i)*(N-f))/g;return 0<E&&E<1&&0<w&&w<1},d.findCircleLineIntersections=function(n,e,t,h,i,f,o){var r=(t-n)*(t-n)+(h-e)*(h-e),s=2*((n-i)*(t-n)+(e-f)*(h-e)),u=(n-i)*(n-i)+(e-f)*(e-f)-o*o,l=s*s-4*r*u;if(l>=0){var N=(-s+Math.sqrt(s*s-4*r*u))/(2*r),g=(-s-Math.sqrt(s*s-4*r*u))/(2*r),E=null;return N>=0&&N<=1?[N]:g>=0&&g<=1?[g]:E}else return null},d.HALF_PI=.5*Math.PI,d.ONE_AND_HALF_PI=1.5*Math.PI,d.TWO_PI=2*Math.PI,d.THREE_PI=3*Math.PI,L.exports=d},function(L,M,T){function c(){}A(c,"IMath"),c.sign=function(d){return d>0?1:d<0?-1:0},c.floor=function(d){return d<0?Math.ceil(d):Math.floor(d)},c.ceil=function(d){return d<0?Math.floor(d):Math.ceil(d)},L.exports=c},function(L,M,T){function c(){}A(c,"Integer"),c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,L.exports=c},function(L,M,T){var c=function(){function i(f,o){for(var r=0;r<o.length;r++){var s=o[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(f,s.key,s)}}return A(i,"defineProperties"),function(f,o,r){return o&&i(f.prototype,o),r&&i(f,r),f}}();function d(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}A(d,"_classCallCheck");var n=A(function(i){return{value:i,next:null,prev:null}},"nodeFrom"),e=A(function(i,f,o,r){return i!==null?i.next=f:r.head=f,o!==null?o.prev=f:r.tail=f,f.prev=i,f.next=o,r.length++,f},"add"),t=A(function(i,f){var o=i.prev,r=i.next;return o!==null?o.next=r:f.head=r,r!==null?r.prev=o:f.tail=o,i.prev=i.next=null,f.length--,i},"_remove"),h=function(){function i(f){var o=this;d(this,i),this.length=0,this.head=null,this.tail=null,f==null||f.forEach(function(r){return o.push(r)})}return A(i,"LinkedList"),c(i,[{key:"size",value:A(function(){return this.length},"size")},{key:"insertBefore",value:A(function(f,o){return e(o.prev,n(f),o,this)},"insertBefore")},{key:"insertAfter",value:A(function(f,o){return e(o,n(f),o.next,this)},"insertAfter")},{key:"insertNodeBefore",value:A(function(f,o){return e(o.prev,f,o,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:A(function(f,o){return e(o,f,o.next,this)},"insertNodeAfter")},{key:"push",value:A(function(f){return e(this.tail,n(f),null,this)},"push")},{key:"unshift",value:A(function(f){return e(null,n(f),this.head,this)},"unshift")},{key:"remove",value:A(function(f){return t(f,this)},"remove")},{key:"pop",value:A(function(){return t(this.tail,this).value},"pop")},{key:"popNode",value:A(function(){return t(this.tail,this)},"popNode")},{key:"shift",value:A(function(){return t(this.head,this).value},"shift")},{key:"shiftNode",value:A(function(){return t(this.head,this)},"shiftNode")},{key:"get_object_at",value:A(function(f){if(f<=this.length()){for(var o=1,r=this.head;o<f;)r=r.next,o++;return r.value}},"get_object_at")},{key:"set_object_at",value:A(function(f,o){if(f<=this.length()){for(var r=1,s=this.head;r<f;)s=s.next,r++;s.value=o}},"set_object_at")}]),i}();L.exports=h},function(L,M,T){function c(d,n,e){this.x=null,this.y=null,d==null&&n==null&&e==null?(this.x=0,this.y=0):typeof d=="number"&&typeof n=="number"&&e==null?(this.x=d,this.y=n):d.constructor.name=="Point"&&n==null&&e==null&&(e=d,this.x=e.x,this.y=e.y)}A(c,"Point"),c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(d,n,e){d.constructor.name=="Point"&&n==null&&e==null?(e=d,this.setLocation(e.x,e.y)):typeof d=="number"&&typeof n=="number"&&e==null&&(parseInt(d)==d&&parseInt(n)==n?this.move(d,n):(this.x=Math.floor(d+.5),this.y=Math.floor(n+.5)))},c.prototype.move=function(d,n){this.x=d,this.y=n},c.prototype.translate=function(d,n){this.x+=d,this.y+=n},c.prototype.equals=function(d){if(d.constructor.name=="Point"){var n=d;return this.x==n.x&&this.y==n.y}return this==d},c.prototype.toString=function(){return new c().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=c},function(L,M,T){function c(d,n,e,t){this.x=0,this.y=0,this.width=0,this.height=0,d!=null&&n!=null&&e!=null&&t!=null&&(this.x=d,this.y=n,this.width=e,this.height=t)}A(c,"RectangleD"),c.prototype.getX=function(){return this.x},c.prototype.setX=function(d){this.x=d},c.prototype.getY=function(){return this.y},c.prototype.setY=function(d){this.y=d},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(d){this.width=d},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(d){this.height=d},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(d){return!(this.getRight()<d.x||this.getBottom()<d.y||d.getRight()<this.x||d.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},L.exports=c},function(L,M,T){var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function d(){}A(d,"UniqueIDGeneretor"),d.lastID=0,d.createID=function(n){return d.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=d.getString(),d.lastID++),n.uniqueID)},d.getString=function(n){return n==null&&(n=d.lastID),"Object#"+n},d.isPrimitive=function(n){var e=typeof n>"u"?"undefined":c(n);return n==null||e!="object"&&e!="function"},L.exports=d},function(L,M,T){function c(s){if(Array.isArray(s)){for(var u=0,l=Array(s.length);u<s.length;u++)l[u]=s[u];return l}else return Array.from(s)}A(c,"_toConsumableArray");var d=T(0),n=T(7),e=T(3),t=T(1),h=T(6),i=T(5),f=T(17),o=T(29);function r(s){o.call(this),this.layoutQuality=d.QUALITY,this.createBendsAsNeeded=d.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=d.DEFAULT_INCREMENTAL,this.animationOnLayout=d.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=d.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=d.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=d.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}A(r,"Layout"),r.RANDOM_SEED=1,r.prototype=Object.create(o.prototype),r.prototype.getGraphManager=function(){return this.graphManager},r.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},r.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},r.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},r.prototype.newGraphManager=function(){var s=new n(this);return this.graphManager=s,s},r.prototype.newGraph=function(s){return new h(null,this.graphManager,s)},r.prototype.newNode=function(s){return new e(this.graphManager,s)},r.prototype.newEdge=function(s){return new t(null,null,s)},r.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},r.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),d.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},r.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},r.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var s,u=this.graphManager.getAllEdges(),l=0;l<u.length;l++)s=u[l];for(var N,g=this.graphManager.getRoot().getNodes(),l=0;l<g.length;l++)N=g[l];this.update(this.graphManager.getRoot())}},r.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof e){var u=s;if(u.getChild()!=null)for(var l=u.getChild().getNodes(),N=0;N<l.length;N++)update(l[N]);if(u.vGraphObject!=null){var g=u.vGraphObject;g.update(u)}}else if(s instanceof t){var E=s;if(E.vGraphObject!=null){var w=E.vGraphObject;w.update(E)}}else if(s instanceof h){var _=s;if(_.vGraphObject!=null){var U=_.vGraphObject;U.update(_)}}},r.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=d.QUALITY,this.animationDuringLayout=d.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=d.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=d.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=d.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=d.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=d.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},r.prototype.transform=function(s){if(s==null)this.transform(new i(0,0));else{var u=new f,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){u.setWorldOrgX(s.x),u.setWorldOrgY(s.y),u.setDeviceOrgX(l.x),u.setDeviceOrgY(l.y);for(var N=this.getAllNodes(),g,E=0;E<N.length;E++)g=N[E],g.transform(u)}}},r.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var u,l,N=s.getNodes(),g=0;g<N.length;g++)u=N[g],l=u.getChild(),l==null||l.getNodes().length==0?u.scatter():(this.positionNodesRandomly(l),u.updateBounds())},r.prototype.getFlatForest=function(){for(var s=[],u=!0,l=this.graphManager.getRoot().getNodes(),N=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(N=!1);if(!N)return s;var E=new Set,w=[],_=new Map,U=[];for(U=U.concat(l);U.length>0&&u;){for(w.push(U[0]);w.length>0&&u;){var Y=w[0];w.splice(0,1),E.add(Y);for(var V=Y.getEdges(),g=0;g<V.length;g++){var z=V[g].getOtherEnd(Y);if(_.get(Y)!=z)if(!E.has(z))w.push(z),_.set(z,Y);else{u=!1;break}}}if(!u)s=[];else{var q=[].concat(c(E));s.push(q);for(var g=0;g<q.length;g++){var b=q[g],nt=U.indexOf(b);nt>-1&&U.splice(nt,1)}E=new Set,_=new Map}}return s},r.prototype.createDummyNodesForBendpoints=function(s){for(var u=[],l=s.source,N=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),N.add(E);var w=this.newEdge(null);this.graphManager.add(w,l,E),u.add(E),l=E}var w=this.newEdge(null);return this.graphManager.add(w,l,s.target),this.edgeToDummyNodes.set(s,u),s.isInterGraph()?this.graphManager.remove(s):N.remove(s),u},r.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(c(this.edgeToDummyNodes.keys())).concat(s);for(var u=0;u<s.length;u++){var l=s[u];if(l.bendpoints.length>0){for(var N=this.edgeToDummyNodes.get(l),g=0;g<N.length;g++){var E=N[g],w=new i(E.getCenterX(),E.getCenterY()),_=l.bendpoints.get(g);_.x=w.x,_.y=w.y,E.getOwner().remove(E)}this.graphManager.add(l,l.source,l.target)}}},r.transform=function(s,u,l,N){if(l!=null&&N!=null){var g=u;if(s<=50){var E=u/l;g-=(u-E)/50*(50-s)}else{var w=u*N;g+=(w-u)/50*(s-50)}return g}else{var _,U;return s<=50?(_=9*u/500,U=u/10):(_=9*u/50,U=-8*u),_*s+U}},r.findCenterOfTree=function(s){var u=[];u=u.concat(s);var l=[],N=new Map,g=!1,E=null;(u.length==1||u.length==2)&&(g=!0,E=u[0]);for(var w=0;w<u.length;w++){var _=u[w],U=_.getNeighborsList().size;N.set(_,_.getNeighborsList().size),U==1&&l.push(_)}var Y=[];for(Y=Y.concat(l);!g;){var V=[];V=V.concat(Y),Y=[];for(var w=0;w<u.length;w++){var _=u[w],z=u.indexOf(_);z>=0&&u.splice(z,1);var q=_.getNeighborsList();q.forEach(function(a){if(l.indexOf(a)<0){var v=N.get(a),m=v-1;m==1&&Y.push(a),N.set(a,m)}})}l=l.concat(Y),(u.length==1||u.length==2)&&(g=!0,E=u[0])}return E},r.prototype.setGraphManager=function(s){this.graphManager=s},L.exports=r},function(L,M,T){function c(){}A(c,"RandomSeed"),c.seed=1,c.x=0,c.nextDouble=function(){return c.x=Math.sin(c.seed++)*1e4,c.x-Math.floor(c.x)},L.exports=c},function(L,M,T){var c=T(5);function d(n,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}A(d,"Transform"),d.prototype.getWorldOrgX=function(){return this.lworldOrgX},d.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},d.prototype.getWorldOrgY=function(){return this.lworldOrgY},d.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},d.prototype.getWorldExtX=function(){return this.lworldExtX},d.prototype.setWorldExtX=function(n){this.lworldExtX=n},d.prototype.getWorldExtY=function(){return this.lworldExtY},d.prototype.setWorldExtY=function(n){this.lworldExtY=n},d.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},d.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},d.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},d.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},d.prototype.getDeviceExtX=function(){return this.ldeviceExtX},d.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},d.prototype.getDeviceExtY=function(){return this.ldeviceExtY},d.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},d.prototype.transformX=function(n){var e=0,t=this.lworldExtX;return t!=0&&(e=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/t),e},d.prototype.transformY=function(n){var e=0,t=this.lworldExtY;return t!=0&&(e=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/t),e},d.prototype.inverseTransformX=function(n){var e=0,t=this.ldeviceExtX;return t!=0&&(e=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/t),e},d.prototype.inverseTransformY=function(n){var e=0,t=this.ldeviceExtY;return t!=0&&(e=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/t),e},d.prototype.inverseTransformPoint=function(n){var e=new c(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return e},L.exports=d},function(L,M,T){function c(o){if(Array.isArray(o)){for(var r=0,s=Array(o.length);r<o.length;r++)s[r]=o[r];return s}else return Array.from(o)}A(c,"_toConsumableArray");var d=T(15),n=T(4),e=T(0),t=T(8),h=T(9);function i(){d.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}A(i,"FDLayout"),i.prototype=Object.create(d.prototype);for(var f in d)i[f]=d[f];i.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var o,r,s,u,l,N,g,E=this.getGraphManager().getAllEdges(),w=0;w<E.length;w++)o=E[w],r=o.idealLength,o.isInterGraph&&(u=o.getSource(),l=o.getTarget(),N=o.getSourceInLca().getEstimatedSize(),g=o.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(o.idealLength+=N+g-2*e.SIMPLE_NODE_SIZE),s=o.getLca().getInclusionTreeDepth(),o.idealLength+=r*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*s))},i.prototype.initSpringEmbedder=function(){var o=this.getAllNodes().length;this.incremental?(o>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(o-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(o>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(o-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var o=this.getAllEdges(),r,s=0;s<o.length;s++)r=o[s],this.calcSpringForce(r,r.idealLength)},i.prototype.calcRepulsionForces=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,u,l,N,g=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),E=new Set,s=0;s<g.length;s++)l=g[s],this.calculateRepulsionForceOfANode(l,E,o,r),E.add(l);else for(s=0;s<g.length;s++)for(l=g[s],u=s+1;u<g.length;u++)N=g[u],l.getOwner()==N.getOwner()&&this.calcRepulsionForce(l,N)},i.prototype.calcGravitationalForces=function(){for(var o,r=this.getAllNodesToApplyGravitation(),s=0;s<r.length;s++)o=r[s],this.calcGravitationalForce(o)},i.prototype.moveNodes=function(){for(var o=this.getAllNodes(),r,s=0;s<o.length;s++)r=o[s],r.move()},i.prototype.calcSpringForce=function(o,r){var s=o.getSource(),u=o.getTarget(),l,N,g,E;if(this.uniformLeafNodeSizes&&s.getChild()==null&&u.getChild()==null)o.updateLengthSimple();else if(o.updateLength(),o.isOverlapingSourceAndTarget)return;l=o.getLength(),l!=0&&(N=o.edgeElasticity*(l-r),g=N*(o.lengthX/l),E=N*(o.lengthY/l),s.springForceX+=g,s.springForceY+=E,u.springForceX-=g,u.springForceY-=E)},i.prototype.calcRepulsionForce=function(o,r){var s=o.getRect(),u=r.getRect(),l=new Array(2),N=new Array(4),g,E,w,_,U,Y,V;if(s.intersects(u)){t.calcSeparationAmount(s,u,l,n.DEFAULT_EDGE_LENGTH/2),Y=2*l[0],V=2*l[1];var z=o.noOfChildren*r.noOfChildren/(o.noOfChildren+r.noOfChildren);o.repulsionForceX-=z*Y,o.repulsionForceY-=z*V,r.repulsionForceX+=z*Y,r.repulsionForceY+=z*V}else this.uniformLeafNodeSizes&&o.getChild()==null&&r.getChild()==null?(g=u.getCenterX()-s.getCenterX(),E=u.getCenterY()-s.getCenterY()):(t.getIntersection(s,u,N),g=N[2]-N[0],E=N[3]-N[1]),Math.abs(g)<n.MIN_REPULSION_DIST&&(g=h.sign(g)*n.MIN_REPULSION_DIST),Math.abs(E)<n.MIN_REPULSION_DIST&&(E=h.sign(E)*n.MIN_REPULSION_DIST),w=g*g+E*E,_=Math.sqrt(w),U=(o.nodeRepulsion/2+r.nodeRepulsion/2)*o.noOfChildren*r.noOfChildren/w,Y=U*g/_,V=U*E/_,o.repulsionForceX-=Y,o.repulsionForceY-=V,r.repulsionForceX+=Y,r.repulsionForceY+=V},i.prototype.calcGravitationalForce=function(o){var r,s,u,l,N,g,E,w;r=o.getOwner(),s=(r.getRight()+r.getLeft())/2,u=(r.getTop()+r.getBottom())/2,l=o.getCenterX()-s,N=o.getCenterY()-u,g=Math.abs(l)+o.getWidth()/2,E=Math.abs(N)+o.getHeight()/2,o.getOwner()==this.graphManager.getRoot()?(w=r.getEstimatedSize()*this.gravityRangeFactor,(g>w||E>w)&&(o.gravitationForceX=-this.gravityConstant*l,o.gravitationForceY=-this.gravityConstant*N)):(w=r.getEstimatedSize()*this.compoundGravityRangeFactor,(g>w||E>w)&&(o.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,o.gravitationForceY=-this.gravityConstant*N*this.compoundGravityConstant))},i.prototype.isConverged=function(){var o,r=!1;return this.totalIterations>this.maxIterations/3&&(r=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),o=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,o||r},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var o,r=this.graphManager.getAllNodes(),s=0;s<r.length;s++)o=r[s],o.noOfChildren=o.getNoOfChildren()},i.prototype.calcGrid=function(o){var r=0,s=0;r=parseInt(Math.ceil((o.getRight()-o.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((o.getBottom()-o.getTop())/this.repulsionRange));for(var u=new Array(r),l=0;l<r;l++)u[l]=new Array(s);for(var l=0;l<r;l++)for(var N=0;N<s;N++)u[l][N]=new Array;return u},i.prototype.addNodeToGrid=function(o,r,s){var u=0,l=0,N=0,g=0;u=parseInt(Math.floor((o.getRect().x-r)/this.repulsionRange)),l=parseInt(Math.floor((o.getRect().width+o.getRect().x-r)/this.repulsionRange)),N=parseInt(Math.floor((o.getRect().y-s)/this.repulsionRange)),g=parseInt(Math.floor((o.getRect().height+o.getRect().y-s)/this.repulsionRange));for(var E=u;E<=l;E++)for(var w=N;w<=g;w++)this.grid[E][w].push(o),o.setGridCoordinates(u,l,N,g)},i.prototype.updateGrid=function(){var o,r,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),o=0;o<s.length;o++)r=s[o],this.addNodeToGrid(r,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(o,r,s,u){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s||u){var l=new Set;o.surrounding=new Array;for(var N,g=this.grid,E=o.startX-1;E<o.finishX+2;E++)for(var w=o.startY-1;w<o.finishY+2;w++)if(!(E<0||w<0||E>=g.length||w>=g[0].length)){for(var _=0;_<g[E][w].length;_++)if(N=g[E][w][_],!(o.getOwner()!=N.getOwner()||o==N)&&!r.has(N)&&!l.has(N)){var U=Math.abs(o.getCenterX()-N.getCenterX())-(o.getWidth()/2+N.getWidth()/2),Y=Math.abs(o.getCenterY()-N.getCenterY())-(o.getHeight()/2+N.getHeight()/2);U<=this.repulsionRange&&Y<=this.repulsionRange&&l.add(N)}}o.surrounding=[].concat(c(l))}for(E=0;E<o.surrounding.length;E++)this.calcRepulsionForce(o,o.surrounding[E])},i.prototype.calcRepulsionRange=function(){return 0},L.exports=i},function(L,M,T){var c=T(1),d=T(4);function n(t,h,i){c.call(this,t,h,i),this.idealLength=d.DEFAULT_EDGE_LENGTH,this.edgeElasticity=d.DEFAULT_SPRING_STRENGTH}A(n,"FDLayoutEdge"),n.prototype=Object.create(c.prototype);for(var e in c)n[e]=c[e];L.exports=n},function(L,M,T){var c=T(3),d=T(4);function n(t,h,i,f){c.call(this,t,h,i,f),this.nodeRepulsion=d.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}A(n,"FDLayoutNode"),n.prototype=Object.create(c.prototype);for(var e in c)n[e]=c[e];n.prototype.setGridCoordinates=function(t,h,i,f){this.startX=t,this.finishX=h,this.startY=i,this.finishY=f},L.exports=n},function(L,M,T){function c(d,n){this.width=0,this.height=0,d!==null&&n!==null&&(this.height=n,this.width=d)}A(c,"DimensionD"),c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(d){this.width=d},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(d){this.height=d},L.exports=c},function(L,M,T){var c=T(14);function d(){this.map={},this.keys=[]}A(d,"HashMap"),d.prototype.put=function(n,e){var t=c.createID(n);this.contains(t)||(this.map[t]=e,this.keys.push(n))},d.prototype.contains=function(n){return c.createID(n),this.map[n]!=null},d.prototype.get=function(n){var e=c.createID(n);return this.map[e]},d.prototype.keySet=function(){return this.keys},L.exports=d},function(L,M,T){var c=T(14);function d(){this.set={}}A(d,"HashSet"),d.prototype.add=function(n){var e=c.createID(n);this.contains(e)||(this.set[e]=n)},d.prototype.remove=function(n){delete this.set[c.createID(n)]},d.prototype.clear=function(){this.set={}},d.prototype.contains=function(n){return this.set[c.createID(n)]==n},d.prototype.isEmpty=function(){return this.size()===0},d.prototype.size=function(){return Object.keys(this.set).length},d.prototype.addAllTo=function(n){for(var e=Object.keys(this.set),t=e.length,h=0;h<t;h++)n.push(this.set[e[h]])},d.prototype.size=function(){return Object.keys(this.set).length},d.prototype.addAll=function(n){for(var e=n.length,t=0;t<e;t++){var h=n[t];this.add(h)}},L.exports=d},function(L,M,T){function c(){}A(c,"Matrix"),c.multMat=function(d,n){for(var e=[],t=0;t<d.length;t++){e[t]=[];for(var h=0;h<n[0].length;h++){e[t][h]=0;for(var i=0;i<d[0].length;i++)e[t][h]+=d[t][i]*n[i][h]}}return e},c.transpose=function(d){for(var n=[],e=0;e<d[0].length;e++){n[e]=[];for(var t=0;t<d.length;t++)n[e][t]=d[t][e]}return n},c.multCons=function(d,n){for(var e=[],t=0;t<d.length;t++)e[t]=d[t]*n;return e},c.minusOp=function(d,n){for(var e=[],t=0;t<d.length;t++)e[t]=d[t]-n[t];return e},c.dotProduct=function(d,n){for(var e=0,t=0;t<d.length;t++)e+=d[t]*n[t];return e},c.mag=function(d){return Math.sqrt(this.dotProduct(d,d))},c.normalize=function(d){for(var n=[],e=this.mag(d),t=0;t<d.length;t++)n[t]=d[t]/e;return n},c.multGamma=function(d){for(var n=[],e=0,t=0;t<d.length;t++)e+=d[t];e*=-1/d.length;for(var h=0;h<d.length;h++)n[h]=e+d[h];return n},c.multL=function(d,n,e){for(var t=[],h=[],i=[],f=0;f<n[0].length;f++){for(var o=0,r=0;r<n.length;r++)o+=-.5*n[r][f]*d[r];h[f]=o}for(var s=0;s<e.length;s++){for(var u=0,l=0;l<e.length;l++)u+=e[s][l]*h[l];i[s]=u}for(var N=0;N<n.length;N++){for(var g=0,E=0;E<n[0].length;E++)g+=n[N][E]*i[E];t[N]=g}return t},L.exports=c},function(L,M,T){var c=function(){function t(h,i){for(var f=0;f<i.length;f++){var o=i[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(h,o.key,o)}}return A(t,"defineProperties"),function(h,i,f){return i&&t(h.prototype,i),f&&t(h,f),h}}();function d(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")}A(d,"_classCallCheck");var n=T(11),e=function(){function t(h,i){d(this,t),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var f=void 0;h instanceof n?f=h.size():f=h.length,this._quicksort(h,0,f-1)}return A(t,"Quicksort"),c(t,[{key:"_quicksort",value:A(function(h,i,f){if(i<f){var o=this._partition(h,i,f);this._quicksort(h,i,o),this._quicksort(h,o+1,f)}},"_quicksort")},{key:"_partition",value:A(function(h,i,f){for(var o=this._get(h,i),r=i,s=f;;){for(;this.compareFunction(o,this._get(h,s));)s--;for(;this.compareFunction(this._get(h,r),o);)r++;if(r<s)this._swap(h,r,s),r++,s--;else return s}},"_partition")},{key:"_get",value:A(function(h,i){return h instanceof n?h.get_object_at(i):h[i]},"_get")},{key:"_set",value:A(function(h,i,f){h instanceof n?h.set_object_at(i,f):h[i]=f},"_set")},{key:"_swap",value:A(function(h,i,f){var o=this._get(h,i);this._set(h,i,this._get(h,f)),this._set(h,f,o)},"_swap")},{key:"_defaultCompareFunction",value:A(function(h,i){return i>h},"_defaultCompareFunction")}]),t}();L.exports=e},function(L,M,T){function c(){}A(c,"SVD"),c.svd=function(d){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=d.length,this.n=d[0].length;var n=Math.min(this.m,this.n);this.s=function(Tt){for(var At=[];Tt-- >0;)At.push(0);return At}(Math.min(this.m+1,this.n)),this.U=function(Tt){var At=A(function St(Gt){if(Gt.length==0)return 0;for(var Bt=[],jt=0;jt<Gt[0];jt++)Bt.push(St(Gt.slice(1)));return Bt},"allocate");return At(Tt)}([this.m,n]),this.V=function(Tt){var At=A(function St(Gt){if(Gt.length==0)return 0;for(var Bt=[],jt=0;jt<Gt[0];jt++)Bt.push(St(Gt.slice(1)));return Bt},"allocate");return At(Tt)}([this.n,this.n]);for(var e=function(Tt){for(var At=[];Tt-- >0;)At.push(0);return At}(this.n),t=function(Tt){for(var At=[];Tt-- >0;)At.push(0);return At}(this.m),h=!0,i=!0,f=Math.min(this.m-1,this.n),o=Math.max(0,Math.min(this.n-2,this.m)),r=0;r<Math.max(f,o);r++){if(r<f){this.s[r]=0;for(var s=r;s<this.m;s++)this.s[r]=c.hypot(this.s[r],d[s][r]);if(this.s[r]!==0){d[r][r]<0&&(this.s[r]=-this.s[r]);for(var u=r;u<this.m;u++)d[u][r]/=this.s[r];d[r][r]+=1}this.s[r]=-this.s[r]}for(var l=r+1;l<this.n;l++){if(function(Tt,At){return Tt&&At}(r<f,this.s[r]!==0)){for(var N=0,g=r;g<this.m;g++)N+=d[g][r]*d[g][l];N=-N/d[r][r];for(var E=r;E<this.m;E++)d[E][l]+=N*d[E][r]}e[l]=d[r][l]}if(function(Tt,At){return Tt&&At}(h,r<f))for(var w=r;w<this.m;w++)this.U[w][r]=d[w][r];if(r<o){e[r]=0;for(var _=r+1;_<this.n;_++)e[r]=c.hypot(e[r],e[_]);if(e[r]!==0){e[r+1]<0&&(e[r]=-e[r]);for(var U=r+1;U<this.n;U++)e[U]/=e[r];e[r+1]+=1}if(e[r]=-e[r],function(Tt,At){return Tt&&At}(r+1<this.m,e[r]!==0)){for(var Y=r+1;Y<this.m;Y++)t[Y]=0;for(var V=r+1;V<this.n;V++)for(var z=r+1;z<this.m;z++)t[z]+=e[V]*d[z][V];for(var q=r+1;q<this.n;q++)for(var b=-e[q]/e[r+1],nt=r+1;nt<this.m;nt++)d[nt][q]+=b*t[nt]}if(i)for(var a=r+1;a<this.n;a++)this.V[a][r]=e[a]}}var v=Math.min(this.n,this.m+1);if(f<this.n&&(this.s[f]=d[f][f]),this.m<v&&(this.s[v-1]=0),o+1<v&&(e[o]=d[o][v-1]),e[v-1]=0,h){for(var m=f;m<n;m++){for(var y=0;y<this.m;y++)this.U[y][m]=0;this.U[m][m]=1}for(var p=f-1;p>=0;p--)if(this.s[p]!==0){for(var R=p+1;R<n;R++){for(var x=0,D=p;D<this.m;D++)x+=this.U[D][p]*this.U[D][R];x=-x/this.U[p][p];for(var X=p;X<this.m;X++)this.U[X][R]+=x*this.U[X][p]}for(var H=p;H<this.m;H++)this.U[H][p]=-this.U[H][p];this.U[p][p]=1+this.U[p][p];for(var W=0;W<p-1;W++)this.U[W][p]=0}else{for(var j=0;j<this.m;j++)this.U[j][p]=0;this.U[p][p]=1}}if(i)for(var B=this.n-1;B>=0;B--){if(function(Tt,At){return Tt&&At}(B<o,e[B]!==0))for(var K=B+1;K<n;K++){for(var k=0,S=B+1;S<this.n;S++)k+=this.V[S][B]*this.V[S][K];k=-k/this.V[B+1][B];for(var P=B+1;P<this.n;P++)this.V[P][K]+=k*this.V[P][B]}for(var J=0;J<this.n;J++)this.V[J][B]=0;this.V[B][B]=1}for(var it=v-1,ut=0,Lt=Math.pow(2,-52),bt=Math.pow(2,-966);v>0;){var F=void 0,rt=void 0;for(F=v-2;F>=-1&&F!==-1;F--)if(Math.abs(e[F])<=bt+Lt*(Math.abs(this.s[F])+Math.abs(this.s[F+1]))){e[F]=0;break}if(F===v-2)rt=4;else{var ht=void 0;for(ht=v-1;ht>=F&&ht!==F;ht--){var mt=(ht!==v?Math.abs(e[ht]):0)+(ht!==F+1?Math.abs(e[ht-1]):0);if(Math.abs(this.s[ht])<=bt+Lt*mt){this.s[ht]=0;break}}ht===F?rt=3:ht===v-1?rt=1:(rt=2,F=ht)}switch(F++,rt){case 1:{var Ct=e[v-2];e[v-2]=0;for(var vt=v-2;vt>=F;vt--){var yt=c.hypot(this.s[vt],Ct),xt=this.s[vt]/yt,Ht=Ct/yt;if(this.s[vt]=yt,vt!==F&&(Ct=-Ht*e[vt-1],e[vt-1]=xt*e[vt-1]),i)for(var Ft=0;Ft<this.n;Ft++)yt=xt*this.V[Ft][vt]+Ht*this.V[Ft][v-1],this.V[Ft][v-1]=-Ht*this.V[Ft][vt]+xt*this.V[Ft][v-1],this.V[Ft][vt]=yt}}break;case 2:{var Pt=e[F-1];e[F-1]=0;for(var Ot=F;Ot<v;Ot++){var Ut=c.hypot(this.s[Ot],Pt),Xt=this.s[Ot]/Ut,Wt=Pt/Ut;if(this.s[Ot]=Ut,Pt=-Wt*e[Ot],e[Ot]=Xt*e[Ot],h)for(var lt=0;lt<this.m;lt++)Ut=Xt*this.U[lt][Ot]+Wt*this.U[lt][F-1],this.U[lt][F-1]=-Wt*this.U[lt][Ot]+Xt*this.U[lt][F-1],this.U[lt][Ot]=Ut}}break;case 3:{var C=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[v-1]),Math.abs(this.s[v-2])),Math.abs(e[v-2])),Math.abs(this.s[F])),Math.abs(e[F])),G=this.s[v-1]/C,$=this.s[v-2]/C,Z=e[v-2]/C,Q=this.s[F]/C,pt=e[F]/C,dt=(($+G)*($-G)+Z*Z)/2,tt=G*Z*(G*Z),ct=0;(function(Tt,At){return Tt||At})(dt!==0,tt!==0)&&(ct=Math.sqrt(dt*dt+tt),dt<0&&(ct=-ct),ct=tt/(dt+ct));for(var Et=(Q+G)*(Q-G)+ct,wt=Q*pt,et=F;et<v-1;et++){var It=c.hypot(Et,wt),ot=Et/It,st=wt/It;if(et!==F&&(e[et-1]=It),Et=ot*this.s[et]+st*e[et],e[et]=ot*e[et]-st*this.s[et],wt=st*this.s[et+1],this.s[et+1]=ot*this.s[et+1],i)for(var at=0;at<this.n;at++)It=ot*this.V[at][et]+st*this.V[at][et+1],this.V[at][et+1]=-st*this.V[at][et]+ot*this.V[at][et+1],this.V[at][et]=It;if(It=c.hypot(Et,wt),ot=Et/It,st=wt/It,this.s[et]=It,Et=ot*e[et]+st*this.s[et+1],this.s[et+1]=-st*e[et]+ot*this.s[et+1],wt=st*e[et+1],e[et+1]=ot*e[et+1],h&&et<this.m-1)for(var Nt=0;Nt<this.m;Nt++)It=ot*this.U[Nt][et]+st*this.U[Nt][et+1],this.U[Nt][et+1]=-st*this.U[Nt][et]+ot*this.U[Nt][et+1],this.U[Nt][et]=It}e[v-2]=Et,ut=ut+1}break;case 4:{if(this.s[F]<=0&&(this.s[F]=this.s[F]<0?-this.s[F]:0,i))for(var ft=0;ft<=it;ft++)this.V[ft][F]=-this.V[ft][F];for(;F<it&&!(this.s[F]>=this.s[F+1]);){var Mt=this.s[F];if(this.s[F]=this.s[F+1],this.s[F+1]=Mt,i&&F<this.n-1)for(var Rt=0;Rt<this.n;Rt++)Mt=this.V[Rt][F+1],this.V[Rt][F+1]=this.V[Rt][F],this.V[Rt][F]=Mt;if(h&&F<this.m-1)for(var Dt=0;Dt<this.m;Dt++)Mt=this.U[Dt][F+1],this.U[Dt][F+1]=this.U[Dt][F],this.U[Dt][F]=Mt;F++}ut=0,v--}break}}var zt={U:this.U,V:this.V,S:this.s};return zt},c.hypot=function(d,n){var e=void 0;return Math.abs(d)>Math.abs(n)?(e=n/d,e=Math.abs(d)*Math.sqrt(1+e*e)):n!=0?(e=d/n,e=Math.abs(n)*Math.sqrt(1+e*e)):e=0,e},L.exports=c},function(L,M,T){var c=function(){function e(t,h){for(var i=0;i<h.length;i++){var f=h[i];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(t,f.key,f)}}return A(e,"defineProperties"),function(t,h,i){return h&&e(t.prototype,h),i&&e(t,i),t}}();function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}A(d,"_classCallCheck");var n=function(){function e(t,h){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;d(this,e),this.sequence1=t,this.sequence2=h,this.match_score=i,this.mismatch_penalty=f,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=h.length+1,this.grid=new Array(this.iMax);for(var r=0;r<this.iMax;r++){this.grid[r]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[r][s]=0}this.tracebackGrid=new Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[u][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return A(e,"NeedlemanWunsch"),c(e,[{key:"getScore",value:A(function(){return this.score},"getScore")},{key:"getAlignments",value:A(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:A(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 h=1;h<this.iMax;h++)this.grid[h][0]=this.grid[h-1][0]+this.gap_penalty,this.tracebackGrid[h][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var f=1;f<this.jMax;f++){var o=void 0;this.sequence1[i-1]===this.sequence2[f-1]?o=this.grid[i-1][f-1]+this.match_score:o=this.grid[i-1][f-1]+this.mismatch_penalty;var r=this.grid[i-1][f]+this.gap_penalty,s=this.grid[i][f-1]+this.gap_penalty,u=[o,r,s],l=this.arrayAllMaxIndexes(u);this.grid[i][f]=u[l[0]],this.tracebackGrid[i][f]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:A(function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var h=t[0],i=this.tracebackGrid[h.pos[0]][h.pos[1]];i[0]&&t.push({pos:[h.pos[0]-1,h.pos[1]-1],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),i[1]&&t.push({pos:[h.pos[0]-1,h.pos[1]],seq1:this.sequence1[h.pos[0]-1]+h.seq1,seq2:"-"+h.seq2}),i[2]&&t.push({pos:[h.pos[0],h.pos[1]-1],seq1:"-"+h.seq1,seq2:this.sequence2[h.pos[1]-1]+h.seq2}),h.pos[0]===0&&h.pos[1]===0&&this.alignments.push({sequence1:h.seq1,sequence2:h.seq2}),t.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:A(function(t,h){for(var i=[],f=-1;(f=t.indexOf(h,f+1))!==-1;)i.push(f);return i},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:A(function(t){return this.getAllIndexes(t,Math.max.apply(null,t))},"arrayAllMaxIndexes")}]),e}();L.exports=n},function(L,M,T){var c=A(function(){},"layoutBase");c.FDLayout=T(18),c.FDLayoutConstants=T(4),c.FDLayoutEdge=T(19),c.FDLayoutNode=T(20),c.DimensionD=T(21),c.HashMap=T(22),c.HashSet=T(23),c.IGeometry=T(8),c.IMath=T(9),c.Integer=T(10),c.Point=T(12),c.PointD=T(5),c.RandomSeed=T(16),c.RectangleD=T(13),c.Transform=T(17),c.UniqueIDGeneretor=T(14),c.Quicksort=T(25),c.LinkedList=T(11),c.LGraphObject=T(2),c.LGraph=T(6),c.LEdge=T(1),c.LGraphManager=T(7),c.LNode=T(3),c.Layout=T(15),c.LayoutConstants=T(0),c.NeedlemanWunsch=T(27),c.Matrix=T(24),c.SVD=T(26),L.exports=c},function(L,M,T){function c(){this.listeners=[]}A(c,"Emitter");var d=c.prototype;d.addListener=function(n,e){this.listeners.push({event:n,callback:e})},d.removeListener=function(n,e){for(var t=this.listeners.length;t>=0;t--){var h=this.listeners[t];h.event===n&&h.callback===e&&this.listeners.splice(t,1)}},d.emit=function(n,e){for(var t=0;t<this.listeners.length;t++){var h=this.listeners[t];n===h.event&&h.callback(e)}},L.exports=c}])})}),_e=pe((O,I)=>{A(function(L,M){typeof O=="object"&&typeof I=="object"?I.exports=M(we()):typeof define=="function"&&define.amd?define(["layout-base"],M):typeof O=="object"?O.coseBase=M(we()):L.coseBase=M(L.layoutBase)},"webpackUniversalModuleDefinition")(O,function(L){return(()=>{var M={45:(n,e,t)=>{var h={};h.layoutBase=t(551),h.CoSEConstants=t(806),h.CoSEEdge=t(767),h.CoSEGraph=t(880),h.CoSEGraphManager=t(578),h.CoSELayout=t(765),h.CoSENode=t(991),h.ConstraintHandler=t(902),n.exports=h},806:(n,e,t)=>{var h=t(551).FDLayoutConstants;function i(){}A(i,"CoSEConstants");for(var f in h)i[f]=h[f];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=h.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,n.exports=i},767:(n,e,t)=>{var h=t(551).FDLayoutEdge;function i(o,r,s){h.call(this,o,r,s)}A(i,"CoSEEdge"),i.prototype=Object.create(h.prototype);for(var f in h)i[f]=h[f];n.exports=i},880:(n,e,t)=>{var h=t(551).LGraph;function i(o,r,s){h.call(this,o,r,s)}A(i,"CoSEGraph"),i.prototype=Object.create(h.prototype);for(var f in h)i[f]=h[f];n.exports=i},578:(n,e,t)=>{var h=t(551).LGraphManager;function i(o){h.call(this,o)}A(i,"CoSEGraphManager"),i.prototype=Object.create(h.prototype);for(var f in h)i[f]=h[f];n.exports=i},765:(n,e,t)=>{var h=t(551).FDLayout,i=t(578),f=t(880),o=t(991),r=t(767),s=t(806),u=t(902),l=t(551).FDLayoutConstants,N=t(551).LayoutConstants,g=t(551).Point,E=t(551).PointD,w=t(551).DimensionD,_=t(551).Layout,U=t(551).Integer,Y=t(551).IGeometry,V=t(551).LGraph,z=t(551).Transform,q=t(551).LinkedList;function b(){h.call(this),this.toBeTiled={},this.constraints={}}A(b,"CoSELayout"),b.prototype=Object.create(h.prototype);for(var nt in h)b[nt]=h[nt];b.prototype.newGraphManager=function(){var a=new i(this);return this.graphManager=a,a},b.prototype.newGraph=function(a){return new f(null,this.graphManager,a)},b.prototype.newNode=function(a){return new o(this.graphManager,a)},b.prototype.newEdge=function(a){return new r(null,null,a)},b.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},b.prototype.initSpringEmbedder=function(){h.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},b.prototype.layout=function(){var a=N.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},b.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(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var m=this.getFlatForest();if(m.length>0)this.positionNodesRadially(m);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(R){return a.has(R)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(u.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},b.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%l.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 a=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(p){return a.has(p)});this.graphManager.setAllNodesToApplyGravitation(v),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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()),s.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var m=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(m,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},b.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),v={},m=0;m<a.length;m++){var y=a[m].rect,p=a[m].id;v[p]={id:p,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return v},b.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},b.prototype.moveNodes=function(){for(var a=this.getAllNodes(),v,m=0;m<a.length;m++)v=a[m],v.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var m=0;m<a.length;m++)v=a[m],v.move()},b.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var v=this.graphManager.getAllNodes(),m=0;m<v.length;m++){var y=v[m];this.idToNodeMap.set(y.id,y)}var p=A(function S(P){for(var J=P.getChild().getNodes(),it,ut=0,Lt=0;Lt<J.length;Lt++)it=J[Lt],it.getChild()==null?a.fixedNodeSet.has(it.id)&&(ut+=100):ut+=S(it);return ut},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(S){a.fixedNodeSet.add(S.nodeId)});for(var v=this.graphManager.getAllNodes(),y,m=0;m<v.length;m++)if(y=v[m],y.getChild()!=null){var R=p(y);R>0&&(y.fixedNodeWeight=R)}}if(this.constraints.relativePlacementConstraint){var x=new Map,D=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(S){a.fixedNodesOnHorizontal.add(S),a.fixedNodesOnVertical.add(S)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var X=this.constraints.alignmentConstraint.vertical,m=0;m<X.length;m++)this.dummyToNodeForVerticalAlignment.set("dummy"+m,[]),X[m].forEach(function(P){x.set(P,"dummy"+m),a.dummyToNodeForVerticalAlignment.get("dummy"+m).push(P),a.fixedNodeSet.has(P)&&a.fixedNodesOnHorizontal.add("dummy"+m)});if(this.constraints.alignmentConstraint.horizontal)for(var H=this.constraints.alignmentConstraint.horizontal,m=0;m<H.length;m++)this.dummyToNodeForHorizontalAlignment.set("dummy"+m,[]),H[m].forEach(function(P){D.set(P,"dummy"+m),a.dummyToNodeForHorizontalAlignment.get("dummy"+m).push(P),a.fixedNodeSet.has(P)&&a.fixedNodesOnVertical.add("dummy"+m)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(S){var P,J,it;for(it=S.length-1;it>=2*S.length/3;it--)P=Math.floor(Math.random()*(it+1)),J=S[it],S[it]=S[P],S[P]=J;return S},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var P=x.has(S.left)?x.get(S.left):S.left,J=x.has(S.right)?x.get(S.right):S.right;a.nodesInRelativeHorizontal.includes(P)||(a.nodesInRelativeHorizontal.push(P),a.nodeToRelativeConstraintMapHorizontal.set(P,[]),a.dummyToNodeForVerticalAlignment.has(P)?a.nodeToTempPositionMapHorizontal.set(P,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(P)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(P,a.idToNodeMap.get(P).getCenterX())),a.nodesInRelativeHorizontal.includes(J)||(a.nodesInRelativeHorizontal.push(J),a.nodeToRelativeConstraintMapHorizontal.set(J,[]),a.dummyToNodeForVerticalAlignment.has(J)?a.nodeToTempPositionMapHorizontal.set(J,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(J,a.idToNodeMap.get(J).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(P).push({right:J,gap:S.gap}),a.nodeToRelativeConstraintMapHorizontal.get(J).push({left:P,gap:S.gap})}else{var it=D.has(S.top)?D.get(S.top):S.top,ut=D.has(S.bottom)?D.get(S.bottom):S.bottom;a.nodesInRelativeVertical.includes(it)||(a.nodesInRelativeVertical.push(it),a.nodeToRelativeConstraintMapVertical.set(it,[]),a.dummyToNodeForHorizontalAlignment.has(it)?a.nodeToTempPositionMapVertical.set(it,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(it)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(it,a.idToNodeMap.get(it).getCenterY())),a.nodesInRelativeVertical.includes(ut)||(a.nodesInRelativeVertical.push(ut),a.nodeToRelativeConstraintMapVertical.set(ut,[]),a.dummyToNodeForHorizontalAlignment.has(ut)?a.nodeToTempPositionMapVertical.set(ut,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ut)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ut,a.idToNodeMap.get(ut).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(it).push({bottom:ut,gap:S.gap}),a.nodeToRelativeConstraintMapVertical.get(ut).push({top:it,gap:S.gap})}});else{var W=new Map,j=new Map;this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var P=x.has(S.left)?x.get(S.left):S.left,J=x.has(S.right)?x.get(S.right):S.right;W.has(P)?W.get(P).push(J):W.set(P,[J]),W.has(J)?W.get(J).push(P):W.set(J,[P])}else{var it=D.has(S.top)?D.get(S.top):S.top,ut=D.has(S.bottom)?D.get(S.bottom):S.bottom;j.has(it)?j.get(it).push(ut):j.set(it,[ut]),j.has(ut)?j.get(ut).push(it):j.set(ut,[it])}});var B=A(function(S,P){var J=[],it=[],ut=new q,Lt=new Set,bt=0;return S.forEach(function(F,rt){if(!Lt.has(rt)){J[bt]=[],it[bt]=!1;var ht=rt;for(ut.push(ht),Lt.add(ht),J[bt].push(ht);ut.length!=0;){ht=ut.shift(),P.has(ht)&&(it[bt]=!0);var mt=S.get(ht);mt.forEach(function(Ct){Lt.has(Ct)||(ut.push(Ct),Lt.add(Ct),J[bt].push(Ct))})}bt++}}),{components:J,isFixed:it}},"constructComponents"),K=B(W,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var k=B(j,a.fixedNodesOnVertical);this.componentsOnVertical=k.components,this.fixedComponentsOnVertical=k.isFixed}}},b.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(k){var S=a.idToNodeMap.get(k.nodeId);S.displacementX=0,S.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var v=this.constraints.alignmentConstraint.vertical,m=0;m<v.length;m++){for(var y=0,p=0;p<v[m].length;p++){if(this.fixedNodeSet.has(v[m][p])){y=0;break}y+=this.idToNodeMap.get(v[m][p]).displacementX}for(var R=y/v[m].length,p=0;p<v[m].length;p++)this.idToNodeMap.get(v[m][p]).displacementX=R}if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,m=0;m<x.length;m++){for(var D=0,p=0;p<x[m].length;p++){if(this.fixedNodeSet.has(x[m][p])){D=0;break}D+=this.idToNodeMap.get(x[m][p]).displacementY}for(var X=D/x[m].length,p=0;p<x[m].length;p++)this.idToNodeMap.get(x[m][p]).displacementY=X}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(k){if(!a.fixedNodesOnHorizontal.has(k)){var S=0;a.dummyToNodeForVerticalAlignment.has(k)?S=a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(k)[0]).displacementX:S=a.idToNodeMap.get(k).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(k).forEach(function(P){if(P.right){var J=a.nodeToTempPositionMapHorizontal.get(P.right)-a.nodeToTempPositionMapHorizontal.get(k)-S;J<P.gap&&(S-=P.gap-J)}else{var J=a.nodeToTempPositionMapHorizontal.get(k)-a.nodeToTempPositionMapHorizontal.get(P.left)+S;J<P.gap&&(S+=P.gap-J)}}),a.nodeToTempPositionMapHorizontal.set(k,a.nodeToTempPositionMapHorizontal.get(k)+S),a.dummyToNodeForVerticalAlignment.has(k)?a.dummyToNodeForVerticalAlignment.get(k).forEach(function(P){a.idToNodeMap.get(P).displacementX=S}):a.idToNodeMap.get(k).displacementX=S}}),this.nodesInRelativeVertical.forEach(function(k){if(!a.fixedNodesOnHorizontal.has(k)){var S=0;a.dummyToNodeForHorizontalAlignment.has(k)?S=a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(k)[0]).displacementY:S=a.idToNodeMap.get(k).displacementY,a.nodeToRelativeConstraintMapVertical.get(k).forEach(function(P){if(P.bottom){var J=a.nodeToTempPositionMapVertical.get(P.bottom)-a.nodeToTempPositionMapVertical.get(k)-S;J<P.gap&&(S-=P.gap-J)}else{var J=a.nodeToTempPositionMapVertical.get(k)-a.nodeToTempPositionMapVertical.get(P.top)+S;J<P.gap&&(S+=P.gap-J)}}),a.nodeToTempPositionMapVertical.set(k,a.nodeToTempPositionMapVertical.get(k)+S),a.dummyToNodeForHorizontalAlignment.has(k)?a.dummyToNodeForHorizontalAlignment.get(k).forEach(function(P){a.idToNodeMap.get(P).displacementY=S}):a.idToNodeMap.get(k).displacementY=S}});else{for(var m=0;m<this.componentsOnHorizontal.length;m++){var H=this.componentsOnHorizontal[m];if(this.fixedComponentsOnHorizontal[m])for(var p=0;p<H.length;p++)this.dummyToNodeForVerticalAlignment.has(H[p])?this.dummyToNodeForVerticalAlignment.get(H[p]).forEach(function(P){a.idToNodeMap.get(P).displacementX=0}):this.idToNodeMap.get(H[p]).displacementX=0;else{for(var W=0,j=0,p=0;p<H.length;p++)if(this.dummyToNodeForVerticalAlignment.has(H[p])){var B=this.dummyToNodeForVerticalAlignment.get(H[p]);W+=B.length*this.idToNodeMap.get(B[0]).displacementX,j+=B.length}else W+=this.idToNodeMap.get(H[p]).displacementX,j++;for(var K=W/j,p=0;p<H.length;p++)this.dummyToNodeForVerticalAlignment.has(H[p])?this.dummyToNodeForVerticalAlignment.get(H[p]).forEach(function(P){a.idToNodeMap.get(P).displacementX=K}):this.idToNodeMap.get(H[p]).displacementX=K}}for(var m=0;m<this.componentsOnVertical.length;m++){var H=this.componentsOnVertical[m];if(this.fixedComponentsOnVertical[m])for(var p=0;p<H.length;p++)this.dummyToNodeForHorizontalAlignment.has(H[p])?this.dummyToNodeForHorizontalAlignment.get(H[p]).forEach(function(J){a.idToNodeMap.get(J).displacementY=0}):this.idToNodeMap.get(H[p]).displacementY=0;else{for(var W=0,j=0,p=0;p<H.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(H[p])){var B=this.dummyToNodeForHorizontalAlignment.get(H[p]);W+=B.length*this.idToNodeMap.get(B[0]).displacementY,j+=B.length}else W+=this.idToNodeMap.get(H[p]).displacementY,j++;for(var K=W/j,p=0;p<H.length;p++)this.dummyToNodeForHorizontalAlignment.has(H[p])?this.dummyToNodeForHorizontalAlignment.get(H[p]).forEach(function(it){a.idToNodeMap.get(it).displacementY=K}):this.idToNodeMap.get(H[p]).displacementY=K}}}},b.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],v,m=this.graphManager.getGraphs(),y=m.length,p;for(p=0;p<y;p++)v=m[p],v.updateConnected(),v.isConnected||(a=a.concat(v.getNodes()));return a},b.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var v=new Set,m;for(m=0;m<a.length;m++){var y=a[m];if(!v.has(y)){var p=y.getSource(),R=y.getTarget();if(p==R)y.getBendpoints().push(new E),y.getBendpoints().push(new E),this.createDummyNodesForBendpoints(y),v.add(y);else{var x=[];if(x=x.concat(p.getEdgeListToNode(R)),x=x.concat(R.getEdgeListToNode(p)),!v.has(x[0])){if(x.length>1){var D;for(D=0;D<x.length;D++){var X=x[D];X.getBendpoints().push(new E),this.createDummyNodesForBendpoints(X)}}x.forEach(function(H){v.add(H)})}}}if(v.size==a.length)break}},b.prototype.positionNodesRadially=function(a){for(var v=new g(0,0),m=Math.ceil(Math.sqrt(a.length)),y=0,p=0,R=0,x=new E(0,0),D=0;D<a.length;D++){D%m==0&&(R=0,p=y,D!=0&&(p+=s.DEFAULT_COMPONENT_SEPERATION),y=0);var X=a[D],H=_.findCenterOfTree(X);v.x=R,v.y=p,x=b.radialLayout(X,H,v),x.y>y&&(y=Math.floor(x.y)),R=Math.floor(x.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(N.WORLD_CENTER_X-x.x/2,N.WORLD_CENTER_Y-x.y/2))},b.radialLayout=function(a,v,m){var y=Math.max(this.maxDiagonalInTree(a),s.DEFAULT_RADIAL_SEPARATION);b.branchRadialLayout(v,null,0,359,0,y);var p=V.calculateBounds(a),R=new z;R.setDeviceOrgX(p.getMinX()),R.setDeviceOrgY(p.getMinY()),R.setWorldOrgX(m.x),R.setWorldOrgY(m.y);for(var x=0;x<a.length;x++){var D=a[x];D.transform(R)}var X=new E(p.getMaxX(),p.getMaxY());return R.inverseTransformPoint(X)},b.branchRadialLayout=function(a,v,m,y,p,R){var x=(y-m+1)/2;x<0&&(x+=180);var D=(x+m)%360,X=D*Y.TWO_PI/360,H=p*Math.cos(X),W=p*Math.sin(X);a.setCenter(H,W);var j=[];j=j.concat(a.getEdges());var B=j.length;v!=null&&B--;for(var K=0,k=j.length,S,P=a.getEdgesBetween(v);P.length>1;){var J=P[0];P.splice(0,1);var it=j.indexOf(J);it>=0&&j.splice(it,1),k--,B--}v!=null?S=(j.indexOf(P[0])+1)%k:S=0;for(var ut=Math.abs(y-m)/B,Lt=S;K!=B;Lt=++Lt%k){var bt=j[Lt].getOtherEnd(a);if(bt!=v){var F=(m+K*ut)%360,rt=(F+ut)%360;b.branchRadialLayout(bt,a,F,rt,p+R,R),K++}}},b.maxDiagonalInTree=function(a){for(var v=U.MIN_VALUE,m=0;m<a.length;m++){var y=a[m],p=y.getDiagonal();p>v&&(v=p)}return v},b.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},b.prototype.groupZeroDegreeMembers=function(){var a=this,v={};this.memberGroups={},this.idToDummyNode={};for(var m=[],y=this.graphManager.getAllNodes(),p=0;p<y.length;p++){var R=y[p],x=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(x.id==null||!this.getToBeTiled(x))&&m.push(R)}for(var p=0;p<m.length;p++){var R=m[p],D=R.getParent().id;typeof v[D]>"u"&&(v[D]=[]),v[D]=v[D].concat(R)}Object.keys(v).forEach(function(X){if(v[X].length>1){var H="DummyCompound_"+X;a.memberGroups[H]=v[X];var W=v[X][0].getParent(),j=new o(a.graphManager);j.id=H,j.paddingLeft=W.paddingLeft||0,j.paddingRight=W.paddingRight||0,j.paddingBottom=W.paddingBottom||0,j.paddingTop=W.paddingTop||0,a.idToDummyNode[H]=j;var B=a.getGraphManager().add(a.newGraph(),j),K=W.getChild();K.add(j);for(var k=0;k<v[X].length;k++){var S=v[X][k];K.remove(S),B.add(S)}}})},b.prototype.clearCompounds=function(){var a={},v={};this.performDFSOnCompounds();for(var m=0;m<this.compoundOrder.length;m++)v[this.compoundOrder[m].id]=this.compoundOrder[m],a[this.compoundOrder[m].id]=[].concat(this.compoundOrder[m].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[m].getChild()),this.compoundOrder[m].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,v)},b.prototype.clearZeroDegreeMembers=function(){var a=this,v=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(m){var y=a.idToDummyNode[m];if(v[m]=a.tileNodes(a.memberGroups[m],y.paddingLeft+y.paddingRight),y.rect.width=v[m].width,y.rect.height=v[m].height,y.setCenter(v[m].centerX,v[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var p=y.rect.width,R=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(p+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>p?(y.rect.x-=(y.labelWidth-p)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-p)/2):y.labelPosHorizontal=="right"&&y.setWidth(p+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(R+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>R?(y.rect.y-=(y.labelHeight-R)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-R)/2):y.labelPosVertical=="bottom"&&y.setHeight(R+y.labelHeight))}})},b.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var v=this.compoundOrder[a],m=v.id,y=v.paddingLeft,p=v.paddingTop,R=v.labelMarginLeft,x=v.labelMarginTop;this.adjustLocations(this.tiledMemberPack[m],v.rect.x,v.rect.y,y,p,R,x)}},b.prototype.repopulateZeroDegreeMembers=function(){var a=this,v=this.tiledZeroDegreePack;Object.keys(v).forEach(function(m){var y=a.idToDummyNode[m],p=y.paddingLeft,R=y.paddingTop,x=y.labelMarginLeft,D=y.labelMarginTop;a.adjustLocations(v[m],y.rect.x,y.rect.y,p,R,x,D)})},b.prototype.getToBeTiled=function(a){var v=a.id;if(this.toBeTiled[v]!=null)return this.toBeTiled[v];var m=a.getChild();if(m==null)return this.toBeTiled[v]=!1,!1;for(var y=m.getNodes(),p=0;p<y.length;p++){var R=y[p];if(this.getNodeDegree(R)>0)return this.toBeTiled[v]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[v]=!1,!1}return this.toBeTiled[v]=!0,!0},b.prototype.getNodeDegree=function(a){for(var v=a.id,m=a.getEdges(),y=0,p=0;p<m.length;p++){var R=m[p];R.getSource().id!==R.getTarget().id&&(y=y+1)}return y},b.prototype.getNodeDegreeWithChildren=function(a){var v=this.getNodeDegree(a);if(a.getChild()==null)return v;for(var m=a.getChild().getNodes(),y=0;y<m.length;y++){var p=m[y];v+=this.getNodeDegreeWithChildren(p)}return v},b.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},b.prototype.fillCompexOrderByDFS=function(a){for(var v=0;v<a.length;v++){var m=a[v];m.getChild()!=null&&this.fillCompexOrderByDFS(m.getChild().getNodes()),this.getToBeTiled(m)&&this.compoundOrder.push(m)}},b.prototype.adjustLocations=function(a,v,m,y,p,R,x){v+=y+R,m+=p+x;for(var D=v,X=0;X<a.rows.length;X++){var H=a.rows[X];v=D;for(var W=0,j=0;j<H.length;j++){var B=H[j];B.rect.x=v,B.rect.y=m,v+=B.rect.width+a.horizontalPadding,B.rect.height>W&&(W=B.rect.height)}m+=W+a.verticalPadding}},b.prototype.tileCompoundMembers=function(a,v){var m=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(y){var p=v[y];if(m.tiledMemberPack[y]=m.tileNodes(a[y],p.paddingLeft+p.paddingRight),p.rect.width=m.tiledMemberPack[y].width,p.rect.height=m.tiledMemberPack[y].height,p.setCenter(m.tiledMemberPack[y].centerX,m.tiledMemberPack[y].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var R=p.rect.width,x=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(R+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>R?(p.rect.x-=(p.labelWidth-R)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-R)/2):p.labelPosHorizontal=="right"&&p.setWidth(R+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(x+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>x?(p.rect.y-=(p.labelHeight-x)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-x)/2):p.labelPosVertical=="bottom"&&p.setHeight(x+p.labelHeight))}})},b.prototype.tileNodes=function(a,v){var m=this.tileNodesByFavoringDim(a,v,!0),y=this.tileNodesByFavoringDim(a,v,!1),p=this.getOrgRatio(m),R=this.getOrgRatio(y),x;return R<p?x=y:x=m,x},b.prototype.getOrgRatio=function(a){var v=a.width,m=a.height,y=v/m;return y<1&&(y=1/y),y},b.prototype.calcIdealRowWidth=function(a,v){var m=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,p=a.length,R=0,x=0,D=0;a.forEach(function(k){R+=k.getWidth(),x+=k.getHeight(),k.getWidth()>D&&(D=k.getWidth())});var X=R/p,H=x/p,W=Math.pow(m-y,2)+4*(X+y)*(H+m)*p,j=(y-m+Math.sqrt(W))/(2*(X+y)),B;v?(B=Math.ceil(j),B==j&&B++):B=Math.floor(j);var K=B*(X+y)-y;return D>K&&(K=D),K+=y*2,K},b.prototype.tileNodesByFavoringDim=function(a,v,m){var y=s.TILING_PADDING_VERTICAL,p=s.TILING_PADDING_HORIZONTAL,R=s.TILING_COMPARE_BY,x={rows:[],rowWidth:[],rowHeight:[],width:0,height:v,verticalPadding:y,horizontalPadding:p,centerX:0,centerY:0};R&&(x.idealRowWidth=this.calcIdealRowWidth(a,m));var D=A(function(k){return k.rect.width*k.rect.height},"getNodeArea"),X=A(function(k,S){return D(S)-D(k)},"areaCompareFcn");a.sort(function(k,S){var P=X;return x.idealRowWidth?(P=R,P(k.id,S.id)):P(k,S)});for(var H=0,W=0,j=0;j<a.length;j++){var B=a[j];H+=B.getCenterX(),W+=B.getCenterY()}x.centerX=H/a.length,x.centerY=W/a.length;for(var j=0;j<a.length;j++){var B=a[j];if(x.rows.length==0)this.insertNodeToRow(x,B,0,v);else if(this.canAddHorizontal(x,B.rect.width,B.rect.height)){var K=x.rows.length-1;x.idealRowWidth||(K=this.getShortestRowIndex(x)),this.insertNodeToRow(x,B,K,v)}else this.insertNodeToRow(x,B,x.rows.length,v);this.shiftToLastRow(x)}return x},b.prototype.insertNodeToRow=function(a,v,m,y){var p=y;if(m==a.rows.length){var R=[];a.rows.push(R),a.rowWidth.push(p),a.rowHeight.push(0)}var x=a.rowWidth[m]+v.rect.width;a.rows[m].length>0&&(x+=a.horizontalPadding),a.rowWidth[m]=x,a.width<x&&(a.width=x);var D=v.rect.height;m>0&&(D+=a.verticalPadding);var X=0;D>a.rowHeight[m]&&(X=a.rowHeight[m],a.rowHeight[m]=D,X=a.rowHeight[m]-X),a.height+=X,a.rows[m].push(v)},b.prototype.getShortestRowIndex=function(a){for(var v=-1,m=Number.MAX_VALUE,y=0;y<a.rows.length;y++)a.rowWidth[y]<m&&(v=y,m=a.rowWidth[y]);return v},b.prototype.getLongestRowIndex=function(a){for(var v=-1,m=Number.MIN_VALUE,y=0;y<a.rows.length;y++)a.rowWidth[y]>m&&(v=y,m=a.rowWidth[y]);return v},b.prototype.canAddHorizontal=function(a,v,m){if(a.idealRowWidth){var y=a.rows.length-1,p=a.rowWidth[y];return p+v+a.horizontalPadding<=a.idealRowWidth}var R=this.getShortestRowIndex(a);if(R<0)return!0;var x=a.rowWidth[R];if(x+a.horizontalPadding+v<=a.width)return!0;var D=0;a.rowHeight[R]<m&&R>0&&(D=m+a.verticalPadding-a.rowHeight[R]);var X;a.width-x>=v+a.horizontalPadding?X=(a.height+D)/(x+v+a.horizontalPadding):X=(a.height+D)/a.width,D=m+a.verticalPadding;var H;return a.width<v?H=(a.height+D)/v:H=(a.height+D)/a.width,H<1&&(H=1/H),X<1&&(X=1/X),X<H},b.prototype.shiftToLastRow=function(a){var v=this.getLongestRowIndex(a),m=a.rowWidth.length-1,y=a.rows[v],p=y[y.length-1],R=p.width+a.horizontalPadding;if(a.width-a.rowWidth[m]>R&&v!=m){y.splice(-1,1),a.rows[m].push(p),a.rowWidth[v]=a.rowWidth[v]-R,a.rowWidth[m]=a.rowWidth[m]+R,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var x=Number.MIN_VALUE,D=0;D<y.length;D++)y[D].height>x&&(x=y[D].height);v>0&&(x+=a.verticalPadding);var X=a.rowHeight[v]+a.rowHeight[m];a.rowHeight[v]=x,a.rowHeight[m]<p.height+a.verticalPadding&&(a.rowHeight[m]=p.height+a.verticalPadding);var H=a.rowHeight[v]+a.rowHeight[m];a.height+=H-X,this.shiftToLastRow(a)}},b.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},b.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},b.prototype.reduceTrees=function(){for(var a=[],v=!0,m;v;){var y=this.graphManager.getAllNodes(),p=[];v=!1;for(var R=0;R<y.length;R++)if(m=y[R],m.getEdges().length==1&&!m.getEdges()[0].isInterGraph&&m.getChild()==null){if(s.PURE_INCREMENTAL){var x=m.getEdges()[0].getOtherEnd(m),D=new w(m.getCenterX()-x.getCenterX(),m.getCenterY()-x.getCenterY());p.push([m,m.getEdges()[0],m.getOwner(),D])}else p.push([m,m.getEdges()[0],m.getOwner()]);v=!0}if(v==!0){for(var X=[],H=0;H<p.length;H++)p[H][0].getEdges().length==1&&(X.push(p[H]),p[H][0].getOwner().remove(p[H][0]));a.push(X),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},b.prototype.growTree=function(a){for(var v=a.length,m=a[v-1],y,p=0;p<m.length;p++)y=m[p],this.findPlaceforPrunedNode(y),y[2].add(y[0]),y[2].add(y[1],y[1].source,y[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},b.prototype.findPlaceforPrunedNode=function(a){var v,m,y=a[0];if(y==a[1].source?m=a[1].target:m=a[1].source,s.PURE_INCREMENTAL)y.setCenter(m.getCenterX()+a[3].getWidth(),m.getCenterY()+a[3].getHeight());else{var p=m.startX,R=m.finishX,x=m.startY,D=m.finishY,X=0,H=0,W=0,j=0,B=[X,W,H,j];if(x>0)for(var K=p;K<=R;K++)B[0]+=this.grid[K][x-1].length+this.grid[K][x].length-1;if(R<this.grid.length-1)for(var K=x;K<=D;K++)B[1]+=this.grid[R+1][K].length+this.grid[R][K].length-1;if(D<this.grid[0].length-1)for(var K=p;K<=R;K++)B[2]+=this.grid[K][D+1].length+this.grid[K][D].length-1;if(p>0)for(var K=x;K<=D;K++)B[3]+=this.grid[p-1][K].length+this.grid[p][K].length-1;for(var k=U.MAX_VALUE,S,P,J=0;J<B.length;J++)B[J]<k?(k=B[J],S=1,P=J):B[J]==k&&S++;if(S==3&&k==0)B[0]==0&&B[1]==0&&B[2]==0?v=1:B[0]==0&&B[1]==0&&B[3]==0?v=0:B[0]==0&&B[2]==0&&B[3]==0?v=3:B[1]==0&&B[2]==0&&B[3]==0&&(v=2);else if(S==2&&k==0){var it=Math.floor(Math.random()*2);B[0]==0&&B[1]==0?it==0?v=0:v=1:B[0]==0&&B[2]==0?it==0?v=0:v=2:B[0]==0&&B[3]==0?it==0?v=0:v=3:B[1]==0&&B[2]==0?it==0?v=1:v=2:B[1]==0&&B[3]==0?it==0?v=1:v=3:it==0?v=2:v=3}else if(S==4&&k==0){var it=Math.floor(Math.random()*4);v=it}else v=P;v==0?y.setCenter(m.getCenterX(),m.getCenterY()-m.getHeight()/2-l.DEFAULT_EDGE_LENGTH-y.getHeight()/2):v==1?y.setCenter(m.getCenterX()+m.getWidth()/2+l.DEFAULT_EDGE_LENGTH+y.getWidth()/2,m.getCenterY()):v==2?y.setCenter(m.getCenterX(),m.getCenterY()+m.getHeight()/2+l.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(m.getCenterX()-m.getWidth()/2-l.DEFAULT_EDGE_LENGTH-y.getWidth()/2,m.getCenterY())}},n.exports=b},991:(n,e,t)=>{var h=t(551).FDLayoutNode,i=t(551).IMath;function f(r,s,u,l){h.call(this,r,s,u,l)}A(f,"CoSENode"),f.prototype=Object.create(h.prototype);for(var o in h)f[o]=h[o];f.prototype.calculateDisplacement=function(){var r=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=r.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=r.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementX=r.coolingFactor*r.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>r.coolingFactor*r.maxNodeDisplacement&&(this.displacementY=r.coolingFactor*r.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(r,s){for(var u=this.getChild().getNodes(),l,N=0;N<u.length;N++)l=u[N],l.getChild()==null?(l.displacementX+=r,l.displacementY+=s):l.propogateDisplacementToChildren(r,s)},f.prototype.move=function(){var r=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),r.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},f.prototype.setPred1=function(r){this.pred1=r},f.prototype.getPred1=function(){return pred1},f.prototype.getPred2=function(){return pred2},f.prototype.setNext=function(r){this.next=r},f.prototype.getNext=function(){return next},f.prototype.setProcessed=function(r){this.processed=r},f.prototype.isProcessed=function(){return processed},n.exports=f},902:(n,e,t)=>{function h(u){if(Array.isArray(u)){for(var l=0,N=Array(u.length);l<u.length;l++)N[l]=u[l];return N}else return Array.from(u)}A(h,"_toConsumableArray");var i=t(806),f=t(551).LinkedList,o=t(551).Matrix,r=t(551).SVD;function s(){}A(s,"ConstraintHandler"),s.handleConstraints=function(u){var l={};l.fixedNodeConstraint=u.constraints.fixedNodeConstraint,l.alignmentConstraint=u.constraints.alignmentConstraint,l.relativePlacementConstraint=u.constraints.relativePlacementConstraint;for(var N=new Map,g=new Map,E=[],w=[],_=u.getAllNodes(),U=0,Y=0;Y<_.length;Y++){var V=_[Y];V.getChild()==null&&(g.set(V.id,U++),E.push(V.getCenterX()),w.push(V.getCenterY()),N.set(V.id,V))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(C){!C.gap&&C.gap!=0&&(C.left?C.gap=i.DEFAULT_EDGE_LENGTH+N.get(C.left).getWidth()/2+N.get(C.right).getWidth()/2:C.gap=i.DEFAULT_EDGE_LENGTH+N.get(C.top).getHeight()/2+N.get(C.bottom).getHeight()/2)});var z=A(function(C,G){return{x:C.x-G.x,y:C.y-G.y}},"calculatePositionDiff"),q=A(function(C){var G=0,$=0;return C.forEach(function(Z){G+=E[g.get(Z)],$+=w[g.get(Z)]}),{x:G/C.size,y:$/C.size}},"calculateAvgPosition"),b=A(function(C,G,$,Z,Q){function pt(ot,st){var at=new Set(ot),Nt=!0,ft=!1,Mt=void 0;try{for(var Rt=st[Symbol.iterator](),Dt;!(Nt=(Dt=Rt.next()).done);Nt=!0){var zt=Dt.value;at.add(zt)}}catch(Tt){ft=!0,Mt=Tt}finally{try{!Nt&&Rt.return&&Rt.return()}finally{if(ft)throw Mt}}return at}A(pt,"setUnion");var dt=new Map;C.forEach(function(ot,st){dt.set(st,0)}),C.forEach(function(ot,st){ot.forEach(function(at){dt.set(at.id,dt.get(at.id)+1)})});var tt=new Map,ct=new Map,Et=new f;dt.forEach(function(ot,st){ot==0?(Et.push(st),$||(G=="horizontal"?tt.set(st,g.has(st)?E[g.get(st)]:Z.get(st)):tt.set(st,g.has(st)?w[g.get(st)]:Z.get(st)))):tt.set(st,Number.NEGATIVE_INFINITY),$&&ct.set(st,new Set([st]))}),$&&Q.forEach(function(ot){var st=[];if(ot.forEach(function(ft){$.has(ft)&&st.push(ft)}),st.length>0){var at=0;st.forEach(function(ft){G=="horizontal"?(tt.set(ft,g.has(ft)?E[g.get(ft)]:Z.get(ft)),at+=tt.get(ft)):(tt.set(ft,g.has(ft)?w[g.get(ft)]:Z.get(ft)),at+=tt.get(ft))}),at=at/st.length,ot.forEach(function(ft){$.has(ft)||tt.set(ft,at)})}else{var Nt=0;ot.forEach(function(ft){G=="horizontal"?Nt+=g.has(ft)?E[g.get(ft)]:Z.get(ft):Nt+=g.has(ft)?w[g.get(ft)]:Z.get(ft)}),Nt=Nt/ot.length,ot.forEach(function(ft){tt.set(ft,Nt)})}});for(var wt=A(function(){var ot=Et.shift(),st=C.get(ot);st.forEach(function(at){if(tt.get(at.id)<tt.get(ot)+at.gap)if($&&$.has(at.id)){var Nt=void 0;if(G=="horizontal"?Nt=g.has(at.id)?E[g.get(at.id)]:Z.get(at.id):Nt=g.has(at.id)?w[g.get(at.id)]:Z.get(at.id),tt.set(at.id,Nt),Nt<tt.get(ot)+at.gap){var ft=tt.get(ot)+at.gap-Nt;ct.get(ot).forEach(function(Mt){tt.set(Mt,tt.get(Mt)-ft)})}}else tt.set(at.id,tt.get(ot)+at.gap);dt.set(at.id,dt.get(at.id)-1),dt.get(at.id)==0&&Et.push(at.id),$&&ct.set(at.id,pt(ct.get(ot),ct.get(at.id)))})},"_loop");Et.length!=0;)wt();if($){var et=new Set;C.forEach(function(ot,st){ot.length==0&&et.add(st)});var It=[];ct.forEach(function(ot,st){if(et.has(st)){var at=!1,Nt=!0,ft=!1,Mt=void 0;try{for(var Rt=ot[Symbol.iterator](),Dt;!(Nt=(Dt=Rt.next()).done);Nt=!0){var zt=Dt.value;$.has(zt)&&(at=!0)}}catch(St){ft=!0,Mt=St}finally{try{!Nt&&Rt.return&&Rt.return()}finally{if(ft)throw Mt}}if(!at){var Tt=!1,At=void 0;It.forEach(function(St,Gt){St.has([].concat(h(ot))[0])&&(Tt=!0,At=Gt)}),Tt?ot.forEach(function(St){It[At].add(St)}):It.push(new Set(ot))}}}),It.forEach(function(ot,st){var at=Number.POSITIVE_INFINITY,Nt=Number.POSITIVE_INFINITY,ft=Number.NEGATIVE_INFINITY,Mt=Number.NEGATIVE_INFINITY,Rt=!0,Dt=!1,zt=void 0;try{for(var Tt=ot[Symbol.iterator](),At;!(Rt=(At=Tt.next()).done);Rt=!0){var St=At.value,Gt=void 0;G=="horizontal"?Gt=g.has(St)?E[g.get(St)]:Z.get(St):Gt=g.has(St)?w[g.get(St)]:Z.get(St);var Bt=tt.get(St);Gt<at&&(at=Gt),Gt>ft&&(ft=Gt),Bt<Nt&&(Nt=Bt),Bt>Mt&&(Mt=Bt)}}catch(Jt){Dt=!0,zt=Jt}finally{try{!Rt&&Tt.return&&Tt.return()}finally{if(Dt)throw zt}}var jt=(at+ft)/2-(Nt+Mt)/2,re=!0,Zt=!1,Kt=void 0;try{for(var qt=ot[Symbol.iterator](),Qt;!(re=(Qt=qt.next()).done);re=!0){var oe=Qt.value;tt.set(oe,tt.get(oe)+jt)}}catch(Jt){Zt=!0,Kt=Jt}finally{try{!re&&qt.return&&qt.return()}finally{if(Zt)throw Kt}}})}return tt},"findAppropriatePositionForRelativePlacement"),nt=A(function(C){var G=0,$=0,Z=0,Q=0;if(C.forEach(function(ct){ct.left?E[g.get(ct.left)]-E[g.get(ct.right)]>=0?G++:$++:w[g.get(ct.top)]-w[g.get(ct.bottom)]>=0?Z++:Q++}),G>$&&Z>Q)for(var pt=0;pt<g.size;pt++)E[pt]=-1*E[pt],w[pt]=-1*w[pt];else if(G>$)for(var dt=0;dt<g.size;dt++)E[dt]=-1*E[dt];else if(Z>Q)for(var tt=0;tt<g.size;tt++)w[tt]=-1*w[tt]},"applyReflectionForRelativePlacement"),a=A(function(C){var G=[],$=new f,Z=new Set,Q=0;return C.forEach(function(pt,dt){if(!Z.has(dt)){G[Q]=[];var tt=dt;for($.push(tt),Z.add(tt),G[Q].push(tt);$.length!=0;){tt=$.shift();var ct=C.get(tt);ct.forEach(function(Et){Z.has(Et.id)||($.push(Et.id),Z.add(Et.id),G[Q].push(Et.id))})}Q++}}),G},"findComponents"),v=A(function(C){var G=new Map;return C.forEach(function($,Z){G.set(Z,[])}),C.forEach(function($,Z){$.forEach(function(Q){G.get(Z).push(Q),G.get(Q.id).push({id:Z,gap:Q.gap,direction:Q.direction})})}),G},"dagToUndirected"),m=A(function(C){var G=new Map;return C.forEach(function($,Z){G.set(Z,[])}),C.forEach(function($,Z){$.forEach(function(Q){G.get(Q.id).push({id:Z,gap:Q.gap,direction:Q.direction})})}),G},"dagToReversed"),y=[],p=[],R=!1,x=!1,D=new Set,X=new Map,H=new Map,W=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(C){D.add(C.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(C){C.left?(X.has(C.left)?X.get(C.left).push({id:C.right,gap:C.gap,direction:"horizontal"}):X.set(C.left,[{id:C.right,gap:C.gap,direction:"horizontal"}]),X.has(C.right)||X.set(C.right,[])):(X.has(C.top)?X.get(C.top).push({id:C.bottom,gap:C.gap,direction:"vertical"}):X.set(C.top,[{id:C.bottom,gap:C.gap,direction:"vertical"}]),X.has(C.bottom)||X.set(C.bottom,[]))}),H=v(X),W=a(H)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(C,G){y[G]=[C.position.x,C.position.y],p[G]=[E[g.get(C.nodeId)],w[g.get(C.nodeId)]]}),R=!0;else if(l.alignmentConstraint)(function(){var C=0;if(l.alignmentConstraint.vertical){for(var G=l.alignmentConstraint.vertical,$=A(function(tt){var ct=new Set;G[tt].forEach(function(et){ct.add(et)});var Et=new Set([].concat(h(ct)).filter(function(et){return D.has(et)})),wt=void 0;Et.size>0?wt=E[g.get(Et.values().next().value)]:wt=q(ct).x,G[tt].forEach(function(et){y[C]=[wt,w[g.get(et)]],p[C]=[E[g.get(et)],w[g.get(et)]],C++})},"_loop2"),Z=0;Z<G.length;Z++)$(Z);R=!0}if(l.alignmentConstraint.horizontal){for(var Q=l.alignmentConstraint.horizontal,pt=A(function(tt){var ct=new Set;Q[tt].forEach(function(et){ct.add(et)});var Et=new Set([].concat(h(ct)).filter(function(et){return D.has(et)})),wt=void 0;Et.size>0?wt=E[g.get(Et.values().next().value)]:wt=q(ct).y,Q[tt].forEach(function(et){y[C]=[E[g.get(et)],wt],p[C]=[E[g.get(et)],w[g.get(et)]],C++})},"_loop3"),dt=0;dt<Q.length;dt++)pt(dt);R=!0}l.relativePlacementConstraint&&(x=!0)})();else if(l.relativePlacementConstraint){for(var j=0,B=0,K=0;K<W.length;K++)W[K].length>j&&(j=W[K].length,B=K);if(j<H.size/2)nt(l.relativePlacementConstraint),R=!1,x=!1;else{var k=new Map,S=new Map,P=[];W[B].forEach(function(C){X.get(C).forEach(function(G){G.direction=="horizontal"?(k.has(C)?k.get(C).push(G):k.set(C,[G]),k.has(G.id)||k.set(G.id,[]),P.push({left:C,right:G.id})):(S.has(C)?S.get(C).push(G):S.set(C,[G]),S.has(G.id)||S.set(G.id,[]),P.push({top:C,bottom:G.id}))})}),nt(P),x=!1;var J=b(k,"horizontal"),it=b(S,"vertical");W[B].forEach(function(C,G){p[G]=[E[g.get(C)],w[g.get(C)]],y[G]=[],J.has(C)?y[G][0]=J.get(C):y[G][0]=E[g.get(C)],it.has(C)?y[G][1]=it.get(C):y[G][1]=w[g.get(C)]}),R=!0}}if(R){for(var ut=void 0,Lt=o.transpose(y),bt=o.transpose(p),F=0;F<Lt.length;F++)Lt[F]=o.multGamma(Lt[F]),bt[F]=o.multGamma(bt[F]);var rt=o.multMat(Lt,o.transpose(bt)),ht=r.svd(rt);ut=o.multMat(ht.V,o.transpose(ht.U));for(var mt=0;mt<g.size;mt++){var Ct=[E[mt],w[mt]],vt=[ut[0][0],ut[1][0]],yt=[ut[0][1],ut[1][1]];E[mt]=o.dotProduct(Ct,vt),w[mt]=o.dotProduct(Ct,yt)}x&&nt(l.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var xt={x:0,y:0};l.fixedNodeConstraint.forEach(function(C,G){var $={x:E[g.get(C.nodeId)],y:w[g.get(C.nodeId)]},Z=C.position,Q=z(Z,$);xt.x+=Q.x,xt.y+=Q.y}),xt.x/=l.fixedNodeConstraint.length,xt.y/=l.fixedNodeConstraint.length,E.forEach(function(C,G){E[G]+=xt.x}),w.forEach(function(C,G){w[G]+=xt.y}),l.fixedNodeConstraint.forEach(function(C){E[g.get(C.nodeId)]=C.position.x,w[g.get(C.nodeId)]=C.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Ht=l.alignmentConstraint.vertical,Ft=A(function(C){var G=new Set;Ht[C].forEach(function(Q){G.add(Q)});var $=new Set([].concat(h(G)).filter(function(Q){return D.has(Q)})),Z=void 0;$.size>0?Z=E[g.get($.values().next().value)]:Z=q(G).x,G.forEach(function(Q){D.has(Q)||(E[g.get(Q)]=Z)})},"_loop4"),Pt=0;Pt<Ht.length;Pt++)Ft(Pt);if(l.alignmentConstraint.horizontal)for(var Ot=l.alignmentConstraint.horizontal,Ut=A(function(C){var G=new Set;Ot[C].forEach(function(Q){G.add(Q)});var $=new Set([].concat(h(G)).filter(function(Q){return D.has(Q)})),Z=void 0;$.size>0?Z=w[g.get($.values().next().value)]:Z=q(G).y,G.forEach(function(Q){D.has(Q)||(w[g.get(Q)]=Z)})},"_loop5"),Xt=0;Xt<Ot.length;Xt++)Ut(Xt)}l.relativePlacementConstraint&&function(){var C=new Map,G=new Map,$=new Map,Z=new Map,Q=new Map,pt=new Map,dt=new Set,tt=new Set;if(D.forEach(function(gt){dt.add(gt),tt.add(gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var ct=l.alignmentConstraint.vertical,Et=A(function(gt){$.set("dummy"+gt,[]),ct[gt].forEach(function(_t){C.set(_t,"dummy"+gt),$.get("dummy"+gt).push(_t),D.has(_t)&&dt.add("dummy"+gt)}),Q.set("dummy"+gt,E[g.get(ct[gt][0])])},"_loop6"),wt=0;wt<ct.length;wt++)Et(wt);if(l.alignmentConstraint.horizontal)for(var et=l.alignmentConstraint.horizontal,It=A(function(gt){Z.set("dummy"+gt,[]),et[gt].forEach(function(_t){G.set(_t,"dummy"+gt),Z.get("dummy"+gt).push(_t),D.has(_t)&&tt.add("dummy"+gt)}),pt.set("dummy"+gt,w[g.get(et[gt][0])])},"_loop7"),ot=0;ot<et.length;ot++)It(ot)}var st=new Map,at=new Map,Nt=A(function(gt){X.get(gt).forEach(function(_t){var Yt=void 0,Vt=void 0;_t.direction=="horizontal"?(Yt=C.get(gt)?C.get(gt):gt,C.get(_t.id)?Vt={id:C.get(_t.id),gap:_t.gap,direction:_t.direction}:Vt=_t,st.has(Yt)?st.get(Yt).push(Vt):st.set(Yt,[Vt]),st.has(Vt.id)||st.set(Vt.id,[])):(Yt=G.get(gt)?G.get(gt):gt,G.get(_t.id)?Vt={id:G.get(_t.id),gap:_t.gap,direction:_t.direction}:Vt=_t,at.has(Yt)?at.get(Yt).push(Vt):at.set(Yt,[Vt]),at.has(Vt.id)||at.set(Vt.id,[]))})},"_loop8"),ft=!0,Mt=!1,Rt=void 0;try{for(var Dt=X.keys()[Symbol.iterator](),zt;!(ft=(zt=Dt.next()).done);ft=!0){var Tt=zt.value;Nt(Tt)}}catch(gt){Mt=!0,Rt=gt}finally{try{!ft&&Dt.return&&Dt.return()}finally{if(Mt)throw Rt}}var At=v(st),St=v(at),Gt=a(At),Bt=a(St),jt=m(st),re=m(at),Zt=[],Kt=[];Gt.forEach(function(gt,_t){Zt[_t]=[],gt.forEach(function(Yt){jt.get(Yt).length==0&&Zt[_t].push(Yt)})}),Bt.forEach(function(gt,_t){Kt[_t]=[],gt.forEach(function(Yt){re.get(Yt).length==0&&Kt[_t].push(Yt)})});var qt=b(st,"horizontal",dt,Q,Zt),Qt=b(at,"vertical",tt,pt,Kt),oe=A(function(gt){$.get(gt)?$.get(gt).forEach(function(_t){E[g.get(_t)]=qt.get(gt)}):E[g.get(gt)]=qt.get(gt)},"_loop9"),Jt=!0,ve=!1,ye=void 0;try{for(var se=qt.keys()[Symbol.iterator](),Ee;!(Jt=(Ee=se.next()).done);Jt=!0){var he=Ee.value;oe(he)}}catch(gt){ve=!0,ye=gt}finally{try{!Jt&&se.return&&se.return()}finally{if(ve)throw ye}}var Ye=A(function(gt){Z.get(gt)?Z.get(gt).forEach(function(_t){w[g.get(_t)]=Qt.get(gt)}):w[g.get(gt)]=Qt.get(gt)},"_loop10"),le=!0,Ne=!1,Te=void 0;try{for(var de=Qt.keys()[Symbol.iterator](),Ae;!(le=(Ae=de.next()).done);le=!0){var he=Ae.value;Ye(he)}}catch(gt){Ne=!0,Te=gt}finally{try{!le&&de.return&&de.return()}finally{if(Ne)throw Te}}}()}for(var Wt=0;Wt<_.length;Wt++){var lt=_[Wt];lt.getChild()==null&<.setCenter(E[g.get(lt.id)],w[g.get(lt.id)])}},n.exports=s},551:n=>{n.exports=L}},T={};function c(n){var e=T[n];if(e!==void 0)return e.exports;var t=T[n]={exports:{}};return M[n](t,t.exports,c),t.exports}A(c,"__webpack_require__");var d=c(45);return d})()})}),hi=pe((O,I)=>{A(function(L,M){typeof O=="object"&&typeof I=="object"?I.exports=M(_e()):typeof define=="function"&&define.amd?define(["cose-base"],M):typeof O=="object"?O.cytoscapeFcose=M(_e()):L.cytoscapeFcose=M(L.coseBase)},"webpackUniversalModuleDefinition")(O,function(L){return(()=>{var M={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var t=arguments.length,h=Array(t>1?t-1:0),i=1;i<t;i++)h[i-1]=arguments[i];return h.forEach(function(f){Object.keys(f).forEach(function(o){return e[o]=f[o]})}),e}},548:(n,e,t)=>{var h=function(){function o(r,s){var u=[],l=!0,N=!1,g=void 0;try{for(var E=r[Symbol.iterator](),w;!(l=(w=E.next()).done)&&(u.push(w.value),!(s&&u.length===s));l=!0);}catch(_){N=!0,g=_}finally{try{!l&&E.return&&E.return()}finally{if(N)throw g}}return u}return A(o,"sliceIterator"),function(r,s){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return o(r,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=t(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(o){for(var r={},s=0;s<o.length;s++)r[o[s].id()]=!0;var u=o.filter(function(l,N){typeof l=="number"&&(l=N);for(var g=l.parent()[0];g!=null;){if(r[g.id()])return!1;g=g.parent()[0]}return!0});return u},f.connectComponents=function(o,r,s,u){var l=new i,N=new Set,g=[],E=void 0,w=void 0,_=void 0,U=!1,Y=1,V=[],z=[],q=A(function(){var b=o.collection();z.push(b);var nt=s[0],a=o.collection();a.merge(nt).merge(nt.descendants().intersection(r)),g.push(nt),a.forEach(function(y){l.push(y),N.add(y),b.merge(y)});for(var v=A(function(){nt=l.shift();var y=o.collection();nt.neighborhood().nodes().forEach(function(D){r.intersection(nt.edgesWith(D)).length>0&&y.merge(D)});for(var p=0;p<y.length;p++){var R=y[p];if(E=s.intersection(R.union(R.ancestors())),E!=null&&!N.has(E[0])){var x=E.union(E.descendants());x.forEach(function(D){l.push(D),N.add(D),b.merge(D),s.has(D)&&g.push(D)})}}},"_loop2");l.length!=0;)v();if(b.forEach(function(y){r.intersection(y.connectedEdges()).forEach(function(p){b.has(p.source())&&b.has(p.target())&&b.merge(p)})}),g.length==s.length&&(U=!0),!U||U&&Y>1){w=g[0],_=w.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<_&&(_=y.connectedEdges().length,w=y)}),V.push(w.id());var m=o.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],s=s.difference(m),Y++}},"_loop");do q();while(!U);return u&&V.length>0&&u.set("dummy"+(u.size+1),V),z},f.relocateComponent=function(o,r,s){if(!s.fixedNodeConstraint){var u=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,N=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var E=!0,w=!1,_=void 0;try{for(var U=r.nodeIndexes[Symbol.iterator](),Y;!(E=(Y=U.next()).done);E=!0){var V=Y.value,z=h(V,2),q=z[0],b=z[1],nt=s.cy.getElementById(q);if(nt){var a=nt.boundingBox(),v=r.xCoords[b]-a.w/2,m=r.xCoords[b]+a.w/2,y=r.yCoords[b]-a.h/2,p=r.yCoords[b]+a.h/2;v<u&&(u=v),m>l&&(l=m),y<N&&(N=y),p>g&&(g=p)}}}catch(H){w=!0,_=H}finally{try{!E&&U.return&&U.return()}finally{if(w)throw _}}var R=o.x-(l+u)/2,x=o.y-(g+N)/2;r.xCoords=r.xCoords.map(function(H){return H+R}),r.yCoords=r.yCoords.map(function(H){return H+x})}else{Object.keys(r).forEach(function(H){var W=r[H],j=W.getRect().x,B=W.getRect().x+W.getRect().width,K=W.getRect().y,k=W.getRect().y+W.getRect().height;j<u&&(u=j),B>l&&(l=B),K<N&&(N=K),k>g&&(g=k)});var D=o.x-(l+u)/2,X=o.y-(g+N)/2;Object.keys(r).forEach(function(H){var W=r[H];W.setCenter(W.getCenterX()+D,W.getCenterY()+X)})}}},f.calcBoundingBox=function(o,r,s,u){for(var l=Number.MAX_SAFE_INTEGER,N=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,E=Number.MIN_SAFE_INTEGER,w=void 0,_=void 0,U=void 0,Y=void 0,V=o.descendants().not(":parent"),z=V.length,q=0;q<z;q++){var b=V[q];w=r[u.get(b.id())]-b.width()/2,_=r[u.get(b.id())]+b.width()/2,U=s[u.get(b.id())]-b.height()/2,Y=s[u.get(b.id())]+b.height()/2,l>w&&(l=w),N<_&&(N=_),g>U&&(g=U),E<Y&&(E=Y)}var nt={};return nt.topLeftX=l,nt.topLeftY=g,nt.width=N-l,nt.height=E-g,nt},f.calcParentsWithoutChildren=function(o,r){var s=o.collection();return r.nodes(":parent").forEach(function(u){var l=!1;u.children().forEach(function(N){N.css("display")!="none"&&(l=!0)}),l||s.merge(u)}),s},n.exports=f},816:(n,e,t)=>{var h=t(548),i=t(140).CoSELayout,f=t(140).CoSENode,o=t(140).layoutBase.PointD,r=t(140).layoutBase.DimensionD,s=t(140).layoutBase.LayoutConstants,u=t(140).layoutBase.FDLayoutConstants,l=t(140).CoSEConstants,N=A(function(g,E){var w=g.cy,_=g.eles,U=_.nodes(),Y=_.edges(),V=void 0,z=void 0,q=void 0,b={};g.randomize&&(V=E.nodeIndexes,z=E.xCoords,q=E.yCoords);var nt=A(function(D){return typeof D=="function"},"isFn"),a=A(function(D,X){return nt(D)?D(X):D},"optFn"),v=h.calcParentsWithoutChildren(w,_),m=A(function D(X,H,W,j){for(var B=H.length,K=0;K<B;K++){var k=H[K],S=null;k.intersection(v).length==0&&(S=k.children());var P=void 0,J=k.layoutDimensions({nodeDimensionsIncludeLabels:j.nodeDimensionsIncludeLabels});if(k.outerWidth()!=null&&k.outerHeight()!=null)if(j.randomize)if(!k.isParent())P=X.add(new f(W.graphManager,new o(z[V.get(k.id())]-J.w/2,q[V.get(k.id())]-J.h/2),new r(parseFloat(J.w),parseFloat(J.h))));else{var it=h.calcBoundingBox(k,z,q,V);k.intersection(v).length==0?P=X.add(new f(W.graphManager,new o(it.topLeftX,it.topLeftY),new r(it.width,it.height))):P=X.add(new f(W.graphManager,new o(it.topLeftX,it.topLeftY),new r(parseFloat(J.w),parseFloat(J.h))))}else P=X.add(new f(W.graphManager,new o(k.position("x")-J.w/2,k.position("y")-J.h/2),new r(parseFloat(J.w),parseFloat(J.h))));else P=X.add(new f(this.graphManager));if(P.id=k.data("id"),P.nodeRepulsion=a(j.nodeRepulsion,k),P.paddingLeft=parseInt(k.css("padding")),P.paddingTop=parseInt(k.css("padding")),P.paddingRight=parseInt(k.css("padding")),P.paddingBottom=parseInt(k.css("padding")),j.nodeDimensionsIncludeLabels&&(P.labelWidth=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,P.labelHeight=k.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,P.labelPosVertical=k.css("text-valign"),P.labelPosHorizontal=k.css("text-halign")),b[k.data("id")]=P,isNaN(P.rect.x)&&(P.rect.x=0),isNaN(P.rect.y)&&(P.rect.y=0),S!=null&&S.length>0){var ut=void 0;ut=W.getGraphManager().add(W.newGraph(),P),D(ut,S,W,j)}}},"processChildrenList"),y=A(function(D,X,H){for(var W=0,j=0,B=0;B<H.length;B++){var K=H[B],k=b[K.data("source")],S=b[K.data("target")];if(k&&S&&k!==S&&k.getEdgesBetween(S).length==0){var P=X.add(D.newEdge(),k,S);P.id=K.id(),P.idealLength=a(g.idealEdgeLength,K),P.edgeElasticity=a(g.edgeElasticity,K),W+=P.idealLength,j++}}g.idealEdgeLength!=null&&(j>0?l.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=W/j:nt(g.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=g.idealEdgeLength,l.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH)},"processEdges"),p=A(function(D,X){X.fixedNodeConstraint&&(D.constraints.fixedNodeConstraint=X.fixedNodeConstraint),X.alignmentConstraint&&(D.constraints.alignmentConstraint=X.alignmentConstraint),X.relativePlacementConstraint&&(D.constraints.relativePlacementConstraint=X.relativePlacementConstraint)},"processConstraints");g.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.nestingFactor),g.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=g.gravity),g.numIter!=null&&(l.MAX_ITERATIONS=u.MAX_ITERATIONS=g.numIter),g.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=g.gravityRange),g.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.gravityCompound),g.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.gravityRangeCompound),g.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.initialEnergyOnIncremental),g.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=g.tilingCompareBy),g.quality=="proof"?s.QUALITY=2:s.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=g.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!g.randomize,l.ANIMATE=u.ANIMATE=s.ANIMATE=g.animate,l.TILE=g.tile,l.TILING_PADDING_VERTICAL=typeof g.tilingPaddingVertical=="function"?g.tilingPaddingVertical.call():g.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof g.tilingPaddingHorizontal=="function"?g.tilingPaddingHorizontal.call():g.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!g.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=g.uniformNodeDimensions,g.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),g.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),g.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),g.step=="all"&&(g.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),g.fixedNodeConstraint||g.alignmentConstraint||g.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var R=new i,x=R.newGraphManager();return m(x.addRoot(),h.getTopMostNodes(U),R,g),y(R,x,Y),p(R,g),R.runLayout(),b},"coseLayout");n.exports={coseLayout:N}},212:(n,e,t)=>{var h=function(){function E(w,_){for(var U=0;U<_.length;U++){var Y=_[U];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(w,Y.key,Y)}}return A(E,"defineProperties"),function(w,_,U){return _&&E(w.prototype,_),U&&E(w,U),w}}();function i(E,w){if(!(E instanceof w))throw new TypeError("Cannot call a class as a function")}A(i,"_classCallCheck");var f=t(658),o=t(548),r=t(657),s=r.spectralLayout,u=t(816),l=u.coseLayout,N=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:A(function(E){return 4500},"nodeRepulsion"),idealEdgeLength:A(function(E){return 50},"idealEdgeLength"),edgeElasticity:A(function(E){return .45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:A(function(){},"ready"),stop:A(function(){},"stop")}),g=function(){function E(w){i(this,E),this.options=f({},N,w)}return A(E,"Layout"),h(E,[{key:"run",value:A(function(){var w=this,_=this.options,U=_.cy,Y=_.eles,V=[],z=[],q=void 0,b=[];_.fixedNodeConstraint&&(!Array.isArray(_.fixedNodeConstraint)||_.fixedNodeConstraint.length==0)&&(_.fixedNodeConstraint=void 0),_.alignmentConstraint&&(_.alignmentConstraint.vertical&&(!Array.isArray(_.alignmentConstraint.vertical)||_.alignmentConstraint.vertical.length==0)&&(_.alignmentConstraint.vertical=void 0),_.alignmentConstraint.horizontal&&(!Array.isArray(_.alignmentConstraint.horizontal)||_.alignmentConstraint.horizontal.length==0)&&(_.alignmentConstraint.horizontal=void 0)),_.relativePlacementConstraint&&(!Array.isArray(_.relativePlacementConstraint)||_.relativePlacementConstraint.length==0)&&(_.relativePlacementConstraint=void 0);var nt=_.fixedNodeConstraint||_.alignmentConstraint||_.relativePlacementConstraint;nt&&(_.tile=!1,_.packComponents=!1);var a=void 0,v=!1;if(U.layoutUtilities&&_.packComponents&&(a=U.layoutUtilities("get"),a||(a=U.layoutUtilities()),v=!0),Y.nodes().length>0)if(v){var m=o.getTopMostNodes(_.eles.nodes());if(q=o.connectComponents(U,_.eles,m),q.forEach(function(F){var rt=F.boundingBox();b.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2})}),_.randomize&&q.forEach(function(F){_.eles=F,V.push(s(_))}),_.quality=="default"||_.quality=="proof"){var y=U.collection();if(_.tile){var p=new Map,R=[],x=[],D=0,X={nodeIndexes:p,xCoords:R,yCoords:x},H=[];if(q.forEach(function(F,rt){F.edges().length==0&&(F.nodes().forEach(function(ht,mt){y.merge(F.nodes()[mt]),ht.isParent()||(X.nodeIndexes.set(F.nodes()[mt].id(),D++),X.xCoords.push(F.nodes()[0].position().x),X.yCoords.push(F.nodes()[0].position().y))}),H.push(rt))}),y.length>1){var W=y.boundingBox();b.push({x:W.x1+W.w/2,y:W.y1+W.h/2}),q.push(y),V.push(X);for(var j=H.length-1;j>=0;j--)q.splice(H[j],1),V.splice(H[j],1),b.splice(H[j],1)}}q.forEach(function(F,rt){_.eles=F,z.push(l(_,V[rt])),o.relocateComponent(b[rt],z[rt],_)})}else q.forEach(function(F,rt){o.relocateComponent(b[rt],V[rt],_)});var B=new Set;if(q.length>1){var K=[],k=Y.filter(function(F){return F.css("display")=="none"});q.forEach(function(F,rt){var ht=void 0;if(_.quality=="draft"&&(ht=V[rt].nodeIndexes),F.nodes().not(k).length>0){var mt={};mt.edges=[],mt.nodes=[];var Ct=void 0;F.nodes().not(k).forEach(function(vt){if(_.quality=="draft")if(!vt.isParent())Ct=ht.get(vt.id()),mt.nodes.push({x:V[rt].xCoords[Ct]-vt.boundingbox().w/2,y:V[rt].yCoords[Ct]-vt.boundingbox().h/2,width:vt.boundingbox().w,height:vt.boundingbox().h});else{var yt=o.calcBoundingBox(vt,V[rt].xCoords,V[rt].yCoords,ht);mt.nodes.push({x:yt.topLeftX,y:yt.topLeftY,width:yt.width,height:yt.height})}else z[rt][vt.id()]&&mt.nodes.push({x:z[rt][vt.id()].getLeft(),y:z[rt][vt.id()].getTop(),width:z[rt][vt.id()].getWidth(),height:z[rt][vt.id()].getHeight()})}),F.edges().forEach(function(vt){var yt=vt.source(),xt=vt.target();if(yt.css("display")!="none"&&xt.css("display")!="none")if(_.quality=="draft"){var Ht=ht.get(yt.id()),Ft=ht.get(xt.id()),Pt=[],Ot=[];if(yt.isParent()){var Ut=o.calcBoundingBox(yt,V[rt].xCoords,V[rt].yCoords,ht);Pt.push(Ut.topLeftX+Ut.width/2),Pt.push(Ut.topLeftY+Ut.height/2)}else Pt.push(V[rt].xCoords[Ht]),Pt.push(V[rt].yCoords[Ht]);if(xt.isParent()){var Xt=o.calcBoundingBox(xt,V[rt].xCoords,V[rt].yCoords,ht);Ot.push(Xt.topLeftX+Xt.width/2),Ot.push(Xt.topLeftY+Xt.height/2)}else Ot.push(V[rt].xCoords[Ft]),Ot.push(V[rt].yCoords[Ft]);mt.edges.push({startX:Pt[0],startY:Pt[1],endX:Ot[0],endY:Ot[1]})}else z[rt][yt.id()]&&z[rt][xt.id()]&&mt.edges.push({startX:z[rt][yt.id()].getCenterX(),startY:z[rt][yt.id()].getCenterY(),endX:z[rt][xt.id()].getCenterX(),endY:z[rt][xt.id()].getCenterY()})}),mt.nodes.length>0&&(K.push(mt),B.add(rt))}});var S=a.packComponents(K,_.randomize).shifts;if(_.quality=="draft")V.forEach(function(F,rt){var ht=F.xCoords.map(function(Ct){return Ct+S[rt].dx}),mt=F.yCoords.map(function(Ct){return Ct+S[rt].dy});F.xCoords=ht,F.yCoords=mt});else{var P=0;B.forEach(function(F){Object.keys(z[F]).forEach(function(rt){var ht=z[F][rt];ht.setCenter(ht.getCenterX()+S[P].dx,ht.getCenterY()+S[P].dy)}),P++})}}}else{var J=_.eles.boundingBox();if(b.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),_.randomize){var it=s(_);V.push(it)}_.quality=="default"||_.quality=="proof"?(z.push(l(_,V[0])),o.relocateComponent(b[0],z[0],_)):o.relocateComponent(b[0],V[0],_)}var ut=A(function(F,rt){if(_.quality=="default"||_.quality=="proof"){typeof F=="number"&&(F=rt);var ht=void 0,mt=void 0,Ct=F.data("id");return z.forEach(function(yt){Ct in yt&&(ht={x:yt[Ct].getRect().getCenterX(),y:yt[Ct].getRect().getCenterY()},mt=yt[Ct])}),_.nodeDimensionsIncludeLabels&&(mt.labelWidth&&(mt.labelPosHorizontal=="left"?ht.x+=mt.labelWidth/2:mt.labelPosHorizontal=="right"&&(ht.x-=mt.labelWidth/2)),mt.labelHeight&&(mt.labelPosVertical=="top"?ht.y+=mt.labelHeight/2:mt.labelPosVertical=="bottom"&&(ht.y-=mt.labelHeight/2))),ht==null&&(ht={x:F.position("x"),y:F.position("y")}),{x:ht.x,y:ht.y}}else{var vt=void 0;return V.forEach(function(yt){var xt=yt.nodeIndexes.get(F.id());xt!=null&&(vt={x:yt.xCoords[xt],y:yt.yCoords[xt]})}),vt==null&&(vt={x:F.position("x"),y:F.position("y")}),{x:vt.x,y:vt.y}}},"getPositions");if(_.quality=="default"||_.quality=="proof"||_.randomize){var Lt=o.calcParentsWithoutChildren(U,Y),bt=Y.filter(function(F){return F.css("display")=="none"});_.eles=Y.not(bt),Y.nodes().not(":parent").not(bt).layoutPositions(w,_,ut),Lt.length>0&&Lt.forEach(function(F){F.position(ut(F))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),E}();n.exports=g},657:(n,e,t)=>{var h=t(548),i=t(140).layoutBase.Matrix,f=t(140).layoutBase.SVD,o=A(function(r){var s=r.cy,u=r.eles,l=u.nodes(),N=u.nodes(":parent"),g=new Map,E=new Map,w=new Map,_=[],U=[],Y=[],V=[],z=[],q=[],b=[],nt=[],a=void 0,v=1e8,m=1e-9,y=r.piTol,p=r.samplingType,R=r.nodeSeparation,x=void 0,D=A(function(){for(var lt=0,C=0,G=!1;C<x;){lt=Math.floor(Math.random()*a),G=!1;for(var $=0;$<C;$++)if(V[$]==lt){G=!0;break}if(!G)V[C]=lt,C++;else continue}},"randomSampleCR"),X=A(function(lt,C,G){for(var $=[],Z=0,Q=0,pt=0,dt=void 0,tt=[],ct=0,Et=1,wt=0;wt<a;wt++)tt[wt]=v;for($[Q]=lt,tt[lt]=0;Q>=Z;){pt=$[Z++];for(var et=_[pt],It=0;It<et.length;It++)dt=E.get(et[It]),tt[dt]==v&&(tt[dt]=tt[pt]+1,$[++Q]=dt);q[pt][C]=tt[pt]*R}if(G){for(var ot=0;ot<a;ot++)q[ot][C]<z[ot]&&(z[ot]=q[ot][C]);for(var st=0;st<a;st++)z[st]>ct&&(ct=z[st],Et=st)}return Et},"BFS"),H=A(function(lt){var C=void 0;if(lt){C=Math.floor(Math.random()*a);for(var G=0;G<a;G++)z[G]=v;for(var $=0;$<x;$++)V[$]=C,C=X(C,$,lt)}else{D();for(var Z=0;Z<x;Z++)X(V[Z],Z,lt,!1)}for(var Q=0;Q<a;Q++)for(var pt=0;pt<x;pt++)q[Q][pt]*=q[Q][pt];for(var dt=0;dt<x;dt++)b[dt]=[];for(var tt=0;tt<x;tt++)for(var ct=0;ct<x;ct++)b[tt][ct]=q[V[ct]][tt]},"allBFS"),W=A(function(){for(var lt=f.svd(b),C=lt.S,G=lt.U,$=lt.V,Z=C[0]*C[0]*C[0],Q=[],pt=0;pt<x;pt++){Q[pt]=[];for(var dt=0;dt<x;dt++)Q[pt][dt]=0,pt==dt&&(Q[pt][dt]=C[pt]/(C[pt]*C[pt]+Z/(C[pt]*C[pt])))}nt=i.multMat(i.multMat($,Q),i.transpose(G))},"sample"),j=A(function(){for(var lt=void 0,C=void 0,G=[],$=[],Z=[],Q=[],pt=0;pt<a;pt++)G[pt]=Math.random(),$[pt]=Math.random();G=i.normalize(G),$=i.normalize($);for(var dt=0,tt=m,ct=m,Et=void 0;;){dt++;for(var wt=0;wt<a;wt++)Z[wt]=G[wt];if(G=i.multGamma(i.multL(i.multGamma(Z),q,nt)),lt=i.dotProduct(Z,G),G=i.normalize(G),tt=i.dotProduct(Z,G),Et=Math.abs(tt/ct),Et<=1+y&&Et>=1)break;ct=tt}for(var et=0;et<a;et++)Z[et]=G[et];for(dt=0,ct=m;;){dt++;for(var It=0;It<a;It++)Q[It]=$[It];if(Q=i.minusOp(Q,i.multCons(Z,i.dotProduct(Z,Q))),$=i.multGamma(i.multL(i.multGamma(Q),q,nt)),C=i.dotProduct(Q,$),$=i.normalize($),tt=i.dotProduct(Q,$),Et=Math.abs(tt/ct),Et<=1+y&&Et>=1)break;ct=tt}for(var ot=0;ot<a;ot++)Q[ot]=$[ot];U=i.multCons(Z,Math.sqrt(Math.abs(lt))),Y=i.multCons(Q,Math.sqrt(Math.abs(C)))},"powerIteration");h.connectComponents(s,u,h.getTopMostNodes(l),g),N.forEach(function(lt){h.connectComponents(s,u,h.getTopMostNodes(lt.descendants().intersection(u)),g)});for(var B=0,K=0;K<l.length;K++)l[K].isParent()||E.set(l[K].id(),B++);var k=!0,S=!1,P=void 0;try{for(var J=g.keys()[Symbol.iterator](),it;!(k=(it=J.next()).done);k=!0){var ut=it.value;E.set(ut,B++)}}catch(lt){S=!0,P=lt}finally{try{!k&&J.return&&J.return()}finally{if(S)throw P}}for(var Lt=0;Lt<E.size;Lt++)_[Lt]=[];N.forEach(function(lt){for(var C=lt.children().intersection(u);C.nodes(":childless").length==0;)C=C.nodes()[0].children().intersection(u);var G=0,$=C.nodes(":childless")[0].connectedEdges().length;C.nodes(":childless").forEach(function(Z,Q){Z.connectedEdges().length<$&&($=Z.connectedEdges().length,G=Q)}),w.set(lt.id(),C.nodes(":childless")[G].id())}),l.forEach(function(lt){var C=void 0;lt.isParent()?C=E.get(w.get(lt.id())):C=E.get(lt.id()),lt.neighborhood().nodes().forEach(function(G){u.intersection(lt.edgesWith(G)).length>0&&(G.isParent()?_[C].push(w.get(G.id())):_[C].push(G.id()))})});var bt=A(function(lt){var C=E.get(lt),G=void 0;g.get(lt).forEach(function($){s.getElementById($).isParent()?G=w.get($):G=$,_[C].push(G),_[E.get(G)].push(lt)})},"_loop"),F=!0,rt=!1,ht=void 0;try{for(var mt=g.keys()[Symbol.iterator](),Ct;!(F=(Ct=mt.next()).done);F=!0){var vt=Ct.value;bt(vt)}}catch(lt){rt=!0,ht=lt}finally{try{!F&&mt.return&&mt.return()}finally{if(rt)throw ht}}a=E.size;var yt=void 0;if(a>2){x=a<r.sampleSize?a:r.sampleSize;for(var xt=0;xt<a;xt++)q[xt]=[];for(var Ht=0;Ht<x;Ht++)nt[Ht]=[];return r.quality=="draft"||r.step=="all"?(H(p),W(),j(),yt={nodeIndexes:E,xCoords:U,yCoords:Y}):(E.forEach(function(lt,C){U.push(s.getElementById(C).position("x")),Y.push(s.getElementById(C).position("y"))}),yt={nodeIndexes:E,xCoords:U,yCoords:Y}),yt}else{var Ft=E.keys(),Pt=s.getElementById(Ft.next().value),Ot=Pt.position(),Ut=Pt.outerWidth();if(U.push(Ot.x),Y.push(Ot.y),a==2){var Xt=s.getElementById(Ft.next().value),Wt=Xt.outerWidth();U.push(Ot.x+Ut/2+Wt/2+r.idealEdgeLength),Y.push(Ot.y)}return yt={nodeIndexes:E,xCoords:U,yCoords:Y},yt}},"spectralLayout");n.exports={spectralLayout:o}},579:(n,e,t)=>{var h=t(212),i=A(function(f){f&&f("layout","fcose",h)},"register");typeof cytoscape<"u"&&i(cytoscape),n.exports=i},140:n=>{n.exports=L}},T={};function c(n){var e=T[n];if(e!==void 0)return e.exports;var t=T[n]={exports:{}};return M[n](t,t.exports,c),t.exports}A(c,"__webpack_require__");var d=c(579);return d})()})}),Le={L:"left",R:"right",T:"top",B:"bottom"},Ce={L:A(O=>`${O},${O/2} 0,${O} 0,0`,"L"),R:A(O=>`0,${O/2} ${O},0 ${O},${O}`,"R"),T:A(O=>`0,0 ${O},0 ${O/2},${O}`,"T"),B:A(O=>`${O/2},0 ${O},${O} 0,${O}`,"B")},ae={L:A((O,I)=>O-I+2,"L"),R:A((O,I)=>O-2,"R"),T:A((O,I)=>O-I+2,"T"),B:A((O,I)=>O-2,"B")},li=A(function(O){return kt(O)?O==="L"?"R":"L":O==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=A(function(O){let I=O;return I==="L"||I==="R"||I==="T"||I==="B"},"isArchitectureDirection"),kt=A(function(O){let I=O;return I==="L"||I==="R"},"isArchitectureDirectionX"),$t=A(function(O){let I=O;return I==="T"||I==="B"},"isArchitectureDirectionY"),me=A(function(O,I){let L=kt(O)&&$t(I),M=$t(O)&&kt(I);return L||M},"isArchitectureDirectionXY"),di=A(function(O){let I=O[0],L=O[1],M=kt(I)&&$t(L),T=$t(I)&&kt(L);return M||T},"isArchitecturePairXY"),gi=A(function(O){return O!=="LL"&&O!=="RR"&&O!=="TT"&&O!=="BB"},"isValidArchitectureDirectionPair"),ce=A(function(O,I){let L=`${O}${I}`;return gi(L)?L:void 0},"getArchitectureDirectionPair"),ci=A(function([O,I],L){let M=L[0],T=L[1];return kt(M)?$t(T)?[O+(M==="L"?-1:1),I+(T==="T"?1:-1)]:[O+(M==="L"?-1:1),I]:kt(T)?[O+(T==="L"?1:-1),I+(M==="T"?1:-1)]:[O,I+(M==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),ui=A(function(O){return O==="LT"||O==="TL"?[1,1]:O==="BL"||O==="LB"?[1,-1]:O==="BR"||O==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),fi=A(function(O,I){return me(O,I)?"bend":kt(O)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),pi=A(function(O){return O.type==="service"},"isArchitectureService"),mi=A(function(O){return O.type==="junction"},"isArchitectureJunction"),be=A(O=>O.data(),"edgeData"),ee=A(O=>O.data(),"nodeData"),vi=ti.architecture,ie,Me=(ie=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=We,this.getAccTitle=je,this.setDiagramTitle=$e,this.getDiagramTitle=qe,this.getAccDescription=Je,this.setAccDescription=Ze,this.clear()}setDiagramId(I){this.diagramId=I}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Ke()}addService({id:I,icon:L,in:M,title:T,iconText:c}){if(this.registeredIds[I]!==void 0)throw new Error(`The service id [${I}] is already in use by another ${this.registeredIds[I]}`);if(M!==void 0){if(I===M)throw new Error(`The service [${I}] cannot be placed within itself`);if(this.registeredIds[M]===void 0)throw new Error(`The service [${I}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[M]==="node")throw new Error(`The service [${I}]'s parent is not a group`)}this.registeredIds[I]="node",this.nodes[I]={id:I,type:"service",icon:L,iconText:c,title:T,edges:[],in:M}}getServices(){return Object.values(this.nodes).filter(pi)}addJunction({id:I,in:L}){if(this.registeredIds[I]!==void 0)throw new Error(`The junction id [${I}] is already in use by another ${this.registeredIds[I]}`);if(L!==void 0){if(I===L)throw new Error(`The junction [${I}] cannot be placed within itself`);if(this.registeredIds[L]===void 0)throw new Error(`The junction [${I}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[L]==="node")throw new Error(`The junction [${I}]'s parent is not a group`)}this.registeredIds[I]="node",this.nodes[I]={id:I,type:"junction",edges:[],in:L}}getJunctions(){return Object.values(this.nodes).filter(mi)}getNodes(){return Object.values(this.nodes)}getNode(I){return this.nodes[I]??null}addGroup({id:I,icon:L,in:M,title:T}){var c,d,n;if(((c=this.registeredIds)==null?void 0:c[I])!==void 0)throw new Error(`The group id [${I}] is already in use by another ${this.registeredIds[I]}`);if(M!==void 0){if(I===M)throw new Error(`The group [${I}] cannot be placed within itself`);if(((d=this.registeredIds)==null?void 0:d[M])===void 0)throw new Error(`The group [${I}]'s parent does not exist. Please make sure the parent is created before this group`);if(((n=this.registeredIds)==null?void 0:n[M])==="node")throw new Error(`The group [${I}]'s parent is not a group`)}this.registeredIds[I]="group",this.groups[I]={id:I,icon:L,title:T,in:M}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:I,rhsId:L,lhsDir:M,rhsDir:T,lhsInto:c,rhsInto:d,lhsGroup:n,rhsGroup:e,title:t}){if(!Ie(M))throw new Error(`Invalid direction given for left hand side of edge ${I}--${L}. Expected (L,R,T,B) got ${String(M)}`);if(!Ie(T))throw new Error(`Invalid direction given for right hand side of edge ${I}--${L}. Expected (L,R,T,B) got ${String(T)}`);if(this.nodes[I]===void 0&&this.groups[I]===void 0)throw new Error(`The left-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The right-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);let h=this.nodes[I].in,i=this.nodes[L].in;if(n&&h&&i&&h==i)throw new Error(`The left-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&h&&i&&h==i)throw new Error(`The right-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:I,lhsDir:M,lhsInto:c,lhsGroup:n,rhsId:L,rhsDir:T,rhsInto:d,rhsGroup:e,title:t};this.edges.push(f),this.nodes[I]&&this.nodes[L]&&(this.nodes[I].edges.push(this.edges[this.edges.length-1]),this.nodes[L].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let I={},L=Object.entries(this.nodes).reduce((e,[t,h])=>(e[t]=h.edges.reduce((i,f)=>{var s,u;let o=(s=this.getNode(f.lhsId))==null?void 0:s.in,r=(u=this.getNode(f.rhsId))==null?void 0:u.in;if(o&&r&&o!==r){let l=fi(f.lhsDir,f.rhsDir);l!=="bend"&&(I[o]??(I[o]={}),I[o][r]=l,I[r]??(I[r]={}),I[r][o]=l)}if(f.lhsId===t){let l=ce(f.lhsDir,f.rhsDir);l&&(i[l]=f.rhsId)}else{let l=ce(f.rhsDir,f.lhsDir);l&&(i[l]=f.lhsId)}return i},{}),e),{}),M=Object.keys(L)[0],T={[M]:1},c=Object.keys(L).reduce((e,t)=>t===M?e:{...e,[t]:1},{}),d=A(e=>{let t={[e]:[0,0]},h=[e];for(;h.length>0;){let i=h.shift();if(i){T[i]=1,delete c[i];let f=L[i],[o,r]=t[i];Object.entries(f).forEach(([s,u])=>{T[u]||(t[u]=ci([o,r],s),h.push(u))})}}return t},"BFS"),n=[d(M)];for(;Object.keys(c).length>0;)n.push(d(Object.keys(c)[0]));this.dataStructures={adjList:L,spatialMaps:n,groupAlignments:I}}return this.dataStructures}setElementForId(I,L){this.elements[I]=L}getElementById(I){return this.elements[I]}getConfig(){return Qe({...vi,...ei().architecture})}getConfigField(I){return this.getConfig()[I]}},A(ie,"ArchitectureDB"),ie),yi=A((O,I)=>{He(O,I),O.groups.map(L=>I.addGroup(L)),O.services.map(L=>I.addService({...L,type:"service"})),O.junctions.map(L=>I.addJunction({...L,type:"junction"})),O.edges.map(L=>I.addEdge(L))},"populateDb"),Re={parser:{yy:void 0},parse:A(async O=>{var M;let I=await Be("architecture",O);xe.debug(I);let L=(M=Re.parser)==null?void 0:M.yy;if(!(L instanceof Me))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");yi(I,L)},"parse")},Ei=A(O=>`
|
|
2
|
+
.edge {
|
|
3
|
+
stroke-width: ${O.archEdgeWidth};
|
|
4
|
+
stroke: ${O.archEdgeColor};
|
|
5
|
+
fill: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.arrow {
|
|
9
|
+
fill: ${O.archEdgeArrowColor};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.node-bkg {
|
|
13
|
+
fill: none;
|
|
14
|
+
stroke: ${O.archGroupBorderColor};
|
|
15
|
+
stroke-width: ${O.archGroupBorderWidth};
|
|
16
|
+
stroke-dasharray: 8;
|
|
17
|
+
}
|
|
18
|
+
.node-icon-text {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.node-icon-text > div {
|
|
24
|
+
color: #fff;
|
|
25
|
+
margin: 1px;
|
|
26
|
+
height: fit-content;
|
|
27
|
+
text-align: center;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
display: -webkit-box;
|
|
30
|
+
-webkit-box-orient: vertical;
|
|
31
|
+
}
|
|
32
|
+
`,"getStyles"),Ni=Ei,Ti=oi(hi()),te=A(O=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${O}</g>`,"wrapIcon"),ne={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:te('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:te('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:te('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:te('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:te('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:si,blank:{body:te("")}}},Ai=A(async function(O,I,L,M){let T=L.getConfigField("padding"),c=L.getConfigField("iconSize"),d=c/2,n=c/6,e=n/2;await Promise.all(I.edges().map(async t=>{var z,q;let{source:h,sourceDir:i,sourceArrow:f,sourceGroup:o,target:r,targetDir:s,targetArrow:u,targetGroup:l,label:N}=be(t),{x:g,y:E}=t[0].sourceEndpoint(),{x:w,y:_}=t[0].midpoint(),{x:U,y:Y}=t[0].targetEndpoint(),V=T+4;if(o&&(kt(i)?g+=i==="L"?-V:V:E+=i==="T"?-V:V+18),l&&(kt(s)?U+=s==="L"?-V:V:Y+=s==="T"?-V:V+18),!o&&((z=L.getNode(h))==null?void 0:z.type)==="junction"&&(kt(i)?g+=i==="L"?d:-d:E+=i==="T"?d:-d),!l&&((q=L.getNode(r))==null?void 0:q.type)==="junction"&&(kt(s)?U+=s==="L"?d:-d:Y+=s==="T"?d:-d),t[0]._private.rscratch){let b=O.insert("g");if(b.insert("path").attr("d",`M ${g},${E} L ${w},${_} L${U},${Y} `).attr("class","edge").attr("id",`${M}-${ni(h,r,{prefix:"L"})}`),f){let nt=kt(i)?ae[i](g,n):g-e,a=$t(i)?ae[i](E,n):E-e;b.insert("polygon").attr("points",Ce[i](n)).attr("transform",`translate(${nt},${a})`).attr("class","arrow")}if(u){let nt=kt(s)?ae[s](U,n):U-e,a=$t(s)?ae[s](Y,n):Y-e;b.insert("polygon").attr("points",Ce[s](n)).attr("transform",`translate(${nt},${a})`).attr("class","arrow")}if(N){let nt=me(i,s)?"XY":kt(i)?"X":"Y",a=0;nt==="X"?a=Math.abs(g-U):nt==="Y"?a=Math.abs(E-Y)/1.5:a=Math.abs(g-U)/2;let v=b.append("g");if(await fe(v,N,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},ue()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),nt==="X")v.attr("transform","translate("+w+", "+_+")");else if(nt==="Y")v.attr("transform","translate("+w+", "+_+") rotate(-90)");else if(nt==="XY"){let m=ce(i,s);if(m&&di(m)){let y=v.node().getBoundingClientRect(),[p,R]=ui(m);v.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*R*45})`);let x=v.node().getBoundingClientRect();v.attr("transform",`
|
|
33
|
+
translate(${w}, ${_-y.height/2})
|
|
34
|
+
translate(${p*x.width/2}, ${R*x.height/2})
|
|
35
|
+
rotate(${-1*p*R*45}, 0, ${y.height/2})
|
|
36
|
+
`)}}}}}))},"drawEdges"),wi=A(async function(O,I,L,M){let T=L.getConfigField("padding")*.75,c=L.getConfigField("fontSize"),d=L.getConfigField("iconSize")/2;await Promise.all(I.nodes().map(async n=>{let e=ee(n);if(e.type==="group"){let{h:t,w:h,x1:i,y1:f}=n.boundingBox(),o=O.append("rect");o.attr("id",`${M}-group-${e.id}`).attr("x",i+d).attr("y",f+d).attr("width",h).attr("height",t).attr("class","node-bkg");let r=O.append("g"),s=i,u=f;if(e.icon){let l=r.append("g");l.html(`<g>${await ge(e.icon,{height:T,width:T,fallbackPrefix:ne.prefix})}</g>`),l.attr("transform","translate("+(s+d+1)+", "+(u+d+1)+")"),s+=T,u+=c/2-1-2}if(e.label){let l=r.append("g");await fe(l,e.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},ue()),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),l.attr("transform","translate("+(s+d+4)+", "+(u+d+2)+")")}L.setElementForId(e.id,o)}}))},"drawGroups"),_i=A(async function(O,I,L,M){let T=ue();for(let c of L){let d=I.append("g"),n=O.getConfigField("iconSize");if(c.title){let i=d.append("g");await fe(i,c.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},T),i.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),i.attr("transform","translate("+n/2+", "+n+")")}let e=d.append("g");if(c.icon)e.html(`<g>${await ge(c.icon,{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);else if(c.iconText){e.html(`<g>${await ge("blank",{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);let i=e.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(ii(c.iconText,T)),f=parseInt(window.getComputedStyle(i.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;i.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/f)};`)}else e.append("path").attr("class","node-bkg").attr("id",`${M}-node-${c.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);d.attr("id",`${M}-service-${c.id}`).attr("class","architecture-service");let{width:t,height:h}=d.node().getBBox();c.width=t,c.height=h,O.setElementForId(c.id,d)}return 0},"drawServices"),Li=A(function(O,I,L,M){L.forEach(T=>{let c=I.append("g"),d=O.getConfigField("iconSize");c.append("g").append("rect").attr("id",`${M}-node-${T.id}`).attr("fill-opacity","0").attr("width",d).attr("height",d),c.attr("class","architecture-junction");let{width:n,height:e}=c._groups[0][0].getBBox();c.width=n,c.height=e,O.setElementForId(T.id,c)})},"drawJunctions");ai([{name:ne.prefix,icons:ne}]);Oe.use(Ti.default);function De(O,I,L){O.forEach(M=>{I.add({group:"nodes",data:{type:"service",id:M.id,icon:M.icon,label:M.title,parent:M.in,width:L.getConfigField("iconSize"),height:L.getConfigField("iconSize")},classes:"node-service"})})}A(De,"addServices");function Se(O,I,L){O.forEach(M=>{I.add({group:"nodes",data:{type:"junction",id:M.id,parent:M.in,width:L.getConfigField("iconSize"),height:L.getConfigField("iconSize")},classes:"node-junction"})})}A(Se,"addJunctions");function Ge(O,I){I.nodes().map(L=>{let M=ee(L);M.type!=="group"&&(M.x=L.position().x,M.y=L.position().y,O.getElementById(M.id).attr("transform","translate("+(M.x||0)+","+(M.y||0)+")"))})}A(Ge,"positionNodes");function Pe(O,I){O.forEach(L=>{I.add({group:"nodes",data:{type:"group",id:L.id,icon:L.icon,label:L.title,parent:L.in},classes:"node-group"})})}A(Pe,"addGroups");function Fe(O,I){O.forEach(L=>{let{lhsId:M,rhsId:T,lhsInto:c,lhsGroup:d,rhsInto:n,lhsDir:e,rhsDir:t,rhsGroup:h,title:i}=L,f=me(L.lhsDir,L.rhsDir)?"segments":"straight",o={id:`${M}-${T}`,label:i,source:M,sourceDir:e,sourceArrow:c,sourceGroup:d,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:T,targetDir:t,targetArrow:n,targetGroup:h,targetEndpoint:t==="L"?"0 50%":t==="R"?"100% 50%":t==="T"?"50% 0":"50% 100%"};I.add({group:"edges",data:o,classes:f})})}A(Fe,"addEdges");function ke(O,I,L){let M=A((n,e)=>Object.entries(n).reduce((t,[h,i])=>{var r;let f=0,o=Object.entries(i);if(o.length===1)return t[h]=o[0][1],t;for(let s=0;s<o.length-1;s++)for(let u=s+1;u<o.length;u++){let[l,N]=o[s],[g,E]=o[u];if(((r=L[l])==null?void 0:r[g])===e)t[h]??(t[h]=[]),t[h]=[...t[h],...N,...E];else if(l==="default"||g==="default")t[h]??(t[h]=[]),t[h]=[...t[h],...N,...E];else{let w=`${h}-${f++}`;t[w]=N;let _=`${h}-${f++}`;t[_]=E}}return t},{}),"flattenAlignments"),T=I.map(n=>{let e={},t={};return Object.entries(n).forEach(([h,[i,f]])=>{var r,s,u;let o=((r=O.getNode(h))==null?void 0:r.in)??"default";e[f]??(e[f]={}),(s=e[f])[o]??(s[o]=[]),e[f][o].push(h),t[i]??(t[i]={}),(u=t[i])[o]??(u[o]=[]),t[i][o].push(h)}),{horiz:Object.values(M(e,"horizontal")).filter(h=>h.length>1),vert:Object.values(M(t,"vertical")).filter(h=>h.length>1)}}),[c,d]=T.reduce(([n,e],{horiz:t,vert:h})=>[[...n,...t],[...e,...h]],[[],[]]);return{horizontal:c,vertical:d}}A(ke,"getAlignments");function Ue(O,I){let L=[],M=A(c=>`${c[0]},${c[1]}`,"posToStr"),T=A(c=>c.split(",").map(d=>parseInt(d)),"strToPos");return O.forEach(c=>{let d=Object.fromEntries(Object.entries(c).map(([h,i])=>[M(i),h])),n=[M([0,0])],e={},t={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let h=n.shift();if(h){e[h]=1;let i=d[h];if(i){let f=T(h);Object.entries(t).forEach(([o,r])=>{let s=M([f[0]+r[0],f[1]+r[1]]),u=d[s];u&&!e[s]&&(n.push(s),L.push({[Le[o]]:u,[Le[li(o)]]:i,gap:1.5*I.getConfigField("iconSize")}))})}}}}),L}A(Ue,"getRelativeConstraints");function Xe(O,I,L,M,T,{spatialMaps:c,groupAlignments:d}){return new Promise(n=>{let e=ri("body").append("div").attr("id","cy").attr("style","display:none"),t=Oe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${T.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${T.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),Pe(L,t),De(O,t,T),Se(I,t,T),Fe(M,t);let h=ke(T,c,d),i=Ue(c,T),f=t.layout({name:"fcose",quality:"proof",randomize:T.getConfigField("randomize"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(o){let[r,s]=o.connectedNodes(),{parent:u}=ee(r),{parent:l}=ee(s);return u===l?1.5*T.getConfigField("iconSize"):.5*T.getConfigField("iconSize")},edgeElasticity(o){let[r,s]=o.connectedNodes(),{parent:u}=ee(r),{parent:l}=ee(s);return u===l?.45:.001},alignmentConstraint:h,relativePlacementConstraint:i});f.one("layoutstop",()=>{var r;function o(s,u,l,N){let g,E,{x:w,y:_}=s,{x:U,y:Y}=u;E=(N-_+(w-l)*(_-Y)/(w-U))/Math.sqrt(1+Math.pow((_-Y)/(w-U),2)),g=Math.sqrt(Math.pow(N-_,2)+Math.pow(l-w,2)-Math.pow(E,2));let V=Math.sqrt(Math.pow(U-w,2)+Math.pow(Y-_,2));g=g/V;let z=(U-w)*(N-_)-(Y-_)*(l-w);switch(!0){case z>=0:z=1;break;case z<0:z=-1;break}let q=(U-w)*(l-w)+(Y-_)*(N-_);switch(!0){case q>=0:q=1;break;case q<0:q=-1;break}return E=Math.abs(E)*z,g=g*q,{distances:E,weights:g}}A(o,"getSegmentWeights"),t.startBatch();for(let s of Object.values(t.edges()))if((r=s.data)!=null&&r.call(s)){let{x:u,y:l}=s.source().position(),{x:N,y:g}=s.target().position();if(u!==N&&l!==g){let E=s.sourceEndpoint(),w=s.targetEndpoint(),{sourceDir:_}=be(s),[U,Y]=$t(_)?[E.x,w.y]:[w.x,E.y],{weights:V,distances:z}=o(E,w,U,Y);s.style("segment-distances",z),s.style("segment-weights",V)}}t.endBatch(),f.run()}),f.run(),t.ready(o=>{xe.info("Ready",o),n(t)})})}A(Xe,"layoutArchitecture");var Ci=A(async(O,I,L,M)=>{let T=M.db;T.setDiagramId(I);let c=T.getServices(),d=T.getJunctions(),n=T.getGroups(),e=T.getEdges(),t=T.getDataStructures(),h=Ve(I),i=h.append("g");i.attr("class","architecture-edges");let f=h.append("g");f.attr("class","architecture-services");let o=h.append("g");o.attr("class","architecture-groups"),await _i(T,f,c,I),Li(T,f,d,I);let r=await Xe(c,d,n,e,T,t);await Ai(i,r,T,I),await wi(o,r,T,I),Ge(T,r),ze(void 0,h,T.getConfigField("padding"),T.getConfigField("useMaxWidth"))},"draw"),Ii={draw:Ci},Di={parser:Re,get db(){return new Me},renderer:Ii,styles:Ni};export{Di as diagram};
|