@softistx/pulsarix-widget 0.8.2 → 0.8.3
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/dist/chunks/{abnfDiagram-XWFEHMT6.jcqkp43e.js → abnfDiagram-XWFEHMT6.9eyf87ze.js} +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.230b0n6c.js +1 -0
- package/dist/chunks/{architectureDiagram-CSQXQB3N.pk9dxdfb.js → architectureDiagram-CSQXQB3N.cy6247c8.js} +1 -1
- package/dist/chunks/{blockDiagram-BEDRHYPZ.ehefn7dt.js → blockDiagram-BEDRHYPZ.an5w7tk4.js} +1 -1
- package/dist/chunks/{c4Diagram-M2UUVUY5.knj3as6x.js → c4Diagram-M2UUVUY5.512525r3.js} +1 -1
- package/dist/chunks/{chat-markdown-DLDNLXM9.tvekh9sm.js → chat-markdown-COFhHMpe.fm39gs4e.js} +2 -2
- package/dist/chunks/{classDiagram-v2-KXABOMEV.vtb7vjzn.js → classDiagram-v2-KXABOMEV.5gw6azyv.js} +1 -1
- package/dist/chunks/{cose-bilkent-JH36ORCC.gb18dr42.js → cose-bilkent-JH36ORCC.9t42zmky.js} +1 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.e9ycn4jb.js +1 -0
- package/dist/chunks/{cynefinDiagram-NJNITYFG.akmr90zk.js → cynefinDiagram-NJNITYFG.dta2tfnh.js} +1 -1
- package/dist/chunks/{dagre-KIHZ2IZ3.7n7s7vq2.js → dagre-KIHZ2IZ3.k7b2vmwy.js} +1 -1
- package/dist/chunks/{diagram-7YQZDPLS.d3sdv0py.js → diagram-7YQZDPLS.cd2t0saz.js} +1 -1
- package/dist/chunks/{diagram-QBROCOUO.2v08zs42.js → diagram-QBROCOUO.1x4d8w7m.js} +1 -1
- package/dist/chunks/{diagram-RJJCUUZO.tpnwa621.js → diagram-RJJCUUZO.jk65d82z.js} +1 -1
- package/dist/chunks/{diagram-WERXNKYE.hz7tgbtr.js → diagram-WERXNKYE.85c3en4j.js} +1 -1
- package/dist/chunks/{diagram-YHHI257C.9gge9ecb.js → diagram-YHHI257C.y494n4nm.js} +1 -1
- package/dist/chunks/{diagram-YR4HJLHV.bajpx75b.js → diagram-YR4HJLHV.z2n88j9s.js} +1 -1
- package/dist/chunks/{ebnfDiagram-N527522P.hxbbq671.js → ebnfDiagram-N527522P.cgfkzbkp.js} +1 -1
- package/dist/chunks/{editor-shortcuts-dialog-I77EAez1.0s00eh53.js → editor-shortcuts-dialog-Ch8GFC-h.n66q7eep.js} +1 -1
- package/dist/chunks/editor.yc8q5dd1.js +4 -0
- package/dist/chunks/{elk-O5DQBFGD.vy7cdqps.js → elk-O5DQBFGD.188pnf8b.js} +1 -1
- package/dist/chunks/{emoji-picker-BofyuTmK.qf287fk6.js → emoji-picker-Cv6ZOgpd.cmp5h45n.js} +1 -1
- package/dist/chunks/{erDiagram-K3K3BIDK.kzs3v0ts.js → erDiagram-K3K3BIDK.abxf5cgs.js} +1 -1
- package/dist/chunks/eventmodeling-K75KTNOO.q3y4xbmj.js +1 -0
- package/dist/chunks/{flow-diagram-OPO1ep57.5006stqg.js → flow-diagram-B6X1M34-.awp18a9v.js} +1 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.af312t1k.js +1 -0
- package/dist/chunks/{ganttDiagram-3PRQTZWP.qkcp8pvg.js → ganttDiagram-3PRQTZWP.p72ak8vx.js} +1 -1
- package/dist/chunks/gitGraph-VSP46ZUC.e4envgw8.js +1 -0
- package/dist/chunks/{gitGraphDiagram-VXDFKS5L.ry9dejxm.js → gitGraphDiagram-VXDFKS5L.vtq378bg.js} +1 -1
- package/dist/chunks/{grid-E2QIVN74.q51enfx7.js → grid-E2QIVN74.8xqrr45y.js} +1 -1
- package/dist/chunks/illustration-BpmMAKpO.brt46gkr.js +1 -0
- package/dist/chunks/{index.fvh2m60c.js → index.2jsv3483.js} +1 -1
- package/dist/chunks/index.5vcex75v.js +44 -0
- package/dist/chunks/{index.20dvswea.js → index.6tc2v7mk.js} +1 -1
- package/dist/chunks/{index.bfeafb22.js → index.8hmrz817.js} +1 -1
- package/dist/chunks/{index.eec12m3n.js → index.b0pypc3w.js} +1 -1
- package/dist/chunks/{index.yf0h5qnv.js → index.btq862bx.js} +1 -1
- package/dist/chunks/{index.fab58nn0.js → index.je7pqrtm.js} +1 -1
- package/dist/chunks/{index.51yk4ene.js → index.jgvp2nkv.js} +1 -1
- package/dist/chunks/{index.fgsp5qqn.js → index.mjfjqm0b.js} +2 -2
- package/dist/chunks/{index.vnhefjwh.js → index.nphh2dtn.js} +1 -1
- package/dist/chunks/{index.23p1k2rx.js → index.pb5tn7q8.js} +1 -1
- package/dist/chunks/{index.x163xe9c.js → index.psaka010.js} +1 -1
- package/dist/chunks/{index.153rcscj.js → index.qy1pndre.js} +1 -1
- package/dist/chunks/{index.gqa9s37g.js → index.r8wc9n4q.js} +1 -1
- package/dist/chunks/{index.x1xqs5m5.js → index.vm7ezzet.js} +1 -1
- package/dist/chunks/{index.q9dsw4bt.js → index.x22rwqsz.js} +1 -1
- package/dist/chunks/{index.h6120080.js → index.ybmxf4mt.js} +1 -1
- package/dist/chunks/{index.9zhger75.js → index.yd3167gn.js} +2 -2
- package/dist/chunks/info-OHQRW6UA.yhwzx56w.js +1 -0
- package/dist/chunks/{infoDiagram-EZ3ZOAHP.r2yygqw8.js → infoDiagram-EZ3ZOAHP.q0047zjz.js} +1 -1
- package/dist/chunks/{ishikawaDiagram-S3EKX5GW.gwqtdvb2.js → ishikawaDiagram-S3EKX5GW.41wwb1jp.js} +1 -1
- package/dist/chunks/{journeyDiagram-POQNLL5X.rp31qkq5.js → journeyDiagram-POQNLL5X.2c9swtn6.js} +1 -1
- package/dist/chunks/{kanban-definition-BH5XI6FM.ymsqx6en.js → kanban-definition-BH5XI6FM.xznh9d30.js} +1 -1
- package/dist/chunks/{markup-color-chrome-ykGNUl8y.06cy435c.js → markup-color-chrome-ykGNUl8y.955bjndb.js} +1 -1
- package/dist/chunks/{markup-custom-color-C8Xc6JxB.an2wngns.js → markup-custom-color-Dou38qUi.w8c65wn1.js} +1 -1
- package/dist/chunks/{mention-list-Dhq70jL5.1k61f24q.js → mention-list-D4eNNVs0.2k5cdtgy.js} +1 -1
- package/dist/chunks/{mermaid.core.x45crg0h.js → mermaid.core.d680cq0m.js} +2 -2
- package/dist/chunks/{mindmap-definition-WVAN44T4.5cbd4rg2.js → mindmap-definition-WVAN44T4.k41b9d4r.js} +1 -1
- package/dist/chunks/packet-JDAUHWVQ.gp9cmm94.js +1 -0
- package/dist/chunks/{panel.nm4pj2wm.js → panel.yh0jnkha.js} +1 -1
- package/dist/chunks/{pegDiagram-D4NLKWP3.fsryts4r.js → pegDiagram-D4NLKWP3.x25624w6.js} +1 -1
- package/dist/chunks/pie-XZMESJXO.fx385qqa.js +1 -0
- package/dist/chunks/{pieDiagram-36ENHN4W.k4k2gvg0.js → pieDiagram-36ENHN4W.j4fq9134.js} +1 -1
- package/dist/chunks/{plated-illustration-BzxADkoZ.wtc9psry.js → plated-illustration-0ro04oJt.0ebg0x7r.js} +1 -1
- package/dist/chunks/{quadrantDiagram-ZQUDMS73.j7nj12w0.js → quadrantDiagram-ZQUDMS73.1vgwgk90.js} +1 -1
- package/dist/chunks/radar-ABXABTNO.d58r1mqp.js +1 -0
- package/dist/chunks/railroad-I3PHUGI6.cwq84f31.js +1 -0
- package/dist/chunks/railroad-abnf-LNEFI6M7.7z7d547m.js +1 -0
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.geje0ygg.js +1 -0
- package/dist/chunks/railroad-peg-JR7BVNR7.f8xnzs1y.js +1 -0
- package/dist/chunks/{railroadDiagram-JIZHGYPL.a681wt3b.js → railroadDiagram-JIZHGYPL.pbv1rqfp.js} +1 -1
- package/dist/chunks/{render-VIF2ZAQL.rn9hpsbx.js → render-VIF2ZAQL.2kz294jj.js} +1 -1
- package/dist/chunks/{requirementDiagram-AXW2TVFA.shapgy39.js → requirementDiagram-AXW2TVFA.qnxmvqx8.js} +1 -1
- package/dist/chunks/{sankeyDiagram-FBCJTAIF.2syz1e2b.js → sankeyDiagram-FBCJTAIF.whv6dy60.js} +1 -1
- package/dist/chunks/{sequenceDiagram-3LA2ROMG.jq1w12a6.js → sequenceDiagram-3LA2ROMG.w52darq5.js} +1 -1
- package/dist/chunks/{sizeCapture-2Q2CQKSF.jtv53a6j.js → sizeCapture-2Q2CQKSF.zgscrz2v.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-ATKHQDJO.x0g2rngz.js → stateDiagram-v2-ATKHQDJO.zk8w1ht1.js} +1 -1
- package/dist/chunks/{swimlanes-YQL5WMAO.j7j7c6ex.js → swimlanes-YQL5WMAO.cn1pz0jc.js} +1 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.cy9ywqbn.js +8 -0
- package/dist/chunks/{timeline-definition-7Z437IG3.s5bvn8dr.js → timeline-definition-7Z437IG3.atpqnb0j.js} +1 -1
- package/dist/chunks/treeView-D4JQ5SDB.fj76b06b.js +1 -0
- package/dist/chunks/treemap-SAJKECNS.yk7967y9.js +1 -0
- package/dist/chunks/{usecaseDiagram-RDK6N6HP.9k4r423e.js → usecaseDiagram-RDK6N6HP.ase4sfgd.js} +1 -1
- package/dist/chunks/{vennDiagram-SHRQU5PJ.82q5dzm6.js → vennDiagram-SHRQU5PJ.as8z3hh5.js} +1 -1
- package/dist/chunks/wardley-7MLQ67FV.r3k2k1ra.js +1 -0
- package/dist/chunks/{wardleyDiagram-F3OXNVQS.fm4tw2nc.js → wardleyDiagram-F3OXNVQS.8pf1xb65.js} +1 -1
- package/dist/chunks/{xychartDiagram-GDYJKCDI.57vqn2zd.js → xychartDiagram-GDYJKCDI.z35xw169.js} +1 -1
- package/dist/index.js +5 -5
- package/package.json +2 -2
- package/dist/chunks/architecture-WOLXFQ4H.6qa86taq.js +0 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.e86yfa9w.js +0 -1
- package/dist/chunks/editor.h5bxwyxn.js +0 -4
- package/dist/chunks/eventmodeling-K75KTNOO.9yb5zf47.js +0 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.zf0kndsp.js +0 -1
- package/dist/chunks/gitGraph-VSP46ZUC.txpj8e6d.js +0 -1
- package/dist/chunks/illustration-BoOzuxNg.h0gnxa4s.js +0 -1
- package/dist/chunks/index.0hrfbrja.js +0 -44
- package/dist/chunks/info-OHQRW6UA.xea9bh7d.js +0 -1
- package/dist/chunks/packet-JDAUHWVQ.c7dmae11.js +0 -1
- package/dist/chunks/pie-XZMESJXO.6rv4kzjx.js +0 -1
- package/dist/chunks/radar-ABXABTNO.58dfc8ba.js +0 -1
- package/dist/chunks/railroad-I3PHUGI6.00fqbahv.js +0 -1
- package/dist/chunks/railroad-abnf-LNEFI6M7.gt1x50q5.js +0 -1
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.qr5qfkga.js +0 -1
- package/dist/chunks/railroad-peg-JR7BVNR7.m61rq7hj.js +0 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.tzqcsrmd.js +0 -8
- package/dist/chunks/treeView-D4JQ5SDB.0x1grm2t.js +0 -1
- package/dist/chunks/treemap-SAJKECNS.1te19jsm.js +0 -1
- package/dist/chunks/wardley-7MLQ67FV.zp6gykk3.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ee}from"./index.yf0h5qnv.js";import{e,n,F,k,q,Tt,A,L,I,R,M,O,D,u,m,Y,bs,mr,nt,K,We,Be}from"./index.fgsp5qqn.js";import{se}from"./index.9zhger75.js";import{wt}from"./index.fv9af3wd.js";import{Fe,Ke}from"./index.0hrfbrja.js";var Ge=Ke(function(we,Pe){(function(U,S){if(typeof we==="object"&&typeof Pe==="object")Pe.exports=S();else if(typeof define==="function"&&define.amd)define([],S);else if(typeof we==="object")we.layoutBase=S();else U.layoutBase=S()})(we,function(){return function(C){var U={};function S(v){if(U[v])return U[v].exports;var l=U[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,S),l.l=!0,l.exports}return S.m=C,S.c=U,S.i=function(v){return v},S.d=function(v,l,s){if(!S.o(v,l))Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:s})},S.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return S.d(l,"a",l),l},S.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},S.p="",S(S.s=28)}([function(C,U,S){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1000,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v},function(C,U,S){var v=S(2),l=S(8),s=S(9);function a(g,r,p){v.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=g,this.target=r}a.prototype=Object.create(v.prototype);for(var o in v)a[o]=v[o];a.prototype.getSource=function(){return this.source},a.prototype.getTarget=function(){return this.target},a.prototype.isInterGraph=function(){return this.isInterGraph},a.prototype.getLength=function(){return this.length},a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},a.prototype.getBendpoints=function(){return this.bendpoints},a.prototype.getLca=function(){return this.lca},a.prototype.getSourceInLca=function(){return this.sourceInLca},a.prototype.getTargetInLca=function(){return this.targetInLca},a.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;else if(this.target===g)return this.source;else throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(g,r){var p=this.getOtherEnd(g),i=r.getGraphManager().getRoot();while(!0){if(p.getOwner()==r)return p;if(p.getOwner()==i)break;p=p.getOwner().getParent()}return null},a.prototype.updateLength=function(){var g=[,,,,];if(this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),g),!this.isOverlapingSourceAndTarget){if(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1)this.lengthX=s.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=s.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},a.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=s.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=s.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=a},function(C,U,S){function v(l){this.vGraphObject=l}C.exports=v},function(C,U,S){var v=S(2),l=S(10),s=S(13),a=S(0),o=S(16),g=S(5);function r(i,t,c,d){if(c==null&&d==null)d=t;if(v.call(this,d),i.graphManager!=null)i=i.graphManager;if(this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,c!=null&&t!=null)this.rect=new s(t.x,t.y,c.width,c.height);else this.rect=new s}r.prototype=Object.create(v.prototype);for(var p in v)r[p]=v[p];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(i){this.rect.width=i},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(i){this.rect.height=i},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(i,t){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=t.width,this.rect.height=t.height},r.prototype.setCenter=function(i,t){this.rect.x=i-this.rect.width/2,this.rect.y=t-this.rect.height/2},r.prototype.setLocation=function(i,t){this.rect.x=i,this.rect.y=t},r.prototype.moveBy=function(i,t){this.rect.x+=i,this.rect.y+=t},r.prototype.getEdgeListToNode=function(i){var t=[],c,d=this;return d.edges.forEach(function(f){if(f.target==i){if(f.source!=d)throw"Incorrect edge source!";t.push(f)}}),t},r.prototype.getEdgesBetween=function(i){var t=[],c,d=this;return d.edges.forEach(function(f){if(!(f.source==d||f.target==d))throw"Incorrect edge source and/or target";if(f.target==i||f.source==i)t.push(f)}),t},r.prototype.getNeighborsList=function(){var i=new Set,t=this;return t.edges.forEach(function(c){if(c.source==t)i.add(c.target);else{if(c.target!=t)throw"Incorrect incidency!";i.add(c.source)}}),i},r.prototype.withChildren=function(){var i=new Set,t,c;if(i.add(this),this.child!=null){var d=this.child.getNodes();for(var f=0;f<d.length;f++)t=d[f],c=t.withChildren(),c.forEach(function(P){i.add(P)})}return i},r.prototype.getNoOfChildren=function(){var i=0,t;if(this.child==null)i=1;else{var c=this.child.getNodes();for(var d=0;d<c.length;d++)t=c[d],i+=t.getNoOfChildren()}if(i==0)i=1;return i},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},r.prototype.scatter=function(){var i,t,c=-a.INITIAL_WORLD_BOUNDARY,d=a.INITIAL_WORLD_BOUNDARY;i=a.WORLD_CENTER_X+o.nextDouble()*(d-c)+c;var f=-a.INITIAL_WORLD_BOUNDARY,P=a.INITIAL_WORLD_BOUNDARY;t=a.WORLD_CENTER_Y+o.nextDouble()*(P-f)+f,this.rect.x=i,this.rect.y=t},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),a.NODE_DIMENSIONS_INCLUDE_LABELS){var t=i.getRight()-i.getLeft(),c=i.getBottom()-i.getTop();if(this.labelWidth){if(this.labelPosHorizontal=="left")this.rect.x-=this.labelWidth,this.setWidth(t+this.labelWidth);else if(this.labelPosHorizontal=="center"&&this.labelWidth>t)this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth);else if(this.labelPosHorizontal=="right")this.setWidth(t+this.labelWidth)}if(this.labelHeight){if(this.labelPosVertical=="top")this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight);else if(this.labelPosVertical=="center"&&this.labelHeight>c)this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight);else if(this.labelPosVertical=="bottom")this.setHeight(c+this.labelHeight)}}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(i){var t=this.rect.x;if(t>a.WORLD_BOUNDARY)t=a.WORLD_BOUNDARY;else if(t<-a.WORLD_BOUNDARY)t=-a.WORLD_BOUNDARY;var c=this.rect.y;if(c>a.WORLD_BOUNDARY)c=a.WORLD_BOUNDARY;else if(c<-a.WORLD_BOUNDARY)c=-a.WORLD_BOUNDARY;var d=new g(t,c),f=i.inverseTransformPoint(d);this.setLocation(f.x,f.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},C.exports=r},function(C,U,S){var v=S(0);function l(){}for(var s in v)l[s]=v[s];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=0.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=0.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,l.COOLING_ADAPTATION_FACTOR=0.33,l.ADAPTATION_LOWER_NODE_LIMIT=1000,l.ADAPTATION_UPPER_NODE_LIMIT=5000,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l},function(C,U,S){function v(l,s){if(l==null&&s==null)this.x=0,this.y=0;else this.x=l,this.y=s}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v},function(C,U,S){var v=S(2),l=S(10),s=S(0),a=S(7),o=S(3),g=S(1),r=S(13),p=S(12),i=S(11);function t(d,f,P){if(v.call(this,P),this.estimatedSize=l.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,f!=null&&f instanceof a)this.graphManager=f;else if(f!=null&&f instanceof Layout)this.graphManager=f.graphManager}t.prototype=Object.create(v.prototype);for(var c in v)t[c]=v[c];t.prototype.getNodes=function(){return this.nodes},t.prototype.getEdges=function(){return this.edges},t.prototype.getGraphManager=function(){return this.graphManager},t.prototype.getParent=function(){return this.parent},t.prototype.getLeft=function(){return this.left},t.prototype.getRight=function(){return this.right},t.prototype.getTop=function(){return this.top},t.prototype.getBottom=function(){return this.bottom},t.prototype.isConnected=function(){return this.isConnected},t.prototype.add=function(d,f,P){if(f==null&&P==null){var T=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(T)>-1)throw"Node already in graph!";return T.owner=this,this.getNodes().push(T),T}else{var N=d;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(P)>-1))throw"Source or target not in graph!";if(!(f.owner==P.owner&&f.owner==this))throw"Both owners must be this graph!";if(f.owner!=P.owner)return null;if(N.source=f,N.target=P,N.isInterGraph=!1,this.getEdges().push(N),f.edges.push(N),P!=f)P.edges.push(N);return N}},t.prototype.remove=function(d){var f=d;if(d instanceof o){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var P=f.edges.slice(),T,N=P.length;for(var b=0;b<N;b++)if(T=P[b],T.isInterGraph)this.graphManager.remove(T);else T.source.owner.remove(T);var z=this.nodes.indexOf(f);if(z==-1)throw"Node not in owner node list!";this.nodes.splice(z,1)}else if(d instanceof g){var T=d;if(T==null)throw"Edge is null!";if(!(T.source!=null&&T.target!=null))throw"Source and/or target is null!";if(!(T.source.owner!=null&&T.target.owner!=null&&T.source.owner==this&&T.target.owner==this))throw"Source and/or target owner is invalid!";var G=T.source.edges.indexOf(T),Z=T.target.edges.indexOf(T);if(!(G>-1&&Z>-1))throw"Source and/or target doesn't know this edge!";if(T.source.edges.splice(G,1),T.target!=T.source)T.target.edges.splice(Z,1);var z=T.source.owner.getEdges().indexOf(T);if(z==-1)throw"Not in owner's edge list!";T.source.owner.getEdges().splice(z,1)}},t.prototype.updateLeftTop=function(){var{MAX_VALUE:d,MAX_VALUE:f}=l,P,T,N,b=this.getNodes(),z=b.length;for(var G=0;G<z;G++){var Z=b[G];if(P=Z.getTop(),T=Z.getLeft(),d>P)d=P;if(f>T)f=T}if(d==l.MAX_VALUE)return null;if(b[0].getParent().paddingLeft!=null)N=b[0].getParent().paddingLeft;else N=this.margin;return this.left=f-N,this.top=d-N,new p(this.left,this.top)},t.prototype.updateBounds=function(d){var f=l.MAX_VALUE,P=-l.MAX_VALUE,T=l.MAX_VALUE,N=-l.MAX_VALUE,b,z,G,Z,rt,_=this.nodes,ut=_.length;for(var W=0;W<ut;W++){var it=_[W];if(d&&it.child!=null)it.updateBounds();if(b=it.getLeft(),z=it.getRight(),G=it.getTop(),Z=it.getBottom(),f>b)f=b;if(P<z)P=z;if(T>G)T=G;if(N<Z)N=Z}var h=new r(f,T,P-f,N-T);if(f==l.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(_[0].getParent().paddingLeft!=null)rt=_[0].getParent().paddingLeft;else rt=this.margin;this.left=h.x-rt,this.right=h.x+h.width+rt,this.top=h.y-rt,this.bottom=h.y+h.height+rt},t.calculateBounds=function(d){var f=l.MAX_VALUE,P=-l.MAX_VALUE,T=l.MAX_VALUE,N=-l.MAX_VALUE,b,z,G,Z,rt=d.length;for(var _=0;_<rt;_++){var ut=d[_];if(b=ut.getLeft(),z=ut.getRight(),G=ut.getTop(),Z=ut.getBottom(),f>b)f=b;if(P<z)P=z;if(T>G)T=G;if(N<Z)N=Z}var W=new r(f,T,P-f,N-T);return W},t.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},t.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},t.prototype.calcEstimatedSize=function(){var d=0,f=this.nodes,P=f.length;for(var T=0;T<P;T++){var N=f[T];d+=N.calcEstimatedSize()}if(d==0)this.estimatedSize=s.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=d/Math.sqrt(this.nodes.length);return this.estimatedSize},t.prototype.updateConnected=function(){var d=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new i,P=new Set,T=this.nodes[0],N,b,z=T.withChildren();z.forEach(function(W){f.push(W),P.add(W)});while(f.length!==0){T=f.shift(),N=T.getEdges();var G=N.length;for(var Z=0;Z<G;Z++){var rt=N[Z];if(b=rt.getOtherEndInGraph(T,this),b!=null&&!P.has(b)){var _=b.withChildren();_.forEach(function(W){f.push(W),P.add(W)})}}}if(this.isConnected=!1,P.size>=this.nodes.length){var ut=0;if(P.forEach(function(W){if(W.owner==d)ut++}),ut==this.nodes.length)this.isConnected=!0}},C.exports=t},function(C,U,S){var v,l=S(1);function s(a){v=S(6),this.layout=a,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var a=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(a,o);return this.setRootGraph(g),this.rootGraph},s.prototype.add=function(a,o,g,r,p){if(g==null&&r==null&&p==null){if(a==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(a)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(a),a.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return a.parent=o,o.child=a,a}else{p=g,r=o,g=a;var i=r.getOwner(),t=p.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(t!=null&&t.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==t)return g.isInterGraph=!1,i.add(g,r,p);else{if(g.isInterGraph=!0,g.source=r,g.target=p,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}}},s.prototype.remove=function(a){if(a instanceof v){var o=a;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());var r,p=g.length;for(var i=0;i<p;i++)r=g[i],o.remove(r);var t=[];t=t.concat(o.getNodes());var c;p=t.length;for(var i=0;i<p;i++)c=t[i],o.remove(c);if(o==this.rootGraph)this.setRootGraph(null);var d=this.graphs.indexOf(o);this.graphs.splice(d,1),o.parent=null}else if(a instanceof l){if(r=a,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var d=r.source.edges.indexOf(r);if(r.source.edges.splice(d,1),d=r.target.edges.indexOf(r),r.target.edges.splice(d,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var d=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(d,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){var a=[],o=this.getGraphs(),g=o.length;for(var r=0;r<g;r++)a=a.concat(o[r].getNodes());this.allNodes=a}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var a=[],o=this.getGraphs(),g=o.length;for(var r=0;r<o.length;r++)a=a.concat(o[r].getEdges());a=a.concat(this.edges),this.allEdges=a}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(a){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=a},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(a){if(a.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=a,a.parent==null)a.parent=this.layout.newNode("Root node")},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(a,o){if(!(a!=null&&o!=null))throw"assert failed";if(a==o)return!0;var g=a.getOwner(),r;do{if(r=g.getParent(),r==null)break;if(r==o)return!0;if(g=r.getOwner(),g==null)break}while(!0);g=o.getOwner();do{if(r=g.getParent(),r==null)break;if(r==a)return!0;if(g=r.getOwner(),g==null)break}while(!0);return!1},s.prototype.calcLowestCommonAncestors=function(){var a,o,g,r,p,i=this.getAllEdges(),t=i.length;for(var c=0;c<t;c++){if(a=i[c],o=a.source,g=a.target,a.lca=null,a.sourceInLca=o,a.targetInLca=g,o==g){a.lca=o.getOwner();continue}r=o.getOwner();while(a.lca==null){a.targetInLca=g,p=g.getOwner();while(a.lca==null){if(p==r){a.lca=p;break}if(p==this.rootGraph)break;if(a.lca!=null)throw"assert failed";a.targetInLca=p.getParent(),p=a.targetInLca.getOwner()}if(r==this.rootGraph)break;if(a.lca==null)a.sourceInLca=r.getParent(),r=a.sourceInLca.getOwner()}if(a.lca==null)throw"assert failed"}},s.prototype.calcLowestCommonAncestor=function(a,o){if(a==o)return a.getOwner();var g=a.getOwner();do{if(g==null)break;var r=o.getOwner();do{if(r==null)break;if(r==g)return r;r=r.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},s.prototype.calcInclusionTreeDepths=function(a,o){if(a==null&&o==null)a=this.rootGraph,o=1;var g,r=a.getNodes(),p=r.length;for(var i=0;i<p;i++)if(g=r[i],g.inclusionTreeDepth=o,g.child!=null)this.calcInclusionTreeDepths(g.child,o+1)},s.prototype.includesInvalidEdge=function(){var a,o=[],g=this.edges.length;for(var r=0;r<g;r++)if(a=this.edges[r],this.isOneAncestorOfOther(a.source,a.target))o.push(a);for(var r=0;r<o.length;r++)this.remove(o[r]);return!1},C.exports=s},function(C,U,S){var v=S(12);function l(){}l.calcSeparationAmount=function(s,a,o,g){if(!s.intersects(a))throw"assert failed";var r=[,,];if(this.decideDirectionsForOverlappingNodes(s,a,r),o[0]=Math.min(s.getRight(),a.getRight())-Math.max(s.x,a.x),o[1]=Math.min(s.getBottom(),a.getBottom())-Math.max(s.y,a.y),s.getX()<=a.getX()&&s.getRight()>=a.getRight())o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight());else if(a.getX()<=s.getX()&&a.getRight()>=s.getRight())o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight());if(s.getY()<=a.getY()&&s.getBottom()>=a.getBottom())o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom());else if(a.getY()<=s.getY()&&a.getBottom()>=s.getBottom())o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom());var p=Math.abs((a.getCenterY()-s.getCenterY())/(a.getCenterX()-s.getCenterX()));if(a.getCenterY()===s.getCenterY()&&a.getCenterX()===s.getCenterX())p=1;var i=p*o[0],t=o[1]/p;if(o[0]<t)t=o[0];else i=o[1];o[0]=-1*r[0]*(t/2+g),o[1]=-1*r[1]*(i/2+g)},l.decideDirectionsForOverlappingNodes=function(s,a,o){if(s.getCenterX()<a.getCenterX())o[0]=-1;else o[0]=1;if(s.getCenterY()<a.getCenterY())o[1]=-1;else o[1]=1},l.getIntersection2=function(s,a,o){var g=s.getCenterX(),r=s.getCenterY(),p=a.getCenterX(),i=a.getCenterY();if(s.intersects(a))return o[0]=g,o[1]=r,o[2]=p,o[3]=i,!0;var t=s.getX(),c=s.getY(),d=s.getRight(),f=s.getX(),P=s.getBottom(),T=s.getRight(),N=s.getWidthHalf(),b=s.getHeightHalf(),z=a.getX(),G=a.getY(),Z=a.getRight(),rt=a.getX(),_=a.getBottom(),ut=a.getRight(),W=a.getWidthHalf(),it=a.getHeightHalf(),h=!1,w=!1;if(g===p){if(r>i)return o[0]=g,o[1]=c,o[2]=p,o[3]=_,!1;else if(r<i)return o[0]=g,o[1]=P,o[2]=p,o[3]=G,!1}else if(r===i){if(g>p)return o[0]=t,o[1]=r,o[2]=Z,o[3]=i,!1;else if(g<p)return o[0]=d,o[1]=r,o[2]=z,o[3]=i,!1}else{var E=s.height/s.width,x=a.height/a.width,y=(i-r)/(p-g),V=void 0,H=void 0,j=void 0,Q=void 0,B=void 0,ct=void 0;if(-E===y)if(g>p)o[0]=f,o[1]=P,h=!0;else o[0]=d,o[1]=c,h=!0;else if(E===y)if(g>p)o[0]=t,o[1]=c,h=!0;else o[0]=T,o[1]=P,h=!0;if(-x===y)if(p>g)o[2]=rt,o[3]=_,w=!0;else o[2]=Z,o[3]=G,w=!0;else if(x===y)if(p>g)o[2]=z,o[3]=G,w=!0;else o[2]=ut,o[3]=_,w=!0;if(h&&w)return!1;if(g>p)if(r>i)V=this.getCardinalDirection(E,y,4),H=this.getCardinalDirection(x,y,2);else V=this.getCardinalDirection(-E,y,3),H=this.getCardinalDirection(-x,y,1);else if(r>i)V=this.getCardinalDirection(-E,y,1),H=this.getCardinalDirection(-x,y,3);else V=this.getCardinalDirection(E,y,2),H=this.getCardinalDirection(x,y,4);if(!h)switch(V){case 1:Q=c,j=g+-b/y,o[0]=j,o[1]=Q;break;case 2:j=T,Q=r+N*y,o[0]=j,o[1]=Q;break;case 3:Q=P,j=g+b/y,o[0]=j,o[1]=Q;break;case 4:j=f,Q=r+-N*y,o[0]=j,o[1]=Q;break}if(!w)switch(H){case 1:ct=G,B=p+-it/y,o[2]=B,o[3]=ct;break;case 2:B=ut,ct=i+W*y,o[2]=B,o[3]=ct;break;case 3:ct=_,B=p+it/y,o[2]=B,o[3]=ct;break;case 4:B=rt,ct=i+-W*y,o[2]=B,o[3]=ct;break}}return!1},l.getCardinalDirection=function(s,a,o){if(s>a)return o;else return 1+o%4},l.getIntersection=function(s,a,o,g){if(g==null)return this.getIntersection2(s,a,o);var{x:r,y:p}=s,{x:i,y:t}=a,{x:c,y:d}=o,{x:f,y:P}=g,T=void 0,N=void 0,b=void 0,z=void 0,G=void 0,Z=void 0,rt=void 0,_=void 0,ut=void 0;if(b=t-p,G=r-i,rt=i*p-r*t,z=P-d,Z=c-f,_=f*d-c*P,ut=b*Z-z*G,ut===0)return null;return T=(G*_-Z*rt)/ut,N=(z*rt-b*_)/ut,new v(T,N)},l.angleOfVector=function(s,a,o,g){var r=void 0;if(s!==o){if(r=Math.atan((g-a)/(o-s)),o<s)r+=Math.PI;else if(g<a)r+=this.TWO_PI}else if(g<a)r=this.ONE_AND_HALF_PI;else r=this.HALF_PI;return r},l.doIntersect=function(s,a,o,g){var{x:r,y:p}=s,{x:i,y:t}=a,{x:c,y:d}=o,{x:f,y:P}=g,T=(i-r)*(P-d)-(f-c)*(t-p);if(T===0)return!1;else{var N=((P-d)*(f-r)+(c-f)*(P-p))/T,b=((p-t)*(f-r)+(i-r)*(P-p))/T;return 0<N&&N<1&&0<b&&b<1}},l.findCircleLineIntersections=function(s,a,o,g,r,p,i){var t=(o-s)*(o-s)+(g-a)*(g-a),c=2*((s-r)*(o-s)+(a-p)*(g-a)),d=(s-r)*(s-r)+(a-p)*(a-p)-i*i,f=c*c-4*t*d;if(f>=0){var P=(-c+Math.sqrt(c*c-4*t*d))/(2*t),T=(-c-Math.sqrt(c*c-4*t*d))/(2*t),N=null;if(P>=0&&P<=1)return[P];if(T>=0&&T<=1)return[T];return N}else return null},l.HALF_PI=0.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l},function(C,U,S){function v(){}v.sign=function(l){if(l>0)return 1;else if(l<0)return-1;else return 0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v},function(C,U,S){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v},function(C,U,S){var v=function(){function r(p,i){for(var t=0;t<i.length;t++){var c=i[t];if(c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c)c.writable=!0;Object.defineProperty(p,c.key,c)}}return function(p,i,t){if(i)r(p.prototype,i);if(t)r(p,t);return p}}();function l(r,p){if(!(r instanceof p))throw TypeError("Cannot call a class as a function")}var s=function(p){return{value:p,next:null,prev:null}},a=function(p,i,t,c){if(p!==null)p.next=i;else c.head=i;if(t!==null)t.prev=i;else c.tail=i;return i.prev=p,i.next=t,c.length++,i},o=function(p,i){var{prev:t,next:c}=p;if(t!==null)t.next=c;else i.head=c;if(c!==null)c.prev=t;else i.tail=t;return p.prev=p.next=null,i.length--,p},g=function(){function r(p){var i=this;if(l(this,r),this.length=0,this.head=null,this.tail=null,p!=null)p.forEach(function(t){return i.push(t)})}return v(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,t){return a(t.prev,s(i),t,this)}},{key:"insertAfter",value:function(i,t){return a(t,s(i),t.next,this)}},{key:"insertNodeBefore",value:function(i,t){return a(t.prev,i,t,this)}},{key:"insertNodeAfter",value:function(i,t){return a(t,i,t.next,this)}},{key:"push",value:function(i){return a(this.tail,s(i),null,this)}},{key:"unshift",value:function(i){return a(null,s(i),this.head,this)}},{key:"remove",value:function(i){return o(i,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){var t=1,c=this.head;while(t<i)c=c.next,t++;return c.value}}},{key:"set_object_at",value:function(i,t){if(i<=this.length()){var c=1,d=this.head;while(c<i)d=d.next,c++;d.value=t}}}]),r}();C.exports=g},function(C,U,S){function v(l,s,a){if(this.x=null,this.y=null,l==null&&s==null&&a==null)this.x=0,this.y=0;else if(typeof l=="number"&&typeof s=="number"&&a==null)this.x=l,this.y=s;else if(l.constructor.name=="Point"&&s==null&&a==null)a=l,this.x=a.x,this.y=a.y}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(l,s,a){if(l.constructor.name=="Point"&&s==null&&a==null)a=l,this.setLocation(a.x,a.y);else if(typeof l=="number"&&typeof s=="number"&&a==null)if(parseInt(l)==l&&parseInt(s)==s)this.move(l,s);else this.x=Math.floor(l+0.5),this.y=Math.floor(s+0.5)},v.prototype.move=function(l,s){this.x=l,this.y=s},v.prototype.translate=function(l,s){this.x+=l,this.y+=s},v.prototype.equals=function(l){if(l.constructor.name=="Point"){var s=l;return this.x==s.x&&this.y==s.y}return this==l},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v},function(C,U,S){function v(l,s,a,o){if(this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&s!=null&&a!=null&&o!=null)this.x=l,this.y=s,this.width=a,this.height=o}v.prototype.getX=function(){return this.x},v.prototype.setX=function(l){this.x=l},v.prototype.getY=function(){return this.y},v.prototype.setY=function(l){this.y=l},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(l){if(this.getRight()<l.x)return!1;if(this.getBottom()<l.y)return!1;if(l.getRight()<this.x)return!1;if(l.getBottom()<this.y)return!1;return!0},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v},function(C,U,S){var v=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol==="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function l(){}l.lastID=0,l.createID=function(s){if(l.isPrimitive(s))return s;if(s.uniqueID!=null)return s.uniqueID;return s.uniqueID=l.getString(),l.lastID++,s.uniqueID},l.getString=function(s){if(s==null)s=l.lastID;return"Object#"+s},l.isPrimitive=function(s){var a=typeof s>"u"?"undefined":v(s);return s==null||a!="object"&&a!="function"},C.exports=l},function(C,U,S){function v(c){if(Array.isArray(c)){for(var d=0,f=Array(c.length);d<c.length;d++)f[d]=c[d];return f}else return Array.from(c)}var l=S(0),s=S(7),a=S(3),o=S(1),g=S(6),r=S(5),p=S(17),i=S(29);function t(c){if(i.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null)this.isRemoteUse=c}t.RANDOM_SEED=1,t.prototype=Object.create(i.prototype),t.prototype.getGraphManager=function(){return this.graphManager},t.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},t.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},t.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},t.prototype.newGraphManager=function(){var c=new s(this);return this.graphManager=c,c},t.prototype.newGraph=function(c){return new g(null,this.graphManager,c)},t.prototype.newNode=function(c){return new a(this.graphManager,c)},t.prototype.newEdge=function(c){return new o(null,null,c)},t.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},t.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var c;if(this.checkLayoutSuccess())c=!1;else c=this.layout();if(l.ANIMATE==="during")return!1;if(c){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,c},t.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},t.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var c,d=this.graphManager.getAllEdges();for(var f=0;f<d.length;f++)c=d[f];var P,T=this.graphManager.getRoot().getNodes();for(var f=0;f<T.length;f++)P=T[f];this.update(this.graphManager.getRoot())}},t.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof a){var d=c;if(d.getChild()!=null){var f=d.getChild().getNodes();for(var P=0;P<f.length;P++)update(f[P])}if(d.vGraphObject!=null){var T=d.vGraphObject;T.update(d)}}else if(c instanceof o){var N=c;if(N.vGraphObject!=null){var b=N.vGraphObject;b.update(N)}}else if(c instanceof g){var z=c;if(z.vGraphObject!=null){var G=z.vGraphObject;G.update(z)}}},t.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},t.prototype.transform=function(c){if(c==null)this.transform(new r(0,0));else{var d=new p,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){d.setWorldOrgX(c.x),d.setWorldOrgY(c.y),d.setDeviceOrgX(f.x),d.setDeviceOrgY(f.y);var P=this.getAllNodes(),T;for(var N=0;N<P.length;N++)T=P[N],T.transform(d)}}},t.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var d,f,P=c.getNodes();for(var T=0;T<P.length;T++)if(d=P[T],f=d.getChild(),f==null)d.scatter();else if(f.getNodes().length==0)d.scatter();else this.positionNodesRandomly(f),d.updateBounds()}},t.prototype.getFlatForest=function(){var c=[],d=!0,f=this.graphManager.getRoot().getNodes(),P=!0;for(var T=0;T<f.length;T++)if(f[T].getChild()!=null)P=!1;if(!P)return c;var N=new Set,b=[],z=new Map,G=[];G=G.concat(f);while(G.length>0&&d){b.push(G[0]);while(b.length>0&&d){var Z=b[0];b.splice(0,1),N.add(Z);var rt=Z.getEdges();for(var T=0;T<rt.length;T++){var _=rt[T].getOtherEnd(Z);if(z.get(Z)!=_)if(!N.has(_))b.push(_),z.set(_,Z);else{d=!1;break}}}if(!d)c=[];else{var ut=[].concat(v(N));c.push(ut);for(var T=0;T<ut.length;T++){var W=ut[T],it=G.indexOf(W);if(it>-1)G.splice(it,1)}N=new Set,z=new Map}}return c},t.prototype.createDummyNodesForBendpoints=function(c){var d=[],f=c.source,P=this.graphManager.calcLowestCommonAncestor(c.source,c.target);for(var T=0;T<c.bendpoints.length;T++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),P.add(N);var b=this.newEdge(null);this.graphManager.add(b,f,N),d.add(N),f=N}var b=this.newEdge(null);if(this.graphManager.add(b,f,c.target),this.edgeToDummyNodes.set(c,d),c.isInterGraph())this.graphManager.remove(c);else P.remove(c);return d},t.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(v(this.edgeToDummyNodes.keys())).concat(c);for(var d=0;d<c.length;d++){var f=c[d];if(f.bendpoints.length>0){var P=this.edgeToDummyNodes.get(f);for(var T=0;T<P.length;T++){var N=P[T],b=new r(N.getCenterX(),N.getCenterY()),z=f.bendpoints.get(T);z.x=b.x,z.y=b.y,N.getOwner().remove(N)}this.graphManager.add(f,f.source,f.target)}}},t.transform=function(c,d,f,P){if(f!=null&&P!=null){var T=d;if(c<=50){var N=d/f;T-=(d-N)/50*(50-c)}else{var b=d*P;T+=(b-d)/50*(c-50)}return T}else{var z,G;if(c<=50)z=9*d/500,G=d/10;else z=9*d/50,G=-8*d;return z*c+G}},t.findCenterOfTree=function(c){var d=[];d=d.concat(c);var f=[],P=new Map,T=!1,N=null;if(d.length==1||d.length==2)T=!0,N=d[0];for(var b=0;b<d.length;b++){var z=d[b],G=z.getNeighborsList().size;if(P.set(z,z.getNeighborsList().size),G==1)f.push(z)}var Z=[];Z=Z.concat(f);while(!T){var rt=[];rt=rt.concat(Z),Z=[];for(var b=0;b<d.length;b++){var z=d[b],_=d.indexOf(z);if(_>=0)d.splice(_,1);var ut=z.getNeighborsList();ut.forEach(function(h){if(f.indexOf(h)<0){var w=P.get(h),E=w-1;if(E==1)Z.push(h);P.set(h,E)}})}if(f=f.concat(Z),d.length==1||d.length==2)T=!0,N=d[0]}return N},t.prototype.setGraphManager=function(c){this.graphManager=c},C.exports=t},function(C,U,S){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v},function(C,U,S){var v=S(5);function l(s,a){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(s){this.lworldExtX=s},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(s){this.lworldExtY=s},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},l.prototype.transformX=function(s){var a=0,o=this.lworldExtX;if(o!=0)a=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/o;return a},l.prototype.transformY=function(s){var a=0,o=this.lworldExtY;if(o!=0)a=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/o;return a},l.prototype.inverseTransformX=function(s){var a=0,o=this.ldeviceExtX;if(o!=0)a=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/o;return a},l.prototype.inverseTransformY=function(s){var a=0,o=this.ldeviceExtY;if(o!=0)a=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/o;return a},l.prototype.inverseTransformPoint=function(s){var a=new v(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return a},C.exports=l},function(C,U,S){function v(i){if(Array.isArray(i)){for(var t=0,c=Array(i.length);t<i.length;t++)c[t]=i[t];return c}else return Array.from(i)}var l=S(15),s=S(4),a=S(0),o=S(8),g=S(9);function r(){l.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}r.prototype=Object.create(l.prototype);for(var p in l)r[p]=l[p];r.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){var i,t,c,d,f,P,T,N=this.getGraphManager().getAllEdges();for(var b=0;b<N.length;b++)if(i=N[b],t=i.idealLength,i.isInterGraph){if(d=i.getSource(),f=i.getTarget(),P=i.getSourceInLca().getEstimatedSize(),T=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)i.idealLength+=P+T-2*a.SIMPLE_NODE_SIZE;c=i.getLca().getInclusionTreeDepth(),i.idealLength+=t*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*c)}},r.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;if(this.incremental){if(i>s.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(i>s.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(i-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){var i=this.getAllEdges(),t;for(var c=0;c<i.length;c++)t=i[c],this.calcSpringForce(t,t.idealLength)},r.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c,d,f,P,T=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&i)this.updateGrid();N=new Set;for(c=0;c<T.length;c++)f=T[c],this.calculateRepulsionForceOfANode(f,N,i,t),N.add(f)}else for(c=0;c<T.length;c++){f=T[c];for(d=c+1;d<T.length;d++){if(P=T[d],f.getOwner()!=P.getOwner())continue;this.calcRepulsionForce(f,P)}}},r.prototype.calcGravitationalForces=function(){var i,t=this.getAllNodesToApplyGravitation();for(var c=0;c<t.length;c++)i=t[c],this.calcGravitationalForce(i)},r.prototype.moveNodes=function(){var i=this.getAllNodes(),t;for(var c=0;c<i.length;c++)t=i[c],t.move()},r.prototype.calcSpringForce=function(i,t){var c=i.getSource(),d=i.getTarget(),f,P,T,N;if(this.uniformLeafNodeSizes&&c.getChild()==null&&d.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;if(f=i.getLength(),f==0)return;P=i.edgeElasticity*(f-t),T=P*(i.lengthX/f),N=P*(i.lengthY/f),c.springForceX+=T,c.springForceY+=N,d.springForceX-=T,d.springForceY-=N},r.prototype.calcRepulsionForce=function(i,t){var c=i.getRect(),d=t.getRect(),f=[,,],P=[,,,,],T,N,b,z,G,Z,rt;if(c.intersects(d)){o.calcSeparationAmount(c,d,f,s.DEFAULT_EDGE_LENGTH/2),Z=2*f[0],rt=2*f[1];var _=i.noOfChildren*t.noOfChildren/(i.noOfChildren+t.noOfChildren);i.repulsionForceX-=_*Z,i.repulsionForceY-=_*rt,t.repulsionForceX+=_*Z,t.repulsionForceY+=_*rt}else{if(this.uniformLeafNodeSizes&&i.getChild()==null&&t.getChild()==null)T=d.getCenterX()-c.getCenterX(),N=d.getCenterY()-c.getCenterY();else o.getIntersection(c,d,P),T=P[2]-P[0],N=P[3]-P[1];if(Math.abs(T)<s.MIN_REPULSION_DIST)T=g.sign(T)*s.MIN_REPULSION_DIST;if(Math.abs(N)<s.MIN_REPULSION_DIST)N=g.sign(N)*s.MIN_REPULSION_DIST;b=T*T+N*N,z=Math.sqrt(b),G=(i.nodeRepulsion/2+t.nodeRepulsion/2)*i.noOfChildren*t.noOfChildren/b,Z=G*T/z,rt=G*N/z,i.repulsionForceX-=Z,i.repulsionForceY-=rt,t.repulsionForceX+=Z,t.repulsionForceY+=rt}},r.prototype.calcGravitationalForce=function(i){var t,c,d,f,P,T,N,b;if(t=i.getOwner(),c=(t.getRight()+t.getLeft())/2,d=(t.getTop()+t.getBottom())/2,f=i.getCenterX()-c,P=i.getCenterY()-d,T=Math.abs(f)+i.getWidth()/2,N=Math.abs(P)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()){if(b=t.getEstimatedSize()*this.gravityRangeFactor,T>b||N>b)i.gravitationForceX=-this.gravityConstant*f,i.gravitationForceY=-this.gravityConstant*P}else if(b=t.getEstimatedSize()*this.compoundGravityRangeFactor,T>b||N>b)i.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*P*this.compoundGravityConstant},r.prototype.isConverged=function(){var i,t=!1;if(this.totalIterations>this.maxIterations/3)t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||t},r.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},r.prototype.calcNoOfChildrenForAllNodes=function(){var i,t=this.graphManager.getAllNodes();for(var c=0;c<t.length;c++)i=t[c],i.noOfChildren=i.getNoOfChildren()},r.prototype.calcGrid=function(i){var t=0,c=0;t=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),c=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));var d=Array(t);for(var f=0;f<t;f++)d[f]=Array(c);for(var f=0;f<t;f++)for(var P=0;P<c;P++)d[f][P]=[];return d},r.prototype.addNodeToGrid=function(i,t,c){var d=0,f=0,P=0,T=0;d=parseInt(Math.floor((i.getRect().x-t)/this.repulsionRange)),f=parseInt(Math.floor((i.getRect().width+i.getRect().x-t)/this.repulsionRange)),P=parseInt(Math.floor((i.getRect().y-c)/this.repulsionRange)),T=parseInt(Math.floor((i.getRect().height+i.getRect().y-c)/this.repulsionRange));for(var N=d;N<=f;N++)for(var b=P;b<=T;b++)this.grid[N][b].push(i),i.setGridCoordinates(d,f,P,T)},r.prototype.updateGrid=function(){var i,t,c=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(i=0;i<c.length;i++)t=c[i],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(i,t,c,d){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&c||d){var f=new Set;i.surrounding=[];var P,T=this.grid;for(var N=i.startX-1;N<i.finishX+2;N++)for(var b=i.startY-1;b<i.finishY+2;b++)if(!(N<0||b<0||N>=T.length||b>=T[0].length))for(var z=0;z<T[N][b].length;z++){if(P=T[N][b][z],i.getOwner()!=P.getOwner()||i==P)continue;if(!t.has(P)&&!f.has(P)){var G=Math.abs(i.getCenterX()-P.getCenterX())-(i.getWidth()/2+P.getWidth()/2),Z=Math.abs(i.getCenterY()-P.getCenterY())-(i.getHeight()/2+P.getHeight()/2);if(G<=this.repulsionRange&&Z<=this.repulsionRange)f.add(P)}}i.surrounding=[].concat(v(f))}for(N=0;N<i.surrounding.length;N++)this.calcRepulsionForce(i,i.surrounding[N])},r.prototype.calcRepulsionRange=function(){return 0},C.exports=r},function(C,U,S){var v=S(1),l=S(4);function s(o,g,r){v.call(this,o,g,r),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}s.prototype=Object.create(v.prototype);for(var a in v)s[a]=v[a];C.exports=s},function(C,U,S){var v=S(3),l=S(4);function s(o,g,r,p){v.call(this,o,g,r,p),this.nodeRepulsion=l.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=[]}s.prototype=Object.create(v.prototype);for(var a in v)s[a]=v[a];s.prototype.setGridCoordinates=function(o,g,r,p){this.startX=o,this.finishX=g,this.startY=r,this.finishY=p},C.exports=s},function(C,U,S){function v(l,s){if(this.width=0,this.height=0,l!==null&&s!==null)this.height=s,this.width=l}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},C.exports=v},function(C,U,S){var v=S(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(s,a){var o=v.createID(s);if(!this.contains(o))this.map[o]=a,this.keys.push(s)},l.prototype.contains=function(s){var a=v.createID(s);return this.map[s]!=null},l.prototype.get=function(s){var a=v.createID(s);return this.map[a]},l.prototype.keySet=function(){return this.keys},C.exports=l},function(C,U,S){var v=S(14);function l(){this.set={}}l.prototype.add=function(s){var a=v.createID(s);if(!this.contains(a))this.set[a]=s},l.prototype.remove=function(s){delete this.set[v.createID(s)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(s){return this.set[v.createID(s)]==s},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(s){var a=Object.keys(this.set),o=a.length;for(var g=0;g<o;g++)s.push(this.set[a[g]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(s){var a=s.length;for(var o=0;o<a;o++){var g=s[o];this.add(g)}},C.exports=l},function(C,U,S){function v(){}v.multMat=function(l,s){var a=[];for(var o=0;o<l.length;o++){a[o]=[];for(var g=0;g<s[0].length;g++){a[o][g]=0;for(var r=0;r<l[0].length;r++)a[o][g]+=l[o][r]*s[r][g]}}return a},v.transpose=function(l){var s=[];for(var a=0;a<l[0].length;a++){s[a]=[];for(var o=0;o<l.length;o++)s[a][o]=l[o][a]}return s},v.multCons=function(l,s){var a=[];for(var o=0;o<l.length;o++)a[o]=l[o]*s;return a},v.minusOp=function(l,s){var a=[];for(var o=0;o<l.length;o++)a[o]=l[o]-s[o];return a},v.dotProduct=function(l,s){var a=0;for(var o=0;o<l.length;o++)a+=l[o]*s[o];return a},v.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},v.normalize=function(l){var s=[],a=this.mag(l);for(var o=0;o<l.length;o++)s[o]=l[o]/a;return s},v.multGamma=function(l){var s=[],a=0;for(var o=0;o<l.length;o++)a+=l[o];a*=-1/l.length;for(var g=0;g<l.length;g++)s[g]=a+l[g];return s},v.multL=function(l,s,a){var o=[],g=[],r=[];for(var p=0;p<s[0].length;p++){var i=0;for(var t=0;t<s.length;t++)i+=-0.5*s[t][p]*l[t];g[p]=i}for(var c=0;c<a.length;c++){var d=0;for(var f=0;f<a.length;f++)d+=a[c][f]*g[f];r[c]=d}for(var P=0;P<s.length;P++){var T=0;for(var N=0;N<s[0].length;N++)T+=s[P][N]*r[N];o[P]=T}return o},C.exports=v},function(C,U,S){var v=function(){function o(g,r){for(var p=0;p<r.length;p++){var i=r[p];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(g,i.key,i)}}return function(g,r,p){if(r)o(g.prototype,r);if(p)o(g,p);return g}}();function l(o,g){if(!(o instanceof g))throw TypeError("Cannot call a class as a function")}var s=S(11),a=function(){function o(g,r){if(l(this,o),r!==null||r!==void 0)this.compareFunction=this._defaultCompareFunction;var p=void 0;if(g instanceof s)p=g.size();else p=g.length;this._quicksort(g,0,p-1)}return v(o,[{key:"_quicksort",value:function(r,p,i){if(p<i){var t=this._partition(r,p,i);this._quicksort(r,p,t),this._quicksort(r,t+1,i)}}},{key:"_partition",value:function(r,p,i){var t=this._get(r,p),c=p,d=i;while(!0){while(this.compareFunction(t,this._get(r,d)))d--;while(this.compareFunction(this._get(r,c),t))c++;if(c<d)this._swap(r,c,d),c++,d--;else return d}}},{key:"_get",value:function(r,p){if(r instanceof s)return r.get_object_at(p);else return r[p]}},{key:"_set",value:function(r,p,i){if(r instanceof s)r.set_object_at(p,i);else r[p]=i}},{key:"_swap",value:function(r,p,i){var t=this._get(r,p);this._set(r,p,this._get(r,i)),this._set(r,i,t)}},{key:"_defaultCompareFunction",value:function(r,p){return p>r}}]),o}();C.exports=a},function(C,U,S){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var s=Math.min(this.m,this.n);this.s=function(kt){var Ht=[];while(kt-- >0)Ht.push(0);return Ht}(Math.min(this.m+1,this.n)),this.U=function(kt){var Ht=function ge(Jt){if(Jt.length==0)return 0;else{var ae=[];for(var fe=0;fe<Jt[0];fe++)ae.push(ge(Jt.slice(1)));return ae}};return Ht(kt)}([this.m,s]),this.V=function(kt){var Ht=function ge(Jt){if(Jt.length==0)return 0;else{var ae=[];for(var fe=0;fe<Jt[0];fe++)ae.push(ge(Jt.slice(1)));return ae}};return Ht(kt)}([this.n,this.n]);var a=function(kt){var Ht=[];while(kt-- >0)Ht.push(0);return Ht}(this.n),o=function(kt){var Ht=[];while(kt-- >0)Ht.push(0);return Ht}(this.m),g=!0,r=!0,p=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m));for(var t=0;t<Math.max(p,i);t++){if(t<p){this.s[t]=0;for(var c=t;c<this.m;c++)this.s[t]=v.hypot(this.s[t],l[c][t]);if(this.s[t]!==0){if(l[t][t]<0)this.s[t]=-this.s[t];for(var d=t;d<this.m;d++)l[d][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var f=t+1;f<this.n;f++){if(function(kt,Ht){return kt&&Ht}(t<p,this.s[t]!==0)){var P=0;for(var T=t;T<this.m;T++)P+=l[T][t]*l[T][f];P=-P/l[t][t];for(var N=t;N<this.m;N++)l[N][f]+=P*l[N][t]}a[f]=l[t][f]}if(function(kt,Ht){return kt&&Ht}(g,t<p))for(var b=t;b<this.m;b++)this.U[b][t]=l[b][t];if(t<i){a[t]=0;for(var z=t+1;z<this.n;z++)a[t]=v.hypot(a[t],a[z]);if(a[t]!==0){if(a[t+1]<0)a[t]=-a[t];for(var G=t+1;G<this.n;G++)a[G]/=a[t];a[t+1]+=1}if(a[t]=-a[t],function(kt,Ht){return kt&&Ht}(t+1<this.m,a[t]!==0)){for(var Z=t+1;Z<this.m;Z++)o[Z]=0;for(var rt=t+1;rt<this.n;rt++)for(var _=t+1;_<this.m;_++)o[_]+=a[rt]*l[_][rt];for(var ut=t+1;ut<this.n;ut++){var W=-a[ut]/a[t+1];for(var it=t+1;it<this.m;it++)l[it][ut]+=W*o[it]}}if(r)for(var h=t+1;h<this.n;h++)this.V[h][t]=a[h]}}var w=Math.min(this.n,this.m+1);if(p<this.n)this.s[p]=l[p][p];if(this.m<w)this.s[w-1]=0;if(i+1<w)a[i]=l[i][w-1];if(a[w-1]=0,g){for(var E=p;E<s;E++){for(var x=0;x<this.m;x++)this.U[x][E]=0;this.U[E][E]=1}for(var y=p-1;y>=0;y--)if(this.s[y]!==0){for(var V=y+1;V<s;V++){var H=0;for(var j=y;j<this.m;j++)H+=this.U[j][y]*this.U[j][V];H=-H/this.U[y][y];for(var Q=y;Q<this.m;Q++)this.U[Q][V]+=H*this.U[Q][y]}for(var B=y;B<this.m;B++)this.U[B][y]=-this.U[B][y];this.U[y][y]=1+this.U[y][y];for(var ct=0;ct<y-1;ct++)this.U[ct][y]=0}else{for(var mt=0;mt<this.m;mt++)this.U[mt][y]=0;this.U[y][y]=1}}if(r)for(var J=this.n-1;J>=0;J--){if(function(kt,Ht){return kt&&Ht}(J<i,a[J]!==0))for(var yt=J+1;yt<s;yt++){var ht=0;for(var X=J+1;X<this.n;X++)ht+=this.V[X][J]*this.V[X][yt];ht=-ht/this.V[J+1][J];for(var et=J+1;et<this.n;et++)this.V[et][yt]+=ht*this.V[et][J]}for(var at=0;at<this.n;at++)this.V[at][J]=0;this.V[J][J]=1}var vt=w-1,Dt=0,Wt=Math.pow(2,-52),Kt=Math.pow(2,-966);while(w>0){var dt=void 0,ie=void 0;for(dt=w-2;dt>=-1;dt--){if(dt===-1)break;if(Math.abs(a[dt])<=Kt+Wt*(Math.abs(this.s[dt])+Math.abs(this.s[dt+1]))){a[dt]=0;break}}if(dt===w-2)ie=4;else{var Bt=void 0;for(Bt=w-1;Bt>=dt;Bt--){if(Bt===dt)break;var Ct=(Bt!==w?Math.abs(a[Bt]):0)+(Bt!==dt+1?Math.abs(a[Bt-1]):0);if(Math.abs(this.s[Bt])<=Kt+Wt*Ct){this.s[Bt]=0;break}}if(Bt===dt)ie=3;else if(Bt===w-1)ie=1;else ie=2,dt=Bt}switch(dt++,ie){case 1:{var Et=a[w-2];a[w-2]=0;for(var Pt=w-2;Pt>=dt;Pt--){var Ut=v.hypot(this.s[Pt],Et),Vt=this.s[Pt]/Ut,Yt=Et/Ut;if(this.s[Pt]=Ut,Pt!==dt)Et=-Yt*a[Pt-1],a[Pt-1]=Vt*a[Pt-1];if(r)for(var Xt=0;Xt<this.n;Xt++)Ut=Vt*this.V[Xt][Pt]+Yt*this.V[Xt][w-1],this.V[Xt][w-1]=-Yt*this.V[Xt][Pt]+Vt*this.V[Xt][w-1],this.V[Xt][Pt]=Ut}}break;case 2:{var Zt=a[dt-1];a[dt-1]=0;for(var Qt=dt;Qt<w;Qt++){var he=v.hypot(this.s[Qt],Zt),te=this.s[Qt]/he,ne=Zt/he;if(this.s[Qt]=he,Zt=-ne*a[Qt],a[Qt]=te*a[Qt],g)for(var _t=0;_t<this.m;_t++)he=te*this.U[_t][Qt]+ne*this.U[_t][dt-1],this.U[_t][dt-1]=-ne*this.U[_t][Qt]+te*this.U[_t][dt-1],this.U[_t][Qt]=he}}break;case 3:{var tt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[w-1]),Math.abs(this.s[w-2])),Math.abs(a[w-2])),Math.abs(this.s[dt])),Math.abs(a[dt])),ot=this.s[w-1]/tt,st=this.s[w-2]/tt,lt=a[w-2]/tt,ft=this.s[dt]/tt,pt=a[dt]/tt,St=((st+ot)*(st-ot)+lt*lt)/2,It=ot*lt*(ot*lt),gt=0;if(function(kt,Ht){return kt||Ht}(St!==0,It!==0)){if(gt=Math.sqrt(St*St+It),St<0)gt=-gt;gt=It/(St+gt)}var Ot=(ft+ot)*(ft-ot)+gt,Rt=ft*pt;for(var Nt=dt;Nt<w-1;Nt++){var bt=v.hypot(Ot,Rt),zt=Ot/bt,At=Rt/bt;if(Nt!==dt)a[Nt-1]=bt;if(Ot=zt*this.s[Nt]+At*a[Nt],a[Nt]=zt*a[Nt]-At*this.s[Nt],Rt=At*this.s[Nt+1],this.s[Nt+1]=zt*this.s[Nt+1],r)for(var Lt=0;Lt<this.n;Lt++)bt=zt*this.V[Lt][Nt]+At*this.V[Lt][Nt+1],this.V[Lt][Nt+1]=-At*this.V[Lt][Nt]+zt*this.V[Lt][Nt+1],this.V[Lt][Nt]=bt;if(bt=v.hypot(Ot,Rt),zt=Ot/bt,At=Rt/bt,this.s[Nt]=bt,Ot=zt*a[Nt]+At*this.s[Nt+1],this.s[Nt+1]=-At*a[Nt]+zt*this.s[Nt+1],Rt=At*a[Nt+1],a[Nt+1]=zt*a[Nt+1],g&&Nt<this.m-1)for(var Ft=0;Ft<this.m;Ft++)bt=zt*this.U[Ft][Nt]+At*this.U[Ft][Nt+1],this.U[Ft][Nt+1]=-At*this.U[Ft][Nt]+zt*this.U[Ft][Nt+1],this.U[Ft][Nt]=bt}a[w-2]=Ot,Dt=Dt+1}break;case 4:{if(this.s[dt]<=0){if(this.s[dt]=this.s[dt]<0?-this.s[dt]:0,r)for(var Mt=0;Mt<=vt;Mt++)this.V[Mt][dt]=-this.V[Mt][dt]}while(dt<vt){if(this.s[dt]>=this.s[dt+1])break;var xt=this.s[dt];if(this.s[dt]=this.s[dt+1],this.s[dt+1]=xt,r&&dt<this.n-1)for(var jt=0;jt<this.n;jt++)xt=this.V[jt][dt+1],this.V[jt][dt+1]=this.V[jt][dt],this.V[jt][dt]=xt;if(g&&dt<this.m-1)for(var qt=0;qt<this.m;qt++)xt=this.U[qt][dt+1],this.U[qt][dt+1]=this.U[qt][dt],this.U[qt][dt]=xt;dt++}Dt=0,w--}break}}var le={U:this.U,V:this.V,S:this.s};return le},v.hypot=function(l,s){var a=void 0;if(Math.abs(l)>Math.abs(s))a=s/l,a=Math.abs(l)*Math.sqrt(1+a*a);else if(s!=0)a=l/s,a=Math.abs(s)*Math.sqrt(1+a*a);else a=0;return a},C.exports=v},function(C,U,S){var v=function(){function a(o,g){for(var r=0;r<g.length;r++){var p=g[r];if(p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p)p.writable=!0;Object.defineProperty(o,p.key,p)}}return function(o,g,r){if(g)a(o.prototype,g);if(r)a(o,r);return o}}();function l(a,o){if(!(a instanceof o))throw TypeError("Cannot call a class as a function")}var s=function(){function a(o,g){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,a),this.sequence1=o,this.sequence2=g,this.match_score=r,this.mismatch_penalty=p,this.gap_penalty=i,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=Array(this.iMax);for(var t=0;t<this.iMax;t++){this.grid[t]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[t][c]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var f=0;f<this.jMax;f++)this.tracebackGrid[d][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var p=1;p<this.iMax;p++)for(var i=1;i<this.jMax;i++){var t=void 0;if(this.sequence1[p-1]===this.sequence2[i-1])t=this.grid[p-1][i-1]+this.match_score;else t=this.grid[p-1][i-1]+this.mismatch_penalty;var c=this.grid[p-1][i]+this.gap_penalty,d=this.grid[p][i-1]+this.gap_penalty,f=[t,c,d],P=this.arrayAllMaxIndexes(f);this.grid[p][i]=f[P[0]],this.tracebackGrid[p][i]=[P.includes(0),P.includes(1),P.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(g[0]){var r=g[0],p=this.tracebackGrid[r.pos[0]][r.pos[1]];if(p[0])g.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(p[1])g.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2});if(p[2])g.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(r.pos[0]===0&&r.pos[1]===0)this.alignments.push({sequence1:r.seq1,sequence2:r.seq2});g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,r){var p=[],i=-1;while((i=g.indexOf(r,i+1))!==-1)p.push(i);return p}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),a}();C.exports=s},function(C,U,S){var v=function(){return};v.FDLayout=S(18),v.FDLayoutConstants=S(4),v.FDLayoutEdge=S(19),v.FDLayoutNode=S(20),v.DimensionD=S(21),v.HashMap=S(22),v.HashSet=S(23),v.IGeometry=S(8),v.IMath=S(9),v.Integer=S(10),v.Point=S(12),v.PointD=S(5),v.RandomSeed=S(16),v.RectangleD=S(13),v.Transform=S(17),v.UniqueIDGeneretor=S(14),v.Quicksort=S(25),v.LinkedList=S(11),v.LGraphObject=S(2),v.LGraph=S(6),v.LEdge=S(1),v.LGraphManager=S(7),v.LNode=S(3),v.Layout=S(15),v.LayoutConstants=S(0),v.NeedlemanWunsch=S(27),v.Matrix=S(24),v.SVD=S(26),C.exports=v},function(C,U,S){function v(){this.listeners=[]}var l=v.prototype;l.addListener=function(s,a){this.listeners.push({event:s,callback:a})},l.removeListener=function(s,a){for(var o=this.listeners.length;o>=0;o--){var g=this.listeners[o];if(g.event===s&&g.callback===a)this.listeners.splice(o,1)}},l.emit=function(s,a){for(var o=0;o<this.listeners.length;o++){var g=this.listeners[o];if(s===g.event)g.callback(a)}},C.exports=v}])})});var Ye=Ke(function(Me,Ue){(function(U,S){if(typeof Me==="object"&&typeof Ue==="object")Ue.exports=S(Ge());else if(typeof define==="function"&&define.amd)define(["layout-base"],S);else if(typeof Me==="object")Me.coseBase=S(Ge());else U.coseBase=S(U.layoutBase)})(Me,function(C){return(()=>{var U={45:(s,a,o)=>{var g={};g.layoutBase=o(551),g.CoSEConstants=o(806),g.CoSEEdge=o(767),g.CoSEGraph=o(880),g.CoSEGraphManager=o(578),g.CoSELayout=o(765),g.CoSENode=o(991),g.ConstraintHandler=o(902),s.exports=g},806:(s,a,o)=>{var g=o(551).FDLayoutConstants;function r(){}for(var p in g)r[p]=g[p];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,s.exports=r},767:(s,a,o)=>{var g=o(551).FDLayoutEdge;function r(i,t,c){g.call(this,i,t,c)}r.prototype=Object.create(g.prototype);for(var p in g)r[p]=g[p];s.exports=r},880:(s,a,o)=>{var g=o(551).LGraph;function r(i,t,c){g.call(this,i,t,c)}r.prototype=Object.create(g.prototype);for(var p in g)r[p]=g[p];s.exports=r},578:(s,a,o)=>{var g=o(551).LGraphManager;function r(i){g.call(this,i)}r.prototype=Object.create(g.prototype);for(var p in g)r[p]=g[p];s.exports=r},765:(s,a,o)=>{var g=o(551).FDLayout,r=o(578),p=o(880),i=o(991),t=o(767),c=o(806),d=o(902),f=o(551).FDLayoutConstants,P=o(551).LayoutConstants,T=o(551).Point,N=o(551).PointD,b=o(551).DimensionD,z=o(551).Layout,G=o(551).Integer,Z=o(551).IGeometry,rt=o(551).LGraph,_=o(551).Transform,ut=o(551).LinkedList;function W(){g.call(this),this.toBeTiled={},this.constraints={}}W.prototype=Object.create(g.prototype);for(var it in g)W[it]=g[it];W.prototype.newGraphManager=function(){var h=new r(this);return this.graphManager=h,h},W.prototype.newGraph=function(h){return new p(null,this.graphManager,h)},W.prototype.newNode=function(h){return new i(this.graphManager,h)},W.prototype.newEdge=function(h){return new t(null,null,h)},W.prototype.initParameters=function(){if(g.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(c.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1}},W.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=0.04,this.coolingAdjuster=1},W.prototype.layout=function(){var h=P.DEFAULT_CREATE_BENDS_AS_NEEDED;if(h)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},W.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){var h=this.getFlatForest();if(h.length>0)this.positionNodesRadially(h);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(x){return w.has(x)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(V){return w.has(V)});this.graphManager.setAllNodesToApplyGravitation(E)}if(Object.keys(this.constraints).length>0)d.handleConstraints(this),this.initConstraintVariables();if(this.initSpringEmbedder(),c.APPLY_LAYOUT)this.runSpringEmbedder();return!0},W.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%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(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 h=new Set(this.getAllNodes()),w=this.nodesWithGravity.filter(function(y){return h.has(y)});if(this.graphManager.setAllNodesToApplyGravitation(w),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2;else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();if(c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100);else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var E=!this.isTreeGrowing&&!this.isGrowthFinished,x=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(E,x),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},W.prototype.getPositionsData=function(){var h=this.graphManager.getAllNodes(),w={};for(var E=0;E<h.length;E++){var x=h[E].rect,y=h[E].id;w[y]={id:y,x:x.getCenterX(),y:x.getCenterY(),w:x.width,h:x.height}}return w},W.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{while(!h)h=this.tick();this.graphManager.updateBounds()}},W.prototype.moveNodes=function(){var h=this.getAllNodes(),w;for(var E=0;E<h.length;E++)w=h[E],w.calculateDisplacement();if(Object.keys(this.constraints).length>0)this.updateDisplacements();for(var E=0;E<h.length;E++)w=h[E],w.move()},W.prototype.initConstraintVariables=function(){var h=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;var w=this.graphManager.getAllNodes();for(var E=0;E<w.length;E++){var x=w[E];this.idToNodeMap.set(x.id,x)}var y=function X(et){var at=et.getChild().getNodes(),vt,Dt=0;for(var Wt=0;Wt<at.length;Wt++)if(vt=at[Wt],vt.getChild()==null){if(h.fixedNodeSet.has(vt.id))Dt+=100}else Dt+=X(vt);return Dt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(at){h.fixedNodeSet.add(at.nodeId)});var w=this.graphManager.getAllNodes(),x;for(var E=0;E<w.length;E++)if(x=w[E],x.getChild()!=null){var V=y(x);if(V>0)x.fixedNodeWeight=V}}if(this.constraints.relativePlacementConstraint){var H=new Map,j=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(X){h.fixedNodesOnHorizontal.add(X),h.fixedNodesOnVertical.add(X)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var Q=this.constraints.alignmentConstraint.vertical;for(var E=0;E<Q.length;E++)this.dummyToNodeForVerticalAlignment.set("dummy"+E,[]),Q[E].forEach(function(et){if(H.set(et,"dummy"+E),h.dummyToNodeForVerticalAlignment.get("dummy"+E).push(et),h.fixedNodeSet.has(et))h.fixedNodesOnHorizontal.add("dummy"+E)})}if(this.constraints.alignmentConstraint.horizontal){var B=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<B.length;E++)this.dummyToNodeForHorizontalAlignment.set("dummy"+E,[]),B[E].forEach(function(et){if(j.set(et,"dummy"+E),h.dummyToNodeForHorizontalAlignment.get("dummy"+E).push(et),h.fixedNodeSet.has(et))h.fixedNodesOnVertical.add("dummy"+E)})}}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(X){var et,at,vt;for(vt=X.length-1;vt>=2*X.length/3;vt--)et=Math.floor(Math.random()*(vt+1)),at=X[vt],X[vt]=X[et],X[et]=at;return X},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(X){if(X.left){var et=H.has(X.left)?H.get(X.left):X.left,at=H.has(X.right)?H.get(X.right):X.right;if(!h.nodesInRelativeHorizontal.includes(et))if(h.nodesInRelativeHorizontal.push(et),h.nodeToRelativeConstraintMapHorizontal.set(et,[]),h.dummyToNodeForVerticalAlignment.has(et))h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX());else h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(et).getCenterX());if(!h.nodesInRelativeHorizontal.includes(at))if(h.nodesInRelativeHorizontal.push(at),h.nodeToRelativeConstraintMapHorizontal.set(at,[]),h.dummyToNodeForVerticalAlignment.has(at))h.nodeToTempPositionMapHorizontal.set(at,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(at)[0]).getCenterX());else h.nodeToTempPositionMapHorizontal.set(at,h.idToNodeMap.get(at).getCenterX());h.nodeToRelativeConstraintMapHorizontal.get(et).push({right:at,gap:X.gap}),h.nodeToRelativeConstraintMapHorizontal.get(at).push({left:et,gap:X.gap})}else{var vt=j.has(X.top)?j.get(X.top):X.top,Dt=j.has(X.bottom)?j.get(X.bottom):X.bottom;if(!h.nodesInRelativeVertical.includes(vt))if(h.nodesInRelativeVertical.push(vt),h.nodeToRelativeConstraintMapVertical.set(vt,[]),h.dummyToNodeForHorizontalAlignment.has(vt))h.nodeToTempPositionMapVertical.set(vt,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(vt)[0]).getCenterY());else h.nodeToTempPositionMapVertical.set(vt,h.idToNodeMap.get(vt).getCenterY());if(!h.nodesInRelativeVertical.includes(Dt))if(h.nodesInRelativeVertical.push(Dt),h.nodeToRelativeConstraintMapVertical.set(Dt,[]),h.dummyToNodeForHorizontalAlignment.has(Dt))h.nodeToTempPositionMapVertical.set(Dt,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(Dt)[0]).getCenterY());else h.nodeToTempPositionMapVertical.set(Dt,h.idToNodeMap.get(Dt).getCenterY());h.nodeToRelativeConstraintMapVertical.get(vt).push({bottom:Dt,gap:X.gap}),h.nodeToRelativeConstraintMapVertical.get(Dt).push({top:vt,gap:X.gap})}});else{var ct=new Map,mt=new Map;this.constraints.relativePlacementConstraint.forEach(function(X){if(X.left){var et=H.has(X.left)?H.get(X.left):X.left,at=H.has(X.right)?H.get(X.right):X.right;if(ct.has(et))ct.get(et).push(at);else ct.set(et,[at]);if(ct.has(at))ct.get(at).push(et);else ct.set(at,[et])}else{var vt=j.has(X.top)?j.get(X.top):X.top,Dt=j.has(X.bottom)?j.get(X.bottom):X.bottom;if(mt.has(vt))mt.get(vt).push(Dt);else mt.set(vt,[Dt]);if(mt.has(Dt))mt.get(Dt).push(vt);else mt.set(Dt,[vt])}});var J=function(et,at){var vt=[],Dt=[],Wt=new ut,Kt=new Set,dt=0;return et.forEach(function(ie,Bt){if(!Kt.has(Bt)){vt[dt]=[],Dt[dt]=!1;var Ct=Bt;Wt.push(Ct),Kt.add(Ct),vt[dt].push(Ct);while(Wt.length!=0){if(Ct=Wt.shift(),at.has(Ct))Dt[dt]=!0;var Et=et.get(Ct);Et.forEach(function(Pt){if(!Kt.has(Pt))Wt.push(Pt),Kt.add(Pt),vt[dt].push(Pt)})}dt++}}),{components:vt,isFixed:Dt}},yt=J(ct,h.fixedNodesOnHorizontal);this.componentsOnHorizontal=yt.components,this.fixedComponentsOnHorizontal=yt.isFixed;var ht=J(mt,h.fixedNodesOnVertical);this.componentsOnVertical=ht.components,this.fixedComponentsOnVertical=ht.isFixed}}},W.prototype.updateDisplacements=function(){var h=this;if(this.constraints.fixedNodeConstraint)this.constraints.fixedNodeConstraint.forEach(function(ht){var X=h.idToNodeMap.get(ht.nodeId);X.displacementX=0,X.displacementY=0});if(this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var w=this.constraints.alignmentConstraint.vertical;for(var E=0;E<w.length;E++){var x=0;for(var y=0;y<w[E].length;y++){if(this.fixedNodeSet.has(w[E][y])){x=0;break}x+=this.idToNodeMap.get(w[E][y]).displacementX}var V=x/w[E].length;for(var y=0;y<w[E].length;y++)this.idToNodeMap.get(w[E][y]).displacementX=V}}if(this.constraints.alignmentConstraint.horizontal){var H=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<H.length;E++){var j=0;for(var y=0;y<H[E].length;y++){if(this.fixedNodeSet.has(H[E][y])){j=0;break}j+=this.idToNodeMap.get(H[E][y]).displacementY}var Q=j/H[E].length;for(var y=0;y<H[E].length;y++)this.idToNodeMap.get(H[E][y]).displacementY=Q}}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS){if(this.totalIterations%10==0)this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical);this.nodesInRelativeHorizontal.forEach(function(ht){if(!h.fixedNodesOnHorizontal.has(ht)){var X=0;if(h.dummyToNodeForVerticalAlignment.has(ht))X=h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(ht)[0]).displacementX;else X=h.idToNodeMap.get(ht).displacementX;if(h.nodeToRelativeConstraintMapHorizontal.get(ht).forEach(function(et){if(et.right){var at=h.nodeToTempPositionMapHorizontal.get(et.right)-h.nodeToTempPositionMapHorizontal.get(ht)-X;if(at<et.gap)X-=et.gap-at}else{var at=h.nodeToTempPositionMapHorizontal.get(ht)-h.nodeToTempPositionMapHorizontal.get(et.left)+X;if(at<et.gap)X+=et.gap-at}}),h.nodeToTempPositionMapHorizontal.set(ht,h.nodeToTempPositionMapHorizontal.get(ht)+X),h.dummyToNodeForVerticalAlignment.has(ht))h.dummyToNodeForVerticalAlignment.get(ht).forEach(function(et){h.idToNodeMap.get(et).displacementX=X});else h.idToNodeMap.get(ht).displacementX=X}}),this.nodesInRelativeVertical.forEach(function(ht){if(!h.fixedNodesOnHorizontal.has(ht)){var X=0;if(h.dummyToNodeForHorizontalAlignment.has(ht))X=h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(ht)[0]).displacementY;else X=h.idToNodeMap.get(ht).displacementY;if(h.nodeToRelativeConstraintMapVertical.get(ht).forEach(function(et){if(et.bottom){var at=h.nodeToTempPositionMapVertical.get(et.bottom)-h.nodeToTempPositionMapVertical.get(ht)-X;if(at<et.gap)X-=et.gap-at}else{var at=h.nodeToTempPositionMapVertical.get(ht)-h.nodeToTempPositionMapVertical.get(et.top)+X;if(at<et.gap)X+=et.gap-at}}),h.nodeToTempPositionMapVertical.set(ht,h.nodeToTempPositionMapVertical.get(ht)+X),h.dummyToNodeForHorizontalAlignment.has(ht))h.dummyToNodeForHorizontalAlignment.get(ht).forEach(function(et){h.idToNodeMap.get(et).displacementY=X});else h.idToNodeMap.get(ht).displacementY=X}})}else{for(var E=0;E<this.componentsOnHorizontal.length;E++){var B=this.componentsOnHorizontal[E];if(this.fixedComponentsOnHorizontal[E])for(var y=0;y<B.length;y++)if(this.dummyToNodeForVerticalAlignment.has(B[y]))this.dummyToNodeForVerticalAlignment.get(B[y]).forEach(function(et){h.idToNodeMap.get(et).displacementX=0});else this.idToNodeMap.get(B[y]).displacementX=0;else{var ct=0,mt=0;for(var y=0;y<B.length;y++)if(this.dummyToNodeForVerticalAlignment.has(B[y])){var J=this.dummyToNodeForVerticalAlignment.get(B[y]);ct+=J.length*this.idToNodeMap.get(J[0]).displacementX,mt+=J.length}else ct+=this.idToNodeMap.get(B[y]).displacementX,mt++;var yt=ct/mt;for(var y=0;y<B.length;y++)if(this.dummyToNodeForVerticalAlignment.has(B[y]))this.dummyToNodeForVerticalAlignment.get(B[y]).forEach(function(et){h.idToNodeMap.get(et).displacementX=yt});else this.idToNodeMap.get(B[y]).displacementX=yt}}for(var E=0;E<this.componentsOnVertical.length;E++){var B=this.componentsOnVertical[E];if(this.fixedComponentsOnVertical[E])for(var y=0;y<B.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(B[y]))this.dummyToNodeForHorizontalAlignment.get(B[y]).forEach(function(at){h.idToNodeMap.get(at).displacementY=0});else this.idToNodeMap.get(B[y]).displacementY=0;else{var ct=0,mt=0;for(var y=0;y<B.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(B[y])){var J=this.dummyToNodeForHorizontalAlignment.get(B[y]);ct+=J.length*this.idToNodeMap.get(J[0]).displacementY,mt+=J.length}else ct+=this.idToNodeMap.get(B[y]).displacementY,mt++;var yt=ct/mt;for(var y=0;y<B.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(B[y]))this.dummyToNodeForHorizontalAlignment.get(B[y]).forEach(function(Wt){h.idToNodeMap.get(Wt).displacementY=yt});else this.idToNodeMap.get(B[y]).displacementY=yt}}}},W.prototype.calculateNodesToApplyGravitationTo=function(){var h=[],w,E=this.graphManager.getGraphs(),x=E.length,y;for(y=0;y<x;y++)if(w=E[y],w.updateConnected(),!w.isConnected)h=h.concat(w.getNodes());return h},W.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var w=new Set,E;for(E=0;E<h.length;E++){var x=h[E];if(!w.has(x)){var y=x.getSource(),V=x.getTarget();if(y==V)x.getBendpoints().push(new N),x.getBendpoints().push(new N),this.createDummyNodesForBendpoints(x),w.add(x);else{var H=[];if(H=H.concat(y.getEdgeListToNode(V)),H=H.concat(V.getEdgeListToNode(y)),!w.has(H[0])){if(H.length>1){var j;for(j=0;j<H.length;j++){var Q=H[j];Q.getBendpoints().push(new N),this.createDummyNodesForBendpoints(Q)}}H.forEach(function(B){w.add(B)})}}}if(w.size==h.length)break}},W.prototype.positionNodesRadially=function(h){var w=new T(0,0),E=Math.ceil(Math.sqrt(h.length)),x=0,y=0,V=0,H=new N(0,0);for(var j=0;j<h.length;j++){if(j%E==0){if(V=0,y=x,j!=0)y+=c.DEFAULT_COMPONENT_SEPERATION;x=0}var Q=h[j],B=z.findCenterOfTree(Q);if(w.x=V,w.y=y,H=W.radialLayout(Q,B,w),H.y>x)x=Math.floor(H.y);V=Math.floor(H.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(P.WORLD_CENTER_X-H.x/2,P.WORLD_CENTER_Y-H.y/2))},W.radialLayout=function(h,w,E){var x=Math.max(this.maxDiagonalInTree(h),c.DEFAULT_RADIAL_SEPARATION);W.branchRadialLayout(w,null,0,359,0,x);var y=rt.calculateBounds(h),V=new _;V.setDeviceOrgX(y.getMinX()),V.setDeviceOrgY(y.getMinY()),V.setWorldOrgX(E.x),V.setWorldOrgY(E.y);for(var H=0;H<h.length;H++){var j=h[H];j.transform(V)}var Q=new N(y.getMaxX(),y.getMaxY());return V.inverseTransformPoint(Q)},W.branchRadialLayout=function(h,w,E,x,y,V){var H=(x-E+1)/2;if(H<0)H+=180;var j=(H+E)%360,Q=j*Z.TWO_PI/360,B=Math.cos(Q),ct=y*Math.cos(Q),mt=y*Math.sin(Q);h.setCenter(ct,mt);var J=[];J=J.concat(h.getEdges());var yt=J.length;if(w!=null)yt--;var ht=0,X=J.length,et,at=h.getEdgesBetween(w);while(at.length>1){var vt=at[0];at.splice(0,1);var Dt=J.indexOf(vt);if(Dt>=0)J.splice(Dt,1);X--,yt--}if(w!=null)et=(J.indexOf(at[0])+1)%X;else et=0;var Wt=Math.abs(x-E)/yt;for(var Kt=et;ht!=yt;Kt=++Kt%X){var dt=J[Kt].getOtherEnd(h);if(dt==w)continue;var ie=(E+ht*Wt)%360,Bt=(ie+Wt)%360;W.branchRadialLayout(dt,h,ie,Bt,y+V,V),ht++}},W.maxDiagonalInTree=function(h){var w=G.MIN_VALUE;for(var E=0;E<h.length;E++){var x=h[E],y=x.getDiagonal();if(y>w)w=y}return w},W.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},W.prototype.groupZeroDegreeMembers=function(){var h=this,w={};this.memberGroups={},this.idToDummyNode={};var E=[],x=this.graphManager.getAllNodes();for(var y=0;y<x.length;y++){var V=x[y],H=V.getParent();if(this.getNodeDegreeWithChildren(V)===0&&(H.id==null||!this.getToBeTiled(H)))E.push(V)}for(var y=0;y<E.length;y++){var V=E[y],j=V.getParent().id;if(typeof w[j]>"u")w[j]=[];w[j]=w[j].concat(V)}Object.keys(w).forEach(function(Q){if(w[Q].length>1){var B="DummyCompound_"+Q;h.memberGroups[B]=w[Q];var ct=w[Q][0].getParent(),mt=new i(h.graphManager);mt.id=B,mt.paddingLeft=ct.paddingLeft||0,mt.paddingRight=ct.paddingRight||0,mt.paddingBottom=ct.paddingBottom||0,mt.paddingTop=ct.paddingTop||0,h.idToDummyNode[B]=mt;var J=h.getGraphManager().add(h.newGraph(),mt),yt=ct.getChild();yt.add(mt);for(var ht=0;ht<w[Q].length;ht++){var X=w[Q][ht];yt.remove(X),J.add(X)}}})},W.prototype.clearCompounds=function(){var h={},w={};this.performDFSOnCompounds();for(var E=0;E<this.compoundOrder.length;E++)w[this.compoundOrder[E].id]=this.compoundOrder[E],h[this.compoundOrder[E].id]=[].concat(this.compoundOrder[E].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[E].getChild()),this.compoundOrder[E].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,w)},W.prototype.clearZeroDegreeMembers=function(){var h=this,w=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(E){var x=h.idToDummyNode[E];if(w[E]=h.tileNodes(h.memberGroups[E],x.paddingLeft+x.paddingRight),x.rect.width=w[E].width,x.rect.height=w[E].height,x.setCenter(w[E].centerX,w[E].centerY),x.labelMarginLeft=0,x.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var y=x.rect.width,V=x.rect.height;if(x.labelWidth){if(x.labelPosHorizontal=="left")x.rect.x-=x.labelWidth,x.setWidth(y+x.labelWidth),x.labelMarginLeft=x.labelWidth;else if(x.labelPosHorizontal=="center"&&x.labelWidth>y)x.rect.x-=(x.labelWidth-y)/2,x.setWidth(x.labelWidth),x.labelMarginLeft=(x.labelWidth-y)/2;else if(x.labelPosHorizontal=="right")x.setWidth(y+x.labelWidth)}if(x.labelHeight){if(x.labelPosVertical=="top")x.rect.y-=x.labelHeight,x.setHeight(V+x.labelHeight),x.labelMarginTop=x.labelHeight;else if(x.labelPosVertical=="center"&&x.labelHeight>V)x.rect.y-=(x.labelHeight-V)/2,x.setHeight(x.labelHeight),x.labelMarginTop=(x.labelHeight-V)/2;else if(x.labelPosVertical=="bottom")x.setHeight(V+x.labelHeight)}}})},W.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var w=this.compoundOrder[h],{id:E,paddingLeft:x,paddingTop:y,labelMarginLeft:V,labelMarginTop:H}=w;this.adjustLocations(this.tiledMemberPack[E],w.rect.x,w.rect.y,x,y,V,H)}},W.prototype.repopulateZeroDegreeMembers=function(){var h=this,w=this.tiledZeroDegreePack;Object.keys(w).forEach(function(E){var x=h.idToDummyNode[E],{paddingLeft:y,paddingTop:V,labelMarginLeft:H,labelMarginTop:j}=x;h.adjustLocations(w[E],x.rect.x,x.rect.y,y,V,H,j)})},W.prototype.getToBeTiled=function(h){var w=h.id;if(this.toBeTiled[w]!=null)return this.toBeTiled[w];var E=h.getChild();if(E==null)return this.toBeTiled[w]=!1,!1;var x=E.getNodes();for(var y=0;y<x.length;y++){var V=x[y];if(this.getNodeDegree(V)>0)return this.toBeTiled[w]=!1,!1;if(V.getChild()==null){this.toBeTiled[V.id]=!1;continue}if(!this.getToBeTiled(V))return this.toBeTiled[w]=!1,!1}return this.toBeTiled[w]=!0,!0},W.prototype.getNodeDegree=function(h){var w=h.id,E=h.getEdges(),x=0;for(var y=0;y<E.length;y++){var V=E[y];if(V.getSource().id!==V.getTarget().id)x=x+1}return x},W.prototype.getNodeDegreeWithChildren=function(h){var w=this.getNodeDegree(h);if(h.getChild()==null)return w;var E=h.getChild().getNodes();for(var x=0;x<E.length;x++){var y=E[x];w+=this.getNodeDegreeWithChildren(y)}return w},W.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},W.prototype.fillCompexOrderByDFS=function(h){for(var w=0;w<h.length;w++){var E=h[w];if(E.getChild()!=null)this.fillCompexOrderByDFS(E.getChild().getNodes());if(this.getToBeTiled(E))this.compoundOrder.push(E)}},W.prototype.adjustLocations=function(h,w,E,x,y,V,H){w+=x+V,E+=y+H;var j=w;for(var Q=0;Q<h.rows.length;Q++){var B=h.rows[Q];w=j;var ct=0;for(var mt=0;mt<B.length;mt++){var J=B[mt];if(J.rect.x=w,J.rect.y=E,w+=J.rect.width+h.horizontalPadding,J.rect.height>ct)ct=J.rect.height}E+=ct+h.verticalPadding}},W.prototype.tileCompoundMembers=function(h,w){var E=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(x){var y=w[x];if(E.tiledMemberPack[x]=E.tileNodes(h[x],y.paddingLeft+y.paddingRight),y.rect.width=E.tiledMemberPack[x].width,y.rect.height=E.tiledMemberPack[x].height,y.setCenter(E.tiledMemberPack[x].centerX,E.tiledMemberPack[x].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var V=y.rect.width,H=y.rect.height;if(y.labelWidth){if(y.labelPosHorizontal=="left")y.rect.x-=y.labelWidth,y.setWidth(V+y.labelWidth),y.labelMarginLeft=y.labelWidth;else if(y.labelPosHorizontal=="center"&&y.labelWidth>V)y.rect.x-=(y.labelWidth-V)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-V)/2;else if(y.labelPosHorizontal=="right")y.setWidth(V+y.labelWidth)}if(y.labelHeight){if(y.labelPosVertical=="top")y.rect.y-=y.labelHeight,y.setHeight(H+y.labelHeight),y.labelMarginTop=y.labelHeight;else if(y.labelPosVertical=="center"&&y.labelHeight>H)y.rect.y-=(y.labelHeight-H)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-H)/2;else if(y.labelPosVertical=="bottom")y.setHeight(H+y.labelHeight)}}})},W.prototype.tileNodes=function(h,w){var E=this.tileNodesByFavoringDim(h,w,!0),x=this.tileNodesByFavoringDim(h,w,!1),y=this.getOrgRatio(E),V=this.getOrgRatio(x),H;if(V<y)H=x;else H=E;return H},W.prototype.getOrgRatio=function(h){var{width:w,height:E}=h,x=w/E;if(x<1)x=1/x;return x},W.prototype.calcIdealRowWidth=function(h,w){var{TILING_PADDING_VERTICAL:E,TILING_PADDING_HORIZONTAL:x}=c,y=h.length,V=0,H=0,j=0;h.forEach(function(ht){if(V+=ht.getWidth(),H+=ht.getHeight(),ht.getWidth()>j)j=ht.getWidth()});var Q=V/y,B=H/y,ct=Math.pow(E-x,2)+4*(Q+x)*(B+E)*y,mt=(x-E+Math.sqrt(ct))/(2*(Q+x)),J;if(w){if(J=Math.ceil(mt),J==mt)J++}else J=Math.floor(mt);var yt=J*(Q+x)-x;if(j>yt)yt=j;return yt+=x*2,yt},W.prototype.tileNodesByFavoringDim=function(h,w,E){var{TILING_PADDING_VERTICAL:x,TILING_PADDING_HORIZONTAL:y,TILING_COMPARE_BY:V}=c,H={rows:[],rowWidth:[],rowHeight:[],width:0,height:w,verticalPadding:x,horizontalPadding:y,centerX:0,centerY:0};if(V)H.idealRowWidth=this.calcIdealRowWidth(h,E);var j=function(X){return X.rect.width*X.rect.height},Q=function(X,et){return j(et)-j(X)};h.sort(function(ht,X){var et=Q;if(H.idealRowWidth)return et=V,et(ht.id,X.id);return et(ht,X)});var B=0,ct=0;for(var mt=0;mt<h.length;mt++){var J=h[mt];B+=J.getCenterX(),ct+=J.getCenterY()}H.centerX=B/h.length,H.centerY=ct/h.length;for(var mt=0;mt<h.length;mt++){var J=h[mt];if(H.rows.length==0)this.insertNodeToRow(H,J,0,w);else if(this.canAddHorizontal(H,J.rect.width,J.rect.height)){var yt=H.rows.length-1;if(!H.idealRowWidth)yt=this.getShortestRowIndex(H);this.insertNodeToRow(H,J,yt,w)}else this.insertNodeToRow(H,J,H.rows.length,w);this.shiftToLastRow(H)}return H},W.prototype.insertNodeToRow=function(h,w,E,x){var y=x;if(E==h.rows.length){var V=[];h.rows.push(V),h.rowWidth.push(y),h.rowHeight.push(0)}var H=h.rowWidth[E]+w.rect.width;if(h.rows[E].length>0)H+=h.horizontalPadding;if(h.rowWidth[E]=H,h.width<H)h.width=H;var j=w.rect.height;if(E>0)j+=h.verticalPadding;var Q=0;if(j>h.rowHeight[E])Q=h.rowHeight[E],h.rowHeight[E]=j,Q=h.rowHeight[E]-Q;h.height+=Q,h.rows[E].push(w)},W.prototype.getShortestRowIndex=function(h){var w=-1,E=Number.MAX_VALUE;for(var x=0;x<h.rows.length;x++)if(h.rowWidth[x]<E)w=x,E=h.rowWidth[x];return w},W.prototype.getLongestRowIndex=function(h){var w=-1,E=Number.MIN_VALUE;for(var x=0;x<h.rows.length;x++)if(h.rowWidth[x]>E)w=x,E=h.rowWidth[x];return w},W.prototype.canAddHorizontal=function(h,w,E){if(h.idealRowWidth){var x=h.rows.length-1,y=h.rowWidth[x];return y+w+h.horizontalPadding<=h.idealRowWidth}var V=this.getShortestRowIndex(h);if(V<0)return!0;var H=h.rowWidth[V];if(H+h.horizontalPadding+w<=h.width)return!0;var j=0;if(h.rowHeight[V]<E){if(V>0)j=E+h.verticalPadding-h.rowHeight[V]}var Q;if(h.width-H>=w+h.horizontalPadding)Q=(h.height+j)/(H+w+h.horizontalPadding);else Q=(h.height+j)/h.width;j=E+h.verticalPadding;var B;if(h.width<w)B=(h.height+j)/w;else B=(h.height+j)/h.width;if(B<1)B=1/B;if(Q<1)Q=1/Q;return Q<B},W.prototype.shiftToLastRow=function(h){var w=this.getLongestRowIndex(h),E=h.rowWidth.length-1,x=h.rows[w],y=x[x.length-1],V=y.width+h.horizontalPadding;if(h.width-h.rowWidth[E]>V&&w!=E){x.splice(-1,1),h.rows[E].push(y),h.rowWidth[w]=h.rowWidth[w]-V,h.rowWidth[E]=h.rowWidth[E]+V,h.width=h.rowWidth[instance.getLongestRowIndex(h)];var H=Number.MIN_VALUE;for(var j=0;j<x.length;j++)if(x[j].height>H)H=x[j].height;if(w>0)H+=h.verticalPadding;var Q=h.rowHeight[w]+h.rowHeight[E];if(h.rowHeight[w]=H,h.rowHeight[E]<y.height+h.verticalPadding)h.rowHeight[E]=y.height+h.verticalPadding;var B=h.rowHeight[w]+h.rowHeight[E];h.height+=B-Q,this.shiftToLastRow(h)}},W.prototype.tilingPreLayout=function(){if(c.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},W.prototype.tilingPostLayout=function(){if(c.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},W.prototype.reduceTrees=function(){var h=[],w=!0,E;while(w){var x=this.graphManager.getAllNodes(),y=[];w=!1;for(var V=0;V<x.length;V++)if(E=x[V],E.getEdges().length==1&&!E.getEdges()[0].isInterGraph&&E.getChild()==null){if(c.PURE_INCREMENTAL){var H=E.getEdges()[0].getOtherEnd(E),j=new b(E.getCenterX()-H.getCenterX(),E.getCenterY()-H.getCenterY());y.push([E,E.getEdges()[0],E.getOwner(),j])}else y.push([E,E.getEdges()[0],E.getOwner()]);w=!0}if(w==!0){var Q=[];for(var B=0;B<y.length;B++)if(y[B][0].getEdges().length==1)Q.push(y[B]),y[B][0].getOwner().remove(y[B][0]);h.push(Q),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=h},W.prototype.growTree=function(h){var w=h.length,E=h[w-1],x;for(var y=0;y<E.length;y++)x=E[y],this.findPlaceforPrunedNode(x),x[2].add(x[0]),x[2].add(x[1],x[1].source,x[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},W.prototype.findPlaceforPrunedNode=function(h){var w,E,x=h[0];if(x==h[1].source)E=h[1].target;else E=h[1].source;if(c.PURE_INCREMENTAL)x.setCenter(E.getCenterX()+h[3].getWidth(),E.getCenterY()+h[3].getHeight());else{var y=E.startX,V=E.finishX,H=E.startY,j=E.finishY,Q=0,B=0,ct=0,mt=0,J=[Q,ct,B,mt];if(H>0)for(var yt=y;yt<=V;yt++)J[0]+=this.grid[yt][H-1].length+this.grid[yt][H].length-1;if(V<this.grid.length-1)for(var yt=H;yt<=j;yt++)J[1]+=this.grid[V+1][yt].length+this.grid[V][yt].length-1;if(j<this.grid[0].length-1)for(var yt=y;yt<=V;yt++)J[2]+=this.grid[yt][j+1].length+this.grid[yt][j].length-1;if(y>0)for(var yt=H;yt<=j;yt++)J[3]+=this.grid[y-1][yt].length+this.grid[y][yt].length-1;var ht=G.MAX_VALUE,X,et;for(var at=0;at<J.length;at++)if(J[at]<ht)ht=J[at],X=1,et=at;else if(J[at]==ht)X++;if(X==3&&ht==0){if(J[0]==0&&J[1]==0&&J[2]==0)w=1;else if(J[0]==0&&J[1]==0&&J[3]==0)w=0;else if(J[0]==0&&J[2]==0&&J[3]==0)w=3;else if(J[1]==0&&J[2]==0&&J[3]==0)w=2}else if(X==2&&ht==0){var vt=Math.floor(Math.random()*2);if(J[0]==0&&J[1]==0)if(vt==0)w=0;else w=1;else if(J[0]==0&&J[2]==0)if(vt==0)w=0;else w=2;else if(J[0]==0&&J[3]==0)if(vt==0)w=0;else w=3;else if(J[1]==0&&J[2]==0)if(vt==0)w=1;else w=2;else if(J[1]==0&&J[3]==0)if(vt==0)w=1;else w=3;else if(vt==0)w=2;else w=3}else if(X==4&&ht==0){var vt=Math.floor(Math.random()*4);w=vt}else w=et;if(w==0)x.setCenter(E.getCenterX(),E.getCenterY()-E.getHeight()/2-f.DEFAULT_EDGE_LENGTH-x.getHeight()/2);else if(w==1)x.setCenter(E.getCenterX()+E.getWidth()/2+f.DEFAULT_EDGE_LENGTH+x.getWidth()/2,E.getCenterY());else if(w==2)x.setCenter(E.getCenterX(),E.getCenterY()+E.getHeight()/2+f.DEFAULT_EDGE_LENGTH+x.getHeight()/2);else x.setCenter(E.getCenterX()-E.getWidth()/2-f.DEFAULT_EDGE_LENGTH-x.getWidth()/2,E.getCenterY())}},s.exports=W},991:(s,a,o)=>{var g=o(551).FDLayoutNode,r=o(551).IMath;function p(t,c,d,f){g.call(this,t,c,d,f)}p.prototype=Object.create(g.prototype);for(var i in g)p[i]=g[i];p.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();if(this.getChild()!=null&&this.fixedNodeWeight)this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight;else this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren;if(Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement)this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX);if(Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement)this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY);if(this.child&&this.child.getNodes().length>0)this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},p.prototype.propogateDisplacementToChildren=function(t,c){var d=this.getChild().getNodes(),f;for(var P=0;P<d.length;P++)if(f=d[P],f.getChild()==null)f.displacementX+=t,f.displacementY+=c;else f.propogateDisplacementToChildren(t,c)},p.prototype.move=function(){var t=this.graphManager.getLayout();if(this.child==null||this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY),t.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},p.prototype.setPred1=function(t){this.pred1=t},p.prototype.getPred1=function(){return pred1},p.prototype.getPred2=function(){return pred2},p.prototype.setNext=function(t){this.next=t},p.prototype.getNext=function(){return next},p.prototype.setProcessed=function(t){this.processed=t},p.prototype.isProcessed=function(){return processed},s.exports=p},902:(s,a,o)=>{function g(d){if(Array.isArray(d)){for(var f=0,P=Array(d.length);f<d.length;f++)P[f]=d[f];return P}else return Array.from(d)}var r=o(806),p=o(551).LinkedList,i=o(551).Matrix,t=o(551).SVD;function c(){}c.handleConstraints=function(d){var f={};f.fixedNodeConstraint=d.constraints.fixedNodeConstraint,f.alignmentConstraint=d.constraints.alignmentConstraint,f.relativePlacementConstraint=d.constraints.relativePlacementConstraint;var P=new Map,T=new Map,N=[],b=[],z=d.getAllNodes(),G=0;for(var Z=0;Z<z.length;Z++){var rt=z[Z];if(rt.getChild()==null)T.set(rt.id,G++),N.push(rt.getCenterX()),b.push(rt.getCenterY()),P.set(rt.id,rt)}if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(tt){if(!tt.gap&&tt.gap!=0)if(tt.left)tt.gap=r.DEFAULT_EDGE_LENGTH+P.get(tt.left).getWidth()/2+P.get(tt.right).getWidth()/2;else tt.gap=r.DEFAULT_EDGE_LENGTH+P.get(tt.top).getHeight()/2+P.get(tt.bottom).getHeight()/2});var _=function(ot,st){return{x:ot.x-st.x,y:ot.y-st.y}},ut=function(ot){var st=0,lt=0;return ot.forEach(function(ft){st+=N[T.get(ft)],lt+=b[T.get(ft)]}),{x:st/ot.size,y:lt/ot.size}},W=function(ot,st,lt,ft,pt){function St(At,Lt){var Ft=new Set(At),Mt=!0,xt=!1,jt=void 0;try{for(var qt=Lt[Symbol.iterator](),le;!(Mt=(le=qt.next()).done);Mt=!0){var kt=le.value;Ft.add(kt)}}catch(Ht){xt=!0,jt=Ht}finally{try{if(!Mt&&qt.return)qt.return()}finally{if(xt)throw jt}}return Ft}var It=new Map;ot.forEach(function(At,Lt){It.set(Lt,0)}),ot.forEach(function(At,Lt){At.forEach(function(Ft){It.set(Ft.id,It.get(Ft.id)+1)})});var gt=new Map,Ot=new Map,Rt=new p;if(It.forEach(function(At,Lt){if(At==0){if(Rt.push(Lt),!lt)if(st=="horizontal")gt.set(Lt,T.has(Lt)?N[T.get(Lt)]:ft.get(Lt));else gt.set(Lt,T.has(Lt)?b[T.get(Lt)]:ft.get(Lt))}else gt.set(Lt,Number.NEGATIVE_INFINITY);if(lt)Ot.set(Lt,new Set([Lt]))}),lt)pt.forEach(function(At){var Lt=[];if(At.forEach(function(xt){if(lt.has(xt))Lt.push(xt)}),Lt.length>0){var Ft=0;Lt.forEach(function(xt){if(st=="horizontal")gt.set(xt,T.has(xt)?N[T.get(xt)]:ft.get(xt)),Ft+=gt.get(xt);else gt.set(xt,T.has(xt)?b[T.get(xt)]:ft.get(xt)),Ft+=gt.get(xt)}),Ft=Ft/Lt.length,At.forEach(function(xt){if(!lt.has(xt))gt.set(xt,Ft)})}else{var Mt=0;At.forEach(function(xt){if(st=="horizontal")Mt+=T.has(xt)?N[T.get(xt)]:ft.get(xt);else Mt+=T.has(xt)?b[T.get(xt)]:ft.get(xt)}),Mt=Mt/At.length,At.forEach(function(xt){gt.set(xt,Mt)})}});var Nt=function(){var Lt=Rt.shift(),Ft=ot.get(Lt);Ft.forEach(function(Mt){if(gt.get(Mt.id)<gt.get(Lt)+Mt.gap)if(lt&<.has(Mt.id)){var xt=void 0;if(st=="horizontal")xt=T.has(Mt.id)?N[T.get(Mt.id)]:ft.get(Mt.id);else xt=T.has(Mt.id)?b[T.get(Mt.id)]:ft.get(Mt.id);if(gt.set(Mt.id,xt),xt<gt.get(Lt)+Mt.gap){var jt=gt.get(Lt)+Mt.gap-xt;Ot.get(Lt).forEach(function(qt){gt.set(qt,gt.get(qt)-jt)})}}else gt.set(Mt.id,gt.get(Lt)+Mt.gap);if(It.set(Mt.id,It.get(Mt.id)-1),It.get(Mt.id)==0)Rt.push(Mt.id);if(lt)Ot.set(Mt.id,St(Ot.get(Lt),Ot.get(Mt.id)))})};while(Rt.length!=0)Nt();if(lt){var bt=new Set;ot.forEach(function(At,Lt){if(At.length==0)bt.add(Lt)});var zt=[];Ot.forEach(function(At,Lt){if(bt.has(Lt)){var Ft=!1,Mt=!0,xt=!1,jt=void 0;try{for(var qt=At[Symbol.iterator](),le;!(Mt=(le=qt.next()).done);Mt=!0){var kt=le.value;if(lt.has(kt))Ft=!0}}catch(Jt){xt=!0,jt=Jt}finally{try{if(!Mt&&qt.return)qt.return()}finally{if(xt)throw jt}}if(!Ft){var Ht=!1,ge=void 0;if(zt.forEach(function(Jt,ae){if(Jt.has([].concat(g(At))[0]))Ht=!0,ge=ae}),!Ht)zt.push(new Set(At));else At.forEach(function(Jt){zt[ge].add(Jt)})}}}),zt.forEach(function(At,Lt){var{POSITIVE_INFINITY:Ft,POSITIVE_INFINITY:Mt,NEGATIVE_INFINITY:xt,NEGATIVE_INFINITY:jt}=Number,qt=!0,le=!1,kt=void 0;try{for(var Ht=At[Symbol.iterator](),ge;!(qt=(ge=Ht.next()).done);qt=!0){var Jt=ge.value,ae=void 0;if(st=="horizontal")ae=T.has(Jt)?N[T.get(Jt)]:ft.get(Jt);else ae=T.has(Jt)?b[T.get(Jt)]:ft.get(Jt);var fe=gt.get(Jt);if(ae<Ft)Ft=ae;if(ae>xt)xt=ae;if(fe<Mt)Mt=fe;if(fe>jt)jt=fe}}catch(Te){le=!0,kt=Te}finally{try{if(!qt&&Ht.return)Ht.return()}finally{if(le)throw kt}}var xe=(Ft+xt)/2-(Mt+jt)/2,ve=!0,ye=!1,me=void 0;try{for(var pe=At[Symbol.iterator](),De;!(ve=(De=pe.next()).done);ve=!0){var Ee=De.value;gt.set(Ee,gt.get(Ee)+xe)}}catch(Te){ye=!0,me=Te}finally{try{if(!ve&&pe.return)pe.return()}finally{if(ye)throw me}}})}return gt},it=function(ot){var st=0,lt=0,ft=0,pt=0;if(ot.forEach(function(Ot){if(Ot.left)N[T.get(Ot.left)]-N[T.get(Ot.right)]>=0?st++:lt++;else b[T.get(Ot.top)]-b[T.get(Ot.bottom)]>=0?ft++:pt++}),st>lt&&ft>pt)for(var St=0;St<T.size;St++)N[St]=-1*N[St],b[St]=-1*b[St];else if(st>lt)for(var It=0;It<T.size;It++)N[It]=-1*N[It];else if(ft>pt)for(var gt=0;gt<T.size;gt++)b[gt]=-1*b[gt]},h=function(ot){var st=[],lt=new p,ft=new Set,pt=0;return ot.forEach(function(St,It){if(!ft.has(It)){st[pt]=[];var gt=It;lt.push(gt),ft.add(gt),st[pt].push(gt);while(lt.length!=0){gt=lt.shift();var Ot=ot.get(gt);Ot.forEach(function(Rt){if(!ft.has(Rt.id))lt.push(Rt.id),ft.add(Rt.id),st[pt].push(Rt.id)})}pt++}}),st},w=function(ot){var st=new Map;return ot.forEach(function(lt,ft){st.set(ft,[])}),ot.forEach(function(lt,ft){lt.forEach(function(pt){st.get(ft).push(pt),st.get(pt.id).push({id:ft,gap:pt.gap,direction:pt.direction})})}),st},E=function(ot){var st=new Map;return ot.forEach(function(lt,ft){st.set(ft,[])}),ot.forEach(function(lt,ft){lt.forEach(function(pt){st.get(pt.id).push({id:ft,gap:pt.gap,direction:pt.direction})})}),st},x=[],y=[],V=!1,H=!1,j=new Set,Q=new Map,B=new Map,ct=[];if(f.fixedNodeConstraint)f.fixedNodeConstraint.forEach(function(tt){j.add(tt.nodeId)});if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(tt){if(tt.left){if(Q.has(tt.left))Q.get(tt.left).push({id:tt.right,gap:tt.gap,direction:"horizontal"});else Q.set(tt.left,[{id:tt.right,gap:tt.gap,direction:"horizontal"}]);if(!Q.has(tt.right))Q.set(tt.right,[])}else{if(Q.has(tt.top))Q.get(tt.top).push({id:tt.bottom,gap:tt.gap,direction:"vertical"});else Q.set(tt.top,[{id:tt.bottom,gap:tt.gap,direction:"vertical"}]);if(!Q.has(tt.bottom))Q.set(tt.bottom,[])}}),B=w(Q),ct=h(B);if(r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(tt,ot){x[ot]=[tt.position.x,tt.position.y],y[ot]=[N[T.get(tt.nodeId)],b[T.get(tt.nodeId)]]}),V=!0;else if(f.alignmentConstraint)(function(){var tt=0;if(f.alignmentConstraint.vertical){var ot=f.alignmentConstraint.vertical,st=function(gt){var Ot=new Set;ot[gt].forEach(function(bt){Ot.add(bt)});var Rt=new Set([].concat(g(Ot)).filter(function(bt){return j.has(bt)})),Nt=void 0;if(Rt.size>0)Nt=N[T.get(Rt.values().next().value)];else Nt=ut(Ot).x;ot[gt].forEach(function(bt){x[tt]=[Nt,b[T.get(bt)]],y[tt]=[N[T.get(bt)],b[T.get(bt)]],tt++})};for(var lt=0;lt<ot.length;lt++)st(lt);V=!0}if(f.alignmentConstraint.horizontal){var ft=f.alignmentConstraint.horizontal,pt=function(gt){var Ot=new Set;ft[gt].forEach(function(bt){Ot.add(bt)});var Rt=new Set([].concat(g(Ot)).filter(function(bt){return j.has(bt)})),Nt=void 0;if(Rt.size>0)Nt=N[T.get(Rt.values().next().value)];else Nt=ut(Ot).y;ft[gt].forEach(function(bt){x[tt]=[N[T.get(bt)],Nt],y[tt]=[N[T.get(bt)],b[T.get(bt)]],tt++})};for(var St=0;St<ft.length;St++)pt(St);V=!0}if(f.relativePlacementConstraint)H=!0})();else if(f.relativePlacementConstraint){var mt=0,J=0;for(var yt=0;yt<ct.length;yt++)if(ct[yt].length>mt)mt=ct[yt].length,J=yt;if(mt<B.size/2)it(f.relativePlacementConstraint),V=!1,H=!1;else{var ht=new Map,X=new Map,et=[];ct[J].forEach(function(tt){Q.get(tt).forEach(function(ot){if(ot.direction=="horizontal"){if(ht.has(tt))ht.get(tt).push(ot);else ht.set(tt,[ot]);if(!ht.has(ot.id))ht.set(ot.id,[]);et.push({left:tt,right:ot.id})}else{if(X.has(tt))X.get(tt).push(ot);else X.set(tt,[ot]);if(!X.has(ot.id))X.set(ot.id,[]);et.push({top:tt,bottom:ot.id})}})}),it(et),H=!1;var at=W(ht,"horizontal"),vt=W(X,"vertical");ct[J].forEach(function(tt,ot){if(y[ot]=[N[T.get(tt)],b[T.get(tt)]],x[ot]=[],at.has(tt))x[ot][0]=at.get(tt);else x[ot][0]=N[T.get(tt)];if(vt.has(tt))x[ot][1]=vt.get(tt);else x[ot][1]=b[T.get(tt)]}),V=!0}}if(V){var Dt=void 0,Wt=i.transpose(x),Kt=i.transpose(y);for(var dt=0;dt<Wt.length;dt++)Wt[dt]=i.multGamma(Wt[dt]),Kt[dt]=i.multGamma(Kt[dt]);var ie=i.multMat(Wt,i.transpose(Kt)),Bt=t.svd(ie);Dt=i.multMat(Bt.V,i.transpose(Bt.U));for(var Ct=0;Ct<T.size;Ct++){var Et=[N[Ct],b[Ct]],Pt=[Dt[0][0],Dt[1][0]],Ut=[Dt[0][1],Dt[1][1]];N[Ct]=i.dotProduct(Et,Pt),b[Ct]=i.dotProduct(Et,Ut)}if(H)it(f.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var Vt={x:0,y:0};f.fixedNodeConstraint.forEach(function(tt,ot){var st={x:N[T.get(tt.nodeId)],y:b[T.get(tt.nodeId)]},lt=tt.position,ft=_(lt,st);Vt.x+=ft.x,Vt.y+=ft.y}),Vt.x/=f.fixedNodeConstraint.length,Vt.y/=f.fixedNodeConstraint.length,N.forEach(function(tt,ot){N[ot]+=Vt.x}),b.forEach(function(tt,ot){b[ot]+=Vt.y}),f.fixedNodeConstraint.forEach(function(tt){N[T.get(tt.nodeId)]=tt.position.x,b[T.get(tt.nodeId)]=tt.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical){var Yt=f.alignmentConstraint.vertical,Xt=function(ot){var st=new Set;Yt[ot].forEach(function(pt){st.add(pt)});var lt=new Set([].concat(g(st)).filter(function(pt){return j.has(pt)})),ft=void 0;if(lt.size>0)ft=N[T.get(lt.values().next().value)];else ft=ut(st).x;st.forEach(function(pt){if(!j.has(pt))N[T.get(pt)]=ft})};for(var Zt=0;Zt<Yt.length;Zt++)Xt(Zt)}if(f.alignmentConstraint.horizontal){var Qt=f.alignmentConstraint.horizontal,he=function(ot){var st=new Set;Qt[ot].forEach(function(pt){st.add(pt)});var lt=new Set([].concat(g(st)).filter(function(pt){return j.has(pt)})),ft=void 0;if(lt.size>0)ft=b[T.get(lt.values().next().value)];else ft=ut(st).y;st.forEach(function(pt){if(!j.has(pt))b[T.get(pt)]=ft})};for(var te=0;te<Qt.length;te++)he(te)}}if(f.relativePlacementConstraint)(function(){var tt=new Map,ot=new Map,st=new Map,lt=new Map,ft=new Map,pt=new Map,St=new Set,It=new Set;if(j.forEach(function(re){St.add(re),It.add(re)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical){var gt=f.alignmentConstraint.vertical,Ot=function(Gt){st.set("dummy"+Gt,[]),gt[Gt].forEach(function($t){if(tt.set($t,"dummy"+Gt),st.get("dummy"+Gt).push($t),j.has($t))St.add("dummy"+Gt)}),ft.set("dummy"+Gt,N[T.get(gt[Gt][0])])};for(var Rt=0;Rt<gt.length;Rt++)Ot(Rt)}if(f.alignmentConstraint.horizontal){var Nt=f.alignmentConstraint.horizontal,bt=function(Gt){lt.set("dummy"+Gt,[]),Nt[Gt].forEach(function($t){if(ot.set($t,"dummy"+Gt),lt.get("dummy"+Gt).push($t),j.has($t))It.add("dummy"+Gt)}),pt.set("dummy"+Gt,b[T.get(Nt[Gt][0])])};for(var zt=0;zt<Nt.length;zt++)bt(zt)}}var At=new Map,Lt=new Map,Ft=function(Gt){Q.get(Gt).forEach(function($t){var ue=void 0,ce=void 0;if($t.direction=="horizontal"){if(ue=tt.get(Gt)?tt.get(Gt):Gt,tt.get($t.id))ce={id:tt.get($t.id),gap:$t.gap,direction:$t.direction};else ce=$t;if(At.has(ue))At.get(ue).push(ce);else At.set(ue,[ce]);if(!At.has(ce.id))At.set(ce.id,[])}else{if(ue=ot.get(Gt)?ot.get(Gt):Gt,ot.get($t.id))ce={id:ot.get($t.id),gap:$t.gap,direction:$t.direction};else ce=$t;if(Lt.has(ue))Lt.get(ue).push(ce);else Lt.set(ue,[ce]);if(!Lt.has(ce.id))Lt.set(ce.id,[])}})},Mt=!0,xt=!1,jt=void 0;try{for(var qt=Q.keys()[Symbol.iterator](),le;!(Mt=(le=qt.next()).done);Mt=!0){var kt=le.value;Ft(kt)}}catch(re){xt=!0,jt=re}finally{try{if(!Mt&&qt.return)qt.return()}finally{if(xt)throw jt}}var Ht=w(At),ge=w(Lt),Jt=h(Ht),ae=h(ge),fe=E(At),xe=E(Lt),ve=[],ye=[];Jt.forEach(function(re,Gt){ve[Gt]=[],re.forEach(function($t){if(fe.get($t).length==0)ve[Gt].push($t)})}),ae.forEach(function(re,Gt){ye[Gt]=[],re.forEach(function($t){if(xe.get($t).length==0)ye[Gt].push($t)})});var me=W(At,"horizontal",St,ft,ve),pe=W(Lt,"vertical",It,pt,ye),De=function(Gt){if(st.get(Gt))st.get(Gt).forEach(function($t){N[T.get($t)]=me.get(Gt)});else N[T.get(Gt)]=me.get(Gt)},Ee=!0,Te=!1,$e=void 0;try{for(var Ie=me.keys()[Symbol.iterator](),Ze;!(Ee=(Ze=Ie.next()).done);Ee=!0){var Re=Ze.value;De(Re)}}catch(re){Te=!0,$e=re}finally{try{if(!Ee&&Ie.return)Ie.return()}finally{if(Te)throw $e}}var dr=function(Gt){if(lt.get(Gt))lt.get(Gt).forEach(function($t){b[T.get($t)]=pe.get(Gt)});else b[T.get(Gt)]=pe.get(Gt)},Se=!0,ke=!1,qe=void 0;try{for(var be=pe.keys()[Symbol.iterator](),Qe;!(Se=(Qe=be.next()).done);Se=!0){var Re=Qe.value;dr(Re)}}catch(re){ke=!0,qe=re}finally{try{if(!Se&&be.return)be.return()}finally{if(ke)throw qe}}})()}for(var ne=0;ne<z.length;ne++){var _t=z[ne];if(_t.getChild()==null)_t.setCenter(N[T.get(_t.id)],b[T.get(_t.id)])}},s.exports=c},551:(s)=>{s.exports=C}},S={};function v(s){var a=S[s];if(a!==void 0)return a.exports;var o=S[s]={exports:{}};return U[s](o,o.exports,v),o.exports}var l=v(45);return l})()})});var Je=Ke(function(Ce,Xe){(function(U,S){if(typeof Ce==="object"&&typeof Xe==="object")Xe.exports=S(Ye());else if(typeof define==="function"&&define.amd)define(["cose-base"],S);else if(typeof Ce==="object")Ce.cytoscapeFcose=S(Ye());else U.cytoscapeFcose=S(U.coseBase)})(Ce,function(C){return(()=>{var U={658:(s)=>{s.exports=Object.assign!=null?Object.assign.bind(Object):function(a){for(var o=arguments.length,g=Array(o>1?o-1:0),r=1;r<o;r++)g[r-1]=arguments[r];return g.forEach(function(p){Object.keys(p).forEach(function(i){return a[i]=p[i]})}),a}},548:(s,a,o)=>{var g=function(){function i(t,c){var d=[],f=!0,P=!1,T=void 0;try{for(var N=t[Symbol.iterator](),b;!(f=(b=N.next()).done);f=!0)if(d.push(b.value),c&&d.length===c)break}catch(z){P=!0,T=z}finally{try{if(!f&&N.return)N.return()}finally{if(P)throw T}}return d}return function(t,c){if(Array.isArray(t))return t;else if(Symbol.iterator in Object(t))return i(t,c);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=o(140).layoutBase.LinkedList,p={};p.getTopMostNodes=function(i){var t={};for(var c=0;c<i.length;c++)t[i[c].id()]=!0;var d=i.filter(function(f,P){if(typeof f==="number")f=P;var T=f.parent()[0];while(T!=null){if(t[T.id()])return!1;T=T.parent()[0]}return!0});return d},p.connectComponents=function(i,t,c,d){var f=new r,P=new Set,T=[],N=void 0,b=void 0,z=void 0,G=!1,Z=1,rt=[],_=[],ut=function(){var it=i.collection();_.push(it);var h=c[0],w=i.collection();w.merge(h).merge(h.descendants().intersection(t)),T.push(h),w.forEach(function(y){f.push(y),P.add(y),it.merge(y)});var E=function(){h=f.shift();var V=i.collection();h.neighborhood().nodes().forEach(function(B){if(t.intersection(h.edgesWith(B)).length>0)V.merge(B)});for(var H=0;H<V.length;H++){var j=V[H];if(N=c.intersection(j.union(j.ancestors())),N!=null&&!P.has(N[0])){var Q=N.union(N.descendants());Q.forEach(function(B){if(f.push(B),P.add(B),it.merge(B),c.has(B))T.push(B)})}}};while(f.length!=0)E();if(it.forEach(function(y){t.intersection(y.connectedEdges()).forEach(function(V){if(it.has(V.source())&&it.has(V.target()))it.merge(V)})}),T.length==c.length)G=!0;if(!G||G&&Z>1){b=T[0],z=b.connectedEdges().length,T.forEach(function(y){if(y.connectedEdges().length<z)z=y.connectedEdges().length,b=y}),rt.push(b.id());var x=i.collection();x.merge(T[0]),T.forEach(function(y){x.merge(y)}),T=[],c=c.difference(x),Z++}};do ut();while(!G);if(d){if(rt.length>0)d.set("dummy"+(d.size+1),rt)}return _},p.relocateComponent=function(i,t,c){if(!c.fixedNodeConstraint){var{POSITIVE_INFINITY:d,NEGATIVE_INFINITY:f,POSITIVE_INFINITY:P,NEGATIVE_INFINITY:T}=Number;if(c.quality=="draft"){var N=!0,b=!1,z=void 0;try{for(var G=t.nodeIndexes[Symbol.iterator](),Z;!(N=(Z=G.next()).done);N=!0){var rt=Z.value,_=g(rt,2),ut=_[0],W=_[1],it=c.cy.getElementById(ut);if(it){var h=it.boundingBox(),w=t.xCoords[W]-h.w/2,E=t.xCoords[W]+h.w/2,x=t.yCoords[W]-h.h/2,y=t.yCoords[W]+h.h/2;if(w<d)d=w;if(E>f)f=E;if(x<P)P=x;if(y>T)T=y}}}catch(B){b=!0,z=B}finally{try{if(!N&&G.return)G.return()}finally{if(b)throw z}}var V=i.x-(f+d)/2,H=i.y-(T+P)/2;t.xCoords=t.xCoords.map(function(B){return B+V}),t.yCoords=t.yCoords.map(function(B){return B+H})}else{Object.keys(t).forEach(function(B){var ct=t[B],mt=ct.getRect().x,J=ct.getRect().x+ct.getRect().width,yt=ct.getRect().y,ht=ct.getRect().y+ct.getRect().height;if(mt<d)d=mt;if(J>f)f=J;if(yt<P)P=yt;if(ht>T)T=ht});var j=i.x-(f+d)/2,Q=i.y-(T+P)/2;Object.keys(t).forEach(function(B){var ct=t[B];ct.setCenter(ct.getCenterX()+j,ct.getCenterY()+Q)})}}},p.calcBoundingBox=function(i,t,c,d){var{MAX_SAFE_INTEGER:f,MIN_SAFE_INTEGER:P,MAX_SAFE_INTEGER:T,MIN_SAFE_INTEGER:N}=Number,b=void 0,z=void 0,G=void 0,Z=void 0,rt=i.descendants().not(":parent"),_=rt.length;for(var ut=0;ut<_;ut++){var W=rt[ut];if(b=t[d.get(W.id())]-W.width()/2,z=t[d.get(W.id())]+W.width()/2,G=c[d.get(W.id())]-W.height()/2,Z=c[d.get(W.id())]+W.height()/2,f>b)f=b;if(P<z)P=z;if(T>G)T=G;if(N<Z)N=Z}var it={};return it.topLeftX=f,it.topLeftY=T,it.width=P-f,it.height=N-T,it},p.calcParentsWithoutChildren=function(i,t){var c=i.collection();return t.nodes(":parent").forEach(function(d){var f=!1;if(d.children().forEach(function(P){if(P.css("display")!="none")f=!0}),!f)c.merge(d)}),c},s.exports=p},816:(s,a,o)=>{var g=o(548),r=o(140).CoSELayout,p=o(140).CoSENode,i=o(140).layoutBase.PointD,t=o(140).layoutBase.DimensionD,c=o(140).layoutBase.LayoutConstants,d=o(140).layoutBase.FDLayoutConstants,f=o(140).CoSEConstants,P=function(N,b){var{cy:z,eles:G}=N,Z=G.nodes(),rt=G.edges(),_=void 0,ut=void 0,W=void 0,it={};if(N.randomize)_=b.nodeIndexes,ut=b.xCoords,W=b.yCoords;var h=function(B){return typeof B==="function"},w=function(B,ct){if(h(B))return B(ct);else return B},E=g.calcParentsWithoutChildren(z,G),x=function Q(B,ct,mt,J){var yt=ct.length;for(var ht=0;ht<yt;ht++){var X=ct[ht],et=null;if(X.intersection(E).length==0)et=X.children();var at=void 0,vt=X.layoutDimensions({nodeDimensionsIncludeLabels:J.nodeDimensionsIncludeLabels});if(X.outerWidth()!=null&&X.outerHeight()!=null)if(J.randomize)if(!X.isParent())at=B.add(new p(mt.graphManager,new i(ut[_.get(X.id())]-vt.w/2,W[_.get(X.id())]-vt.h/2),new t(parseFloat(vt.w),parseFloat(vt.h))));else{var Dt=g.calcBoundingBox(X,ut,W,_);if(X.intersection(E).length==0)at=B.add(new p(mt.graphManager,new i(Dt.topLeftX,Dt.topLeftY),new t(Dt.width,Dt.height)));else at=B.add(new p(mt.graphManager,new i(Dt.topLeftX,Dt.topLeftY),new t(parseFloat(vt.w),parseFloat(vt.h))))}else at=B.add(new p(mt.graphManager,new i(X.position("x")-vt.w/2,X.position("y")-vt.h/2),new t(parseFloat(vt.w),parseFloat(vt.h))));else at=B.add(new p(this.graphManager));if(at.id=X.data("id"),at.nodeRepulsion=w(J.nodeRepulsion,X),at.paddingLeft=parseInt(X.css("padding")),at.paddingTop=parseInt(X.css("padding")),at.paddingRight=parseInt(X.css("padding")),at.paddingBottom=parseInt(X.css("padding")),J.nodeDimensionsIncludeLabels)at.labelWidth=X.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,at.labelHeight=X.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,at.labelPosVertical=X.css("text-valign"),at.labelPosHorizontal=X.css("text-halign");if(it[X.data("id")]=at,isNaN(at.rect.x))at.rect.x=0;if(isNaN(at.rect.y))at.rect.y=0;if(et!=null&&et.length>0){var Wt=void 0;Wt=mt.getGraphManager().add(mt.newGraph(),at),Q(Wt,et,mt,J)}}},y=function(B,ct,mt){var J=0,yt=0;for(var ht=0;ht<mt.length;ht++){var X=mt[ht],et=it[X.data("source")],at=it[X.data("target")];if(et&&at&&et!==at&&et.getEdgesBetween(at).length==0){var vt=ct.add(B.newEdge(),et,at);vt.id=X.id(),vt.idealLength=w(N.idealEdgeLength,X),vt.edgeElasticity=w(N.edgeElasticity,X),J+=vt.idealLength,yt++}}if(N.idealEdgeLength!=null){if(yt>0)f.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=J/yt;else if(!h(N.idealEdgeLength))f.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=N.idealEdgeLength;else f.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50;f.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH}},V=function(B,ct){if(ct.fixedNodeConstraint)B.constraints.fixedNodeConstraint=ct.fixedNodeConstraint;if(ct.alignmentConstraint)B.constraints.alignmentConstraint=ct.alignmentConstraint;if(ct.relativePlacementConstraint)B.constraints.relativePlacementConstraint=ct.relativePlacementConstraint};if(N.nestingFactor!=null)f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor;if(N.gravity!=null)f.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=N.gravity;if(N.numIter!=null)f.MAX_ITERATIONS=d.MAX_ITERATIONS=N.numIter;if(N.gravityRange!=null)f.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange;if(N.gravityCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound;if(N.gravityRangeCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound;if(N.initialEnergyOnIncremental!=null)f.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental;if(N.tilingCompareBy!=null)f.TILING_COMPARE_BY=N.tilingCompareBy;if(N.quality=="proof")c.QUALITY=2;else c.QUALITY=0;if(f.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!N.randomize,f.ANIMATE=d.ANIMATE=c.ANIMATE=N.animate,f.TILE=N.tile,f.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical==="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal==="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!N.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1;if(N.step=="enforced")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1;if(N.step=="cose")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0;if(N.step=="all"){if(N.randomize)f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0}if(N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint)f.TREE_REDUCTION_ON_INCREMENTAL=!1;else f.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new r,j=H.newGraphManager();return x(j.addRoot(),g.getTopMostNodes(Z),H,N),y(H,j,rt),V(H,N),H.runLayout(),it};s.exports={coseLayout:P}},212:(s,a,o)=>{var g=function(){function N(b,z){for(var G=0;G<z.length;G++){var Z=z[G];if(Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z)Z.writable=!0;Object.defineProperty(b,Z.key,Z)}}return function(b,z,G){if(z)N(b.prototype,z);if(G)N(b,G);return b}}();function r(N,b){if(!(N instanceof b))throw TypeError("Cannot call a class as a function")}var p=o(658),i=o(548),t=o(657),c=t.spectralLayout,d=o(816),f=d.coseLayout,P=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(b){return 4500},idealEdgeLength:function(b){return 50},edgeElasticity:function(b){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(b){r(this,N),this.options=p({},P,b)}return g(N,[{key:"run",value:function(){var z=this,G=this.options,{cy:Z,eles:rt}=G,_=[],ut=void 0,W=void 0,it=[],h=void 0,w=[];if(G.fixedNodeConstraint&&(!Array.isArray(G.fixedNodeConstraint)||G.fixedNodeConstraint.length==0))G.fixedNodeConstraint=void 0;if(G.alignmentConstraint){if(G.alignmentConstraint.vertical&&(!Array.isArray(G.alignmentConstraint.vertical)||G.alignmentConstraint.vertical.length==0))G.alignmentConstraint.vertical=void 0;if(G.alignmentConstraint.horizontal&&(!Array.isArray(G.alignmentConstraint.horizontal)||G.alignmentConstraint.horizontal.length==0))G.alignmentConstraint.horizontal=void 0}if(G.relativePlacementConstraint&&(!Array.isArray(G.relativePlacementConstraint)||G.relativePlacementConstraint.length==0))G.relativePlacementConstraint=void 0;var E=G.fixedNodeConstraint||G.alignmentConstraint||G.relativePlacementConstraint;if(E)G.tile=!1,G.packComponents=!1;var x=void 0,y=!1;if(Z.layoutUtilities&&G.packComponents){if(x=Z.layoutUtilities("get"),!x)x=Z.layoutUtilities();y=!0}if(rt.nodes().length>0)if(!y){var V=G.eles.boundingBox();if(w.push({x:V.x1+V.w/2,y:V.y1+V.h/2}),G.randomize){var H=c(G);_.push(H)}if(G.quality=="default"||G.quality=="proof")it.push(f(G,_[0])),i.relocateComponent(w[0],it[0],G);else i.relocateComponent(w[0],_[0],G)}else{var j=i.getTopMostNodes(G.eles.nodes());if(h=i.connectComponents(Z,G.eles,j),h.forEach(function(Ct){var Et=Ct.boundingBox();w.push({x:Et.x1+Et.w/2,y:Et.y1+Et.h/2})}),G.randomize)h.forEach(function(Ct){G.eles=Ct,_.push(c(G))});if(G.quality=="default"||G.quality=="proof"){var Q=Z.collection();if(G.tile){var B=new Map,ct=[],mt=[],J=0,yt={nodeIndexes:B,xCoords:ct,yCoords:mt},ht=[];if(h.forEach(function(Ct,Et){if(Ct.edges().length==0)Ct.nodes().forEach(function(Pt,Ut){if(Q.merge(Ct.nodes()[Ut]),!Pt.isParent())yt.nodeIndexes.set(Ct.nodes()[Ut].id(),J++),yt.xCoords.push(Ct.nodes()[0].position().x),yt.yCoords.push(Ct.nodes()[0].position().y)}),ht.push(Et)}),Q.length>1){var X=Q.boundingBox();w.push({x:X.x1+X.w/2,y:X.y1+X.h/2}),h.push(Q),_.push(yt);for(var et=ht.length-1;et>=0;et--)h.splice(ht[et],1),_.splice(ht[et],1),w.splice(ht[et],1)}}h.forEach(function(Ct,Et){G.eles=Ct,it.push(f(G,_[Et])),i.relocateComponent(w[Et],it[Et],G)})}else h.forEach(function(Ct,Et){i.relocateComponent(w[Et],_[Et],G)});var at=new Set;if(h.length>1){var vt=[],Dt=rt.filter(function(Ct){return Ct.css("display")=="none"});h.forEach(function(Ct,Et){var Pt=void 0;if(G.quality=="draft")Pt=_[Et].nodeIndexes;if(Ct.nodes().not(Dt).length>0){var Ut={};Ut.edges=[],Ut.nodes=[];var Vt=void 0;if(Ct.nodes().not(Dt).forEach(function(Yt){if(G.quality=="draft")if(!Yt.isParent())Vt=Pt.get(Yt.id()),Ut.nodes.push({x:_[Et].xCoords[Vt]-Yt.boundingbox().w/2,y:_[Et].yCoords[Vt]-Yt.boundingbox().h/2,width:Yt.boundingbox().w,height:Yt.boundingbox().h});else{var Xt=i.calcBoundingBox(Yt,_[Et].xCoords,_[Et].yCoords,Pt);Ut.nodes.push({x:Xt.topLeftX,y:Xt.topLeftY,width:Xt.width,height:Xt.height})}else if(it[Et][Yt.id()])Ut.nodes.push({x:it[Et][Yt.id()].getLeft(),y:it[Et][Yt.id()].getTop(),width:it[Et][Yt.id()].getWidth(),height:it[Et][Yt.id()].getHeight()})}),Ct.edges().forEach(function(Yt){var Xt=Yt.source(),Zt=Yt.target();if(Xt.css("display")!="none"&&Zt.css("display")!="none"){if(G.quality=="draft"){var Qt=Pt.get(Xt.id()),he=Pt.get(Zt.id()),te=[],ne=[];if(Xt.isParent()){var _t=i.calcBoundingBox(Xt,_[Et].xCoords,_[Et].yCoords,Pt);te.push(_t.topLeftX+_t.width/2),te.push(_t.topLeftY+_t.height/2)}else te.push(_[Et].xCoords[Qt]),te.push(_[Et].yCoords[Qt]);if(Zt.isParent()){var tt=i.calcBoundingBox(Zt,_[Et].xCoords,_[Et].yCoords,Pt);ne.push(tt.topLeftX+tt.width/2),ne.push(tt.topLeftY+tt.height/2)}else ne.push(_[Et].xCoords[he]),ne.push(_[Et].yCoords[he]);Ut.edges.push({startX:te[0],startY:te[1],endX:ne[0],endY:ne[1]})}else if(it[Et][Xt.id()]&&it[Et][Zt.id()])Ut.edges.push({startX:it[Et][Xt.id()].getCenterX(),startY:it[Et][Xt.id()].getCenterY(),endX:it[Et][Zt.id()].getCenterX(),endY:it[Et][Zt.id()].getCenterY()})}}),Ut.nodes.length>0)vt.push(Ut),at.add(Et)}});var Wt=x.packComponents(vt,G.randomize).shifts;if(G.quality=="draft")_.forEach(function(Ct,Et){var Pt=Ct.xCoords.map(function(Vt){return Vt+Wt[Et].dx}),Ut=Ct.yCoords.map(function(Vt){return Vt+Wt[Et].dy});Ct.xCoords=Pt,Ct.yCoords=Ut});else{var Kt=0;at.forEach(function(Ct){Object.keys(it[Ct]).forEach(function(Et){var Pt=it[Ct][Et];Pt.setCenter(Pt.getCenterX()+Wt[Kt].dx,Pt.getCenterY()+Wt[Kt].dy)}),Kt++})}}}var dt=function(Et,Pt){if(G.quality=="default"||G.quality=="proof"){if(typeof Et==="number")Et=Pt;var Ut=void 0,Vt=void 0,Yt=Et.data("id");if(it.forEach(function(Zt){if(Yt in Zt)Ut={x:Zt[Yt].getRect().getCenterX(),y:Zt[Yt].getRect().getCenterY()},Vt=Zt[Yt]}),G.nodeDimensionsIncludeLabels){if(Vt.labelWidth){if(Vt.labelPosHorizontal=="left")Ut.x+=Vt.labelWidth/2;else if(Vt.labelPosHorizontal=="right")Ut.x-=Vt.labelWidth/2}if(Vt.labelHeight){if(Vt.labelPosVertical=="top")Ut.y+=Vt.labelHeight/2;else if(Vt.labelPosVertical=="bottom")Ut.y-=Vt.labelHeight/2}}if(Ut==null)Ut={x:Et.position("x"),y:Et.position("y")};return{x:Ut.x,y:Ut.y}}else{var Xt=void 0;if(_.forEach(function(Zt){var Qt=Zt.nodeIndexes.get(Et.id());if(Qt!=null)Xt={x:Zt.xCoords[Qt],y:Zt.yCoords[Qt]}}),Xt==null)Xt={x:Et.position("x"),y:Et.position("y")};return{x:Xt.x,y:Xt.y}}};if(G.quality=="default"||G.quality=="proof"||G.randomize){var ie=i.calcParentsWithoutChildren(Z,rt),Bt=rt.filter(function(Ct){return Ct.css("display")=="none"});if(G.eles=rt.not(Bt),rt.nodes().not(":parent").not(Bt).layoutPositions(z,G,dt),ie.length>0)ie.forEach(function(Ct){Ct.position(dt(Ct))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();s.exports=T},657:(s,a,o)=>{var g=o(548),r=o(140).layoutBase.Matrix,p=o(140).layoutBase.SVD,i=function(c){var{cy:d,eles:f}=c,P=f.nodes(),T=f.nodes(":parent"),N=new Map,b=new Map,z=new Map,G=[],Z=[],rt=[],_=[],ut=[],W=[],it=[],h=[],w=void 0,E=void 0,x=1e8,y=0.000000001,{piTol:V,samplingType:H,nodeSeparation:j}=c,Q=void 0,B=function(){var st=0,lt=0,ft=!1;while(lt<Q){st=Math.floor(Math.random()*E),ft=!1;for(var pt=0;pt<lt;pt++)if(_[pt]==st){ft=!0;break}if(!ft)_[lt]=st,lt++;else continue}},ct=function(st,lt,ft){var pt=[],St=0,It=0,gt=0,Ot=void 0,Rt=[],Nt=0,bt=1;for(var zt=0;zt<E;zt++)Rt[zt]=x;pt[It]=st,Rt[st]=0;while(It>=St){gt=pt[St++];var At=G[gt];for(var Lt=0;Lt<At.length;Lt++)if(Ot=b.get(At[Lt]),Rt[Ot]==x)Rt[Ot]=Rt[gt]+1,pt[++It]=Ot;W[gt][lt]=Rt[gt]*j}if(ft){for(var Ft=0;Ft<E;Ft++)if(W[Ft][lt]<ut[Ft])ut[Ft]=W[Ft][lt];for(var Mt=0;Mt<E;Mt++)if(ut[Mt]>Nt)Nt=ut[Mt],bt=Mt}return bt},mt=function(st){var lt=void 0;if(!st){B();for(var ft=0;ft<Q;ft++)ct(_[ft],ft,st,!1)}else{lt=Math.floor(Math.random()*E),w=lt;for(var pt=0;pt<E;pt++)ut[pt]=x;for(var St=0;St<Q;St++)_[St]=lt,lt=ct(lt,St,st)}for(var It=0;It<E;It++)for(var gt=0;gt<Q;gt++)W[It][gt]*=W[It][gt];for(var Ot=0;Ot<Q;Ot++)it[Ot]=[];for(var Rt=0;Rt<Q;Rt++)for(var Nt=0;Nt<Q;Nt++)it[Rt][Nt]=W[_[Nt]][Rt]},J=function(){var st=p.svd(it),{S:lt,U:ft,V:pt}=st,St=lt[0]*lt[0]*lt[0],It=[];for(var gt=0;gt<Q;gt++){It[gt]=[];for(var Ot=0;Ot<Q;Ot++)if(It[gt][Ot]=0,gt==Ot)It[gt][Ot]=lt[gt]/(lt[gt]*lt[gt]+St/(lt[gt]*lt[gt]))}h=r.multMat(r.multMat(pt,It),r.transpose(ft))},yt=function(){var st=void 0,lt=void 0,ft=[],pt=[],St=[],It=[];for(var gt=0;gt<E;gt++)ft[gt]=Math.random(),pt[gt]=Math.random();ft=r.normalize(ft),pt=r.normalize(pt);var Ot=0,Rt=y,Nt=y,bt=void 0;while(!0){Ot++;for(var zt=0;zt<E;zt++)St[zt]=ft[zt];if(ft=r.multGamma(r.multL(r.multGamma(St),W,h)),st=r.dotProduct(St,ft),ft=r.normalize(ft),Rt=r.dotProduct(St,ft),bt=Math.abs(Rt/Nt),bt<=1+V&&bt>=1)break;Nt=Rt}for(var At=0;At<E;At++)St[At]=ft[At];Ot=0,Nt=y;while(!0){Ot++;for(var Lt=0;Lt<E;Lt++)It[Lt]=pt[Lt];if(It=r.minusOp(It,r.multCons(St,r.dotProduct(St,It))),pt=r.multGamma(r.multL(r.multGamma(It),W,h)),lt=r.dotProduct(It,pt),pt=r.normalize(pt),Rt=r.dotProduct(It,pt),bt=Math.abs(Rt/Nt),bt<=1+V&&bt>=1)break;Nt=Rt}for(var Ft=0;Ft<E;Ft++)It[Ft]=pt[Ft];Z=r.multCons(St,Math.sqrt(Math.abs(st))),rt=r.multCons(It,Math.sqrt(Math.abs(lt)))};g.connectComponents(d,f,g.getTopMostNodes(P),N),T.forEach(function(ot){g.connectComponents(d,f,g.getTopMostNodes(ot.descendants().intersection(f)),N)});var ht=0;for(var X=0;X<P.length;X++)if(!P[X].isParent())b.set(P[X].id(),ht++);var et=!0,at=!1,vt=void 0;try{for(var Dt=N.keys()[Symbol.iterator](),Wt;!(et=(Wt=Dt.next()).done);et=!0){var Kt=Wt.value;b.set(Kt,ht++)}}catch(ot){at=!0,vt=ot}finally{try{if(!et&&Dt.return)Dt.return()}finally{if(at)throw vt}}for(var dt=0;dt<b.size;dt++)G[dt]=[];T.forEach(function(ot){var st=ot.children().intersection(f);while(st.nodes(":childless").length==0)st=st.nodes()[0].children().intersection(f);var lt=0,ft=st.nodes(":childless")[0].connectedEdges().length;st.nodes(":childless").forEach(function(pt,St){if(pt.connectedEdges().length<ft)ft=pt.connectedEdges().length,lt=St}),z.set(ot.id(),st.nodes(":childless")[lt].id())}),P.forEach(function(ot){var st=void 0;if(ot.isParent())st=b.get(z.get(ot.id()));else st=b.get(ot.id());ot.neighborhood().nodes().forEach(function(lt){if(f.intersection(ot.edgesWith(lt)).length>0)if(lt.isParent())G[st].push(z.get(lt.id()));else G[st].push(lt.id())})});var ie=function(st){var lt=b.get(st),ft=void 0;N.get(st).forEach(function(pt){if(d.getElementById(pt).isParent())ft=z.get(pt);else ft=pt;G[lt].push(ft),G[b.get(ft)].push(st)})},Bt=!0,Ct=!1,Et=void 0;try{for(var Pt=N.keys()[Symbol.iterator](),Ut;!(Bt=(Ut=Pt.next()).done);Bt=!0){var Vt=Ut.value;ie(Vt)}}catch(ot){Ct=!0,Et=ot}finally{try{if(!Bt&&Pt.return)Pt.return()}finally{if(Ct)throw Et}}E=b.size;var Yt=void 0;if(E>2){Q=E<c.sampleSize?E:c.sampleSize;for(var Xt=0;Xt<E;Xt++)W[Xt]=[];for(var Zt=0;Zt<Q;Zt++)h[Zt]=[];if(c.quality=="draft"||c.step=="all")mt(H),J(),yt(),Yt={nodeIndexes:b,xCoords:Z,yCoords:rt};else b.forEach(function(ot,st){Z.push(d.getElementById(st).position("x")),rt.push(d.getElementById(st).position("y"))}),Yt={nodeIndexes:b,xCoords:Z,yCoords:rt};return Yt}else{var Qt=b.keys(),he=d.getElementById(Qt.next().value),te=he.position(),ne=he.outerWidth();if(Z.push(te.x),rt.push(te.y),E==2){var _t=d.getElementById(Qt.next().value),tt=_t.outerWidth();Z.push(te.x+ne/2+tt/2+c.idealEdgeLength),rt.push(te.y)}return Yt={nodeIndexes:b,xCoords:Z,yCoords:rt},Yt}};s.exports={spectralLayout:i}},579:(s,a,o)=>{var g=o(212),r=function(i){if(!i)return;i("layout","fcose",g)};if(typeof cytoscape<"u")r(cytoscape);s.exports=r},140:(s)=>{s.exports=C}},S={};function v(s){var a=S[s];if(a!==void 0)return a.exports;var o=S[s]={exports:{}};return U[s](o,o.exports,v),o.exports}var l=v(579);return l})()})});var ar=Fe(Je(),1);var je={L:"left",R:"right",T:"top",B:"bottom"},_e={L:e((C)=>`${C},${C/2} 0,${C} 0,0`,"L"),R:e((C)=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:e((C)=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:e((C)=>`${C/2},0 ${C},${C} 0,${C}`,"B")},Oe={L:e((C,U)=>C-U+2,"L"),R:e((C,U)=>C-2,"R"),T:e((C,U)=>C-U+2,"T"),B:e((C,U)=>C-2,"B")},vr=e(function(C){if(oe(C))return C==="L"?"R":"L";else return C==="T"?"B":"T"},"getOppositeArchitectureDirection"),tr=e(function(C){let U=C;return U==="L"||U==="R"||U==="T"||U==="B"},"isArchitectureDirection"),oe=e(function(C){let U=C;return U==="L"||U==="R"},"isArchitectureDirectionX"),de=e(function(C){let U=C;return U==="T"||U==="B"},"isArchitectureDirectionY"),ze=e(function(C,U){let S=oe(C)&&de(U),v=de(C)&&oe(U);return S||v},"isArchitectureDirectionXY"),pr=e(function(C){let U=C[0],S=C[1],v=oe(U)&&de(S),l=de(U)&&oe(S);return v||l},"isArchitecturePairXY"),yr=e(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),He=e(function(C,U){let S=`${C}${U}`;return yr(S)?S:void 0},"getArchitectureDirectionPair"),Er=e(function([C,U],S){let v=S[0],l=S[1];if(oe(v))if(de(l))return[C+(v==="L"?-1:1),U+(l==="T"?1:-1)];else return[C+(v==="L"?-1:1),U];else if(oe(l))return[C+(l==="L"?1:-1),U+(v==="T"?1:-1)];else return[C,U+(v==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Tr=e(function(C){if(C==="LT"||C==="TL")return[1,1];else if(C==="BL"||C==="LB")return[1,-1];else if(C==="BR"||C==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),Nr=e(function(C,U){if(ze(C,U))return"bend";else if(oe(C))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Lr=e(function(C){return C.type==="service"},"isArchitectureService"),wr=e(function(C){return C.type==="junction"},"isArchitectureJunction"),er=e((C,U)=>{let[S,v]=[C,U].sort();return`${JSON.stringify(S)}-${JSON.stringify(v)}`},"architectureGroupAlignmentKey"),rr=e((C)=>C.data(),"edgeData"),Le=e((C)=>C.data(),"nodeData"),Mr=F.architecture,ir=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=L,this.getAccTitle=I,this.setDiagramTitle=O,this.getDiagramTitle=D,this.getAccDescription=M,this.setAccDescription=R,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",A()}addService({id:C,icon:U,in:S,title:v,iconText:l}){if(this.registeredIds.has(C))throw Error(`The service id [${C}] is already in use by another ${this.registeredIds.get(C)}`);if(S!==void 0){if(C===S)throw Error(`The service [${C}] cannot be placed within itself`);if(!this.registeredIds.has(S))throw Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(S)==="node")throw Error(`The service [${C}]'s parent is not a group`)}this.registeredIds.set(C,"node"),this.nodes.set(C,{id:C,type:"service",icon:U,iconText:l,title:v,edges:[],in:S})}getServices(){return[...this.nodes.values()].filter(Lr)}addJunction({id:C,in:U}){if(this.registeredIds.has(C))throw Error(`The junction id [${C}] is already in use by another ${this.registeredIds.get(C)}`);if(U!==void 0){if(C===U)throw Error(`The junction [${C}] cannot be placed within itself`);if(!this.registeredIds.has(U))throw Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(U)==="node")throw Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds.set(C,"node"),this.nodes.set(C,{id:C,type:"junction",edges:[],in:U})}getJunctions(){return[...this.nodes.values()].filter(wr)}getNodes(){return[...this.nodes.values()]}getNode(C){return this.nodes.get(C)??null}addGroup({id:C,icon:U,in:S,title:v}){if(this.registeredIds.has(C))throw Error(`The group id [${C}] is already in use by another ${this.registeredIds.get(C)}`);if(S!==void 0){if(C===S)throw Error(`The group [${C}] cannot be placed within itself`);if(!this.registeredIds.has(S))throw Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(S)==="node")throw Error(`The group [${C}]'s parent is not a group`)}this.registeredIds.set(C,"group"),this.groups.set(C,{id:C,icon:U,title:v,in:S})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:C,rhsId:U,lhsDir:S,rhsDir:v,lhsInto:l,rhsInto:s,lhsGroup:a,rhsGroup:o,title:g}){if(!tr(S))throw Error(`Invalid direction given for left hand side of edge ${C}--${U}. Expected (L,R,T,B) got ${String(S)}`);if(!tr(v))throw Error(`Invalid direction given for right hand side of edge ${C}--${U}. Expected (L,R,T,B) got ${String(v)}`);if(!this.nodes.has(C)&&!this.groups.has(C))throw Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(U)&&!this.groups.has(U))throw Error(`The right-hand id [${U}] does not yet exist. Please create the service/group before declaring an edge to it.`);let r=this.nodes.get(C).in,p=this.nodes.get(U).in;if(a&&r&&p&&r==p)throw Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&r&&p&&r==p)throw Error(`The right-hand id [${U}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let i={lhsId:C,lhsDir:S,lhsInto:l,lhsGroup:a,rhsId:U,rhsDir:v,rhsInto:s,rhsGroup:o,title:g};this.edges.push(i);let t=this.nodes.get(C),c=this.nodes.get(U);if(t&&c)t.edges.push(this.edges[this.edges.length-1]),c.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(C){if(C.members.length<2)throw Error(`An align directive requires at least two members; got ${C.members.length}`);let U=new Set;C.members.forEach((S)=>{if(this.registeredIds.get(S)!=="node")throw Error(`align ${C.direction} references [${S}], which is not a service or junction`);if(U.has(S))throw Error(`align ${C.direction} lists [${S}] more than once`);U.add(S)}),this.layoutHints.push(C)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let C=new Map,U=new Map;for(let[a,o]of this.nodes.entries()){let g=new Map;for(let r of o.edges){let p=this.getNode(r.lhsId)?.in,i=this.getNode(r.rhsId)?.in;if(p&&i&&p!==i){let t=Nr(r.lhsDir,r.rhsDir);if(t!=="bend")C.set(er(p,i),t)}if(r.lhsId===a){let t=He(r.lhsDir,r.rhsDir);if(t)g.set(t,r.rhsId)}else{let t=He(r.rhsDir,r.lhsDir);if(t)g.set(t,r.lhsId)}}U.set(a,g)}let S=new Set,v=new Set(U.keys()),l=e((a)=>{let o=new Map([[a,[0,0]]]),g=[a];while(g.length>0){let r=g.shift();if(r){S.add(r),v.delete(r);let p=U.get(r);if(!p)throw Error(`BFS error: adjacency list for id ${r} not found. Please report this as a bug.`);let i=o.get(r);if(!i)throw Error(`BFS error: position for id ${r} not found in spatial map. Please report this as a bug.`);let[t,c]=i;p.forEach((d,f)=>{if(!S.has(d))o.set(d,Er([t,c],f)),g.push(d)})}}return o},"BFS"),s=[];while(v.size>0){let a=v.values().next().value;s.push(l(a))}this.dataStructures={adjList:U,spatialMaps:s,groupAlignments:C}}return this.dataStructures}setElementForId(C,U){this.elements.set(C,U)}getElementById(C){return this.elements.get(C)}getConfig(){return K({...Mr,...k().architecture})}getConfigField(C){return this.getConfig()[C]}},Cr=e((C,U)=>{ee(C,U),C.groups.map((S)=>U.addGroup(S)),C.services.map((S)=>U.addService({...S,type:"service"})),C.junctions.map((S)=>U.addJunction({...S,type:"junction"})),C.edges.map((S)=>U.addEdge(S)),C.alignments?.map((S)=>U.addLayoutHint({direction:S.direction,members:[...S.members]}))},"populateDb"),nr={parser:{yy:void 0},parse:e(async(C)=>{let U=await se("architecture",C);n.debug(U);let S=nr.parser?.yy;if(!(S instanceof ir))throw 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.");Cr(U,S)},"parse")},Ar=e((C)=>`
|
|
1
|
+
import{ee}from"./index.btq862bx.js";import{e,n,F,k,q,Tt,A,L,I,R,M,O,D,u,m,Y,bs,mr,nt,K,We,Be}from"./index.mjfjqm0b.js";import{se}from"./index.yd3167gn.js";import{wt}from"./index.fv9af3wd.js";import{Fe,Ke}from"./index.5vcex75v.js";var Ge=Ke(function(we,Pe){(function(U,S){if(typeof we==="object"&&typeof Pe==="object")Pe.exports=S();else if(typeof define==="function"&&define.amd)define([],S);else if(typeof we==="object")we.layoutBase=S();else U.layoutBase=S()})(we,function(){return function(C){var U={};function S(v){if(U[v])return U[v].exports;var l=U[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,S),l.l=!0,l.exports}return S.m=C,S.c=U,S.i=function(v){return v},S.d=function(v,l,s){if(!S.o(v,l))Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:s})},S.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return S.d(l,"a",l),l},S.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},S.p="",S(S.s=28)}([function(C,U,S){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1000,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v},function(C,U,S){var v=S(2),l=S(8),s=S(9);function a(g,r,p){v.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=g,this.target=r}a.prototype=Object.create(v.prototype);for(var o in v)a[o]=v[o];a.prototype.getSource=function(){return this.source},a.prototype.getTarget=function(){return this.target},a.prototype.isInterGraph=function(){return this.isInterGraph},a.prototype.getLength=function(){return this.length},a.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},a.prototype.getBendpoints=function(){return this.bendpoints},a.prototype.getLca=function(){return this.lca},a.prototype.getSourceInLca=function(){return this.sourceInLca},a.prototype.getTargetInLca=function(){return this.targetInLca},a.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;else if(this.target===g)return this.source;else throw"Node is not incident with this edge"},a.prototype.getOtherEndInGraph=function(g,r){var p=this.getOtherEnd(g),i=r.getGraphManager().getRoot();while(!0){if(p.getOwner()==r)return p;if(p.getOwner()==i)break;p=p.getOwner().getParent()}return null},a.prototype.updateLength=function(){var g=[,,,,];if(this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),g),!this.isOverlapingSourceAndTarget){if(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1)this.lengthX=s.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=s.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},a.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=s.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=s.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=a},function(C,U,S){function v(l){this.vGraphObject=l}C.exports=v},function(C,U,S){var v=S(2),l=S(10),s=S(13),a=S(0),o=S(16),g=S(5);function r(i,t,c,d){if(c==null&&d==null)d=t;if(v.call(this,d),i.graphManager!=null)i=i.graphManager;if(this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,c!=null&&t!=null)this.rect=new s(t.x,t.y,c.width,c.height);else this.rect=new s}r.prototype=Object.create(v.prototype);for(var p in v)r[p]=v[p];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(i){this.rect.width=i},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(i){this.rect.height=i},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(i,t){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=t.width,this.rect.height=t.height},r.prototype.setCenter=function(i,t){this.rect.x=i-this.rect.width/2,this.rect.y=t-this.rect.height/2},r.prototype.setLocation=function(i,t){this.rect.x=i,this.rect.y=t},r.prototype.moveBy=function(i,t){this.rect.x+=i,this.rect.y+=t},r.prototype.getEdgeListToNode=function(i){var t=[],c,d=this;return d.edges.forEach(function(f){if(f.target==i){if(f.source!=d)throw"Incorrect edge source!";t.push(f)}}),t},r.prototype.getEdgesBetween=function(i){var t=[],c,d=this;return d.edges.forEach(function(f){if(!(f.source==d||f.target==d))throw"Incorrect edge source and/or target";if(f.target==i||f.source==i)t.push(f)}),t},r.prototype.getNeighborsList=function(){var i=new Set,t=this;return t.edges.forEach(function(c){if(c.source==t)i.add(c.target);else{if(c.target!=t)throw"Incorrect incidency!";i.add(c.source)}}),i},r.prototype.withChildren=function(){var i=new Set,t,c;if(i.add(this),this.child!=null){var d=this.child.getNodes();for(var f=0;f<d.length;f++)t=d[f],c=t.withChildren(),c.forEach(function(P){i.add(P)})}return i},r.prototype.getNoOfChildren=function(){var i=0,t;if(this.child==null)i=1;else{var c=this.child.getNodes();for(var d=0;d<c.length;d++)t=c[d],i+=t.getNoOfChildren()}if(i==0)i=1;return i},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},r.prototype.scatter=function(){var i,t,c=-a.INITIAL_WORLD_BOUNDARY,d=a.INITIAL_WORLD_BOUNDARY;i=a.WORLD_CENTER_X+o.nextDouble()*(d-c)+c;var f=-a.INITIAL_WORLD_BOUNDARY,P=a.INITIAL_WORLD_BOUNDARY;t=a.WORLD_CENTER_Y+o.nextDouble()*(P-f)+f,this.rect.x=i,this.rect.y=t},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),a.NODE_DIMENSIONS_INCLUDE_LABELS){var t=i.getRight()-i.getLeft(),c=i.getBottom()-i.getTop();if(this.labelWidth){if(this.labelPosHorizontal=="left")this.rect.x-=this.labelWidth,this.setWidth(t+this.labelWidth);else if(this.labelPosHorizontal=="center"&&this.labelWidth>t)this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth);else if(this.labelPosHorizontal=="right")this.setWidth(t+this.labelWidth)}if(this.labelHeight){if(this.labelPosVertical=="top")this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight);else if(this.labelPosVertical=="center"&&this.labelHeight>c)this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight);else if(this.labelPosVertical=="bottom")this.setHeight(c+this.labelHeight)}}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(i){var t=this.rect.x;if(t>a.WORLD_BOUNDARY)t=a.WORLD_BOUNDARY;else if(t<-a.WORLD_BOUNDARY)t=-a.WORLD_BOUNDARY;var c=this.rect.y;if(c>a.WORLD_BOUNDARY)c=a.WORLD_BOUNDARY;else if(c<-a.WORLD_BOUNDARY)c=-a.WORLD_BOUNDARY;var d=new g(t,c),f=i.inverseTransformPoint(d);this.setLocation(f.x,f.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},C.exports=r},function(C,U,S){var v=S(0);function l(){}for(var s in v)l[s]=v[s];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=0.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=0.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,l.COOLING_ADAPTATION_FACTOR=0.33,l.ADAPTATION_LOWER_NODE_LIMIT=1000,l.ADAPTATION_UPPER_NODE_LIMIT=5000,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l},function(C,U,S){function v(l,s){if(l==null&&s==null)this.x=0,this.y=0;else this.x=l,this.y=s}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v},function(C,U,S){var v=S(2),l=S(10),s=S(0),a=S(7),o=S(3),g=S(1),r=S(13),p=S(12),i=S(11);function t(d,f,P){if(v.call(this,P),this.estimatedSize=l.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,f!=null&&f instanceof a)this.graphManager=f;else if(f!=null&&f instanceof Layout)this.graphManager=f.graphManager}t.prototype=Object.create(v.prototype);for(var c in v)t[c]=v[c];t.prototype.getNodes=function(){return this.nodes},t.prototype.getEdges=function(){return this.edges},t.prototype.getGraphManager=function(){return this.graphManager},t.prototype.getParent=function(){return this.parent},t.prototype.getLeft=function(){return this.left},t.prototype.getRight=function(){return this.right},t.prototype.getTop=function(){return this.top},t.prototype.getBottom=function(){return this.bottom},t.prototype.isConnected=function(){return this.isConnected},t.prototype.add=function(d,f,P){if(f==null&&P==null){var T=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(T)>-1)throw"Node already in graph!";return T.owner=this,this.getNodes().push(T),T}else{var N=d;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(P)>-1))throw"Source or target not in graph!";if(!(f.owner==P.owner&&f.owner==this))throw"Both owners must be this graph!";if(f.owner!=P.owner)return null;if(N.source=f,N.target=P,N.isInterGraph=!1,this.getEdges().push(N),f.edges.push(N),P!=f)P.edges.push(N);return N}},t.prototype.remove=function(d){var f=d;if(d instanceof o){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var P=f.edges.slice(),T,N=P.length;for(var b=0;b<N;b++)if(T=P[b],T.isInterGraph)this.graphManager.remove(T);else T.source.owner.remove(T);var z=this.nodes.indexOf(f);if(z==-1)throw"Node not in owner node list!";this.nodes.splice(z,1)}else if(d instanceof g){var T=d;if(T==null)throw"Edge is null!";if(!(T.source!=null&&T.target!=null))throw"Source and/or target is null!";if(!(T.source.owner!=null&&T.target.owner!=null&&T.source.owner==this&&T.target.owner==this))throw"Source and/or target owner is invalid!";var G=T.source.edges.indexOf(T),Z=T.target.edges.indexOf(T);if(!(G>-1&&Z>-1))throw"Source and/or target doesn't know this edge!";if(T.source.edges.splice(G,1),T.target!=T.source)T.target.edges.splice(Z,1);var z=T.source.owner.getEdges().indexOf(T);if(z==-1)throw"Not in owner's edge list!";T.source.owner.getEdges().splice(z,1)}},t.prototype.updateLeftTop=function(){var{MAX_VALUE:d,MAX_VALUE:f}=l,P,T,N,b=this.getNodes(),z=b.length;for(var G=0;G<z;G++){var Z=b[G];if(P=Z.getTop(),T=Z.getLeft(),d>P)d=P;if(f>T)f=T}if(d==l.MAX_VALUE)return null;if(b[0].getParent().paddingLeft!=null)N=b[0].getParent().paddingLeft;else N=this.margin;return this.left=f-N,this.top=d-N,new p(this.left,this.top)},t.prototype.updateBounds=function(d){var f=l.MAX_VALUE,P=-l.MAX_VALUE,T=l.MAX_VALUE,N=-l.MAX_VALUE,b,z,G,Z,rt,_=this.nodes,ut=_.length;for(var W=0;W<ut;W++){var it=_[W];if(d&&it.child!=null)it.updateBounds();if(b=it.getLeft(),z=it.getRight(),G=it.getTop(),Z=it.getBottom(),f>b)f=b;if(P<z)P=z;if(T>G)T=G;if(N<Z)N=Z}var h=new r(f,T,P-f,N-T);if(f==l.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(_[0].getParent().paddingLeft!=null)rt=_[0].getParent().paddingLeft;else rt=this.margin;this.left=h.x-rt,this.right=h.x+h.width+rt,this.top=h.y-rt,this.bottom=h.y+h.height+rt},t.calculateBounds=function(d){var f=l.MAX_VALUE,P=-l.MAX_VALUE,T=l.MAX_VALUE,N=-l.MAX_VALUE,b,z,G,Z,rt=d.length;for(var _=0;_<rt;_++){var ut=d[_];if(b=ut.getLeft(),z=ut.getRight(),G=ut.getTop(),Z=ut.getBottom(),f>b)f=b;if(P<z)P=z;if(T>G)T=G;if(N<Z)N=Z}var W=new r(f,T,P-f,N-T);return W},t.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},t.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},t.prototype.calcEstimatedSize=function(){var d=0,f=this.nodes,P=f.length;for(var T=0;T<P;T++){var N=f[T];d+=N.calcEstimatedSize()}if(d==0)this.estimatedSize=s.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=d/Math.sqrt(this.nodes.length);return this.estimatedSize},t.prototype.updateConnected=function(){var d=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new i,P=new Set,T=this.nodes[0],N,b,z=T.withChildren();z.forEach(function(W){f.push(W),P.add(W)});while(f.length!==0){T=f.shift(),N=T.getEdges();var G=N.length;for(var Z=0;Z<G;Z++){var rt=N[Z];if(b=rt.getOtherEndInGraph(T,this),b!=null&&!P.has(b)){var _=b.withChildren();_.forEach(function(W){f.push(W),P.add(W)})}}}if(this.isConnected=!1,P.size>=this.nodes.length){var ut=0;if(P.forEach(function(W){if(W.owner==d)ut++}),ut==this.nodes.length)this.isConnected=!0}},C.exports=t},function(C,U,S){var v,l=S(1);function s(a){v=S(6),this.layout=a,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var a=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(a,o);return this.setRootGraph(g),this.rootGraph},s.prototype.add=function(a,o,g,r,p){if(g==null&&r==null&&p==null){if(a==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(a)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(a),a.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return a.parent=o,o.child=a,a}else{p=g,r=o,g=a;var i=r.getOwner(),t=p.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(t!=null&&t.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==t)return g.isInterGraph=!1,i.add(g,r,p);else{if(g.isInterGraph=!0,g.source=r,g.target=p,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}}},s.prototype.remove=function(a){if(a instanceof v){var o=a;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());var r,p=g.length;for(var i=0;i<p;i++)r=g[i],o.remove(r);var t=[];t=t.concat(o.getNodes());var c;p=t.length;for(var i=0;i<p;i++)c=t[i],o.remove(c);if(o==this.rootGraph)this.setRootGraph(null);var d=this.graphs.indexOf(o);this.graphs.splice(d,1),o.parent=null}else if(a instanceof l){if(r=a,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var d=r.source.edges.indexOf(r);if(r.source.edges.splice(d,1),d=r.target.edges.indexOf(r),r.target.edges.splice(d,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var d=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(d,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){var a=[],o=this.getGraphs(),g=o.length;for(var r=0;r<g;r++)a=a.concat(o[r].getNodes());this.allNodes=a}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var a=[],o=this.getGraphs(),g=o.length;for(var r=0;r<o.length;r++)a=a.concat(o[r].getEdges());a=a.concat(this.edges),this.allEdges=a}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(a){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=a},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(a){if(a.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=a,a.parent==null)a.parent=this.layout.newNode("Root node")},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(a,o){if(!(a!=null&&o!=null))throw"assert failed";if(a==o)return!0;var g=a.getOwner(),r;do{if(r=g.getParent(),r==null)break;if(r==o)return!0;if(g=r.getOwner(),g==null)break}while(!0);g=o.getOwner();do{if(r=g.getParent(),r==null)break;if(r==a)return!0;if(g=r.getOwner(),g==null)break}while(!0);return!1},s.prototype.calcLowestCommonAncestors=function(){var a,o,g,r,p,i=this.getAllEdges(),t=i.length;for(var c=0;c<t;c++){if(a=i[c],o=a.source,g=a.target,a.lca=null,a.sourceInLca=o,a.targetInLca=g,o==g){a.lca=o.getOwner();continue}r=o.getOwner();while(a.lca==null){a.targetInLca=g,p=g.getOwner();while(a.lca==null){if(p==r){a.lca=p;break}if(p==this.rootGraph)break;if(a.lca!=null)throw"assert failed";a.targetInLca=p.getParent(),p=a.targetInLca.getOwner()}if(r==this.rootGraph)break;if(a.lca==null)a.sourceInLca=r.getParent(),r=a.sourceInLca.getOwner()}if(a.lca==null)throw"assert failed"}},s.prototype.calcLowestCommonAncestor=function(a,o){if(a==o)return a.getOwner();var g=a.getOwner();do{if(g==null)break;var r=o.getOwner();do{if(r==null)break;if(r==g)return r;r=r.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},s.prototype.calcInclusionTreeDepths=function(a,o){if(a==null&&o==null)a=this.rootGraph,o=1;var g,r=a.getNodes(),p=r.length;for(var i=0;i<p;i++)if(g=r[i],g.inclusionTreeDepth=o,g.child!=null)this.calcInclusionTreeDepths(g.child,o+1)},s.prototype.includesInvalidEdge=function(){var a,o=[],g=this.edges.length;for(var r=0;r<g;r++)if(a=this.edges[r],this.isOneAncestorOfOther(a.source,a.target))o.push(a);for(var r=0;r<o.length;r++)this.remove(o[r]);return!1},C.exports=s},function(C,U,S){var v=S(12);function l(){}l.calcSeparationAmount=function(s,a,o,g){if(!s.intersects(a))throw"assert failed";var r=[,,];if(this.decideDirectionsForOverlappingNodes(s,a,r),o[0]=Math.min(s.getRight(),a.getRight())-Math.max(s.x,a.x),o[1]=Math.min(s.getBottom(),a.getBottom())-Math.max(s.y,a.y),s.getX()<=a.getX()&&s.getRight()>=a.getRight())o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight());else if(a.getX()<=s.getX()&&a.getRight()>=s.getRight())o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight());if(s.getY()<=a.getY()&&s.getBottom()>=a.getBottom())o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom());else if(a.getY()<=s.getY()&&a.getBottom()>=s.getBottom())o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom());var p=Math.abs((a.getCenterY()-s.getCenterY())/(a.getCenterX()-s.getCenterX()));if(a.getCenterY()===s.getCenterY()&&a.getCenterX()===s.getCenterX())p=1;var i=p*o[0],t=o[1]/p;if(o[0]<t)t=o[0];else i=o[1];o[0]=-1*r[0]*(t/2+g),o[1]=-1*r[1]*(i/2+g)},l.decideDirectionsForOverlappingNodes=function(s,a,o){if(s.getCenterX()<a.getCenterX())o[0]=-1;else o[0]=1;if(s.getCenterY()<a.getCenterY())o[1]=-1;else o[1]=1},l.getIntersection2=function(s,a,o){var g=s.getCenterX(),r=s.getCenterY(),p=a.getCenterX(),i=a.getCenterY();if(s.intersects(a))return o[0]=g,o[1]=r,o[2]=p,o[3]=i,!0;var t=s.getX(),c=s.getY(),d=s.getRight(),f=s.getX(),P=s.getBottom(),T=s.getRight(),N=s.getWidthHalf(),b=s.getHeightHalf(),z=a.getX(),G=a.getY(),Z=a.getRight(),rt=a.getX(),_=a.getBottom(),ut=a.getRight(),W=a.getWidthHalf(),it=a.getHeightHalf(),h=!1,w=!1;if(g===p){if(r>i)return o[0]=g,o[1]=c,o[2]=p,o[3]=_,!1;else if(r<i)return o[0]=g,o[1]=P,o[2]=p,o[3]=G,!1}else if(r===i){if(g>p)return o[0]=t,o[1]=r,o[2]=Z,o[3]=i,!1;else if(g<p)return o[0]=d,o[1]=r,o[2]=z,o[3]=i,!1}else{var E=s.height/s.width,x=a.height/a.width,y=(i-r)/(p-g),V=void 0,H=void 0,j=void 0,Q=void 0,B=void 0,ct=void 0;if(-E===y)if(g>p)o[0]=f,o[1]=P,h=!0;else o[0]=d,o[1]=c,h=!0;else if(E===y)if(g>p)o[0]=t,o[1]=c,h=!0;else o[0]=T,o[1]=P,h=!0;if(-x===y)if(p>g)o[2]=rt,o[3]=_,w=!0;else o[2]=Z,o[3]=G,w=!0;else if(x===y)if(p>g)o[2]=z,o[3]=G,w=!0;else o[2]=ut,o[3]=_,w=!0;if(h&&w)return!1;if(g>p)if(r>i)V=this.getCardinalDirection(E,y,4),H=this.getCardinalDirection(x,y,2);else V=this.getCardinalDirection(-E,y,3),H=this.getCardinalDirection(-x,y,1);else if(r>i)V=this.getCardinalDirection(-E,y,1),H=this.getCardinalDirection(-x,y,3);else V=this.getCardinalDirection(E,y,2),H=this.getCardinalDirection(x,y,4);if(!h)switch(V){case 1:Q=c,j=g+-b/y,o[0]=j,o[1]=Q;break;case 2:j=T,Q=r+N*y,o[0]=j,o[1]=Q;break;case 3:Q=P,j=g+b/y,o[0]=j,o[1]=Q;break;case 4:j=f,Q=r+-N*y,o[0]=j,o[1]=Q;break}if(!w)switch(H){case 1:ct=G,B=p+-it/y,o[2]=B,o[3]=ct;break;case 2:B=ut,ct=i+W*y,o[2]=B,o[3]=ct;break;case 3:ct=_,B=p+it/y,o[2]=B,o[3]=ct;break;case 4:B=rt,ct=i+-W*y,o[2]=B,o[3]=ct;break}}return!1},l.getCardinalDirection=function(s,a,o){if(s>a)return o;else return 1+o%4},l.getIntersection=function(s,a,o,g){if(g==null)return this.getIntersection2(s,a,o);var{x:r,y:p}=s,{x:i,y:t}=a,{x:c,y:d}=o,{x:f,y:P}=g,T=void 0,N=void 0,b=void 0,z=void 0,G=void 0,Z=void 0,rt=void 0,_=void 0,ut=void 0;if(b=t-p,G=r-i,rt=i*p-r*t,z=P-d,Z=c-f,_=f*d-c*P,ut=b*Z-z*G,ut===0)return null;return T=(G*_-Z*rt)/ut,N=(z*rt-b*_)/ut,new v(T,N)},l.angleOfVector=function(s,a,o,g){var r=void 0;if(s!==o){if(r=Math.atan((g-a)/(o-s)),o<s)r+=Math.PI;else if(g<a)r+=this.TWO_PI}else if(g<a)r=this.ONE_AND_HALF_PI;else r=this.HALF_PI;return r},l.doIntersect=function(s,a,o,g){var{x:r,y:p}=s,{x:i,y:t}=a,{x:c,y:d}=o,{x:f,y:P}=g,T=(i-r)*(P-d)-(f-c)*(t-p);if(T===0)return!1;else{var N=((P-d)*(f-r)+(c-f)*(P-p))/T,b=((p-t)*(f-r)+(i-r)*(P-p))/T;return 0<N&&N<1&&0<b&&b<1}},l.findCircleLineIntersections=function(s,a,o,g,r,p,i){var t=(o-s)*(o-s)+(g-a)*(g-a),c=2*((s-r)*(o-s)+(a-p)*(g-a)),d=(s-r)*(s-r)+(a-p)*(a-p)-i*i,f=c*c-4*t*d;if(f>=0){var P=(-c+Math.sqrt(c*c-4*t*d))/(2*t),T=(-c-Math.sqrt(c*c-4*t*d))/(2*t),N=null;if(P>=0&&P<=1)return[P];if(T>=0&&T<=1)return[T];return N}else return null},l.HALF_PI=0.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l},function(C,U,S){function v(){}v.sign=function(l){if(l>0)return 1;else if(l<0)return-1;else return 0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v},function(C,U,S){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v},function(C,U,S){var v=function(){function r(p,i){for(var t=0;t<i.length;t++){var c=i[t];if(c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c)c.writable=!0;Object.defineProperty(p,c.key,c)}}return function(p,i,t){if(i)r(p.prototype,i);if(t)r(p,t);return p}}();function l(r,p){if(!(r instanceof p))throw TypeError("Cannot call a class as a function")}var s=function(p){return{value:p,next:null,prev:null}},a=function(p,i,t,c){if(p!==null)p.next=i;else c.head=i;if(t!==null)t.prev=i;else c.tail=i;return i.prev=p,i.next=t,c.length++,i},o=function(p,i){var{prev:t,next:c}=p;if(t!==null)t.next=c;else i.head=c;if(c!==null)c.prev=t;else i.tail=t;return p.prev=p.next=null,i.length--,p},g=function(){function r(p){var i=this;if(l(this,r),this.length=0,this.head=null,this.tail=null,p!=null)p.forEach(function(t){return i.push(t)})}return v(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,t){return a(t.prev,s(i),t,this)}},{key:"insertAfter",value:function(i,t){return a(t,s(i),t.next,this)}},{key:"insertNodeBefore",value:function(i,t){return a(t.prev,i,t,this)}},{key:"insertNodeAfter",value:function(i,t){return a(t,i,t.next,this)}},{key:"push",value:function(i){return a(this.tail,s(i),null,this)}},{key:"unshift",value:function(i){return a(null,s(i),this.head,this)}},{key:"remove",value:function(i){return o(i,this)}},{key:"pop",value:function(){return o(this.tail,this).value}},{key:"popNode",value:function(){return o(this.tail,this)}},{key:"shift",value:function(){return o(this.head,this).value}},{key:"shiftNode",value:function(){return o(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){var t=1,c=this.head;while(t<i)c=c.next,t++;return c.value}}},{key:"set_object_at",value:function(i,t){if(i<=this.length()){var c=1,d=this.head;while(c<i)d=d.next,c++;d.value=t}}}]),r}();C.exports=g},function(C,U,S){function v(l,s,a){if(this.x=null,this.y=null,l==null&&s==null&&a==null)this.x=0,this.y=0;else if(typeof l=="number"&&typeof s=="number"&&a==null)this.x=l,this.y=s;else if(l.constructor.name=="Point"&&s==null&&a==null)a=l,this.x=a.x,this.y=a.y}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(l,s,a){if(l.constructor.name=="Point"&&s==null&&a==null)a=l,this.setLocation(a.x,a.y);else if(typeof l=="number"&&typeof s=="number"&&a==null)if(parseInt(l)==l&&parseInt(s)==s)this.move(l,s);else this.x=Math.floor(l+0.5),this.y=Math.floor(s+0.5)},v.prototype.move=function(l,s){this.x=l,this.y=s},v.prototype.translate=function(l,s){this.x+=l,this.y+=s},v.prototype.equals=function(l){if(l.constructor.name=="Point"){var s=l;return this.x==s.x&&this.y==s.y}return this==l},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v},function(C,U,S){function v(l,s,a,o){if(this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&s!=null&&a!=null&&o!=null)this.x=l,this.y=s,this.width=a,this.height=o}v.prototype.getX=function(){return this.x},v.prototype.setX=function(l){this.x=l},v.prototype.getY=function(){return this.y},v.prototype.setY=function(l){this.y=l},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(l){if(this.getRight()<l.x)return!1;if(this.getBottom()<l.y)return!1;if(l.getRight()<this.x)return!1;if(l.getBottom()<this.y)return!1;return!0},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v},function(C,U,S){var v=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol==="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function l(){}l.lastID=0,l.createID=function(s){if(l.isPrimitive(s))return s;if(s.uniqueID!=null)return s.uniqueID;return s.uniqueID=l.getString(),l.lastID++,s.uniqueID},l.getString=function(s){if(s==null)s=l.lastID;return"Object#"+s},l.isPrimitive=function(s){var a=typeof s>"u"?"undefined":v(s);return s==null||a!="object"&&a!="function"},C.exports=l},function(C,U,S){function v(c){if(Array.isArray(c)){for(var d=0,f=Array(c.length);d<c.length;d++)f[d]=c[d];return f}else return Array.from(c)}var l=S(0),s=S(7),a=S(3),o=S(1),g=S(6),r=S(5),p=S(17),i=S(29);function t(c){if(i.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null)this.isRemoteUse=c}t.RANDOM_SEED=1,t.prototype=Object.create(i.prototype),t.prototype.getGraphManager=function(){return this.graphManager},t.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},t.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},t.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},t.prototype.newGraphManager=function(){var c=new s(this);return this.graphManager=c,c},t.prototype.newGraph=function(c){return new g(null,this.graphManager,c)},t.prototype.newNode=function(c){return new a(this.graphManager,c)},t.prototype.newEdge=function(c){return new o(null,null,c)},t.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},t.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var c;if(this.checkLayoutSuccess())c=!1;else c=this.layout();if(l.ANIMATE==="during")return!1;if(c){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,c},t.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},t.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var c,d=this.graphManager.getAllEdges();for(var f=0;f<d.length;f++)c=d[f];var P,T=this.graphManager.getRoot().getNodes();for(var f=0;f<T.length;f++)P=T[f];this.update(this.graphManager.getRoot())}},t.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof a){var d=c;if(d.getChild()!=null){var f=d.getChild().getNodes();for(var P=0;P<f.length;P++)update(f[P])}if(d.vGraphObject!=null){var T=d.vGraphObject;T.update(d)}}else if(c instanceof o){var N=c;if(N.vGraphObject!=null){var b=N.vGraphObject;b.update(N)}}else if(c instanceof g){var z=c;if(z.vGraphObject!=null){var G=z.vGraphObject;G.update(z)}}},t.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},t.prototype.transform=function(c){if(c==null)this.transform(new r(0,0));else{var d=new p,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){d.setWorldOrgX(c.x),d.setWorldOrgY(c.y),d.setDeviceOrgX(f.x),d.setDeviceOrgY(f.y);var P=this.getAllNodes(),T;for(var N=0;N<P.length;N++)T=P[N],T.transform(d)}}},t.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var d,f,P=c.getNodes();for(var T=0;T<P.length;T++)if(d=P[T],f=d.getChild(),f==null)d.scatter();else if(f.getNodes().length==0)d.scatter();else this.positionNodesRandomly(f),d.updateBounds()}},t.prototype.getFlatForest=function(){var c=[],d=!0,f=this.graphManager.getRoot().getNodes(),P=!0;for(var T=0;T<f.length;T++)if(f[T].getChild()!=null)P=!1;if(!P)return c;var N=new Set,b=[],z=new Map,G=[];G=G.concat(f);while(G.length>0&&d){b.push(G[0]);while(b.length>0&&d){var Z=b[0];b.splice(0,1),N.add(Z);var rt=Z.getEdges();for(var T=0;T<rt.length;T++){var _=rt[T].getOtherEnd(Z);if(z.get(Z)!=_)if(!N.has(_))b.push(_),z.set(_,Z);else{d=!1;break}}}if(!d)c=[];else{var ut=[].concat(v(N));c.push(ut);for(var T=0;T<ut.length;T++){var W=ut[T],it=G.indexOf(W);if(it>-1)G.splice(it,1)}N=new Set,z=new Map}}return c},t.prototype.createDummyNodesForBendpoints=function(c){var d=[],f=c.source,P=this.graphManager.calcLowestCommonAncestor(c.source,c.target);for(var T=0;T<c.bendpoints.length;T++){var N=this.newNode(null);N.setRect(new Point(0,0),new Dimension(1,1)),P.add(N);var b=this.newEdge(null);this.graphManager.add(b,f,N),d.add(N),f=N}var b=this.newEdge(null);if(this.graphManager.add(b,f,c.target),this.edgeToDummyNodes.set(c,d),c.isInterGraph())this.graphManager.remove(c);else P.remove(c);return d},t.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(v(this.edgeToDummyNodes.keys())).concat(c);for(var d=0;d<c.length;d++){var f=c[d];if(f.bendpoints.length>0){var P=this.edgeToDummyNodes.get(f);for(var T=0;T<P.length;T++){var N=P[T],b=new r(N.getCenterX(),N.getCenterY()),z=f.bendpoints.get(T);z.x=b.x,z.y=b.y,N.getOwner().remove(N)}this.graphManager.add(f,f.source,f.target)}}},t.transform=function(c,d,f,P){if(f!=null&&P!=null){var T=d;if(c<=50){var N=d/f;T-=(d-N)/50*(50-c)}else{var b=d*P;T+=(b-d)/50*(c-50)}return T}else{var z,G;if(c<=50)z=9*d/500,G=d/10;else z=9*d/50,G=-8*d;return z*c+G}},t.findCenterOfTree=function(c){var d=[];d=d.concat(c);var f=[],P=new Map,T=!1,N=null;if(d.length==1||d.length==2)T=!0,N=d[0];for(var b=0;b<d.length;b++){var z=d[b],G=z.getNeighborsList().size;if(P.set(z,z.getNeighborsList().size),G==1)f.push(z)}var Z=[];Z=Z.concat(f);while(!T){var rt=[];rt=rt.concat(Z),Z=[];for(var b=0;b<d.length;b++){var z=d[b],_=d.indexOf(z);if(_>=0)d.splice(_,1);var ut=z.getNeighborsList();ut.forEach(function(h){if(f.indexOf(h)<0){var w=P.get(h),E=w-1;if(E==1)Z.push(h);P.set(h,E)}})}if(f=f.concat(Z),d.length==1||d.length==2)T=!0,N=d[0]}return N},t.prototype.setGraphManager=function(c){this.graphManager=c},C.exports=t},function(C,U,S){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v},function(C,U,S){var v=S(5);function l(s,a){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(s){this.lworldExtX=s},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(s){this.lworldExtY=s},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},l.prototype.transformX=function(s){var a=0,o=this.lworldExtX;if(o!=0)a=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/o;return a},l.prototype.transformY=function(s){var a=0,o=this.lworldExtY;if(o!=0)a=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/o;return a},l.prototype.inverseTransformX=function(s){var a=0,o=this.ldeviceExtX;if(o!=0)a=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/o;return a},l.prototype.inverseTransformY=function(s){var a=0,o=this.ldeviceExtY;if(o!=0)a=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/o;return a},l.prototype.inverseTransformPoint=function(s){var a=new v(this.inverseTransformX(s.x),this.inverseTransformY(s.y));return a},C.exports=l},function(C,U,S){function v(i){if(Array.isArray(i)){for(var t=0,c=Array(i.length);t<i.length;t++)c[t]=i[t];return c}else return Array.from(i)}var l=S(15),s=S(4),a=S(0),o=S(8),g=S(9);function r(){l.call(this),this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=s.MAX_ITERATIONS}r.prototype=Object.create(l.prototype);for(var p in l)r[p]=l[p];r.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){var i,t,c,d,f,P,T,N=this.getGraphManager().getAllEdges();for(var b=0;b<N.length;b++)if(i=N[b],t=i.idealLength,i.isInterGraph){if(d=i.getSource(),f=i.getTarget(),P=i.getSourceInLca().getEstimatedSize(),T=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)i.idealLength+=P+T-2*a.SIMPLE_NODE_SIZE;c=i.getLca().getInclusionTreeDepth(),i.idealLength+=t*s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(d.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*c)}},r.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;if(this.incremental){if(i>s.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*s.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-s.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(i>s.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(s.COOLING_ADAPTATION_FACTOR,1-(i-s.ADAPTATION_LOWER_NODE_LIMIT)/(s.ADAPTATION_UPPER_NODE_LIMIT-s.ADAPTATION_LOWER_NODE_LIMIT)*(1-s.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=s.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*s.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){var i=this.getAllEdges(),t;for(var c=0;c<i.length;c++)t=i[c],this.calcSpringForce(t,t.idealLength)},r.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c,d,f,P,T=this.getAllNodes(),N;if(this.useFRGridVariant){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&i)this.updateGrid();N=new Set;for(c=0;c<T.length;c++)f=T[c],this.calculateRepulsionForceOfANode(f,N,i,t),N.add(f)}else for(c=0;c<T.length;c++){f=T[c];for(d=c+1;d<T.length;d++){if(P=T[d],f.getOwner()!=P.getOwner())continue;this.calcRepulsionForce(f,P)}}},r.prototype.calcGravitationalForces=function(){var i,t=this.getAllNodesToApplyGravitation();for(var c=0;c<t.length;c++)i=t[c],this.calcGravitationalForce(i)},r.prototype.moveNodes=function(){var i=this.getAllNodes(),t;for(var c=0;c<i.length;c++)t=i[c],t.move()},r.prototype.calcSpringForce=function(i,t){var c=i.getSource(),d=i.getTarget(),f,P,T,N;if(this.uniformLeafNodeSizes&&c.getChild()==null&&d.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;if(f=i.getLength(),f==0)return;P=i.edgeElasticity*(f-t),T=P*(i.lengthX/f),N=P*(i.lengthY/f),c.springForceX+=T,c.springForceY+=N,d.springForceX-=T,d.springForceY-=N},r.prototype.calcRepulsionForce=function(i,t){var c=i.getRect(),d=t.getRect(),f=[,,],P=[,,,,],T,N,b,z,G,Z,rt;if(c.intersects(d)){o.calcSeparationAmount(c,d,f,s.DEFAULT_EDGE_LENGTH/2),Z=2*f[0],rt=2*f[1];var _=i.noOfChildren*t.noOfChildren/(i.noOfChildren+t.noOfChildren);i.repulsionForceX-=_*Z,i.repulsionForceY-=_*rt,t.repulsionForceX+=_*Z,t.repulsionForceY+=_*rt}else{if(this.uniformLeafNodeSizes&&i.getChild()==null&&t.getChild()==null)T=d.getCenterX()-c.getCenterX(),N=d.getCenterY()-c.getCenterY();else o.getIntersection(c,d,P),T=P[2]-P[0],N=P[3]-P[1];if(Math.abs(T)<s.MIN_REPULSION_DIST)T=g.sign(T)*s.MIN_REPULSION_DIST;if(Math.abs(N)<s.MIN_REPULSION_DIST)N=g.sign(N)*s.MIN_REPULSION_DIST;b=T*T+N*N,z=Math.sqrt(b),G=(i.nodeRepulsion/2+t.nodeRepulsion/2)*i.noOfChildren*t.noOfChildren/b,Z=G*T/z,rt=G*N/z,i.repulsionForceX-=Z,i.repulsionForceY-=rt,t.repulsionForceX+=Z,t.repulsionForceY+=rt}},r.prototype.calcGravitationalForce=function(i){var t,c,d,f,P,T,N,b;if(t=i.getOwner(),c=(t.getRight()+t.getLeft())/2,d=(t.getTop()+t.getBottom())/2,f=i.getCenterX()-c,P=i.getCenterY()-d,T=Math.abs(f)+i.getWidth()/2,N=Math.abs(P)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()){if(b=t.getEstimatedSize()*this.gravityRangeFactor,T>b||N>b)i.gravitationForceX=-this.gravityConstant*f,i.gravitationForceY=-this.gravityConstant*P}else if(b=t.getEstimatedSize()*this.compoundGravityRangeFactor,T>b||N>b)i.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*P*this.compoundGravityConstant},r.prototype.isConverged=function(){var i,t=!1;if(this.totalIterations>this.maxIterations/3)t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||t},r.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},r.prototype.calcNoOfChildrenForAllNodes=function(){var i,t=this.graphManager.getAllNodes();for(var c=0;c<t.length;c++)i=t[c],i.noOfChildren=i.getNoOfChildren()},r.prototype.calcGrid=function(i){var t=0,c=0;t=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),c=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));var d=Array(t);for(var f=0;f<t;f++)d[f]=Array(c);for(var f=0;f<t;f++)for(var P=0;P<c;P++)d[f][P]=[];return d},r.prototype.addNodeToGrid=function(i,t,c){var d=0,f=0,P=0,T=0;d=parseInt(Math.floor((i.getRect().x-t)/this.repulsionRange)),f=parseInt(Math.floor((i.getRect().width+i.getRect().x-t)/this.repulsionRange)),P=parseInt(Math.floor((i.getRect().y-c)/this.repulsionRange)),T=parseInt(Math.floor((i.getRect().height+i.getRect().y-c)/this.repulsionRange));for(var N=d;N<=f;N++)for(var b=P;b<=T;b++)this.grid[N][b].push(i),i.setGridCoordinates(d,f,P,T)},r.prototype.updateGrid=function(){var i,t,c=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(i=0;i<c.length;i++)t=c[i],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(i,t,c,d){if(this.totalIterations%s.GRID_CALCULATION_CHECK_PERIOD==1&&c||d){var f=new Set;i.surrounding=[];var P,T=this.grid;for(var N=i.startX-1;N<i.finishX+2;N++)for(var b=i.startY-1;b<i.finishY+2;b++)if(!(N<0||b<0||N>=T.length||b>=T[0].length))for(var z=0;z<T[N][b].length;z++){if(P=T[N][b][z],i.getOwner()!=P.getOwner()||i==P)continue;if(!t.has(P)&&!f.has(P)){var G=Math.abs(i.getCenterX()-P.getCenterX())-(i.getWidth()/2+P.getWidth()/2),Z=Math.abs(i.getCenterY()-P.getCenterY())-(i.getHeight()/2+P.getHeight()/2);if(G<=this.repulsionRange&&Z<=this.repulsionRange)f.add(P)}}i.surrounding=[].concat(v(f))}for(N=0;N<i.surrounding.length;N++)this.calcRepulsionForce(i,i.surrounding[N])},r.prototype.calcRepulsionRange=function(){return 0},C.exports=r},function(C,U,S){var v=S(1),l=S(4);function s(o,g,r){v.call(this,o,g,r),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}s.prototype=Object.create(v.prototype);for(var a in v)s[a]=v[a];C.exports=s},function(C,U,S){var v=S(3),l=S(4);function s(o,g,r,p){v.call(this,o,g,r,p),this.nodeRepulsion=l.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=[]}s.prototype=Object.create(v.prototype);for(var a in v)s[a]=v[a];s.prototype.setGridCoordinates=function(o,g,r,p){this.startX=o,this.finishX=g,this.startY=r,this.finishY=p},C.exports=s},function(C,U,S){function v(l,s){if(this.width=0,this.height=0,l!==null&&s!==null)this.height=s,this.width=l}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},C.exports=v},function(C,U,S){var v=S(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(s,a){var o=v.createID(s);if(!this.contains(o))this.map[o]=a,this.keys.push(s)},l.prototype.contains=function(s){var a=v.createID(s);return this.map[s]!=null},l.prototype.get=function(s){var a=v.createID(s);return this.map[a]},l.prototype.keySet=function(){return this.keys},C.exports=l},function(C,U,S){var v=S(14);function l(){this.set={}}l.prototype.add=function(s){var a=v.createID(s);if(!this.contains(a))this.set[a]=s},l.prototype.remove=function(s){delete this.set[v.createID(s)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(s){return this.set[v.createID(s)]==s},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(s){var a=Object.keys(this.set),o=a.length;for(var g=0;g<o;g++)s.push(this.set[a[g]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(s){var a=s.length;for(var o=0;o<a;o++){var g=s[o];this.add(g)}},C.exports=l},function(C,U,S){function v(){}v.multMat=function(l,s){var a=[];for(var o=0;o<l.length;o++){a[o]=[];for(var g=0;g<s[0].length;g++){a[o][g]=0;for(var r=0;r<l[0].length;r++)a[o][g]+=l[o][r]*s[r][g]}}return a},v.transpose=function(l){var s=[];for(var a=0;a<l[0].length;a++){s[a]=[];for(var o=0;o<l.length;o++)s[a][o]=l[o][a]}return s},v.multCons=function(l,s){var a=[];for(var o=0;o<l.length;o++)a[o]=l[o]*s;return a},v.minusOp=function(l,s){var a=[];for(var o=0;o<l.length;o++)a[o]=l[o]-s[o];return a},v.dotProduct=function(l,s){var a=0;for(var o=0;o<l.length;o++)a+=l[o]*s[o];return a},v.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},v.normalize=function(l){var s=[],a=this.mag(l);for(var o=0;o<l.length;o++)s[o]=l[o]/a;return s},v.multGamma=function(l){var s=[],a=0;for(var o=0;o<l.length;o++)a+=l[o];a*=-1/l.length;for(var g=0;g<l.length;g++)s[g]=a+l[g];return s},v.multL=function(l,s,a){var o=[],g=[],r=[];for(var p=0;p<s[0].length;p++){var i=0;for(var t=0;t<s.length;t++)i+=-0.5*s[t][p]*l[t];g[p]=i}for(var c=0;c<a.length;c++){var d=0;for(var f=0;f<a.length;f++)d+=a[c][f]*g[f];r[c]=d}for(var P=0;P<s.length;P++){var T=0;for(var N=0;N<s[0].length;N++)T+=s[P][N]*r[N];o[P]=T}return o},C.exports=v},function(C,U,S){var v=function(){function o(g,r){for(var p=0;p<r.length;p++){var i=r[p];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(g,i.key,i)}}return function(g,r,p){if(r)o(g.prototype,r);if(p)o(g,p);return g}}();function l(o,g){if(!(o instanceof g))throw TypeError("Cannot call a class as a function")}var s=S(11),a=function(){function o(g,r){if(l(this,o),r!==null||r!==void 0)this.compareFunction=this._defaultCompareFunction;var p=void 0;if(g instanceof s)p=g.size();else p=g.length;this._quicksort(g,0,p-1)}return v(o,[{key:"_quicksort",value:function(r,p,i){if(p<i){var t=this._partition(r,p,i);this._quicksort(r,p,t),this._quicksort(r,t+1,i)}}},{key:"_partition",value:function(r,p,i){var t=this._get(r,p),c=p,d=i;while(!0){while(this.compareFunction(t,this._get(r,d)))d--;while(this.compareFunction(this._get(r,c),t))c++;if(c<d)this._swap(r,c,d),c++,d--;else return d}}},{key:"_get",value:function(r,p){if(r instanceof s)return r.get_object_at(p);else return r[p]}},{key:"_set",value:function(r,p,i){if(r instanceof s)r.set_object_at(p,i);else r[p]=i}},{key:"_swap",value:function(r,p,i){var t=this._get(r,p);this._set(r,p,this._get(r,i)),this._set(r,i,t)}},{key:"_defaultCompareFunction",value:function(r,p){return p>r}}]),o}();C.exports=a},function(C,U,S){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var s=Math.min(this.m,this.n);this.s=function(kt){var Ht=[];while(kt-- >0)Ht.push(0);return Ht}(Math.min(this.m+1,this.n)),this.U=function(kt){var Ht=function ge(Jt){if(Jt.length==0)return 0;else{var ae=[];for(var fe=0;fe<Jt[0];fe++)ae.push(ge(Jt.slice(1)));return ae}};return Ht(kt)}([this.m,s]),this.V=function(kt){var Ht=function ge(Jt){if(Jt.length==0)return 0;else{var ae=[];for(var fe=0;fe<Jt[0];fe++)ae.push(ge(Jt.slice(1)));return ae}};return Ht(kt)}([this.n,this.n]);var a=function(kt){var Ht=[];while(kt-- >0)Ht.push(0);return Ht}(this.n),o=function(kt){var Ht=[];while(kt-- >0)Ht.push(0);return Ht}(this.m),g=!0,r=!0,p=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m));for(var t=0;t<Math.max(p,i);t++){if(t<p){this.s[t]=0;for(var c=t;c<this.m;c++)this.s[t]=v.hypot(this.s[t],l[c][t]);if(this.s[t]!==0){if(l[t][t]<0)this.s[t]=-this.s[t];for(var d=t;d<this.m;d++)l[d][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var f=t+1;f<this.n;f++){if(function(kt,Ht){return kt&&Ht}(t<p,this.s[t]!==0)){var P=0;for(var T=t;T<this.m;T++)P+=l[T][t]*l[T][f];P=-P/l[t][t];for(var N=t;N<this.m;N++)l[N][f]+=P*l[N][t]}a[f]=l[t][f]}if(function(kt,Ht){return kt&&Ht}(g,t<p))for(var b=t;b<this.m;b++)this.U[b][t]=l[b][t];if(t<i){a[t]=0;for(var z=t+1;z<this.n;z++)a[t]=v.hypot(a[t],a[z]);if(a[t]!==0){if(a[t+1]<0)a[t]=-a[t];for(var G=t+1;G<this.n;G++)a[G]/=a[t];a[t+1]+=1}if(a[t]=-a[t],function(kt,Ht){return kt&&Ht}(t+1<this.m,a[t]!==0)){for(var Z=t+1;Z<this.m;Z++)o[Z]=0;for(var rt=t+1;rt<this.n;rt++)for(var _=t+1;_<this.m;_++)o[_]+=a[rt]*l[_][rt];for(var ut=t+1;ut<this.n;ut++){var W=-a[ut]/a[t+1];for(var it=t+1;it<this.m;it++)l[it][ut]+=W*o[it]}}if(r)for(var h=t+1;h<this.n;h++)this.V[h][t]=a[h]}}var w=Math.min(this.n,this.m+1);if(p<this.n)this.s[p]=l[p][p];if(this.m<w)this.s[w-1]=0;if(i+1<w)a[i]=l[i][w-1];if(a[w-1]=0,g){for(var E=p;E<s;E++){for(var x=0;x<this.m;x++)this.U[x][E]=0;this.U[E][E]=1}for(var y=p-1;y>=0;y--)if(this.s[y]!==0){for(var V=y+1;V<s;V++){var H=0;for(var j=y;j<this.m;j++)H+=this.U[j][y]*this.U[j][V];H=-H/this.U[y][y];for(var Q=y;Q<this.m;Q++)this.U[Q][V]+=H*this.U[Q][y]}for(var B=y;B<this.m;B++)this.U[B][y]=-this.U[B][y];this.U[y][y]=1+this.U[y][y];for(var ct=0;ct<y-1;ct++)this.U[ct][y]=0}else{for(var mt=0;mt<this.m;mt++)this.U[mt][y]=0;this.U[y][y]=1}}if(r)for(var J=this.n-1;J>=0;J--){if(function(kt,Ht){return kt&&Ht}(J<i,a[J]!==0))for(var yt=J+1;yt<s;yt++){var ht=0;for(var X=J+1;X<this.n;X++)ht+=this.V[X][J]*this.V[X][yt];ht=-ht/this.V[J+1][J];for(var et=J+1;et<this.n;et++)this.V[et][yt]+=ht*this.V[et][J]}for(var at=0;at<this.n;at++)this.V[at][J]=0;this.V[J][J]=1}var vt=w-1,Dt=0,Wt=Math.pow(2,-52),Kt=Math.pow(2,-966);while(w>0){var dt=void 0,ie=void 0;for(dt=w-2;dt>=-1;dt--){if(dt===-1)break;if(Math.abs(a[dt])<=Kt+Wt*(Math.abs(this.s[dt])+Math.abs(this.s[dt+1]))){a[dt]=0;break}}if(dt===w-2)ie=4;else{var Bt=void 0;for(Bt=w-1;Bt>=dt;Bt--){if(Bt===dt)break;var Ct=(Bt!==w?Math.abs(a[Bt]):0)+(Bt!==dt+1?Math.abs(a[Bt-1]):0);if(Math.abs(this.s[Bt])<=Kt+Wt*Ct){this.s[Bt]=0;break}}if(Bt===dt)ie=3;else if(Bt===w-1)ie=1;else ie=2,dt=Bt}switch(dt++,ie){case 1:{var Et=a[w-2];a[w-2]=0;for(var Pt=w-2;Pt>=dt;Pt--){var Ut=v.hypot(this.s[Pt],Et),Vt=this.s[Pt]/Ut,Yt=Et/Ut;if(this.s[Pt]=Ut,Pt!==dt)Et=-Yt*a[Pt-1],a[Pt-1]=Vt*a[Pt-1];if(r)for(var Xt=0;Xt<this.n;Xt++)Ut=Vt*this.V[Xt][Pt]+Yt*this.V[Xt][w-1],this.V[Xt][w-1]=-Yt*this.V[Xt][Pt]+Vt*this.V[Xt][w-1],this.V[Xt][Pt]=Ut}}break;case 2:{var Zt=a[dt-1];a[dt-1]=0;for(var Qt=dt;Qt<w;Qt++){var he=v.hypot(this.s[Qt],Zt),te=this.s[Qt]/he,ne=Zt/he;if(this.s[Qt]=he,Zt=-ne*a[Qt],a[Qt]=te*a[Qt],g)for(var _t=0;_t<this.m;_t++)he=te*this.U[_t][Qt]+ne*this.U[_t][dt-1],this.U[_t][dt-1]=-ne*this.U[_t][Qt]+te*this.U[_t][dt-1],this.U[_t][Qt]=he}}break;case 3:{var tt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[w-1]),Math.abs(this.s[w-2])),Math.abs(a[w-2])),Math.abs(this.s[dt])),Math.abs(a[dt])),ot=this.s[w-1]/tt,st=this.s[w-2]/tt,lt=a[w-2]/tt,ft=this.s[dt]/tt,pt=a[dt]/tt,St=((st+ot)*(st-ot)+lt*lt)/2,It=ot*lt*(ot*lt),gt=0;if(function(kt,Ht){return kt||Ht}(St!==0,It!==0)){if(gt=Math.sqrt(St*St+It),St<0)gt=-gt;gt=It/(St+gt)}var Ot=(ft+ot)*(ft-ot)+gt,Rt=ft*pt;for(var Nt=dt;Nt<w-1;Nt++){var bt=v.hypot(Ot,Rt),zt=Ot/bt,At=Rt/bt;if(Nt!==dt)a[Nt-1]=bt;if(Ot=zt*this.s[Nt]+At*a[Nt],a[Nt]=zt*a[Nt]-At*this.s[Nt],Rt=At*this.s[Nt+1],this.s[Nt+1]=zt*this.s[Nt+1],r)for(var Lt=0;Lt<this.n;Lt++)bt=zt*this.V[Lt][Nt]+At*this.V[Lt][Nt+1],this.V[Lt][Nt+1]=-At*this.V[Lt][Nt]+zt*this.V[Lt][Nt+1],this.V[Lt][Nt]=bt;if(bt=v.hypot(Ot,Rt),zt=Ot/bt,At=Rt/bt,this.s[Nt]=bt,Ot=zt*a[Nt]+At*this.s[Nt+1],this.s[Nt+1]=-At*a[Nt]+zt*this.s[Nt+1],Rt=At*a[Nt+1],a[Nt+1]=zt*a[Nt+1],g&&Nt<this.m-1)for(var Ft=0;Ft<this.m;Ft++)bt=zt*this.U[Ft][Nt]+At*this.U[Ft][Nt+1],this.U[Ft][Nt+1]=-At*this.U[Ft][Nt]+zt*this.U[Ft][Nt+1],this.U[Ft][Nt]=bt}a[w-2]=Ot,Dt=Dt+1}break;case 4:{if(this.s[dt]<=0){if(this.s[dt]=this.s[dt]<0?-this.s[dt]:0,r)for(var Mt=0;Mt<=vt;Mt++)this.V[Mt][dt]=-this.V[Mt][dt]}while(dt<vt){if(this.s[dt]>=this.s[dt+1])break;var xt=this.s[dt];if(this.s[dt]=this.s[dt+1],this.s[dt+1]=xt,r&&dt<this.n-1)for(var jt=0;jt<this.n;jt++)xt=this.V[jt][dt+1],this.V[jt][dt+1]=this.V[jt][dt],this.V[jt][dt]=xt;if(g&&dt<this.m-1)for(var qt=0;qt<this.m;qt++)xt=this.U[qt][dt+1],this.U[qt][dt+1]=this.U[qt][dt],this.U[qt][dt]=xt;dt++}Dt=0,w--}break}}var le={U:this.U,V:this.V,S:this.s};return le},v.hypot=function(l,s){var a=void 0;if(Math.abs(l)>Math.abs(s))a=s/l,a=Math.abs(l)*Math.sqrt(1+a*a);else if(s!=0)a=l/s,a=Math.abs(s)*Math.sqrt(1+a*a);else a=0;return a},C.exports=v},function(C,U,S){var v=function(){function a(o,g){for(var r=0;r<g.length;r++){var p=g[r];if(p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p)p.writable=!0;Object.defineProperty(o,p.key,p)}}return function(o,g,r){if(g)a(o.prototype,g);if(r)a(o,r);return o}}();function l(a,o){if(!(a instanceof o))throw TypeError("Cannot call a class as a function")}var s=function(){function a(o,g){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,a),this.sequence1=o,this.sequence2=g,this.match_score=r,this.mismatch_penalty=p,this.gap_penalty=i,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=Array(this.iMax);for(var t=0;t<this.iMax;t++){this.grid[t]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[t][c]=0}this.tracebackGrid=Array(this.iMax);for(var d=0;d<this.iMax;d++){this.tracebackGrid[d]=Array(this.jMax);for(var f=0;f<this.jMax;f++)this.tracebackGrid[d][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var p=1;p<this.iMax;p++)for(var i=1;i<this.jMax;i++){var t=void 0;if(this.sequence1[p-1]===this.sequence2[i-1])t=this.grid[p-1][i-1]+this.match_score;else t=this.grid[p-1][i-1]+this.mismatch_penalty;var c=this.grid[p-1][i]+this.gap_penalty,d=this.grid[p][i-1]+this.gap_penalty,f=[t,c,d],P=this.arrayAllMaxIndexes(f);this.grid[p][i]=f[P[0]],this.tracebackGrid[p][i]=[P.includes(0),P.includes(1),P.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(g[0]){var r=g[0],p=this.tracebackGrid[r.pos[0]][r.pos[1]];if(p[0])g.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(p[1])g.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2});if(p[2])g.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(r.pos[0]===0&&r.pos[1]===0)this.alignments.push({sequence1:r.seq1,sequence2:r.seq2});g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,r){var p=[],i=-1;while((i=g.indexOf(r,i+1))!==-1)p.push(i);return p}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),a}();C.exports=s},function(C,U,S){var v=function(){return};v.FDLayout=S(18),v.FDLayoutConstants=S(4),v.FDLayoutEdge=S(19),v.FDLayoutNode=S(20),v.DimensionD=S(21),v.HashMap=S(22),v.HashSet=S(23),v.IGeometry=S(8),v.IMath=S(9),v.Integer=S(10),v.Point=S(12),v.PointD=S(5),v.RandomSeed=S(16),v.RectangleD=S(13),v.Transform=S(17),v.UniqueIDGeneretor=S(14),v.Quicksort=S(25),v.LinkedList=S(11),v.LGraphObject=S(2),v.LGraph=S(6),v.LEdge=S(1),v.LGraphManager=S(7),v.LNode=S(3),v.Layout=S(15),v.LayoutConstants=S(0),v.NeedlemanWunsch=S(27),v.Matrix=S(24),v.SVD=S(26),C.exports=v},function(C,U,S){function v(){this.listeners=[]}var l=v.prototype;l.addListener=function(s,a){this.listeners.push({event:s,callback:a})},l.removeListener=function(s,a){for(var o=this.listeners.length;o>=0;o--){var g=this.listeners[o];if(g.event===s&&g.callback===a)this.listeners.splice(o,1)}},l.emit=function(s,a){for(var o=0;o<this.listeners.length;o++){var g=this.listeners[o];if(s===g.event)g.callback(a)}},C.exports=v}])})});var Ye=Ke(function(Me,Ue){(function(U,S){if(typeof Me==="object"&&typeof Ue==="object")Ue.exports=S(Ge());else if(typeof define==="function"&&define.amd)define(["layout-base"],S);else if(typeof Me==="object")Me.coseBase=S(Ge());else U.coseBase=S(U.layoutBase)})(Me,function(C){return(()=>{var U={45:(s,a,o)=>{var g={};g.layoutBase=o(551),g.CoSEConstants=o(806),g.CoSEEdge=o(767),g.CoSEGraph=o(880),g.CoSEGraphManager=o(578),g.CoSELayout=o(765),g.CoSENode=o(991),g.ConstraintHandler=o(902),s.exports=g},806:(s,a,o)=>{var g=o(551).FDLayoutConstants;function r(){}for(var p in g)r[p]=g[p];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,s.exports=r},767:(s,a,o)=>{var g=o(551).FDLayoutEdge;function r(i,t,c){g.call(this,i,t,c)}r.prototype=Object.create(g.prototype);for(var p in g)r[p]=g[p];s.exports=r},880:(s,a,o)=>{var g=o(551).LGraph;function r(i,t,c){g.call(this,i,t,c)}r.prototype=Object.create(g.prototype);for(var p in g)r[p]=g[p];s.exports=r},578:(s,a,o)=>{var g=o(551).LGraphManager;function r(i){g.call(this,i)}r.prototype=Object.create(g.prototype);for(var p in g)r[p]=g[p];s.exports=r},765:(s,a,o)=>{var g=o(551).FDLayout,r=o(578),p=o(880),i=o(991),t=o(767),c=o(806),d=o(902),f=o(551).FDLayoutConstants,P=o(551).LayoutConstants,T=o(551).Point,N=o(551).PointD,b=o(551).DimensionD,z=o(551).Layout,G=o(551).Integer,Z=o(551).IGeometry,rt=o(551).LGraph,_=o(551).Transform,ut=o(551).LinkedList;function W(){g.call(this),this.toBeTiled={},this.constraints={}}W.prototype=Object.create(g.prototype);for(var it in g)W[it]=g[it];W.prototype.newGraphManager=function(){var h=new r(this);return this.graphManager=h,h},W.prototype.newGraph=function(h){return new p(null,this.graphManager,h)},W.prototype.newNode=function(h){return new i(this.graphManager,h)},W.prototype.newEdge=function(h){return new t(null,null,h)},W.prototype.initParameters=function(){if(g.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(c.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1}},W.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=0.04,this.coolingAdjuster=1},W.prototype.layout=function(){var h=P.DEFAULT_CREATE_BENDS_AS_NEEDED;if(h)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},W.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){var h=this.getFlatForest();if(h.length>0)this.positionNodesRadially(h);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(x){return w.has(x)});this.graphManager.setAllNodesToApplyGravitation(E),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(V){return w.has(V)});this.graphManager.setAllNodesToApplyGravitation(E)}if(Object.keys(this.constraints).length>0)d.handleConstraints(this),this.initConstraintVariables();if(this.initSpringEmbedder(),c.APPLY_LAYOUT)this.runSpringEmbedder();return!0},W.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%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(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 h=new Set(this.getAllNodes()),w=this.nodesWithGravity.filter(function(y){return h.has(y)});if(this.graphManager.setAllNodesToApplyGravitation(w),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2;else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();if(c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100);else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var E=!this.isTreeGrowing&&!this.isGrowthFinished,x=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(E,x),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},W.prototype.getPositionsData=function(){var h=this.graphManager.getAllNodes(),w={};for(var E=0;E<h.length;E++){var x=h[E].rect,y=h[E].id;w[y]={id:y,x:x.getCenterX(),y:x.getCenterY(),w:x.width,h:x.height}}return w},W.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{while(!h)h=this.tick();this.graphManager.updateBounds()}},W.prototype.moveNodes=function(){var h=this.getAllNodes(),w;for(var E=0;E<h.length;E++)w=h[E],w.calculateDisplacement();if(Object.keys(this.constraints).length>0)this.updateDisplacements();for(var E=0;E<h.length;E++)w=h[E],w.move()},W.prototype.initConstraintVariables=function(){var h=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;var w=this.graphManager.getAllNodes();for(var E=0;E<w.length;E++){var x=w[E];this.idToNodeMap.set(x.id,x)}var y=function X(et){var at=et.getChild().getNodes(),vt,Dt=0;for(var Wt=0;Wt<at.length;Wt++)if(vt=at[Wt],vt.getChild()==null){if(h.fixedNodeSet.has(vt.id))Dt+=100}else Dt+=X(vt);return Dt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(at){h.fixedNodeSet.add(at.nodeId)});var w=this.graphManager.getAllNodes(),x;for(var E=0;E<w.length;E++)if(x=w[E],x.getChild()!=null){var V=y(x);if(V>0)x.fixedNodeWeight=V}}if(this.constraints.relativePlacementConstraint){var H=new Map,j=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(X){h.fixedNodesOnHorizontal.add(X),h.fixedNodesOnVertical.add(X)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var Q=this.constraints.alignmentConstraint.vertical;for(var E=0;E<Q.length;E++)this.dummyToNodeForVerticalAlignment.set("dummy"+E,[]),Q[E].forEach(function(et){if(H.set(et,"dummy"+E),h.dummyToNodeForVerticalAlignment.get("dummy"+E).push(et),h.fixedNodeSet.has(et))h.fixedNodesOnHorizontal.add("dummy"+E)})}if(this.constraints.alignmentConstraint.horizontal){var B=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<B.length;E++)this.dummyToNodeForHorizontalAlignment.set("dummy"+E,[]),B[E].forEach(function(et){if(j.set(et,"dummy"+E),h.dummyToNodeForHorizontalAlignment.get("dummy"+E).push(et),h.fixedNodeSet.has(et))h.fixedNodesOnVertical.add("dummy"+E)})}}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(X){var et,at,vt;for(vt=X.length-1;vt>=2*X.length/3;vt--)et=Math.floor(Math.random()*(vt+1)),at=X[vt],X[vt]=X[et],X[et]=at;return X},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(X){if(X.left){var et=H.has(X.left)?H.get(X.left):X.left,at=H.has(X.right)?H.get(X.right):X.right;if(!h.nodesInRelativeHorizontal.includes(et))if(h.nodesInRelativeHorizontal.push(et),h.nodeToRelativeConstraintMapHorizontal.set(et,[]),h.dummyToNodeForVerticalAlignment.has(et))h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX());else h.nodeToTempPositionMapHorizontal.set(et,h.idToNodeMap.get(et).getCenterX());if(!h.nodesInRelativeHorizontal.includes(at))if(h.nodesInRelativeHorizontal.push(at),h.nodeToRelativeConstraintMapHorizontal.set(at,[]),h.dummyToNodeForVerticalAlignment.has(at))h.nodeToTempPositionMapHorizontal.set(at,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(at)[0]).getCenterX());else h.nodeToTempPositionMapHorizontal.set(at,h.idToNodeMap.get(at).getCenterX());h.nodeToRelativeConstraintMapHorizontal.get(et).push({right:at,gap:X.gap}),h.nodeToRelativeConstraintMapHorizontal.get(at).push({left:et,gap:X.gap})}else{var vt=j.has(X.top)?j.get(X.top):X.top,Dt=j.has(X.bottom)?j.get(X.bottom):X.bottom;if(!h.nodesInRelativeVertical.includes(vt))if(h.nodesInRelativeVertical.push(vt),h.nodeToRelativeConstraintMapVertical.set(vt,[]),h.dummyToNodeForHorizontalAlignment.has(vt))h.nodeToTempPositionMapVertical.set(vt,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(vt)[0]).getCenterY());else h.nodeToTempPositionMapVertical.set(vt,h.idToNodeMap.get(vt).getCenterY());if(!h.nodesInRelativeVertical.includes(Dt))if(h.nodesInRelativeVertical.push(Dt),h.nodeToRelativeConstraintMapVertical.set(Dt,[]),h.dummyToNodeForHorizontalAlignment.has(Dt))h.nodeToTempPositionMapVertical.set(Dt,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(Dt)[0]).getCenterY());else h.nodeToTempPositionMapVertical.set(Dt,h.idToNodeMap.get(Dt).getCenterY());h.nodeToRelativeConstraintMapVertical.get(vt).push({bottom:Dt,gap:X.gap}),h.nodeToRelativeConstraintMapVertical.get(Dt).push({top:vt,gap:X.gap})}});else{var ct=new Map,mt=new Map;this.constraints.relativePlacementConstraint.forEach(function(X){if(X.left){var et=H.has(X.left)?H.get(X.left):X.left,at=H.has(X.right)?H.get(X.right):X.right;if(ct.has(et))ct.get(et).push(at);else ct.set(et,[at]);if(ct.has(at))ct.get(at).push(et);else ct.set(at,[et])}else{var vt=j.has(X.top)?j.get(X.top):X.top,Dt=j.has(X.bottom)?j.get(X.bottom):X.bottom;if(mt.has(vt))mt.get(vt).push(Dt);else mt.set(vt,[Dt]);if(mt.has(Dt))mt.get(Dt).push(vt);else mt.set(Dt,[vt])}});var J=function(et,at){var vt=[],Dt=[],Wt=new ut,Kt=new Set,dt=0;return et.forEach(function(ie,Bt){if(!Kt.has(Bt)){vt[dt]=[],Dt[dt]=!1;var Ct=Bt;Wt.push(Ct),Kt.add(Ct),vt[dt].push(Ct);while(Wt.length!=0){if(Ct=Wt.shift(),at.has(Ct))Dt[dt]=!0;var Et=et.get(Ct);Et.forEach(function(Pt){if(!Kt.has(Pt))Wt.push(Pt),Kt.add(Pt),vt[dt].push(Pt)})}dt++}}),{components:vt,isFixed:Dt}},yt=J(ct,h.fixedNodesOnHorizontal);this.componentsOnHorizontal=yt.components,this.fixedComponentsOnHorizontal=yt.isFixed;var ht=J(mt,h.fixedNodesOnVertical);this.componentsOnVertical=ht.components,this.fixedComponentsOnVertical=ht.isFixed}}},W.prototype.updateDisplacements=function(){var h=this;if(this.constraints.fixedNodeConstraint)this.constraints.fixedNodeConstraint.forEach(function(ht){var X=h.idToNodeMap.get(ht.nodeId);X.displacementX=0,X.displacementY=0});if(this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var w=this.constraints.alignmentConstraint.vertical;for(var E=0;E<w.length;E++){var x=0;for(var y=0;y<w[E].length;y++){if(this.fixedNodeSet.has(w[E][y])){x=0;break}x+=this.idToNodeMap.get(w[E][y]).displacementX}var V=x/w[E].length;for(var y=0;y<w[E].length;y++)this.idToNodeMap.get(w[E][y]).displacementX=V}}if(this.constraints.alignmentConstraint.horizontal){var H=this.constraints.alignmentConstraint.horizontal;for(var E=0;E<H.length;E++){var j=0;for(var y=0;y<H[E].length;y++){if(this.fixedNodeSet.has(H[E][y])){j=0;break}j+=this.idToNodeMap.get(H[E][y]).displacementY}var Q=j/H[E].length;for(var y=0;y<H[E].length;y++)this.idToNodeMap.get(H[E][y]).displacementY=Q}}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS){if(this.totalIterations%10==0)this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical);this.nodesInRelativeHorizontal.forEach(function(ht){if(!h.fixedNodesOnHorizontal.has(ht)){var X=0;if(h.dummyToNodeForVerticalAlignment.has(ht))X=h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(ht)[0]).displacementX;else X=h.idToNodeMap.get(ht).displacementX;if(h.nodeToRelativeConstraintMapHorizontal.get(ht).forEach(function(et){if(et.right){var at=h.nodeToTempPositionMapHorizontal.get(et.right)-h.nodeToTempPositionMapHorizontal.get(ht)-X;if(at<et.gap)X-=et.gap-at}else{var at=h.nodeToTempPositionMapHorizontal.get(ht)-h.nodeToTempPositionMapHorizontal.get(et.left)+X;if(at<et.gap)X+=et.gap-at}}),h.nodeToTempPositionMapHorizontal.set(ht,h.nodeToTempPositionMapHorizontal.get(ht)+X),h.dummyToNodeForVerticalAlignment.has(ht))h.dummyToNodeForVerticalAlignment.get(ht).forEach(function(et){h.idToNodeMap.get(et).displacementX=X});else h.idToNodeMap.get(ht).displacementX=X}}),this.nodesInRelativeVertical.forEach(function(ht){if(!h.fixedNodesOnHorizontal.has(ht)){var X=0;if(h.dummyToNodeForHorizontalAlignment.has(ht))X=h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(ht)[0]).displacementY;else X=h.idToNodeMap.get(ht).displacementY;if(h.nodeToRelativeConstraintMapVertical.get(ht).forEach(function(et){if(et.bottom){var at=h.nodeToTempPositionMapVertical.get(et.bottom)-h.nodeToTempPositionMapVertical.get(ht)-X;if(at<et.gap)X-=et.gap-at}else{var at=h.nodeToTempPositionMapVertical.get(ht)-h.nodeToTempPositionMapVertical.get(et.top)+X;if(at<et.gap)X+=et.gap-at}}),h.nodeToTempPositionMapVertical.set(ht,h.nodeToTempPositionMapVertical.get(ht)+X),h.dummyToNodeForHorizontalAlignment.has(ht))h.dummyToNodeForHorizontalAlignment.get(ht).forEach(function(et){h.idToNodeMap.get(et).displacementY=X});else h.idToNodeMap.get(ht).displacementY=X}})}else{for(var E=0;E<this.componentsOnHorizontal.length;E++){var B=this.componentsOnHorizontal[E];if(this.fixedComponentsOnHorizontal[E])for(var y=0;y<B.length;y++)if(this.dummyToNodeForVerticalAlignment.has(B[y]))this.dummyToNodeForVerticalAlignment.get(B[y]).forEach(function(et){h.idToNodeMap.get(et).displacementX=0});else this.idToNodeMap.get(B[y]).displacementX=0;else{var ct=0,mt=0;for(var y=0;y<B.length;y++)if(this.dummyToNodeForVerticalAlignment.has(B[y])){var J=this.dummyToNodeForVerticalAlignment.get(B[y]);ct+=J.length*this.idToNodeMap.get(J[0]).displacementX,mt+=J.length}else ct+=this.idToNodeMap.get(B[y]).displacementX,mt++;var yt=ct/mt;for(var y=0;y<B.length;y++)if(this.dummyToNodeForVerticalAlignment.has(B[y]))this.dummyToNodeForVerticalAlignment.get(B[y]).forEach(function(et){h.idToNodeMap.get(et).displacementX=yt});else this.idToNodeMap.get(B[y]).displacementX=yt}}for(var E=0;E<this.componentsOnVertical.length;E++){var B=this.componentsOnVertical[E];if(this.fixedComponentsOnVertical[E])for(var y=0;y<B.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(B[y]))this.dummyToNodeForHorizontalAlignment.get(B[y]).forEach(function(at){h.idToNodeMap.get(at).displacementY=0});else this.idToNodeMap.get(B[y]).displacementY=0;else{var ct=0,mt=0;for(var y=0;y<B.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(B[y])){var J=this.dummyToNodeForHorizontalAlignment.get(B[y]);ct+=J.length*this.idToNodeMap.get(J[0]).displacementY,mt+=J.length}else ct+=this.idToNodeMap.get(B[y]).displacementY,mt++;var yt=ct/mt;for(var y=0;y<B.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(B[y]))this.dummyToNodeForHorizontalAlignment.get(B[y]).forEach(function(Wt){h.idToNodeMap.get(Wt).displacementY=yt});else this.idToNodeMap.get(B[y]).displacementY=yt}}}},W.prototype.calculateNodesToApplyGravitationTo=function(){var h=[],w,E=this.graphManager.getGraphs(),x=E.length,y;for(y=0;y<x;y++)if(w=E[y],w.updateConnected(),!w.isConnected)h=h.concat(w.getNodes());return h},W.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var w=new Set,E;for(E=0;E<h.length;E++){var x=h[E];if(!w.has(x)){var y=x.getSource(),V=x.getTarget();if(y==V)x.getBendpoints().push(new N),x.getBendpoints().push(new N),this.createDummyNodesForBendpoints(x),w.add(x);else{var H=[];if(H=H.concat(y.getEdgeListToNode(V)),H=H.concat(V.getEdgeListToNode(y)),!w.has(H[0])){if(H.length>1){var j;for(j=0;j<H.length;j++){var Q=H[j];Q.getBendpoints().push(new N),this.createDummyNodesForBendpoints(Q)}}H.forEach(function(B){w.add(B)})}}}if(w.size==h.length)break}},W.prototype.positionNodesRadially=function(h){var w=new T(0,0),E=Math.ceil(Math.sqrt(h.length)),x=0,y=0,V=0,H=new N(0,0);for(var j=0;j<h.length;j++){if(j%E==0){if(V=0,y=x,j!=0)y+=c.DEFAULT_COMPONENT_SEPERATION;x=0}var Q=h[j],B=z.findCenterOfTree(Q);if(w.x=V,w.y=y,H=W.radialLayout(Q,B,w),H.y>x)x=Math.floor(H.y);V=Math.floor(H.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new N(P.WORLD_CENTER_X-H.x/2,P.WORLD_CENTER_Y-H.y/2))},W.radialLayout=function(h,w,E){var x=Math.max(this.maxDiagonalInTree(h),c.DEFAULT_RADIAL_SEPARATION);W.branchRadialLayout(w,null,0,359,0,x);var y=rt.calculateBounds(h),V=new _;V.setDeviceOrgX(y.getMinX()),V.setDeviceOrgY(y.getMinY()),V.setWorldOrgX(E.x),V.setWorldOrgY(E.y);for(var H=0;H<h.length;H++){var j=h[H];j.transform(V)}var Q=new N(y.getMaxX(),y.getMaxY());return V.inverseTransformPoint(Q)},W.branchRadialLayout=function(h,w,E,x,y,V){var H=(x-E+1)/2;if(H<0)H+=180;var j=(H+E)%360,Q=j*Z.TWO_PI/360,B=Math.cos(Q),ct=y*Math.cos(Q),mt=y*Math.sin(Q);h.setCenter(ct,mt);var J=[];J=J.concat(h.getEdges());var yt=J.length;if(w!=null)yt--;var ht=0,X=J.length,et,at=h.getEdgesBetween(w);while(at.length>1){var vt=at[0];at.splice(0,1);var Dt=J.indexOf(vt);if(Dt>=0)J.splice(Dt,1);X--,yt--}if(w!=null)et=(J.indexOf(at[0])+1)%X;else et=0;var Wt=Math.abs(x-E)/yt;for(var Kt=et;ht!=yt;Kt=++Kt%X){var dt=J[Kt].getOtherEnd(h);if(dt==w)continue;var ie=(E+ht*Wt)%360,Bt=(ie+Wt)%360;W.branchRadialLayout(dt,h,ie,Bt,y+V,V),ht++}},W.maxDiagonalInTree=function(h){var w=G.MIN_VALUE;for(var E=0;E<h.length;E++){var x=h[E],y=x.getDiagonal();if(y>w)w=y}return w},W.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},W.prototype.groupZeroDegreeMembers=function(){var h=this,w={};this.memberGroups={},this.idToDummyNode={};var E=[],x=this.graphManager.getAllNodes();for(var y=0;y<x.length;y++){var V=x[y],H=V.getParent();if(this.getNodeDegreeWithChildren(V)===0&&(H.id==null||!this.getToBeTiled(H)))E.push(V)}for(var y=0;y<E.length;y++){var V=E[y],j=V.getParent().id;if(typeof w[j]>"u")w[j]=[];w[j]=w[j].concat(V)}Object.keys(w).forEach(function(Q){if(w[Q].length>1){var B="DummyCompound_"+Q;h.memberGroups[B]=w[Q];var ct=w[Q][0].getParent(),mt=new i(h.graphManager);mt.id=B,mt.paddingLeft=ct.paddingLeft||0,mt.paddingRight=ct.paddingRight||0,mt.paddingBottom=ct.paddingBottom||0,mt.paddingTop=ct.paddingTop||0,h.idToDummyNode[B]=mt;var J=h.getGraphManager().add(h.newGraph(),mt),yt=ct.getChild();yt.add(mt);for(var ht=0;ht<w[Q].length;ht++){var X=w[Q][ht];yt.remove(X),J.add(X)}}})},W.prototype.clearCompounds=function(){var h={},w={};this.performDFSOnCompounds();for(var E=0;E<this.compoundOrder.length;E++)w[this.compoundOrder[E].id]=this.compoundOrder[E],h[this.compoundOrder[E].id]=[].concat(this.compoundOrder[E].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[E].getChild()),this.compoundOrder[E].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,w)},W.prototype.clearZeroDegreeMembers=function(){var h=this,w=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(E){var x=h.idToDummyNode[E];if(w[E]=h.tileNodes(h.memberGroups[E],x.paddingLeft+x.paddingRight),x.rect.width=w[E].width,x.rect.height=w[E].height,x.setCenter(w[E].centerX,w[E].centerY),x.labelMarginLeft=0,x.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var y=x.rect.width,V=x.rect.height;if(x.labelWidth){if(x.labelPosHorizontal=="left")x.rect.x-=x.labelWidth,x.setWidth(y+x.labelWidth),x.labelMarginLeft=x.labelWidth;else if(x.labelPosHorizontal=="center"&&x.labelWidth>y)x.rect.x-=(x.labelWidth-y)/2,x.setWidth(x.labelWidth),x.labelMarginLeft=(x.labelWidth-y)/2;else if(x.labelPosHorizontal=="right")x.setWidth(y+x.labelWidth)}if(x.labelHeight){if(x.labelPosVertical=="top")x.rect.y-=x.labelHeight,x.setHeight(V+x.labelHeight),x.labelMarginTop=x.labelHeight;else if(x.labelPosVertical=="center"&&x.labelHeight>V)x.rect.y-=(x.labelHeight-V)/2,x.setHeight(x.labelHeight),x.labelMarginTop=(x.labelHeight-V)/2;else if(x.labelPosVertical=="bottom")x.setHeight(V+x.labelHeight)}}})},W.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var w=this.compoundOrder[h],{id:E,paddingLeft:x,paddingTop:y,labelMarginLeft:V,labelMarginTop:H}=w;this.adjustLocations(this.tiledMemberPack[E],w.rect.x,w.rect.y,x,y,V,H)}},W.prototype.repopulateZeroDegreeMembers=function(){var h=this,w=this.tiledZeroDegreePack;Object.keys(w).forEach(function(E){var x=h.idToDummyNode[E],{paddingLeft:y,paddingTop:V,labelMarginLeft:H,labelMarginTop:j}=x;h.adjustLocations(w[E],x.rect.x,x.rect.y,y,V,H,j)})},W.prototype.getToBeTiled=function(h){var w=h.id;if(this.toBeTiled[w]!=null)return this.toBeTiled[w];var E=h.getChild();if(E==null)return this.toBeTiled[w]=!1,!1;var x=E.getNodes();for(var y=0;y<x.length;y++){var V=x[y];if(this.getNodeDegree(V)>0)return this.toBeTiled[w]=!1,!1;if(V.getChild()==null){this.toBeTiled[V.id]=!1;continue}if(!this.getToBeTiled(V))return this.toBeTiled[w]=!1,!1}return this.toBeTiled[w]=!0,!0},W.prototype.getNodeDegree=function(h){var w=h.id,E=h.getEdges(),x=0;for(var y=0;y<E.length;y++){var V=E[y];if(V.getSource().id!==V.getTarget().id)x=x+1}return x},W.prototype.getNodeDegreeWithChildren=function(h){var w=this.getNodeDegree(h);if(h.getChild()==null)return w;var E=h.getChild().getNodes();for(var x=0;x<E.length;x++){var y=E[x];w+=this.getNodeDegreeWithChildren(y)}return w},W.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},W.prototype.fillCompexOrderByDFS=function(h){for(var w=0;w<h.length;w++){var E=h[w];if(E.getChild()!=null)this.fillCompexOrderByDFS(E.getChild().getNodes());if(this.getToBeTiled(E))this.compoundOrder.push(E)}},W.prototype.adjustLocations=function(h,w,E,x,y,V,H){w+=x+V,E+=y+H;var j=w;for(var Q=0;Q<h.rows.length;Q++){var B=h.rows[Q];w=j;var ct=0;for(var mt=0;mt<B.length;mt++){var J=B[mt];if(J.rect.x=w,J.rect.y=E,w+=J.rect.width+h.horizontalPadding,J.rect.height>ct)ct=J.rect.height}E+=ct+h.verticalPadding}},W.prototype.tileCompoundMembers=function(h,w){var E=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(x){var y=w[x];if(E.tiledMemberPack[x]=E.tileNodes(h[x],y.paddingLeft+y.paddingRight),y.rect.width=E.tiledMemberPack[x].width,y.rect.height=E.tiledMemberPack[x].height,y.setCenter(E.tiledMemberPack[x].centerX,E.tiledMemberPack[x].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var V=y.rect.width,H=y.rect.height;if(y.labelWidth){if(y.labelPosHorizontal=="left")y.rect.x-=y.labelWidth,y.setWidth(V+y.labelWidth),y.labelMarginLeft=y.labelWidth;else if(y.labelPosHorizontal=="center"&&y.labelWidth>V)y.rect.x-=(y.labelWidth-V)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-V)/2;else if(y.labelPosHorizontal=="right")y.setWidth(V+y.labelWidth)}if(y.labelHeight){if(y.labelPosVertical=="top")y.rect.y-=y.labelHeight,y.setHeight(H+y.labelHeight),y.labelMarginTop=y.labelHeight;else if(y.labelPosVertical=="center"&&y.labelHeight>H)y.rect.y-=(y.labelHeight-H)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-H)/2;else if(y.labelPosVertical=="bottom")y.setHeight(H+y.labelHeight)}}})},W.prototype.tileNodes=function(h,w){var E=this.tileNodesByFavoringDim(h,w,!0),x=this.tileNodesByFavoringDim(h,w,!1),y=this.getOrgRatio(E),V=this.getOrgRatio(x),H;if(V<y)H=x;else H=E;return H},W.prototype.getOrgRatio=function(h){var{width:w,height:E}=h,x=w/E;if(x<1)x=1/x;return x},W.prototype.calcIdealRowWidth=function(h,w){var{TILING_PADDING_VERTICAL:E,TILING_PADDING_HORIZONTAL:x}=c,y=h.length,V=0,H=0,j=0;h.forEach(function(ht){if(V+=ht.getWidth(),H+=ht.getHeight(),ht.getWidth()>j)j=ht.getWidth()});var Q=V/y,B=H/y,ct=Math.pow(E-x,2)+4*(Q+x)*(B+E)*y,mt=(x-E+Math.sqrt(ct))/(2*(Q+x)),J;if(w){if(J=Math.ceil(mt),J==mt)J++}else J=Math.floor(mt);var yt=J*(Q+x)-x;if(j>yt)yt=j;return yt+=x*2,yt},W.prototype.tileNodesByFavoringDim=function(h,w,E){var{TILING_PADDING_VERTICAL:x,TILING_PADDING_HORIZONTAL:y,TILING_COMPARE_BY:V}=c,H={rows:[],rowWidth:[],rowHeight:[],width:0,height:w,verticalPadding:x,horizontalPadding:y,centerX:0,centerY:0};if(V)H.idealRowWidth=this.calcIdealRowWidth(h,E);var j=function(X){return X.rect.width*X.rect.height},Q=function(X,et){return j(et)-j(X)};h.sort(function(ht,X){var et=Q;if(H.idealRowWidth)return et=V,et(ht.id,X.id);return et(ht,X)});var B=0,ct=0;for(var mt=0;mt<h.length;mt++){var J=h[mt];B+=J.getCenterX(),ct+=J.getCenterY()}H.centerX=B/h.length,H.centerY=ct/h.length;for(var mt=0;mt<h.length;mt++){var J=h[mt];if(H.rows.length==0)this.insertNodeToRow(H,J,0,w);else if(this.canAddHorizontal(H,J.rect.width,J.rect.height)){var yt=H.rows.length-1;if(!H.idealRowWidth)yt=this.getShortestRowIndex(H);this.insertNodeToRow(H,J,yt,w)}else this.insertNodeToRow(H,J,H.rows.length,w);this.shiftToLastRow(H)}return H},W.prototype.insertNodeToRow=function(h,w,E,x){var y=x;if(E==h.rows.length){var V=[];h.rows.push(V),h.rowWidth.push(y),h.rowHeight.push(0)}var H=h.rowWidth[E]+w.rect.width;if(h.rows[E].length>0)H+=h.horizontalPadding;if(h.rowWidth[E]=H,h.width<H)h.width=H;var j=w.rect.height;if(E>0)j+=h.verticalPadding;var Q=0;if(j>h.rowHeight[E])Q=h.rowHeight[E],h.rowHeight[E]=j,Q=h.rowHeight[E]-Q;h.height+=Q,h.rows[E].push(w)},W.prototype.getShortestRowIndex=function(h){var w=-1,E=Number.MAX_VALUE;for(var x=0;x<h.rows.length;x++)if(h.rowWidth[x]<E)w=x,E=h.rowWidth[x];return w},W.prototype.getLongestRowIndex=function(h){var w=-1,E=Number.MIN_VALUE;for(var x=0;x<h.rows.length;x++)if(h.rowWidth[x]>E)w=x,E=h.rowWidth[x];return w},W.prototype.canAddHorizontal=function(h,w,E){if(h.idealRowWidth){var x=h.rows.length-1,y=h.rowWidth[x];return y+w+h.horizontalPadding<=h.idealRowWidth}var V=this.getShortestRowIndex(h);if(V<0)return!0;var H=h.rowWidth[V];if(H+h.horizontalPadding+w<=h.width)return!0;var j=0;if(h.rowHeight[V]<E){if(V>0)j=E+h.verticalPadding-h.rowHeight[V]}var Q;if(h.width-H>=w+h.horizontalPadding)Q=(h.height+j)/(H+w+h.horizontalPadding);else Q=(h.height+j)/h.width;j=E+h.verticalPadding;var B;if(h.width<w)B=(h.height+j)/w;else B=(h.height+j)/h.width;if(B<1)B=1/B;if(Q<1)Q=1/Q;return Q<B},W.prototype.shiftToLastRow=function(h){var w=this.getLongestRowIndex(h),E=h.rowWidth.length-1,x=h.rows[w],y=x[x.length-1],V=y.width+h.horizontalPadding;if(h.width-h.rowWidth[E]>V&&w!=E){x.splice(-1,1),h.rows[E].push(y),h.rowWidth[w]=h.rowWidth[w]-V,h.rowWidth[E]=h.rowWidth[E]+V,h.width=h.rowWidth[instance.getLongestRowIndex(h)];var H=Number.MIN_VALUE;for(var j=0;j<x.length;j++)if(x[j].height>H)H=x[j].height;if(w>0)H+=h.verticalPadding;var Q=h.rowHeight[w]+h.rowHeight[E];if(h.rowHeight[w]=H,h.rowHeight[E]<y.height+h.verticalPadding)h.rowHeight[E]=y.height+h.verticalPadding;var B=h.rowHeight[w]+h.rowHeight[E];h.height+=B-Q,this.shiftToLastRow(h)}},W.prototype.tilingPreLayout=function(){if(c.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},W.prototype.tilingPostLayout=function(){if(c.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},W.prototype.reduceTrees=function(){var h=[],w=!0,E;while(w){var x=this.graphManager.getAllNodes(),y=[];w=!1;for(var V=0;V<x.length;V++)if(E=x[V],E.getEdges().length==1&&!E.getEdges()[0].isInterGraph&&E.getChild()==null){if(c.PURE_INCREMENTAL){var H=E.getEdges()[0].getOtherEnd(E),j=new b(E.getCenterX()-H.getCenterX(),E.getCenterY()-H.getCenterY());y.push([E,E.getEdges()[0],E.getOwner(),j])}else y.push([E,E.getEdges()[0],E.getOwner()]);w=!0}if(w==!0){var Q=[];for(var B=0;B<y.length;B++)if(y[B][0].getEdges().length==1)Q.push(y[B]),y[B][0].getOwner().remove(y[B][0]);h.push(Q),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=h},W.prototype.growTree=function(h){var w=h.length,E=h[w-1],x;for(var y=0;y<E.length;y++)x=E[y],this.findPlaceforPrunedNode(x),x[2].add(x[0]),x[2].add(x[1],x[1].source,x[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},W.prototype.findPlaceforPrunedNode=function(h){var w,E,x=h[0];if(x==h[1].source)E=h[1].target;else E=h[1].source;if(c.PURE_INCREMENTAL)x.setCenter(E.getCenterX()+h[3].getWidth(),E.getCenterY()+h[3].getHeight());else{var y=E.startX,V=E.finishX,H=E.startY,j=E.finishY,Q=0,B=0,ct=0,mt=0,J=[Q,ct,B,mt];if(H>0)for(var yt=y;yt<=V;yt++)J[0]+=this.grid[yt][H-1].length+this.grid[yt][H].length-1;if(V<this.grid.length-1)for(var yt=H;yt<=j;yt++)J[1]+=this.grid[V+1][yt].length+this.grid[V][yt].length-1;if(j<this.grid[0].length-1)for(var yt=y;yt<=V;yt++)J[2]+=this.grid[yt][j+1].length+this.grid[yt][j].length-1;if(y>0)for(var yt=H;yt<=j;yt++)J[3]+=this.grid[y-1][yt].length+this.grid[y][yt].length-1;var ht=G.MAX_VALUE,X,et;for(var at=0;at<J.length;at++)if(J[at]<ht)ht=J[at],X=1,et=at;else if(J[at]==ht)X++;if(X==3&&ht==0){if(J[0]==0&&J[1]==0&&J[2]==0)w=1;else if(J[0]==0&&J[1]==0&&J[3]==0)w=0;else if(J[0]==0&&J[2]==0&&J[3]==0)w=3;else if(J[1]==0&&J[2]==0&&J[3]==0)w=2}else if(X==2&&ht==0){var vt=Math.floor(Math.random()*2);if(J[0]==0&&J[1]==0)if(vt==0)w=0;else w=1;else if(J[0]==0&&J[2]==0)if(vt==0)w=0;else w=2;else if(J[0]==0&&J[3]==0)if(vt==0)w=0;else w=3;else if(J[1]==0&&J[2]==0)if(vt==0)w=1;else w=2;else if(J[1]==0&&J[3]==0)if(vt==0)w=1;else w=3;else if(vt==0)w=2;else w=3}else if(X==4&&ht==0){var vt=Math.floor(Math.random()*4);w=vt}else w=et;if(w==0)x.setCenter(E.getCenterX(),E.getCenterY()-E.getHeight()/2-f.DEFAULT_EDGE_LENGTH-x.getHeight()/2);else if(w==1)x.setCenter(E.getCenterX()+E.getWidth()/2+f.DEFAULT_EDGE_LENGTH+x.getWidth()/2,E.getCenterY());else if(w==2)x.setCenter(E.getCenterX(),E.getCenterY()+E.getHeight()/2+f.DEFAULT_EDGE_LENGTH+x.getHeight()/2);else x.setCenter(E.getCenterX()-E.getWidth()/2-f.DEFAULT_EDGE_LENGTH-x.getWidth()/2,E.getCenterY())}},s.exports=W},991:(s,a,o)=>{var g=o(551).FDLayoutNode,r=o(551).IMath;function p(t,c,d,f){g.call(this,t,c,d,f)}p.prototype=Object.create(g.prototype);for(var i in g)p[i]=g[i];p.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();if(this.getChild()!=null&&this.fixedNodeWeight)this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight;else this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren;if(Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement)this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX);if(Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement)this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY);if(this.child&&this.child.getNodes().length>0)this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},p.prototype.propogateDisplacementToChildren=function(t,c){var d=this.getChild().getNodes(),f;for(var P=0;P<d.length;P++)if(f=d[P],f.getChild()==null)f.displacementX+=t,f.displacementY+=c;else f.propogateDisplacementToChildren(t,c)},p.prototype.move=function(){var t=this.graphManager.getLayout();if(this.child==null||this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY),t.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},p.prototype.setPred1=function(t){this.pred1=t},p.prototype.getPred1=function(){return pred1},p.prototype.getPred2=function(){return pred2},p.prototype.setNext=function(t){this.next=t},p.prototype.getNext=function(){return next},p.prototype.setProcessed=function(t){this.processed=t},p.prototype.isProcessed=function(){return processed},s.exports=p},902:(s,a,o)=>{function g(d){if(Array.isArray(d)){for(var f=0,P=Array(d.length);f<d.length;f++)P[f]=d[f];return P}else return Array.from(d)}var r=o(806),p=o(551).LinkedList,i=o(551).Matrix,t=o(551).SVD;function c(){}c.handleConstraints=function(d){var f={};f.fixedNodeConstraint=d.constraints.fixedNodeConstraint,f.alignmentConstraint=d.constraints.alignmentConstraint,f.relativePlacementConstraint=d.constraints.relativePlacementConstraint;var P=new Map,T=new Map,N=[],b=[],z=d.getAllNodes(),G=0;for(var Z=0;Z<z.length;Z++){var rt=z[Z];if(rt.getChild()==null)T.set(rt.id,G++),N.push(rt.getCenterX()),b.push(rt.getCenterY()),P.set(rt.id,rt)}if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(tt){if(!tt.gap&&tt.gap!=0)if(tt.left)tt.gap=r.DEFAULT_EDGE_LENGTH+P.get(tt.left).getWidth()/2+P.get(tt.right).getWidth()/2;else tt.gap=r.DEFAULT_EDGE_LENGTH+P.get(tt.top).getHeight()/2+P.get(tt.bottom).getHeight()/2});var _=function(ot,st){return{x:ot.x-st.x,y:ot.y-st.y}},ut=function(ot){var st=0,lt=0;return ot.forEach(function(ft){st+=N[T.get(ft)],lt+=b[T.get(ft)]}),{x:st/ot.size,y:lt/ot.size}},W=function(ot,st,lt,ft,pt){function St(At,Lt){var Ft=new Set(At),Mt=!0,xt=!1,jt=void 0;try{for(var qt=Lt[Symbol.iterator](),le;!(Mt=(le=qt.next()).done);Mt=!0){var kt=le.value;Ft.add(kt)}}catch(Ht){xt=!0,jt=Ht}finally{try{if(!Mt&&qt.return)qt.return()}finally{if(xt)throw jt}}return Ft}var It=new Map;ot.forEach(function(At,Lt){It.set(Lt,0)}),ot.forEach(function(At,Lt){At.forEach(function(Ft){It.set(Ft.id,It.get(Ft.id)+1)})});var gt=new Map,Ot=new Map,Rt=new p;if(It.forEach(function(At,Lt){if(At==0){if(Rt.push(Lt),!lt)if(st=="horizontal")gt.set(Lt,T.has(Lt)?N[T.get(Lt)]:ft.get(Lt));else gt.set(Lt,T.has(Lt)?b[T.get(Lt)]:ft.get(Lt))}else gt.set(Lt,Number.NEGATIVE_INFINITY);if(lt)Ot.set(Lt,new Set([Lt]))}),lt)pt.forEach(function(At){var Lt=[];if(At.forEach(function(xt){if(lt.has(xt))Lt.push(xt)}),Lt.length>0){var Ft=0;Lt.forEach(function(xt){if(st=="horizontal")gt.set(xt,T.has(xt)?N[T.get(xt)]:ft.get(xt)),Ft+=gt.get(xt);else gt.set(xt,T.has(xt)?b[T.get(xt)]:ft.get(xt)),Ft+=gt.get(xt)}),Ft=Ft/Lt.length,At.forEach(function(xt){if(!lt.has(xt))gt.set(xt,Ft)})}else{var Mt=0;At.forEach(function(xt){if(st=="horizontal")Mt+=T.has(xt)?N[T.get(xt)]:ft.get(xt);else Mt+=T.has(xt)?b[T.get(xt)]:ft.get(xt)}),Mt=Mt/At.length,At.forEach(function(xt){gt.set(xt,Mt)})}});var Nt=function(){var Lt=Rt.shift(),Ft=ot.get(Lt);Ft.forEach(function(Mt){if(gt.get(Mt.id)<gt.get(Lt)+Mt.gap)if(lt&<.has(Mt.id)){var xt=void 0;if(st=="horizontal")xt=T.has(Mt.id)?N[T.get(Mt.id)]:ft.get(Mt.id);else xt=T.has(Mt.id)?b[T.get(Mt.id)]:ft.get(Mt.id);if(gt.set(Mt.id,xt),xt<gt.get(Lt)+Mt.gap){var jt=gt.get(Lt)+Mt.gap-xt;Ot.get(Lt).forEach(function(qt){gt.set(qt,gt.get(qt)-jt)})}}else gt.set(Mt.id,gt.get(Lt)+Mt.gap);if(It.set(Mt.id,It.get(Mt.id)-1),It.get(Mt.id)==0)Rt.push(Mt.id);if(lt)Ot.set(Mt.id,St(Ot.get(Lt),Ot.get(Mt.id)))})};while(Rt.length!=0)Nt();if(lt){var bt=new Set;ot.forEach(function(At,Lt){if(At.length==0)bt.add(Lt)});var zt=[];Ot.forEach(function(At,Lt){if(bt.has(Lt)){var Ft=!1,Mt=!0,xt=!1,jt=void 0;try{for(var qt=At[Symbol.iterator](),le;!(Mt=(le=qt.next()).done);Mt=!0){var kt=le.value;if(lt.has(kt))Ft=!0}}catch(Jt){xt=!0,jt=Jt}finally{try{if(!Mt&&qt.return)qt.return()}finally{if(xt)throw jt}}if(!Ft){var Ht=!1,ge=void 0;if(zt.forEach(function(Jt,ae){if(Jt.has([].concat(g(At))[0]))Ht=!0,ge=ae}),!Ht)zt.push(new Set(At));else At.forEach(function(Jt){zt[ge].add(Jt)})}}}),zt.forEach(function(At,Lt){var{POSITIVE_INFINITY:Ft,POSITIVE_INFINITY:Mt,NEGATIVE_INFINITY:xt,NEGATIVE_INFINITY:jt}=Number,qt=!0,le=!1,kt=void 0;try{for(var Ht=At[Symbol.iterator](),ge;!(qt=(ge=Ht.next()).done);qt=!0){var Jt=ge.value,ae=void 0;if(st=="horizontal")ae=T.has(Jt)?N[T.get(Jt)]:ft.get(Jt);else ae=T.has(Jt)?b[T.get(Jt)]:ft.get(Jt);var fe=gt.get(Jt);if(ae<Ft)Ft=ae;if(ae>xt)xt=ae;if(fe<Mt)Mt=fe;if(fe>jt)jt=fe}}catch(Te){le=!0,kt=Te}finally{try{if(!qt&&Ht.return)Ht.return()}finally{if(le)throw kt}}var xe=(Ft+xt)/2-(Mt+jt)/2,ve=!0,ye=!1,me=void 0;try{for(var pe=At[Symbol.iterator](),De;!(ve=(De=pe.next()).done);ve=!0){var Ee=De.value;gt.set(Ee,gt.get(Ee)+xe)}}catch(Te){ye=!0,me=Te}finally{try{if(!ve&&pe.return)pe.return()}finally{if(ye)throw me}}})}return gt},it=function(ot){var st=0,lt=0,ft=0,pt=0;if(ot.forEach(function(Ot){if(Ot.left)N[T.get(Ot.left)]-N[T.get(Ot.right)]>=0?st++:lt++;else b[T.get(Ot.top)]-b[T.get(Ot.bottom)]>=0?ft++:pt++}),st>lt&&ft>pt)for(var St=0;St<T.size;St++)N[St]=-1*N[St],b[St]=-1*b[St];else if(st>lt)for(var It=0;It<T.size;It++)N[It]=-1*N[It];else if(ft>pt)for(var gt=0;gt<T.size;gt++)b[gt]=-1*b[gt]},h=function(ot){var st=[],lt=new p,ft=new Set,pt=0;return ot.forEach(function(St,It){if(!ft.has(It)){st[pt]=[];var gt=It;lt.push(gt),ft.add(gt),st[pt].push(gt);while(lt.length!=0){gt=lt.shift();var Ot=ot.get(gt);Ot.forEach(function(Rt){if(!ft.has(Rt.id))lt.push(Rt.id),ft.add(Rt.id),st[pt].push(Rt.id)})}pt++}}),st},w=function(ot){var st=new Map;return ot.forEach(function(lt,ft){st.set(ft,[])}),ot.forEach(function(lt,ft){lt.forEach(function(pt){st.get(ft).push(pt),st.get(pt.id).push({id:ft,gap:pt.gap,direction:pt.direction})})}),st},E=function(ot){var st=new Map;return ot.forEach(function(lt,ft){st.set(ft,[])}),ot.forEach(function(lt,ft){lt.forEach(function(pt){st.get(pt.id).push({id:ft,gap:pt.gap,direction:pt.direction})})}),st},x=[],y=[],V=!1,H=!1,j=new Set,Q=new Map,B=new Map,ct=[];if(f.fixedNodeConstraint)f.fixedNodeConstraint.forEach(function(tt){j.add(tt.nodeId)});if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(tt){if(tt.left){if(Q.has(tt.left))Q.get(tt.left).push({id:tt.right,gap:tt.gap,direction:"horizontal"});else Q.set(tt.left,[{id:tt.right,gap:tt.gap,direction:"horizontal"}]);if(!Q.has(tt.right))Q.set(tt.right,[])}else{if(Q.has(tt.top))Q.get(tt.top).push({id:tt.bottom,gap:tt.gap,direction:"vertical"});else Q.set(tt.top,[{id:tt.bottom,gap:tt.gap,direction:"vertical"}]);if(!Q.has(tt.bottom))Q.set(tt.bottom,[])}}),B=w(Q),ct=h(B);if(r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(tt,ot){x[ot]=[tt.position.x,tt.position.y],y[ot]=[N[T.get(tt.nodeId)],b[T.get(tt.nodeId)]]}),V=!0;else if(f.alignmentConstraint)(function(){var tt=0;if(f.alignmentConstraint.vertical){var ot=f.alignmentConstraint.vertical,st=function(gt){var Ot=new Set;ot[gt].forEach(function(bt){Ot.add(bt)});var Rt=new Set([].concat(g(Ot)).filter(function(bt){return j.has(bt)})),Nt=void 0;if(Rt.size>0)Nt=N[T.get(Rt.values().next().value)];else Nt=ut(Ot).x;ot[gt].forEach(function(bt){x[tt]=[Nt,b[T.get(bt)]],y[tt]=[N[T.get(bt)],b[T.get(bt)]],tt++})};for(var lt=0;lt<ot.length;lt++)st(lt);V=!0}if(f.alignmentConstraint.horizontal){var ft=f.alignmentConstraint.horizontal,pt=function(gt){var Ot=new Set;ft[gt].forEach(function(bt){Ot.add(bt)});var Rt=new Set([].concat(g(Ot)).filter(function(bt){return j.has(bt)})),Nt=void 0;if(Rt.size>0)Nt=N[T.get(Rt.values().next().value)];else Nt=ut(Ot).y;ft[gt].forEach(function(bt){x[tt]=[N[T.get(bt)],Nt],y[tt]=[N[T.get(bt)],b[T.get(bt)]],tt++})};for(var St=0;St<ft.length;St++)pt(St);V=!0}if(f.relativePlacementConstraint)H=!0})();else if(f.relativePlacementConstraint){var mt=0,J=0;for(var yt=0;yt<ct.length;yt++)if(ct[yt].length>mt)mt=ct[yt].length,J=yt;if(mt<B.size/2)it(f.relativePlacementConstraint),V=!1,H=!1;else{var ht=new Map,X=new Map,et=[];ct[J].forEach(function(tt){Q.get(tt).forEach(function(ot){if(ot.direction=="horizontal"){if(ht.has(tt))ht.get(tt).push(ot);else ht.set(tt,[ot]);if(!ht.has(ot.id))ht.set(ot.id,[]);et.push({left:tt,right:ot.id})}else{if(X.has(tt))X.get(tt).push(ot);else X.set(tt,[ot]);if(!X.has(ot.id))X.set(ot.id,[]);et.push({top:tt,bottom:ot.id})}})}),it(et),H=!1;var at=W(ht,"horizontal"),vt=W(X,"vertical");ct[J].forEach(function(tt,ot){if(y[ot]=[N[T.get(tt)],b[T.get(tt)]],x[ot]=[],at.has(tt))x[ot][0]=at.get(tt);else x[ot][0]=N[T.get(tt)];if(vt.has(tt))x[ot][1]=vt.get(tt);else x[ot][1]=b[T.get(tt)]}),V=!0}}if(V){var Dt=void 0,Wt=i.transpose(x),Kt=i.transpose(y);for(var dt=0;dt<Wt.length;dt++)Wt[dt]=i.multGamma(Wt[dt]),Kt[dt]=i.multGamma(Kt[dt]);var ie=i.multMat(Wt,i.transpose(Kt)),Bt=t.svd(ie);Dt=i.multMat(Bt.V,i.transpose(Bt.U));for(var Ct=0;Ct<T.size;Ct++){var Et=[N[Ct],b[Ct]],Pt=[Dt[0][0],Dt[1][0]],Ut=[Dt[0][1],Dt[1][1]];N[Ct]=i.dotProduct(Et,Pt),b[Ct]=i.dotProduct(Et,Ut)}if(H)it(f.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var Vt={x:0,y:0};f.fixedNodeConstraint.forEach(function(tt,ot){var st={x:N[T.get(tt.nodeId)],y:b[T.get(tt.nodeId)]},lt=tt.position,ft=_(lt,st);Vt.x+=ft.x,Vt.y+=ft.y}),Vt.x/=f.fixedNodeConstraint.length,Vt.y/=f.fixedNodeConstraint.length,N.forEach(function(tt,ot){N[ot]+=Vt.x}),b.forEach(function(tt,ot){b[ot]+=Vt.y}),f.fixedNodeConstraint.forEach(function(tt){N[T.get(tt.nodeId)]=tt.position.x,b[T.get(tt.nodeId)]=tt.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical){var Yt=f.alignmentConstraint.vertical,Xt=function(ot){var st=new Set;Yt[ot].forEach(function(pt){st.add(pt)});var lt=new Set([].concat(g(st)).filter(function(pt){return j.has(pt)})),ft=void 0;if(lt.size>0)ft=N[T.get(lt.values().next().value)];else ft=ut(st).x;st.forEach(function(pt){if(!j.has(pt))N[T.get(pt)]=ft})};for(var Zt=0;Zt<Yt.length;Zt++)Xt(Zt)}if(f.alignmentConstraint.horizontal){var Qt=f.alignmentConstraint.horizontal,he=function(ot){var st=new Set;Qt[ot].forEach(function(pt){st.add(pt)});var lt=new Set([].concat(g(st)).filter(function(pt){return j.has(pt)})),ft=void 0;if(lt.size>0)ft=b[T.get(lt.values().next().value)];else ft=ut(st).y;st.forEach(function(pt){if(!j.has(pt))b[T.get(pt)]=ft})};for(var te=0;te<Qt.length;te++)he(te)}}if(f.relativePlacementConstraint)(function(){var tt=new Map,ot=new Map,st=new Map,lt=new Map,ft=new Map,pt=new Map,St=new Set,It=new Set;if(j.forEach(function(re){St.add(re),It.add(re)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical){var gt=f.alignmentConstraint.vertical,Ot=function(Gt){st.set("dummy"+Gt,[]),gt[Gt].forEach(function($t){if(tt.set($t,"dummy"+Gt),st.get("dummy"+Gt).push($t),j.has($t))St.add("dummy"+Gt)}),ft.set("dummy"+Gt,N[T.get(gt[Gt][0])])};for(var Rt=0;Rt<gt.length;Rt++)Ot(Rt)}if(f.alignmentConstraint.horizontal){var Nt=f.alignmentConstraint.horizontal,bt=function(Gt){lt.set("dummy"+Gt,[]),Nt[Gt].forEach(function($t){if(ot.set($t,"dummy"+Gt),lt.get("dummy"+Gt).push($t),j.has($t))It.add("dummy"+Gt)}),pt.set("dummy"+Gt,b[T.get(Nt[Gt][0])])};for(var zt=0;zt<Nt.length;zt++)bt(zt)}}var At=new Map,Lt=new Map,Ft=function(Gt){Q.get(Gt).forEach(function($t){var ue=void 0,ce=void 0;if($t.direction=="horizontal"){if(ue=tt.get(Gt)?tt.get(Gt):Gt,tt.get($t.id))ce={id:tt.get($t.id),gap:$t.gap,direction:$t.direction};else ce=$t;if(At.has(ue))At.get(ue).push(ce);else At.set(ue,[ce]);if(!At.has(ce.id))At.set(ce.id,[])}else{if(ue=ot.get(Gt)?ot.get(Gt):Gt,ot.get($t.id))ce={id:ot.get($t.id),gap:$t.gap,direction:$t.direction};else ce=$t;if(Lt.has(ue))Lt.get(ue).push(ce);else Lt.set(ue,[ce]);if(!Lt.has(ce.id))Lt.set(ce.id,[])}})},Mt=!0,xt=!1,jt=void 0;try{for(var qt=Q.keys()[Symbol.iterator](),le;!(Mt=(le=qt.next()).done);Mt=!0){var kt=le.value;Ft(kt)}}catch(re){xt=!0,jt=re}finally{try{if(!Mt&&qt.return)qt.return()}finally{if(xt)throw jt}}var Ht=w(At),ge=w(Lt),Jt=h(Ht),ae=h(ge),fe=E(At),xe=E(Lt),ve=[],ye=[];Jt.forEach(function(re,Gt){ve[Gt]=[],re.forEach(function($t){if(fe.get($t).length==0)ve[Gt].push($t)})}),ae.forEach(function(re,Gt){ye[Gt]=[],re.forEach(function($t){if(xe.get($t).length==0)ye[Gt].push($t)})});var me=W(At,"horizontal",St,ft,ve),pe=W(Lt,"vertical",It,pt,ye),De=function(Gt){if(st.get(Gt))st.get(Gt).forEach(function($t){N[T.get($t)]=me.get(Gt)});else N[T.get(Gt)]=me.get(Gt)},Ee=!0,Te=!1,$e=void 0;try{for(var Ie=me.keys()[Symbol.iterator](),Ze;!(Ee=(Ze=Ie.next()).done);Ee=!0){var Re=Ze.value;De(Re)}}catch(re){Te=!0,$e=re}finally{try{if(!Ee&&Ie.return)Ie.return()}finally{if(Te)throw $e}}var dr=function(Gt){if(lt.get(Gt))lt.get(Gt).forEach(function($t){b[T.get($t)]=pe.get(Gt)});else b[T.get(Gt)]=pe.get(Gt)},Se=!0,ke=!1,qe=void 0;try{for(var be=pe.keys()[Symbol.iterator](),Qe;!(Se=(Qe=be.next()).done);Se=!0){var Re=Qe.value;dr(Re)}}catch(re){ke=!0,qe=re}finally{try{if(!Se&&be.return)be.return()}finally{if(ke)throw qe}}})()}for(var ne=0;ne<z.length;ne++){var _t=z[ne];if(_t.getChild()==null)_t.setCenter(N[T.get(_t.id)],b[T.get(_t.id)])}},s.exports=c},551:(s)=>{s.exports=C}},S={};function v(s){var a=S[s];if(a!==void 0)return a.exports;var o=S[s]={exports:{}};return U[s](o,o.exports,v),o.exports}var l=v(45);return l})()})});var Je=Ke(function(Ce,Xe){(function(U,S){if(typeof Ce==="object"&&typeof Xe==="object")Xe.exports=S(Ye());else if(typeof define==="function"&&define.amd)define(["cose-base"],S);else if(typeof Ce==="object")Ce.cytoscapeFcose=S(Ye());else U.cytoscapeFcose=S(U.coseBase)})(Ce,function(C){return(()=>{var U={658:(s)=>{s.exports=Object.assign!=null?Object.assign.bind(Object):function(a){for(var o=arguments.length,g=Array(o>1?o-1:0),r=1;r<o;r++)g[r-1]=arguments[r];return g.forEach(function(p){Object.keys(p).forEach(function(i){return a[i]=p[i]})}),a}},548:(s,a,o)=>{var g=function(){function i(t,c){var d=[],f=!0,P=!1,T=void 0;try{for(var N=t[Symbol.iterator](),b;!(f=(b=N.next()).done);f=!0)if(d.push(b.value),c&&d.length===c)break}catch(z){P=!0,T=z}finally{try{if(!f&&N.return)N.return()}finally{if(P)throw T}}return d}return function(t,c){if(Array.isArray(t))return t;else if(Symbol.iterator in Object(t))return i(t,c);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=o(140).layoutBase.LinkedList,p={};p.getTopMostNodes=function(i){var t={};for(var c=0;c<i.length;c++)t[i[c].id()]=!0;var d=i.filter(function(f,P){if(typeof f==="number")f=P;var T=f.parent()[0];while(T!=null){if(t[T.id()])return!1;T=T.parent()[0]}return!0});return d},p.connectComponents=function(i,t,c,d){var f=new r,P=new Set,T=[],N=void 0,b=void 0,z=void 0,G=!1,Z=1,rt=[],_=[],ut=function(){var it=i.collection();_.push(it);var h=c[0],w=i.collection();w.merge(h).merge(h.descendants().intersection(t)),T.push(h),w.forEach(function(y){f.push(y),P.add(y),it.merge(y)});var E=function(){h=f.shift();var V=i.collection();h.neighborhood().nodes().forEach(function(B){if(t.intersection(h.edgesWith(B)).length>0)V.merge(B)});for(var H=0;H<V.length;H++){var j=V[H];if(N=c.intersection(j.union(j.ancestors())),N!=null&&!P.has(N[0])){var Q=N.union(N.descendants());Q.forEach(function(B){if(f.push(B),P.add(B),it.merge(B),c.has(B))T.push(B)})}}};while(f.length!=0)E();if(it.forEach(function(y){t.intersection(y.connectedEdges()).forEach(function(V){if(it.has(V.source())&&it.has(V.target()))it.merge(V)})}),T.length==c.length)G=!0;if(!G||G&&Z>1){b=T[0],z=b.connectedEdges().length,T.forEach(function(y){if(y.connectedEdges().length<z)z=y.connectedEdges().length,b=y}),rt.push(b.id());var x=i.collection();x.merge(T[0]),T.forEach(function(y){x.merge(y)}),T=[],c=c.difference(x),Z++}};do ut();while(!G);if(d){if(rt.length>0)d.set("dummy"+(d.size+1),rt)}return _},p.relocateComponent=function(i,t,c){if(!c.fixedNodeConstraint){var{POSITIVE_INFINITY:d,NEGATIVE_INFINITY:f,POSITIVE_INFINITY:P,NEGATIVE_INFINITY:T}=Number;if(c.quality=="draft"){var N=!0,b=!1,z=void 0;try{for(var G=t.nodeIndexes[Symbol.iterator](),Z;!(N=(Z=G.next()).done);N=!0){var rt=Z.value,_=g(rt,2),ut=_[0],W=_[1],it=c.cy.getElementById(ut);if(it){var h=it.boundingBox(),w=t.xCoords[W]-h.w/2,E=t.xCoords[W]+h.w/2,x=t.yCoords[W]-h.h/2,y=t.yCoords[W]+h.h/2;if(w<d)d=w;if(E>f)f=E;if(x<P)P=x;if(y>T)T=y}}}catch(B){b=!0,z=B}finally{try{if(!N&&G.return)G.return()}finally{if(b)throw z}}var V=i.x-(f+d)/2,H=i.y-(T+P)/2;t.xCoords=t.xCoords.map(function(B){return B+V}),t.yCoords=t.yCoords.map(function(B){return B+H})}else{Object.keys(t).forEach(function(B){var ct=t[B],mt=ct.getRect().x,J=ct.getRect().x+ct.getRect().width,yt=ct.getRect().y,ht=ct.getRect().y+ct.getRect().height;if(mt<d)d=mt;if(J>f)f=J;if(yt<P)P=yt;if(ht>T)T=ht});var j=i.x-(f+d)/2,Q=i.y-(T+P)/2;Object.keys(t).forEach(function(B){var ct=t[B];ct.setCenter(ct.getCenterX()+j,ct.getCenterY()+Q)})}}},p.calcBoundingBox=function(i,t,c,d){var{MAX_SAFE_INTEGER:f,MIN_SAFE_INTEGER:P,MAX_SAFE_INTEGER:T,MIN_SAFE_INTEGER:N}=Number,b=void 0,z=void 0,G=void 0,Z=void 0,rt=i.descendants().not(":parent"),_=rt.length;for(var ut=0;ut<_;ut++){var W=rt[ut];if(b=t[d.get(W.id())]-W.width()/2,z=t[d.get(W.id())]+W.width()/2,G=c[d.get(W.id())]-W.height()/2,Z=c[d.get(W.id())]+W.height()/2,f>b)f=b;if(P<z)P=z;if(T>G)T=G;if(N<Z)N=Z}var it={};return it.topLeftX=f,it.topLeftY=T,it.width=P-f,it.height=N-T,it},p.calcParentsWithoutChildren=function(i,t){var c=i.collection();return t.nodes(":parent").forEach(function(d){var f=!1;if(d.children().forEach(function(P){if(P.css("display")!="none")f=!0}),!f)c.merge(d)}),c},s.exports=p},816:(s,a,o)=>{var g=o(548),r=o(140).CoSELayout,p=o(140).CoSENode,i=o(140).layoutBase.PointD,t=o(140).layoutBase.DimensionD,c=o(140).layoutBase.LayoutConstants,d=o(140).layoutBase.FDLayoutConstants,f=o(140).CoSEConstants,P=function(N,b){var{cy:z,eles:G}=N,Z=G.nodes(),rt=G.edges(),_=void 0,ut=void 0,W=void 0,it={};if(N.randomize)_=b.nodeIndexes,ut=b.xCoords,W=b.yCoords;var h=function(B){return typeof B==="function"},w=function(B,ct){if(h(B))return B(ct);else return B},E=g.calcParentsWithoutChildren(z,G),x=function Q(B,ct,mt,J){var yt=ct.length;for(var ht=0;ht<yt;ht++){var X=ct[ht],et=null;if(X.intersection(E).length==0)et=X.children();var at=void 0,vt=X.layoutDimensions({nodeDimensionsIncludeLabels:J.nodeDimensionsIncludeLabels});if(X.outerWidth()!=null&&X.outerHeight()!=null)if(J.randomize)if(!X.isParent())at=B.add(new p(mt.graphManager,new i(ut[_.get(X.id())]-vt.w/2,W[_.get(X.id())]-vt.h/2),new t(parseFloat(vt.w),parseFloat(vt.h))));else{var Dt=g.calcBoundingBox(X,ut,W,_);if(X.intersection(E).length==0)at=B.add(new p(mt.graphManager,new i(Dt.topLeftX,Dt.topLeftY),new t(Dt.width,Dt.height)));else at=B.add(new p(mt.graphManager,new i(Dt.topLeftX,Dt.topLeftY),new t(parseFloat(vt.w),parseFloat(vt.h))))}else at=B.add(new p(mt.graphManager,new i(X.position("x")-vt.w/2,X.position("y")-vt.h/2),new t(parseFloat(vt.w),parseFloat(vt.h))));else at=B.add(new p(this.graphManager));if(at.id=X.data("id"),at.nodeRepulsion=w(J.nodeRepulsion,X),at.paddingLeft=parseInt(X.css("padding")),at.paddingTop=parseInt(X.css("padding")),at.paddingRight=parseInt(X.css("padding")),at.paddingBottom=parseInt(X.css("padding")),J.nodeDimensionsIncludeLabels)at.labelWidth=X.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,at.labelHeight=X.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,at.labelPosVertical=X.css("text-valign"),at.labelPosHorizontal=X.css("text-halign");if(it[X.data("id")]=at,isNaN(at.rect.x))at.rect.x=0;if(isNaN(at.rect.y))at.rect.y=0;if(et!=null&&et.length>0){var Wt=void 0;Wt=mt.getGraphManager().add(mt.newGraph(),at),Q(Wt,et,mt,J)}}},y=function(B,ct,mt){var J=0,yt=0;for(var ht=0;ht<mt.length;ht++){var X=mt[ht],et=it[X.data("source")],at=it[X.data("target")];if(et&&at&&et!==at&&et.getEdgesBetween(at).length==0){var vt=ct.add(B.newEdge(),et,at);vt.id=X.id(),vt.idealLength=w(N.idealEdgeLength,X),vt.edgeElasticity=w(N.edgeElasticity,X),J+=vt.idealLength,yt++}}if(N.idealEdgeLength!=null){if(yt>0)f.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=J/yt;else if(!h(N.idealEdgeLength))f.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=N.idealEdgeLength;else f.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=50;f.MIN_REPULSION_DIST=d.MIN_REPULSION_DIST=d.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH}},V=function(B,ct){if(ct.fixedNodeConstraint)B.constraints.fixedNodeConstraint=ct.fixedNodeConstraint;if(ct.alignmentConstraint)B.constraints.alignmentConstraint=ct.alignmentConstraint;if(ct.relativePlacementConstraint)B.constraints.relativePlacementConstraint=ct.relativePlacementConstraint};if(N.nestingFactor!=null)f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=N.nestingFactor;if(N.gravity!=null)f.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=N.gravity;if(N.numIter!=null)f.MAX_ITERATIONS=d.MAX_ITERATIONS=N.numIter;if(N.gravityRange!=null)f.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=N.gravityRange;if(N.gravityCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=N.gravityCompound;if(N.gravityRangeCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=N.gravityRangeCompound;if(N.initialEnergyOnIncremental!=null)f.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=N.initialEnergyOnIncremental;if(N.tilingCompareBy!=null)f.TILING_COMPARE_BY=N.tilingCompareBy;if(N.quality=="proof")c.QUALITY=2;else c.QUALITY=0;if(f.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=N.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!N.randomize,f.ANIMATE=d.ANIMATE=c.ANIMATE=N.animate,f.TILE=N.tile,f.TILING_PADDING_VERTICAL=typeof N.tilingPaddingVertical==="function"?N.tilingPaddingVertical.call():N.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof N.tilingPaddingHorizontal==="function"?N.tilingPaddingHorizontal.call():N.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!N.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=N.uniformNodeDimensions,N.step=="transformed")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1;if(N.step=="enforced")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1;if(N.step=="cose")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0;if(N.step=="all"){if(N.randomize)f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0}if(N.fixedNodeConstraint||N.alignmentConstraint||N.relativePlacementConstraint)f.TREE_REDUCTION_ON_INCREMENTAL=!1;else f.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new r,j=H.newGraphManager();return x(j.addRoot(),g.getTopMostNodes(Z),H,N),y(H,j,rt),V(H,N),H.runLayout(),it};s.exports={coseLayout:P}},212:(s,a,o)=>{var g=function(){function N(b,z){for(var G=0;G<z.length;G++){var Z=z[G];if(Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z)Z.writable=!0;Object.defineProperty(b,Z.key,Z)}}return function(b,z,G){if(z)N(b.prototype,z);if(G)N(b,G);return b}}();function r(N,b){if(!(N instanceof b))throw TypeError("Cannot call a class as a function")}var p=o(658),i=o(548),t=o(657),c=t.spectralLayout,d=o(816),f=d.coseLayout,P=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(b){return 4500},idealEdgeLength:function(b){return 50},edgeElasticity:function(b){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),T=function(){function N(b){r(this,N),this.options=p({},P,b)}return g(N,[{key:"run",value:function(){var z=this,G=this.options,{cy:Z,eles:rt}=G,_=[],ut=void 0,W=void 0,it=[],h=void 0,w=[];if(G.fixedNodeConstraint&&(!Array.isArray(G.fixedNodeConstraint)||G.fixedNodeConstraint.length==0))G.fixedNodeConstraint=void 0;if(G.alignmentConstraint){if(G.alignmentConstraint.vertical&&(!Array.isArray(G.alignmentConstraint.vertical)||G.alignmentConstraint.vertical.length==0))G.alignmentConstraint.vertical=void 0;if(G.alignmentConstraint.horizontal&&(!Array.isArray(G.alignmentConstraint.horizontal)||G.alignmentConstraint.horizontal.length==0))G.alignmentConstraint.horizontal=void 0}if(G.relativePlacementConstraint&&(!Array.isArray(G.relativePlacementConstraint)||G.relativePlacementConstraint.length==0))G.relativePlacementConstraint=void 0;var E=G.fixedNodeConstraint||G.alignmentConstraint||G.relativePlacementConstraint;if(E)G.tile=!1,G.packComponents=!1;var x=void 0,y=!1;if(Z.layoutUtilities&&G.packComponents){if(x=Z.layoutUtilities("get"),!x)x=Z.layoutUtilities();y=!0}if(rt.nodes().length>0)if(!y){var V=G.eles.boundingBox();if(w.push({x:V.x1+V.w/2,y:V.y1+V.h/2}),G.randomize){var H=c(G);_.push(H)}if(G.quality=="default"||G.quality=="proof")it.push(f(G,_[0])),i.relocateComponent(w[0],it[0],G);else i.relocateComponent(w[0],_[0],G)}else{var j=i.getTopMostNodes(G.eles.nodes());if(h=i.connectComponents(Z,G.eles,j),h.forEach(function(Ct){var Et=Ct.boundingBox();w.push({x:Et.x1+Et.w/2,y:Et.y1+Et.h/2})}),G.randomize)h.forEach(function(Ct){G.eles=Ct,_.push(c(G))});if(G.quality=="default"||G.quality=="proof"){var Q=Z.collection();if(G.tile){var B=new Map,ct=[],mt=[],J=0,yt={nodeIndexes:B,xCoords:ct,yCoords:mt},ht=[];if(h.forEach(function(Ct,Et){if(Ct.edges().length==0)Ct.nodes().forEach(function(Pt,Ut){if(Q.merge(Ct.nodes()[Ut]),!Pt.isParent())yt.nodeIndexes.set(Ct.nodes()[Ut].id(),J++),yt.xCoords.push(Ct.nodes()[0].position().x),yt.yCoords.push(Ct.nodes()[0].position().y)}),ht.push(Et)}),Q.length>1){var X=Q.boundingBox();w.push({x:X.x1+X.w/2,y:X.y1+X.h/2}),h.push(Q),_.push(yt);for(var et=ht.length-1;et>=0;et--)h.splice(ht[et],1),_.splice(ht[et],1),w.splice(ht[et],1)}}h.forEach(function(Ct,Et){G.eles=Ct,it.push(f(G,_[Et])),i.relocateComponent(w[Et],it[Et],G)})}else h.forEach(function(Ct,Et){i.relocateComponent(w[Et],_[Et],G)});var at=new Set;if(h.length>1){var vt=[],Dt=rt.filter(function(Ct){return Ct.css("display")=="none"});h.forEach(function(Ct,Et){var Pt=void 0;if(G.quality=="draft")Pt=_[Et].nodeIndexes;if(Ct.nodes().not(Dt).length>0){var Ut={};Ut.edges=[],Ut.nodes=[];var Vt=void 0;if(Ct.nodes().not(Dt).forEach(function(Yt){if(G.quality=="draft")if(!Yt.isParent())Vt=Pt.get(Yt.id()),Ut.nodes.push({x:_[Et].xCoords[Vt]-Yt.boundingbox().w/2,y:_[Et].yCoords[Vt]-Yt.boundingbox().h/2,width:Yt.boundingbox().w,height:Yt.boundingbox().h});else{var Xt=i.calcBoundingBox(Yt,_[Et].xCoords,_[Et].yCoords,Pt);Ut.nodes.push({x:Xt.topLeftX,y:Xt.topLeftY,width:Xt.width,height:Xt.height})}else if(it[Et][Yt.id()])Ut.nodes.push({x:it[Et][Yt.id()].getLeft(),y:it[Et][Yt.id()].getTop(),width:it[Et][Yt.id()].getWidth(),height:it[Et][Yt.id()].getHeight()})}),Ct.edges().forEach(function(Yt){var Xt=Yt.source(),Zt=Yt.target();if(Xt.css("display")!="none"&&Zt.css("display")!="none"){if(G.quality=="draft"){var Qt=Pt.get(Xt.id()),he=Pt.get(Zt.id()),te=[],ne=[];if(Xt.isParent()){var _t=i.calcBoundingBox(Xt,_[Et].xCoords,_[Et].yCoords,Pt);te.push(_t.topLeftX+_t.width/2),te.push(_t.topLeftY+_t.height/2)}else te.push(_[Et].xCoords[Qt]),te.push(_[Et].yCoords[Qt]);if(Zt.isParent()){var tt=i.calcBoundingBox(Zt,_[Et].xCoords,_[Et].yCoords,Pt);ne.push(tt.topLeftX+tt.width/2),ne.push(tt.topLeftY+tt.height/2)}else ne.push(_[Et].xCoords[he]),ne.push(_[Et].yCoords[he]);Ut.edges.push({startX:te[0],startY:te[1],endX:ne[0],endY:ne[1]})}else if(it[Et][Xt.id()]&&it[Et][Zt.id()])Ut.edges.push({startX:it[Et][Xt.id()].getCenterX(),startY:it[Et][Xt.id()].getCenterY(),endX:it[Et][Zt.id()].getCenterX(),endY:it[Et][Zt.id()].getCenterY()})}}),Ut.nodes.length>0)vt.push(Ut),at.add(Et)}});var Wt=x.packComponents(vt,G.randomize).shifts;if(G.quality=="draft")_.forEach(function(Ct,Et){var Pt=Ct.xCoords.map(function(Vt){return Vt+Wt[Et].dx}),Ut=Ct.yCoords.map(function(Vt){return Vt+Wt[Et].dy});Ct.xCoords=Pt,Ct.yCoords=Ut});else{var Kt=0;at.forEach(function(Ct){Object.keys(it[Ct]).forEach(function(Et){var Pt=it[Ct][Et];Pt.setCenter(Pt.getCenterX()+Wt[Kt].dx,Pt.getCenterY()+Wt[Kt].dy)}),Kt++})}}}var dt=function(Et,Pt){if(G.quality=="default"||G.quality=="proof"){if(typeof Et==="number")Et=Pt;var Ut=void 0,Vt=void 0,Yt=Et.data("id");if(it.forEach(function(Zt){if(Yt in Zt)Ut={x:Zt[Yt].getRect().getCenterX(),y:Zt[Yt].getRect().getCenterY()},Vt=Zt[Yt]}),G.nodeDimensionsIncludeLabels){if(Vt.labelWidth){if(Vt.labelPosHorizontal=="left")Ut.x+=Vt.labelWidth/2;else if(Vt.labelPosHorizontal=="right")Ut.x-=Vt.labelWidth/2}if(Vt.labelHeight){if(Vt.labelPosVertical=="top")Ut.y+=Vt.labelHeight/2;else if(Vt.labelPosVertical=="bottom")Ut.y-=Vt.labelHeight/2}}if(Ut==null)Ut={x:Et.position("x"),y:Et.position("y")};return{x:Ut.x,y:Ut.y}}else{var Xt=void 0;if(_.forEach(function(Zt){var Qt=Zt.nodeIndexes.get(Et.id());if(Qt!=null)Xt={x:Zt.xCoords[Qt],y:Zt.yCoords[Qt]}}),Xt==null)Xt={x:Et.position("x"),y:Et.position("y")};return{x:Xt.x,y:Xt.y}}};if(G.quality=="default"||G.quality=="proof"||G.randomize){var ie=i.calcParentsWithoutChildren(Z,rt),Bt=rt.filter(function(Ct){return Ct.css("display")=="none"});if(G.eles=rt.not(Bt),rt.nodes().not(":parent").not(Bt).layoutPositions(z,G,dt),ie.length>0)ie.forEach(function(Ct){Ct.position(dt(Ct))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),N}();s.exports=T},657:(s,a,o)=>{var g=o(548),r=o(140).layoutBase.Matrix,p=o(140).layoutBase.SVD,i=function(c){var{cy:d,eles:f}=c,P=f.nodes(),T=f.nodes(":parent"),N=new Map,b=new Map,z=new Map,G=[],Z=[],rt=[],_=[],ut=[],W=[],it=[],h=[],w=void 0,E=void 0,x=1e8,y=0.000000001,{piTol:V,samplingType:H,nodeSeparation:j}=c,Q=void 0,B=function(){var st=0,lt=0,ft=!1;while(lt<Q){st=Math.floor(Math.random()*E),ft=!1;for(var pt=0;pt<lt;pt++)if(_[pt]==st){ft=!0;break}if(!ft)_[lt]=st,lt++;else continue}},ct=function(st,lt,ft){var pt=[],St=0,It=0,gt=0,Ot=void 0,Rt=[],Nt=0,bt=1;for(var zt=0;zt<E;zt++)Rt[zt]=x;pt[It]=st,Rt[st]=0;while(It>=St){gt=pt[St++];var At=G[gt];for(var Lt=0;Lt<At.length;Lt++)if(Ot=b.get(At[Lt]),Rt[Ot]==x)Rt[Ot]=Rt[gt]+1,pt[++It]=Ot;W[gt][lt]=Rt[gt]*j}if(ft){for(var Ft=0;Ft<E;Ft++)if(W[Ft][lt]<ut[Ft])ut[Ft]=W[Ft][lt];for(var Mt=0;Mt<E;Mt++)if(ut[Mt]>Nt)Nt=ut[Mt],bt=Mt}return bt},mt=function(st){var lt=void 0;if(!st){B();for(var ft=0;ft<Q;ft++)ct(_[ft],ft,st,!1)}else{lt=Math.floor(Math.random()*E),w=lt;for(var pt=0;pt<E;pt++)ut[pt]=x;for(var St=0;St<Q;St++)_[St]=lt,lt=ct(lt,St,st)}for(var It=0;It<E;It++)for(var gt=0;gt<Q;gt++)W[It][gt]*=W[It][gt];for(var Ot=0;Ot<Q;Ot++)it[Ot]=[];for(var Rt=0;Rt<Q;Rt++)for(var Nt=0;Nt<Q;Nt++)it[Rt][Nt]=W[_[Nt]][Rt]},J=function(){var st=p.svd(it),{S:lt,U:ft,V:pt}=st,St=lt[0]*lt[0]*lt[0],It=[];for(var gt=0;gt<Q;gt++){It[gt]=[];for(var Ot=0;Ot<Q;Ot++)if(It[gt][Ot]=0,gt==Ot)It[gt][Ot]=lt[gt]/(lt[gt]*lt[gt]+St/(lt[gt]*lt[gt]))}h=r.multMat(r.multMat(pt,It),r.transpose(ft))},yt=function(){var st=void 0,lt=void 0,ft=[],pt=[],St=[],It=[];for(var gt=0;gt<E;gt++)ft[gt]=Math.random(),pt[gt]=Math.random();ft=r.normalize(ft),pt=r.normalize(pt);var Ot=0,Rt=y,Nt=y,bt=void 0;while(!0){Ot++;for(var zt=0;zt<E;zt++)St[zt]=ft[zt];if(ft=r.multGamma(r.multL(r.multGamma(St),W,h)),st=r.dotProduct(St,ft),ft=r.normalize(ft),Rt=r.dotProduct(St,ft),bt=Math.abs(Rt/Nt),bt<=1+V&&bt>=1)break;Nt=Rt}for(var At=0;At<E;At++)St[At]=ft[At];Ot=0,Nt=y;while(!0){Ot++;for(var Lt=0;Lt<E;Lt++)It[Lt]=pt[Lt];if(It=r.minusOp(It,r.multCons(St,r.dotProduct(St,It))),pt=r.multGamma(r.multL(r.multGamma(It),W,h)),lt=r.dotProduct(It,pt),pt=r.normalize(pt),Rt=r.dotProduct(It,pt),bt=Math.abs(Rt/Nt),bt<=1+V&&bt>=1)break;Nt=Rt}for(var Ft=0;Ft<E;Ft++)It[Ft]=pt[Ft];Z=r.multCons(St,Math.sqrt(Math.abs(st))),rt=r.multCons(It,Math.sqrt(Math.abs(lt)))};g.connectComponents(d,f,g.getTopMostNodes(P),N),T.forEach(function(ot){g.connectComponents(d,f,g.getTopMostNodes(ot.descendants().intersection(f)),N)});var ht=0;for(var X=0;X<P.length;X++)if(!P[X].isParent())b.set(P[X].id(),ht++);var et=!0,at=!1,vt=void 0;try{for(var Dt=N.keys()[Symbol.iterator](),Wt;!(et=(Wt=Dt.next()).done);et=!0){var Kt=Wt.value;b.set(Kt,ht++)}}catch(ot){at=!0,vt=ot}finally{try{if(!et&&Dt.return)Dt.return()}finally{if(at)throw vt}}for(var dt=0;dt<b.size;dt++)G[dt]=[];T.forEach(function(ot){var st=ot.children().intersection(f);while(st.nodes(":childless").length==0)st=st.nodes()[0].children().intersection(f);var lt=0,ft=st.nodes(":childless")[0].connectedEdges().length;st.nodes(":childless").forEach(function(pt,St){if(pt.connectedEdges().length<ft)ft=pt.connectedEdges().length,lt=St}),z.set(ot.id(),st.nodes(":childless")[lt].id())}),P.forEach(function(ot){var st=void 0;if(ot.isParent())st=b.get(z.get(ot.id()));else st=b.get(ot.id());ot.neighborhood().nodes().forEach(function(lt){if(f.intersection(ot.edgesWith(lt)).length>0)if(lt.isParent())G[st].push(z.get(lt.id()));else G[st].push(lt.id())})});var ie=function(st){var lt=b.get(st),ft=void 0;N.get(st).forEach(function(pt){if(d.getElementById(pt).isParent())ft=z.get(pt);else ft=pt;G[lt].push(ft),G[b.get(ft)].push(st)})},Bt=!0,Ct=!1,Et=void 0;try{for(var Pt=N.keys()[Symbol.iterator](),Ut;!(Bt=(Ut=Pt.next()).done);Bt=!0){var Vt=Ut.value;ie(Vt)}}catch(ot){Ct=!0,Et=ot}finally{try{if(!Bt&&Pt.return)Pt.return()}finally{if(Ct)throw Et}}E=b.size;var Yt=void 0;if(E>2){Q=E<c.sampleSize?E:c.sampleSize;for(var Xt=0;Xt<E;Xt++)W[Xt]=[];for(var Zt=0;Zt<Q;Zt++)h[Zt]=[];if(c.quality=="draft"||c.step=="all")mt(H),J(),yt(),Yt={nodeIndexes:b,xCoords:Z,yCoords:rt};else b.forEach(function(ot,st){Z.push(d.getElementById(st).position("x")),rt.push(d.getElementById(st).position("y"))}),Yt={nodeIndexes:b,xCoords:Z,yCoords:rt};return Yt}else{var Qt=b.keys(),he=d.getElementById(Qt.next().value),te=he.position(),ne=he.outerWidth();if(Z.push(te.x),rt.push(te.y),E==2){var _t=d.getElementById(Qt.next().value),tt=_t.outerWidth();Z.push(te.x+ne/2+tt/2+c.idealEdgeLength),rt.push(te.y)}return Yt={nodeIndexes:b,xCoords:Z,yCoords:rt},Yt}};s.exports={spectralLayout:i}},579:(s,a,o)=>{var g=o(212),r=function(i){if(!i)return;i("layout","fcose",g)};if(typeof cytoscape<"u")r(cytoscape);s.exports=r},140:(s)=>{s.exports=C}},S={};function v(s){var a=S[s];if(a!==void 0)return a.exports;var o=S[s]={exports:{}};return U[s](o,o.exports,v),o.exports}var l=v(579);return l})()})});var ar=Fe(Je(),1);var je={L:"left",R:"right",T:"top",B:"bottom"},_e={L:e((C)=>`${C},${C/2} 0,${C} 0,0`,"L"),R:e((C)=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:e((C)=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:e((C)=>`${C/2},0 ${C},${C} 0,${C}`,"B")},Oe={L:e((C,U)=>C-U+2,"L"),R:e((C,U)=>C-2,"R"),T:e((C,U)=>C-U+2,"T"),B:e((C,U)=>C-2,"B")},vr=e(function(C){if(oe(C))return C==="L"?"R":"L";else return C==="T"?"B":"T"},"getOppositeArchitectureDirection"),tr=e(function(C){let U=C;return U==="L"||U==="R"||U==="T"||U==="B"},"isArchitectureDirection"),oe=e(function(C){let U=C;return U==="L"||U==="R"},"isArchitectureDirectionX"),de=e(function(C){let U=C;return U==="T"||U==="B"},"isArchitectureDirectionY"),ze=e(function(C,U){let S=oe(C)&&de(U),v=de(C)&&oe(U);return S||v},"isArchitectureDirectionXY"),pr=e(function(C){let U=C[0],S=C[1],v=oe(U)&&de(S),l=de(U)&&oe(S);return v||l},"isArchitecturePairXY"),yr=e(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),He=e(function(C,U){let S=`${C}${U}`;return yr(S)?S:void 0},"getArchitectureDirectionPair"),Er=e(function([C,U],S){let v=S[0],l=S[1];if(oe(v))if(de(l))return[C+(v==="L"?-1:1),U+(l==="T"?1:-1)];else return[C+(v==="L"?-1:1),U];else if(oe(l))return[C+(l==="L"?1:-1),U+(v==="T"?1:-1)];else return[C,U+(v==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Tr=e(function(C){if(C==="LT"||C==="TL")return[1,1];else if(C==="BL"||C==="LB")return[1,-1];else if(C==="BR"||C==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),Nr=e(function(C,U){if(ze(C,U))return"bend";else if(oe(C))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Lr=e(function(C){return C.type==="service"},"isArchitectureService"),wr=e(function(C){return C.type==="junction"},"isArchitectureJunction"),er=e((C,U)=>{let[S,v]=[C,U].sort();return`${JSON.stringify(S)}-${JSON.stringify(v)}`},"architectureGroupAlignmentKey"),rr=e((C)=>C.data(),"edgeData"),Le=e((C)=>C.data(),"nodeData"),Mr=F.architecture,ir=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=L,this.getAccTitle=I,this.setDiagramTitle=O,this.getDiagramTitle=D,this.getAccDescription=M,this.setAccDescription=R,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",A()}addService({id:C,icon:U,in:S,title:v,iconText:l}){if(this.registeredIds.has(C))throw Error(`The service id [${C}] is already in use by another ${this.registeredIds.get(C)}`);if(S!==void 0){if(C===S)throw Error(`The service [${C}] cannot be placed within itself`);if(!this.registeredIds.has(S))throw Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(S)==="node")throw Error(`The service [${C}]'s parent is not a group`)}this.registeredIds.set(C,"node"),this.nodes.set(C,{id:C,type:"service",icon:U,iconText:l,title:v,edges:[],in:S})}getServices(){return[...this.nodes.values()].filter(Lr)}addJunction({id:C,in:U}){if(this.registeredIds.has(C))throw Error(`The junction id [${C}] is already in use by another ${this.registeredIds.get(C)}`);if(U!==void 0){if(C===U)throw Error(`The junction [${C}] cannot be placed within itself`);if(!this.registeredIds.has(U))throw Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(U)==="node")throw Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds.set(C,"node"),this.nodes.set(C,{id:C,type:"junction",edges:[],in:U})}getJunctions(){return[...this.nodes.values()].filter(wr)}getNodes(){return[...this.nodes.values()]}getNode(C){return this.nodes.get(C)??null}addGroup({id:C,icon:U,in:S,title:v}){if(this.registeredIds.has(C))throw Error(`The group id [${C}] is already in use by another ${this.registeredIds.get(C)}`);if(S!==void 0){if(C===S)throw Error(`The group [${C}] cannot be placed within itself`);if(!this.registeredIds.has(S))throw Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(S)==="node")throw Error(`The group [${C}]'s parent is not a group`)}this.registeredIds.set(C,"group"),this.groups.set(C,{id:C,icon:U,title:v,in:S})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:C,rhsId:U,lhsDir:S,rhsDir:v,lhsInto:l,rhsInto:s,lhsGroup:a,rhsGroup:o,title:g}){if(!tr(S))throw Error(`Invalid direction given for left hand side of edge ${C}--${U}. Expected (L,R,T,B) got ${String(S)}`);if(!tr(v))throw Error(`Invalid direction given for right hand side of edge ${C}--${U}. Expected (L,R,T,B) got ${String(v)}`);if(!this.nodes.has(C)&&!this.groups.has(C))throw Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(U)&&!this.groups.has(U))throw Error(`The right-hand id [${U}] does not yet exist. Please create the service/group before declaring an edge to it.`);let r=this.nodes.get(C).in,p=this.nodes.get(U).in;if(a&&r&&p&&r==p)throw Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&r&&p&&r==p)throw Error(`The right-hand id [${U}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let i={lhsId:C,lhsDir:S,lhsInto:l,lhsGroup:a,rhsId:U,rhsDir:v,rhsInto:s,rhsGroup:o,title:g};this.edges.push(i);let t=this.nodes.get(C),c=this.nodes.get(U);if(t&&c)t.edges.push(this.edges[this.edges.length-1]),c.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(C){if(C.members.length<2)throw Error(`An align directive requires at least two members; got ${C.members.length}`);let U=new Set;C.members.forEach((S)=>{if(this.registeredIds.get(S)!=="node")throw Error(`align ${C.direction} references [${S}], which is not a service or junction`);if(U.has(S))throw Error(`align ${C.direction} lists [${S}] more than once`);U.add(S)}),this.layoutHints.push(C)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let C=new Map,U=new Map;for(let[a,o]of this.nodes.entries()){let g=new Map;for(let r of o.edges){let p=this.getNode(r.lhsId)?.in,i=this.getNode(r.rhsId)?.in;if(p&&i&&p!==i){let t=Nr(r.lhsDir,r.rhsDir);if(t!=="bend")C.set(er(p,i),t)}if(r.lhsId===a){let t=He(r.lhsDir,r.rhsDir);if(t)g.set(t,r.rhsId)}else{let t=He(r.rhsDir,r.lhsDir);if(t)g.set(t,r.lhsId)}}U.set(a,g)}let S=new Set,v=new Set(U.keys()),l=e((a)=>{let o=new Map([[a,[0,0]]]),g=[a];while(g.length>0){let r=g.shift();if(r){S.add(r),v.delete(r);let p=U.get(r);if(!p)throw Error(`BFS error: adjacency list for id ${r} not found. Please report this as a bug.`);let i=o.get(r);if(!i)throw Error(`BFS error: position for id ${r} not found in spatial map. Please report this as a bug.`);let[t,c]=i;p.forEach((d,f)=>{if(!S.has(d))o.set(d,Er([t,c],f)),g.push(d)})}}return o},"BFS"),s=[];while(v.size>0){let a=v.values().next().value;s.push(l(a))}this.dataStructures={adjList:U,spatialMaps:s,groupAlignments:C}}return this.dataStructures}setElementForId(C,U){this.elements.set(C,U)}getElementById(C){return this.elements.get(C)}getConfig(){return K({...Mr,...k().architecture})}getConfigField(C){return this.getConfig()[C]}},Cr=e((C,U)=>{ee(C,U),C.groups.map((S)=>U.addGroup(S)),C.services.map((S)=>U.addService({...S,type:"service"})),C.junctions.map((S)=>U.addJunction({...S,type:"junction"})),C.edges.map((S)=>U.addEdge(S)),C.alignments?.map((S)=>U.addLayoutHint({direction:S.direction,members:[...S.members]}))},"populateDb"),nr={parser:{yy:void 0},parse:e(async(C)=>{let U=await se("architecture",C);n.debug(U);let S=nr.parser?.yy;if(!(S instanceof ir))throw 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.");Cr(U,S)},"parse")},Ar=e((C)=>`
|
|
2
2
|
.edge {
|
|
3
3
|
stroke-width: ${C.archEdgeWidth};
|
|
4
4
|
stroke: ${C.archEdgeColor};
|