@marimo-team/frontend 0.14.0 → 0.14.1-dev1
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/assets/{ConnectedDataExplorerComponent-DfaDXbmu.js → ConnectedDataExplorerComponent-C7SQ3Pyy.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-Dk-2ARU4.js → ImageComparisonComponent-CugH3AB5.js} +1 -1
- package/dist/assets/{VegaLite-D_9sSEjl.js → VegaLite-BBfGXQ9n.js} +1 -1
- package/dist/assets/{_baseEach-Db3oykFl.js → _baseEach-B0F-lrb2.js} +1 -1
- package/dist/assets/_baseMap-B6pQR1pp.js +1 -0
- package/dist/assets/{_baseUniq-BTBn1o_U.js → _baseUniq-ZF08PXee.js} +1 -1
- package/dist/assets/{_createAggregator-DLooNR_b.js → _createAggregator-Cmu_Jz9i.js} +1 -1
- package/dist/assets/{any-language-editor-BL3QIolu.js → any-language-editor-BJQr9SW_.js} +1 -1
- package/dist/assets/{architectureDiagram-IEHRJDOE-BmLknE91.js → architectureDiagram-IEHRJDOE-BLkHaX0B.js} +1 -1
- package/dist/assets/{blockDiagram-JOT3LUYC-BuAVX2La.js → blockDiagram-JOT3LUYC-DVRsFBCA.js} +1 -1
- package/dist/assets/{c4Diagram-VJAJSXHY-Dw0p6PD5.js → c4Diagram-VJAJSXHY-DiweE3Sn.js} +1 -1
- package/dist/assets/channel-9a4FDhGA.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-CRrk-vlJ.js → chunk-4BMEZGHF-dUAiRK8Z.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-D4smHg1h.js → chunk-A2AXSNBT-BMNe0YvG.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-DSfK4MvV.js → chunk-AEK57VVT-BF3DxxXb.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-CSfqKnNE.js → chunk-D6G4REZN-DCi6pvNK.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-CiFTbNI7.js → chunk-RZ5BOZE2-uRyiI2j2.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-CxO_ua0_.js → chunk-XZIHB7SX-FQvX5QwS.js} +1 -1
- package/dist/assets/{circle-play-DQ5ulCX1.js → circle-play-_DlKgPAP.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-BxgbOhwg.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-BxgbOhwg.js +1 -0
- package/dist/assets/clone-DrilLVL8.js +1 -0
- package/dist/assets/{compile-DMqlw2f3.js → compile-UlV6HhtZ.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-BhLoHxDu.js → dagre-OKDRZEBW-D5c_2YOj.js} +1 -1
- package/dist/assets/{data-editor-DlI--f5I.js → data-editor-BpaNZo57.js} +1 -1
- package/dist/assets/{diagram-SSKATNLV-vvZ_fGR-.js → diagram-SSKATNLV-CDDU_GeM.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-Y1c0dm-Q.js → diagram-VNBRO52H-CJQ5npme.js} +1 -1
- package/dist/assets/{edit-page-ukPTn1w4.js → edit-page-BymqH5Oj.js} +4 -4
- package/dist/assets/{erDiagram-Q7BY3M3F-Do1k_d6X.js → erDiagram-Q7BY3M3F-roHyfgTm.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-B2_mO5H-.js → flowDiagram-4HSFHLVR-CaJ_xMI3.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-Bah15eFD.js → ganttDiagram-APWFNJXF-DCMh2GqK.js} +1 -1
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-pPeJnRL0.js → gitGraphDiagram-7IBYFJ6S-BdCnAYKJ.js} +1 -1
- package/dist/assets/{graph-Bvep3vGL.js → graph-qNkg61wP.js} +1 -1
- package/dist/assets/{home-page-ClTDSk-b.js → home-page-DhMDSlkx.js} +1 -1
- package/dist/assets/{index-DP2Hem3Q.js → index-1jS_t1B8.js} +1 -1
- package/dist/assets/{index-BHWDo0SJ.js → index-8dpaATX8.js} +1 -1
- package/dist/assets/{index-Cz3-y_u2.js → index-BAG8nyOv.js} +1 -1
- package/dist/assets/{index-ChUupid3.js → index-BUsEX0KW.js} +1 -1
- package/dist/assets/{index-Crlijsf-.js → index-BXa_IJdG.js} +1 -1
- package/dist/assets/{index-CtknHNa6.js → index-Bi5UugVW.js} +1 -1
- package/dist/assets/{index-mKg8eShI.js → index-BkZ5lAt8.js} +1 -1
- package/dist/assets/{index-BRKrWs_D.js → index-BlMcVQkb.js} +1 -1
- package/dist/assets/{index-Cx_Febir.js → index-BpRtbJtq.js} +1 -1
- package/dist/assets/{index-BwHkBbgG.js → index-CCkLr8O1.js} +1 -1
- package/dist/assets/{index-_Zd2Tjcq.js → index-CS3B05kJ.js} +12 -12
- package/dist/assets/{index-ClIpEuqy.js → index-CZMg_XVW.js} +1 -1
- package/dist/assets/{index-D0nOPH95.js → index-Cn8dEY8H.js} +1 -1
- package/dist/assets/{index-C1g5-CPL.js → index-CxHBBe-O.js} +1 -1
- package/dist/assets/{index-BfQujoc3.js → index-DAWtsTj6.js} +1 -1
- package/dist/assets/{index-Cs1EDFdZ.js → index-DG-D5j97.js} +1 -1
- package/dist/assets/{index-e6nykhg-.js → index-DKlg8xxj.js} +1 -1
- package/dist/assets/{index-O2nR5_1b.js → index-Dr9wXPKN.js} +1 -1
- package/dist/assets/{index-D_KrWDAY.js → index-UPLAMsoY.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-CQZFReGV.js +2 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-DeDhp64X.js → journeyDiagram-U35MCT3I-DO0WwgvT.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-CRX4JdQe.js → kanban-definition-NDS4AKOZ-BFWys3v_.js} +1 -1
- package/dist/assets/{layout-BzszAGT3.js → layout-DKshF2YX.js} +1 -1
- package/dist/assets/{linear-D5JcW2cD.js → linear-BIs0rOiZ.js} +1 -1
- package/dist/assets/{mermaid-DkQTvIug.js → mermaid-Cyd4c5_r.js} +4 -4
- package/dist/assets/{min-De7bLdJB.js → min-CU6F9inI.js} +1 -1
- package/dist/assets/{mindmap-definition-ALO5MXBD-CK8c04Vu.js → mindmap-definition-ALO5MXBD-ysItzAYX.js} +1 -1
- package/dist/assets/{pieDiagram-IB7DONF6-BkJKHgzN.js → pieDiagram-IB7DONF6-1597iAX-.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-Dxufikgy.js → quadrantDiagram-7GDLP6J5-CaLPuCYl.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-_li6gpjw.js → radar-MK3ICKWK-CCBSeOSd.js} +1 -1
- package/dist/assets/{react-plotly-B8F7qojE.js → react-plotly-CHbw7ox-.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-DfGf5ATS.js → requirementDiagram-KVF5MWMF-iT_BTyrE.js} +1 -1
- package/dist/assets/{run-page-CHaAAOzr.js → run-page-DP1swoAx.js} +1 -1
- package/dist/assets/{sankeyDiagram-QLVOVGJD-BUSHudYK.js → sankeyDiagram-QLVOVGJD-f5UR_qfg.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-BI7vbJlj.js → sequenceDiagram-X6HHIX6F-f-usBLax.js} +1 -1
- package/dist/assets/{shutdown-button-DPmuCF_V.js → shutdown-button-BpmobHyg.js} +1 -1
- package/dist/assets/{slides-component-BV_PGMRS.js → slides-component-BOyiUyGl.js} +1 -1
- package/dist/assets/{sortBy-DJxmB991.js → sortBy-BBUkOtny.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-DrWgCABl.js → stateDiagram-DGXRK772-tmA-sIl6.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-BRwyR3fh.js +1 -0
- package/dist/assets/{storage-CIvwacNq.js → storage-CjMEqROh.js} +3 -3
- package/dist/assets/{terminal-BKOpNk0B.js → terminal-B62H-snb.js} +1 -1
- package/dist/assets/{time-BJthvF8K.js → time-B5h4oisq.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-CSJ_f_Qc.js → timeline-definition-BDJGKUSR-Cqt7GWLF.js} +1 -1
- package/dist/assets/{tracing-CQm8yTjH.js → tracing-CbguAGQy.js} +2 -2
- package/dist/assets/{vega-component-Byy0tfc3.js → vega-component-CoTEqigS.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-CQU_um72.js → xychartDiagram-VJFVF3MP-Dp-7DRlO.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap-YxkxzdBo.js +0 -1
- package/dist/assets/channel-BqpxxKuX.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-DbS17HjD.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-DbS17HjD.js +0 -1
- package/dist/assets/clone-B_oqkL1y.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-CBYlsZ6V.js +0 -2
- package/dist/assets/stateDiagram-v2-YXO3MK2T-M6fZjV11.js +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import{_ as J,g as Be,s as We,a as je,b as $e,q as qe,p as Ze,I as Je,S as Ke,y as Qe,l as Te,a3 as le,c as ne,aj as de,G as tr,ak as er,al as rr}from"./mermaid-DkQTvIug.js";import{p as nr}from"./chunk-4BMEZGHF-CRrk-vlJ.js";import{I as ir}from"./chunk-XZIHB7SX-CxO_ua0_.js";import{p as or}from"./radar-MK3ICKWK-_li6gpjw.js";import{c as Ae}from"./cytoscape.esm-C11VZyMT.js";import{y as sr}from"./index-_Zd2Tjcq.js";import{s as ar}from"./transform-BzDy4yXW.js";import"./step-BwsUM5iJ.js";import"./_baseEach-Db3oykFl.js";import"./_baseUniq-BTBn1o_U.js";import"./min-De7bLdJB.js";import"./_baseMap-YxkxzdBo.js";import"./clone-B_oqkL1y.js";import"./_createAggregator-DLooNR_b.js";import"./timer-B5eI7Tcu.js";var we,Ie={exports:{}},Le={exports:{}},_e={exports:{}};function hr(){return we?_e.exports:(we=1,N=function(){return function(I){var _={};function T(c){if(_[c])return _[c].exports;var i=_[c]={i:c,l:!1,exports:{}};return I[c].call(i.exports,i,i.exports,T),i.l=!0,i.exports}return T.m=I,T.c=_,T.i=function(c){return c},T.d=function(c,i,a){T.o(c,i)||Object.defineProperty(c,i,{configurable:!1,enumerable:!0,get:a})},T.n=function(c){var i=c&&c.__esModule?function(){return c.default}:function(){return c};return T.d(i,"a",i),i},T.o=function(c,i){return Object.prototype.hasOwnProperty.call(c,i)},T.p="",T(T.s=28)}([function(I,_,T){function c(){}c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,I.exports=c},function(I,_,T){var c=T(2),i=T(8),a=T(9);function r(t,o,e){c.call(this,e),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=e,this.bendpoints=[],this.source=t,this.target=o}for(var n in r.prototype=Object.create(c.prototype),c)r[n]=c[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(t,o){for(var e=this.getOtherEnd(t),l=o.getGraphManager().getRoot();;){if(e.getOwner()==o)return e;if(e.getOwner()==l)break;e=e.getOwner().getParent()}return null},r.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},I.exports=r},function(I,_,T){I.exports=function(c){this.vGraphObject=c}},function(I,_,T){var c=T(2),i=T(10),a=T(13),r=T(0),n=T(16),t=T(5);function o(l,s,g,d){g==null&&d==null&&(d=s),c.call(this,d),l.graphManager!=null&&(l=l.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=l,this.rect=g!=null&&s!=null?new a(s.x,s.y,g.width,g.height):new a}for(var e in o.prototype=Object.create(c.prototype),c)o[e]=c[e];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(l){this.rect.width=l},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(l){this.rect.height=l},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new t(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new t(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(l,s){this.rect.x=l.x,this.rect.y=l.y,this.rect.width=s.width,this.rect.height=s.height},o.prototype.setCenter=function(l,s){this.rect.x=l-this.rect.width/2,this.rect.y=s-this.rect.height/2},o.prototype.setLocation=function(l,s){this.rect.x=l,this.rect.y=s},o.prototype.moveBy=function(l,s){this.rect.x+=l,this.rect.y+=s},o.prototype.getEdgeListToNode=function(l){var s=[],g=this;return g.edges.forEach(function(d){if(d.target==l){if(d.source!=g)throw"Incorrect edge source!";s.push(d)}}),s},o.prototype.getEdgesBetween=function(l){var s=[],g=this;return g.edges.forEach(function(d){if(d.source!=g&&d.target!=g)throw"Incorrect edge source and/or target";d.target!=l&&d.source!=l||s.push(d)}),s},o.prototype.getNeighborsList=function(){var l=new Set,s=this;return s.edges.forEach(function(g){if(g.source==s)l.add(g.target);else{if(g.target!=s)throw"Incorrect incidency!";l.add(g.source)}}),l},o.prototype.withChildren=function(){var l=new Set;if(l.add(this),this.child!=null)for(var s=this.child.getNodes(),g=0;g<s.length;g++)s[g].withChildren().forEach(function(d){l.add(d)});return l},o.prototype.getNoOfChildren=function(){var l=0;if(this.child==null)l=1;else for(var s=this.child.getNodes(),g=0;g<s.length;g++)l+=s[g].getNoOfChildren();return l==0&&(l=1),l},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},o.prototype.scatter=function(){var l,s,g=-r.INITIAL_WORLD_BOUNDARY,d=r.INITIAL_WORLD_BOUNDARY;l=r.WORLD_CENTER_X+n.nextDouble()*(d-g)+g;var v=-r.INITIAL_WORLD_BOUNDARY,m=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+n.nextDouble()*(m-v)+v,this.rect.x=l,this.rect.y=s},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var l=this.getChild();if(l.updateBounds(!0),this.rect.x=l.getLeft(),this.rect.y=l.getTop(),this.setWidth(l.getRight()-l.getLeft()),this.setHeight(l.getBottom()-l.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=l.getRight()-l.getLeft(),g=l.getBottom()-l.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(l){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var g=this.rect.y;g>r.WORLD_BOUNDARY?g=r.WORLD_BOUNDARY:g<-r.WORLD_BOUNDARY&&(g=-r.WORLD_BOUNDARY);var d=new t(s,g),v=l.inverseTransformPoint(d);this.setLocation(v.x,v.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},I.exports=o},function(I,_,T){var c=T(0);function i(){}for(var a in c)i[a]=c[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,I.exports=i},function(I,_,T){function c(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(i){this.x=i},c.prototype.setY=function(i){this.y=i},c.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},I.exports=c},function(I,_,T){var c=T(2),i=T(10),a=T(0),r=T(7),n=T(3),t=T(1),o=T(13),e=T(12),l=T(11);function s(d,v,m){c.call(this,m),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,v!=null&&v instanceof r?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}for(var g in s.prototype=Object.create(c.prototype),c)s[g]=c[g];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(d,v,m){if(v==null&&m==null){var E=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(E)>-1)throw"Node already in graph!";return E.owner=this,this.getNodes().push(E),E}var w=d;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(v.owner!=m.owner||v.owner!=this)throw"Both owners must be this graph!";return v.owner!=m.owner?null:(w.source=v,w.target=m,w.isInterGraph=!1,this.getEdges().push(w),v.edges.push(w),m!=v&&m.edges.push(w),w)},s.prototype.remove=function(d){var v=d;if(d instanceof n){if(v==null)throw"Node is null!";if(v.owner==null||v.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var m=v.edges.slice(),E=m.length,w=0;w<E;w++)(C=m[w]).isInterGraph?this.graphManager.remove(C):C.source.owner.remove(C);if((S=this.nodes.indexOf(v))==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(d instanceof t){var C;if((C=d)==null)throw"Edge is null!";if(C.source==null||C.target==null)throw"Source and/or target is null!";if(C.source.owner==null||C.target.owner==null||C.source.owner!=this||C.target.owner!=this)throw"Source and/or target owner is invalid!";var S,R=C.source.edges.indexOf(C),k=C.target.edges.indexOf(C);if(!(R>-1&&k>-1))throw"Source and/or target doesn't know this edge!";if(C.source.edges.splice(R,1),C.target!=C.source&&C.target.edges.splice(k,1),(S=C.source.owner.getEdges().indexOf(C))==-1)throw"Not in owner's edge list!";C.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var d,v,m,E=i.MAX_VALUE,w=i.MAX_VALUE,C=this.getNodes(),S=C.length,R=0;R<S;R++){var k=C[R];E>(d=k.getTop())&&(E=d),w>(v=k.getLeft())&&(w=v)}return E==i.MAX_VALUE?null:(m=C[0].getParent().paddingLeft!=null?C[0].getParent().paddingLeft:this.margin,this.left=w-m,this.top=E-m,new e(this.left,this.top))},s.prototype.updateBounds=function(d){for(var v,m,E,w,C,S=i.MAX_VALUE,R=-i.MAX_VALUE,k=i.MAX_VALUE,X=-i.MAX_VALUE,W=this.nodes,M=W.length,j=0;j<M;j++){var h=W[j];d&&h.child!=null&&h.updateBounds(),S>(v=h.getLeft())&&(S=v),R<(m=h.getRight())&&(R=m),k>(E=h.getTop())&&(k=E),X<(w=h.getBottom())&&(X=w)}var f=new o(S,k,R-S,X-k);S==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),C=W[0].getParent().paddingLeft!=null?W[0].getParent().paddingLeft:this.margin,this.left=f.x-C,this.right=f.x+f.width+C,this.top=f.y-C,this.bottom=f.y+f.height+C},s.calculateBounds=function(d){for(var v,m,E,w,C=i.MAX_VALUE,S=-i.MAX_VALUE,R=i.MAX_VALUE,k=-i.MAX_VALUE,X=d.length,W=0;W<X;W++){var M=d[W];C>(v=M.getLeft())&&(C=v),S<(m=M.getRight())&&(S=m),R>(E=M.getTop())&&(R=E),k<(w=M.getBottom())&&(k=w)}return new o(C,R,S-C,k-R)},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var d=0,v=this.nodes,m=v.length,E=0;E<m;E++)d+=v[E].calcEstimatedSize();return this.estimatedSize=d==0?a.EMPTY_COMPOUND_NODE_SIZE:d/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var d=this;if(this.nodes.length!=0){var v,m,E=new l,w=new Set,C=this.nodes[0];for(C.withChildren().forEach(function(X){E.push(X),w.add(X)});E.length!==0;)for(var S=(v=(C=E.shift()).getEdges()).length,R=0;R<S;R++)(m=v[R].getOtherEndInGraph(C,this))==null||w.has(m)||m.withChildren().forEach(function(X){E.push(X),w.add(X)});if(this.isConnected=!1,w.size>=this.nodes.length){var k=0;w.forEach(function(X){X.owner==d&&k++}),k==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},I.exports=s},function(I,_,T){var c,i=T(1);function a(r){c=T(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),t=this.add(r,n);return this.setRootGraph(t),this.rootGraph},a.prototype.add=function(r,n,t,o,e){if(t==null&&o==null&&e==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}e=t,t=r;var l=(o=n).getOwner(),s=e.getOwner();if(l==null||l.getGraphManager()!=this)throw"Source not in this graph mgr!";if(s==null||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(l==s)return t.isInterGraph=!1,l.add(t,o,e);if(t.isInterGraph=!0,t.source=o,t.target=e,this.edges.indexOf(t)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(t),t.source==null||t.target==null)throw"Edge source and/or target is null!";if(t.source.edges.indexOf(t)!=-1||t.target.edges.indexOf(t)!=-1)throw"Edge already in source and/or target incidency list!";return t.source.edges.push(t),t.target.edges.push(t),t},a.prototype.remove=function(r){if(r instanceof c){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var t,o=[],e=(o=o.concat(n.getEdges())).length,l=0;l<e;l++)t=o[l],n.remove(t);var s,g=[];for(e=(g=g.concat(n.getNodes())).length,l=0;l<e;l++)s=g[l],n.remove(s);n==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(n);this.graphs.splice(d,1),n.parent=null}else if(r instanceof i){if((t=r)==null)throw"Edge is null!";if(!t.isInterGraph)throw"Not an inter-graph edge!";if(t.source==null||t.target==null)throw"Source and/or target is null!";if(t.source.edges.indexOf(t)==-1||t.target.edges.indexOf(t)==-1)throw"Source and/or target doesn't know this edge!";if(d=t.source.edges.indexOf(t),t.source.edges.splice(d,1),d=t.target.edges.indexOf(t),t.target.edges.splice(d,1),t.source.owner==null||t.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(t.source.owner.getGraphManager().edges.indexOf(t)==-1)throw"Not in owner graph manager's edge list!";d=t.source.owner.getGraphManager().edges.indexOf(t),t.source.owner.getGraphManager().edges.splice(d,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),t=n.length,o=0;o<t;o++)r=r.concat(n[o].getNodes());this.allNodes=r}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var t=0;t<n.length;t++)r=r.concat(n[t].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var t,o=r.getOwner();(t=o.getParent())!=null;){if(t==n)return!0;if((o=t.getOwner())==null)break}for(o=n.getOwner();(t=o.getParent())!=null;){if(t==r)return!0;if((o=t.getOwner())==null)break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var r,n,t,o,e,l=this.getAllEdges(),s=l.length,g=0;g<s;g++)if(n=(r=l[g]).source,t=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=t,n!=t){for(o=n.getOwner();r.lca==null;){for(r.targetInLca=t,e=t.getOwner();r.lca==null;){if(e==o){r.lca=e;break}if(e==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=e.getParent(),e=r.targetInLca.getOwner()}if(o==this.rootGraph)break;r.lca==null&&(r.sourceInLca=o.getParent(),o=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},a.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var t=r.getOwner();t!=null;){for(var o=n.getOwner();o!=null;){if(o==t)return o;o=o.getParent().getOwner()}t=t.getParent().getOwner()}return t},a.prototype.calcInclusionTreeDepths=function(r,n){var t;r==null&&n==null&&(r=this.rootGraph,n=1);for(var o=r.getNodes(),e=o.length,l=0;l<e;l++)(t=o[l]).inclusionTreeDepth=n,t.child!=null&&this.calcInclusionTreeDepths(t.child,n+1)},a.prototype.includesInvalidEdge=function(){for(var r,n=[],t=this.edges.length,o=0;o<t;o++)r=this.edges[o],this.isOneAncestorOfOther(r.source,r.target)&&n.push(r);for(o=0;o<n.length;o++)this.remove(n[o]);return!1},I.exports=a},function(I,_,T){var c=T(12);function i(){}i.calcSeparationAmount=function(a,r,n,t){if(!a.intersects(r))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(a,r,o),n[0]=Math.min(a.getRight(),r.getRight())-Math.max(a.x,r.x),n[1]=Math.min(a.getBottom(),r.getBottom())-Math.max(a.y,r.y),a.getX()<=r.getX()&&a.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var e=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(e=1);var l=e*n[0],s=n[1]/e;n[0]<s?s=n[0]:l=n[1],n[0]=-1*o[0]*(s/2+t),n[1]=-1*o[1]*(l/2+t)},i.decideDirectionsForOverlappingNodes=function(a,r,n){a.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,a.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(a,r,n){var t=a.getCenterX(),o=a.getCenterY(),e=r.getCenterX(),l=r.getCenterY();if(a.intersects(r))return n[0]=t,n[1]=o,n[2]=e,n[3]=l,!0;var s=a.getX(),g=a.getY(),d=a.getRight(),v=a.getX(),m=a.getBottom(),E=a.getRight(),w=a.getWidthHalf(),C=a.getHeightHalf(),S=r.getX(),R=r.getY(),k=r.getRight(),X=r.getX(),W=r.getBottom(),M=r.getRight(),j=r.getWidthHalf(),h=r.getHeightHalf(),f=!1,u=!1;if(t===e){if(o>l)return n[0]=t,n[1]=g,n[2]=e,n[3]=W,!1;if(o<l)return n[0]=t,n[1]=m,n[2]=e,n[3]=R,!1}else if(o===l){if(t>e)return n[0]=s,n[1]=o,n[2]=k,n[3]=l,!1;if(t<e)return n[0]=d,n[1]=o,n[2]=S,n[3]=l,!1}else{var y=a.height/a.width,p=r.height/r.width,A=(l-o)/(e-t),L=void 0,O=void 0,G=void 0,b=void 0,P=void 0,F=void 0;if(-y===A?t>e?(n[0]=v,n[1]=m,f=!0):(n[0]=d,n[1]=g,f=!0):y===A&&(t>e?(n[0]=s,n[1]=g,f=!0):(n[0]=E,n[1]=m,f=!0)),-p===A?e>t?(n[2]=X,n[3]=W,u=!0):(n[2]=k,n[3]=R,u=!0):p===A&&(e>t?(n[2]=S,n[3]=R,u=!0):(n[2]=M,n[3]=W,u=!0)),f&&u)return!1;if(t>e?o>l?(L=this.getCardinalDirection(y,A,4),O=this.getCardinalDirection(p,A,2)):(L=this.getCardinalDirection(-y,A,3),O=this.getCardinalDirection(-p,A,1)):o>l?(L=this.getCardinalDirection(-y,A,1),O=this.getCardinalDirection(-p,A,3)):(L=this.getCardinalDirection(y,A,2),O=this.getCardinalDirection(p,A,4)),!f)switch(L){case 1:b=g,G=t+-C/A,n[0]=G,n[1]=b;break;case 2:G=E,b=o+w*A,n[0]=G,n[1]=b;break;case 3:b=m,G=t+C/A,n[0]=G,n[1]=b;break;case 4:G=v,b=o+-w*A,n[0]=G,n[1]=b}if(!u)switch(O){case 1:F=R,P=e+-h/A,n[2]=P,n[3]=F;break;case 2:P=M,F=l+j*A,n[2]=P,n[3]=F;break;case 3:F=W,P=e+h/A,n[2]=P,n[3]=F;break;case 4:P=X,F=l+-j*A,n[2]=P,n[3]=F}}return!1},i.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},i.getIntersection=function(a,r,n,t){if(t==null)return this.getIntersection2(a,r,n);var o,e,l,s,g,d,v,m=a.x,E=a.y,w=r.x,C=r.y,S=n.x,R=n.y,k=t.x,X=t.y;return(v=(o=C-E)*(s=S-k)-(e=X-R)*(l=m-w))===0?null:new c((l*(d=k*R-S*X)-s*(g=w*E-m*C))/v,(e*g-o*d)/v)},i.angleOfVector=function(a,r,n,t){var o=void 0;return a!==n?(o=Math.atan((t-r)/(n-a)),n<a?o+=Math.PI:t<r&&(o+=this.TWO_PI)):o=t<r?this.ONE_AND_HALF_PI:this.HALF_PI,o},i.doIntersect=function(a,r,n,t){var o=a.x,e=a.y,l=r.x,s=r.y,g=n.x,d=n.y,v=t.x,m=t.y,E=(l-o)*(m-d)-(v-g)*(s-e);if(E===0)return!1;var w=((m-d)*(v-o)+(g-v)*(m-e))/E,C=((e-s)*(v-o)+(l-o)*(m-e))/E;return 0<w&&w<1&&0<C&&C<1},i.findCircleLineIntersections=function(a,r,n,t,o,e,l){var s=(n-a)*(n-a)+(t-r)*(t-r),g=2*((a-o)*(n-a)+(r-e)*(t-r)),d=(a-o)*(a-o)+(r-e)*(r-e)-l*l;if(g*g-4*s*d>=0){var v=(-g+Math.sqrt(g*g-4*s*d))/(2*s),m=(-g-Math.sqrt(g*g-4*s*d))/(2*s);return v>=0&&v<=1?[v]:m>=0&&m<=1?[m]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,I.exports=i},function(I,_,T){function c(){}c.sign=function(i){return i>0?1:i<0?-1:0},c.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},c.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},I.exports=c},function(I,_,T){function c(){}c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,I.exports=c},function(I,_,T){var c=function(){function t(o,e){for(var l=0;l<e.length;l++){var s=e[l];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}return function(o,e,l){return e&&t(o.prototype,e),l&&t(o,l),o}}(),i=function(t){return{value:t,next:null,prev:null}},a=function(t,o,e,l){return t!==null?t.next=o:l.head=o,e!==null?e.prev=o:l.tail=o,o.prev=t,o.next=e,l.length++,o},r=function(t,o){var e=t.prev,l=t.next;return e!==null?e.next=l:o.head=l,l!==null?l.prev=e:o.tail=e,t.prev=t.next=null,o.length--,t},n=function(){function t(o){var e=this;(function(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),this.length=0,this.head=null,this.tail=null,o!=null&&o.forEach(function(l){return e.push(l)})}return c(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,e){return a(e.prev,i(o),e,this)}},{key:"insertAfter",value:function(o,e){return a(e,i(o),e.next,this)}},{key:"insertNodeBefore",value:function(o,e){return a(e.prev,o,e,this)}},{key:"insertNodeAfter",value:function(o,e){return a(e,o,e.next,this)}},{key:"push",value:function(o){return a(this.tail,i(o),null,this)}},{key:"unshift",value:function(o){return a(null,i(o),this.head,this)}},{key:"remove",value:function(o){return r(o,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(o){if(o<=this.length()){for(var e=1,l=this.head;e<o;)l=l.next,e++;return l.value}}},{key:"set_object_at",value:function(o,e){if(o<=this.length()){for(var l=1,s=this.head;l<o;)s=s.next,l++;s.value=e}}}]),t}();I.exports=n},function(I,_,T){function c(i,a,r){this.x=null,this.y=null,i==null&&a==null&&r==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&r==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&r==null&&(r=i,this.x=r.x,this.y=r.y)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(i,a,r){i.constructor.name=="Point"&&a==null&&r==null?(r=i,this.setLocation(r.x,r.y)):typeof i=="number"&&typeof a=="number"&&r==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)))},c.prototype.move=function(i,a){this.x=i,this.y=a},c.prototype.translate=function(i,a){this.x+=i,this.y+=a},c.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y}return this==i},c.prototype.toString=function(){return new c().constructor.name+"[x="+this.x+",y="+this.y+"]"},I.exports=c},function(I,_,T){function c(i,a,r,n){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&r!=null&&n!=null&&(this.x=i,this.y=a,this.width=r,this.height=n)}c.prototype.getX=function(){return this.x},c.prototype.setX=function(i){this.x=i},c.prototype.getY=function(){return this.y},c.prototype.setY=function(i){this.y=i},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(i){this.width=i},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(i){this.height=i},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},I.exports=c},function(I,_,T){var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function i(){}i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID)},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a},i.isPrimitive=function(a){var r=a===void 0?"undefined":c(a);return a==null||r!="object"&&r!="function"},I.exports=i},function(I,_,T){function c(g){if(Array.isArray(g)){for(var d=0,v=Array(g.length);d<g.length;d++)v[d]=g[d];return v}return Array.from(g)}var i=T(0),a=T(7),r=T(3),n=T(1),t=T(6),o=T(5),e=T(17),l=T(29);function s(g){l.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}s.RANDOM_SEED=1,s.prototype=Object.create(l.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var g=new a(this);return this.graphManager=g,g},s.prototype.newGraph=function(g){return new t(null,this.graphManager,g)},s.prototype.newNode=function(g){return new r(this.graphManager,g)},s.prototype.newEdge=function(g){return new n(null,null,g)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){var g;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),g=!this.checkLayoutSuccess()&&this.layout(),i.ANIMATE!=="during"&&(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),d=0;d<g.length;d++)g[d];var v=this.graphManager.getRoot().getNodes();for(d=0;d<v.length;d++)v[d];this.update(this.graphManager.getRoot())}},s.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof r){var d=g;if(d.getChild()!=null)for(var v=d.getChild().getNodes(),m=0;m<v.length;m++)update(v[m]);d.vGraphObject!=null&&d.vGraphObject.update(d)}else if(g instanceof n){var E=g;E.vGraphObject!=null&&E.vGraphObject.update(E)}else if(g instanceof t){var w=g;w.vGraphObject!=null&&w.vGraphObject.update(w)}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(g){if(g==null)this.transform(new o(0,0));else{var d=new e,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(v.x),d.setDeviceOrgY(v.y);for(var m=this.getAllNodes(),E=0;E<m.length;E++)m[E].transform(d)}}},s.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,v,m=g.getNodes(),E=0;E<m.length;E++)(v=(d=m[E]).getChild())==null||v.getNodes().length==0?d.scatter():(this.positionNodesRandomly(v),d.updateBounds())},s.prototype.getFlatForest=function(){for(var g=[],d=!0,v=this.graphManager.getRoot().getNodes(),m=!0,E=0;E<v.length;E++)v[E].getChild()!=null&&(m=!1);if(!m)return g;var w=new Set,C=[],S=new Map,R=[];for(R=R.concat(v);R.length>0&&d;){for(C.push(R[0]);C.length>0&&d;){var k=C[0];C.splice(0,1),w.add(k);var X=k.getEdges();for(E=0;E<X.length;E++){var W=X[E].getOtherEnd(k);if(S.get(k)!=W){if(w.has(W)){d=!1;break}C.push(W),S.set(W,k)}}}if(d){var M=[].concat(c(w));for(g.push(M),E=0;E<M.length;E++){var j=M[E],h=R.indexOf(j);h>-1&&R.splice(h,1)}w=new Set,S=new Map}else g=[]}return g},s.prototype.createDummyNodesForBendpoints=function(g){for(var d=[],v=g.source,m=this.graphManager.calcLowestCommonAncestor(g.source,g.target),E=0;E<g.bendpoints.length;E++){var w=this.newNode(null);w.setRect(new Point(0,0),new Dimension(1,1)),m.add(w);var C=this.newEdge(null);this.graphManager.add(C,v,w),d.add(w),v=w}return C=this.newEdge(null),this.graphManager.add(C,v,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph()?this.graphManager.remove(g):m.remove(g),d},s.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(c(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var v=g[d];if(v.bendpoints.length>0){for(var m=this.edgeToDummyNodes.get(v),E=0;E<m.length;E++){var w=m[E],C=new o(w.getCenterX(),w.getCenterY()),S=v.bendpoints.get(E);S.x=C.x,S.y=C.y,w.getOwner().remove(w)}this.graphManager.add(v,v.source,v.target)}}},s.transform=function(g,d,v,m){if(v!=null&&m!=null){var E=d;return g<=50?E-=(d-d/v)/50*(50-g):E+=(d*m-d)/50*(g-50),E}var w,C;return g<=50?(w=9*d/500,C=d/10):(w=9*d/50,C=-8*d),w*g+C},s.findCenterOfTree=function(g){var d=[];d=d.concat(g);var v=[],m=new Map,E=!1,w=null;d.length!=1&&d.length!=2||(E=!0,w=d[0]);for(var C=0;C<d.length;C++){var S=(X=d[C]).getNeighborsList().size;m.set(X,X.getNeighborsList().size),S==1&&v.push(X)}var R=[];for(R=R.concat(v);!E;){var k=[];for(k=k.concat(R),R=[],C=0;C<d.length;C++){var X=d[C],W=d.indexOf(X);W>=0&&d.splice(W,1),X.getNeighborsList().forEach(function(M){if(v.indexOf(M)<0){var j=m.get(M)-1;j==1&&R.push(M),m.set(M,j)}})}v=v.concat(R),d.length!=1&&d.length!=2||(E=!0,w=d[0])}return w},s.prototype.setGraphManager=function(g){this.graphManager=g},I.exports=s},function(I,_,T){function c(){}c.seed=1,c.x=0,c.nextDouble=function(){return c.x=1e4*Math.sin(c.seed++),c.x-Math.floor(c.x)},I.exports=c},function(I,_,T){var c=T(5);function i(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},i.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},i.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},i.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},i.prototype.inverseTransformPoint=function(a){return new c(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},I.exports=i},function(I,_,T){var c=T(15),i=T(4),a=T(0),r=T(8),n=T(9);function t(){c.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var o in t.prototype=Object.create(c.prototype),c)t[o]=c[o];t.prototype.initParameters=function(){c.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},t.prototype.calcIdealEdgeLengths=function(){for(var e,l,s,g,d,v,m,E=this.getGraphManager().getAllEdges(),w=0;w<E.length;w++)l=(e=E[w]).idealLength,e.isInterGraph&&(g=e.getSource(),d=e.getTarget(),v=e.getSourceInLca().getEstimatedSize(),m=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=v+m-2*a.SIMPLE_NODE_SIZE),s=e.getLca().getInclusionTreeDepth(),e.idealLength+=l*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*s))},t.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},t.prototype.calcSpringForces=function(){for(var e,l=this.getAllEdges(),s=0;s<l.length;s++)e=l[s],this.calcSpringForce(e,e.idealLength)},t.prototype.calcRepulsionForces=function(){var e,l,s,g,d,v=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],m=arguments.length>1&&arguments[1]!==void 0&&arguments[1],E=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&v&&this.updateGrid(),d=new Set,e=0;e<E.length;e++)s=E[e],this.calculateRepulsionForceOfANode(s,d,v,m),d.add(s);else for(e=0;e<E.length;e++)for(s=E[e],l=e+1;l<E.length;l++)g=E[l],s.getOwner()==g.getOwner()&&this.calcRepulsionForce(s,g)},t.prototype.calcGravitationalForces=function(){for(var e,l=this.getAllNodesToApplyGravitation(),s=0;s<l.length;s++)e=l[s],this.calcGravitationalForce(e)},t.prototype.moveNodes=function(){for(var e=this.getAllNodes(),l=0;l<e.length;l++)e[l].move()},t.prototype.calcSpringForce=function(e,l){var s,g,d,v,m=e.getSource(),E=e.getTarget();if(this.uniformLeafNodeSizes&&m.getChild()==null&&E.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;(s=e.getLength())!=0&&(d=(g=e.edgeElasticity*(s-l))*(e.lengthX/s),v=g*(e.lengthY/s),m.springForceX+=d,m.springForceY+=v,E.springForceX-=d,E.springForceY-=v)},t.prototype.calcRepulsionForce=function(e,l){var s,g,d,v,m,E,w,C=e.getRect(),S=l.getRect(),R=new Array(2),k=new Array(4);if(C.intersects(S)){r.calcSeparationAmount(C,S,R,i.DEFAULT_EDGE_LENGTH/2),E=2*R[0],w=2*R[1];var X=e.noOfChildren*l.noOfChildren/(e.noOfChildren+l.noOfChildren);e.repulsionForceX-=X*E,e.repulsionForceY-=X*w,l.repulsionForceX+=X*E,l.repulsionForceY+=X*w}else this.uniformLeafNodeSizes&&e.getChild()==null&&l.getChild()==null?(s=S.getCenterX()-C.getCenterX(),g=S.getCenterY()-C.getCenterY()):(r.getIntersection(C,S,k),s=k[2]-k[0],g=k[3]-k[1]),Math.abs(s)<i.MIN_REPULSION_DIST&&(s=n.sign(s)*i.MIN_REPULSION_DIST),Math.abs(g)<i.MIN_REPULSION_DIST&&(g=n.sign(g)*i.MIN_REPULSION_DIST),d=s*s+g*g,v=Math.sqrt(d),E=(m=(e.nodeRepulsion/2+l.nodeRepulsion/2)*e.noOfChildren*l.noOfChildren/d)*s/v,w=m*g/v,e.repulsionForceX-=E,e.repulsionForceY-=w,l.repulsionForceX+=E,l.repulsionForceY+=w},t.prototype.calcGravitationalForce=function(e){var l,s,g,d,v,m,E,w;s=((l=e.getOwner()).getRight()+l.getLeft())/2,g=(l.getTop()+l.getBottom())/2,d=e.getCenterX()-s,v=e.getCenterY()-g,m=Math.abs(d)+e.getWidth()/2,E=Math.abs(v)+e.getHeight()/2,e.getOwner()==this.graphManager.getRoot()?(m>(w=l.getEstimatedSize()*this.gravityRangeFactor)||E>w)&&(e.gravitationForceX=-this.gravityConstant*d,e.gravitationForceY=-this.gravityConstant*v):(m>(w=l.getEstimatedSize()*this.compoundGravityRangeFactor)||E>w)&&(e.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant)},t.prototype.isConverged=function(){var e,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||l},t.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},t.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,l=this.graphManager.getAllNodes(),s=0;s<l.length;s++)(e=l[s]).noOfChildren=e.getNoOfChildren()},t.prototype.calcGrid=function(e){var l,s;l=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var g=new Array(l),d=0;d<l;d++)g[d]=new Array(s);for(d=0;d<l;d++)for(var v=0;v<s;v++)g[d][v]=new Array;return g},t.prototype.addNodeToGrid=function(e,l,s){var g,d,v,m;g=parseInt(Math.floor((e.getRect().x-l)/this.repulsionRange)),d=parseInt(Math.floor((e.getRect().width+e.getRect().x-l)/this.repulsionRange)),v=parseInt(Math.floor((e.getRect().y-s)/this.repulsionRange)),m=parseInt(Math.floor((e.getRect().height+e.getRect().y-s)/this.repulsionRange));for(var E=g;E<=d;E++)for(var w=v;w<=m;w++)this.grid[E][w].push(e),e.setGridCoordinates(g,d,v,m)},t.prototype.updateGrid=function(){var e,l,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<s.length;e++)l=s[e],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},t.prototype.calculateRepulsionForceOfANode=function(e,l,s,g){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&s||g){var d,v=new Set;e.surrounding=new Array;for(var m=this.grid,E=e.startX-1;E<e.finishX+2;E++)for(var w=e.startY-1;w<e.finishY+2;w++)if(!(E<0||w<0||E>=m.length||w>=m[0].length)){for(var C=0;C<m[E][w].length;C++)if(d=m[E][w][C],e.getOwner()==d.getOwner()&&e!=d&&!l.has(d)&&!v.has(d)){var S=Math.abs(e.getCenterX()-d.getCenterX())-(e.getWidth()/2+d.getWidth()/2),R=Math.abs(e.getCenterY()-d.getCenterY())-(e.getHeight()/2+d.getHeight()/2);S<=this.repulsionRange&&R<=this.repulsionRange&&v.add(d)}}e.surrounding=[].concat(function(k){if(Array.isArray(k)){for(var X=0,W=Array(k.length);X<k.length;X++)W[X]=k[X];return W}return Array.from(k)}(v))}for(E=0;E<e.surrounding.length;E++)this.calcRepulsionForce(e,e.surrounding[E])},t.prototype.calcRepulsionRange=function(){return 0},I.exports=t},function(I,_,T){var c=T(1),i=T(4);function a(n,t,o){c.call(this,n,t,o),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}for(var r in a.prototype=Object.create(c.prototype),c)a[r]=c[r];I.exports=a},function(I,_,T){var c=T(3),i=T(4);function a(n,t,o,e){c.call(this,n,t,o,e),this.nodeRepulsion=i.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=[]}for(var r in a.prototype=Object.create(c.prototype),c)a[r]=c[r];a.prototype.setGridCoordinates=function(n,t,o,e){this.startX=n,this.finishX=t,this.startY=o,this.finishY=e},I.exports=a},function(I,_,T){function c(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i)}c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(i){this.width=i},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(i){this.height=i},I.exports=c},function(I,_,T){var c=T(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(a,r){var n=c.createID(a);this.contains(n)||(this.map[n]=r,this.keys.push(a))},i.prototype.contains=function(a){return c.createID(a),this.map[a]!=null},i.prototype.get=function(a){var r=c.createID(a);return this.map[r]},i.prototype.keySet=function(){return this.keys},I.exports=i},function(I,_,T){var c=T(14);function i(){this.set={}}i.prototype.add=function(a){var r=c.createID(a);this.contains(r)||(this.set[r]=a)},i.prototype.remove=function(a){delete this.set[c.createID(a)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(a){return this.set[c.createID(a)]==a},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(a){for(var r=Object.keys(this.set),n=r.length,t=0;t<n;t++)a.push(this.set[r[t]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(a){for(var r=a.length,n=0;n<r;n++){var t=a[n];this.add(t)}},I.exports=i},function(I,_,T){function c(){}c.multMat=function(i,a){for(var r=[],n=0;n<i.length;n++){r[n]=[];for(var t=0;t<a[0].length;t++){r[n][t]=0;for(var o=0;o<i[0].length;o++)r[n][t]+=i[n][o]*a[o][t]}}return r},c.transpose=function(i){for(var a=[],r=0;r<i[0].length;r++){a[r]=[];for(var n=0;n<i.length;n++)a[r][n]=i[n][r]}return a},c.multCons=function(i,a){for(var r=[],n=0;n<i.length;n++)r[n]=i[n]*a;return r},c.minusOp=function(i,a){for(var r=[],n=0;n<i.length;n++)r[n]=i[n]-a[n];return r},c.dotProduct=function(i,a){for(var r=0,n=0;n<i.length;n++)r+=i[n]*a[n];return r},c.mag=function(i){return Math.sqrt(this.dotProduct(i,i))},c.normalize=function(i){for(var a=[],r=this.mag(i),n=0;n<i.length;n++)a[n]=i[n]/r;return a},c.multGamma=function(i){for(var a=[],r=0,n=0;n<i.length;n++)r+=i[n];r*=-1/i.length;for(var t=0;t<i.length;t++)a[t]=r+i[t];return a},c.multL=function(i,a,r){for(var n=[],t=[],o=[],e=0;e<a[0].length;e++){for(var l=0,s=0;s<a.length;s++)l+=-.5*a[s][e]*i[s];t[e]=l}for(var g=0;g<r.length;g++){for(var d=0,v=0;v<r.length;v++)d+=r[g][v]*t[v];o[g]=d}for(var m=0;m<a.length;m++){for(var E=0,w=0;w<a[0].length;w++)E+=a[m][w]*o[w];n[m]=E}return n},I.exports=c},function(I,_,T){var c=function(){function r(n,t){for(var o=0;o<t.length;o++){var e=t[o];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}return function(n,t,o){return t&&r(n.prototype,t),o&&r(n,o),n}}(),i=T(11),a=function(){function r(n,t){(function(e,l){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),t===null&&t===void 0||(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=n instanceof i?n.size():n.length,this._quicksort(n,0,o-1)}return c(r,[{key:"_quicksort",value:function(n,t,o){if(t<o){var e=this._partition(n,t,o);this._quicksort(n,t,e),this._quicksort(n,e+1,o)}}},{key:"_partition",value:function(n,t,o){for(var e=this._get(n,t),l=t,s=o;;){for(;this.compareFunction(e,this._get(n,s));)s--;for(;this.compareFunction(this._get(n,l),e);)l++;if(!(l<s))return s;this._swap(n,l,s),l++,s--}}},{key:"_get",value:function(n,t){return n instanceof i?n.get_object_at(t):n[t]}},{key:"_set",value:function(n,t,o){n instanceof i?n.set_object_at(t,o):n[t]=o}},{key:"_swap",value:function(n,t,o){var e=this._get(n,t);this._set(n,t,this._get(n,o)),this._set(n,o,e)}},{key:"_defaultCompareFunction",value:function(n,t){return t>n}}]),r}();I.exports=a},function(I,_,T){function c(){}c.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(Lt){for(var lt=[];Lt-- >0;)lt.push(0);return lt}(Math.min(this.m+1,this.n)),this.U=function Lt(lt){if(lt.length==0)return 0;for(var Pt=[],Xt=0;Xt<lt[0];Xt++)Pt.push(Lt(lt.slice(1)));return Pt}([this.m,a]),this.V=function(Lt){return function lt(Pt){if(Pt.length==0)return 0;for(var Xt=[],$t=0;$t<Pt[0];$t++)Xt.push(lt(Pt.slice(1)));return Xt}(Lt)}([this.n,this.n]);for(var r,n,t=function(Lt){for(var lt=[];Lt-- >0;)lt.push(0);return lt}(this.n),o=function(Lt){for(var lt=[];Lt-- >0;)lt.push(0);return lt}(this.m),e=Math.min(this.m-1,this.n),l=Math.max(0,Math.min(this.n-2,this.m)),s=0;s<Math.max(e,l);s++){if(s<e){this.s[s]=0;for(var g=s;g<this.m;g++)this.s[s]=c.hypot(this.s[s],i[g][s]);if(this.s[s]!==0){i[s][s]<0&&(this.s[s]=-this.s[s]);for(var d=s;d<this.m;d++)i[d][s]/=this.s[s];i[s][s]+=1}this.s[s]=-this.s[s]}for(var v=s+1;v<this.n;v++){if(r=s<e,n=this.s[s]!==0,r&&n){for(var m=0,E=s;E<this.m;E++)m+=i[E][s]*i[E][v];m=-m/i[s][s];for(var w=s;w<this.m;w++)i[w][v]+=m*i[w][s]}t[v]=i[s][v]}if(function(Lt,lt){return lt}(0,s<e))for(var C=s;C<this.m;C++)this.U[C][s]=i[C][s];if(s<l){t[s]=0;for(var S=s+1;S<this.n;S++)t[s]=c.hypot(t[s],t[S]);if(t[s]!==0){t[s+1]<0&&(t[s]=-t[s]);for(var R=s+1;R<this.n;R++)t[R]/=t[s];t[s+1]+=1}if(t[s]=-t[s],function(Lt,lt){return Lt&<}(s+1<this.m,t[s]!==0)){for(var k=s+1;k<this.m;k++)o[k]=0;for(var X=s+1;X<this.n;X++)for(var W=s+1;W<this.m;W++)o[W]+=t[X]*i[W][X];for(var M=s+1;M<this.n;M++)for(var j=-t[M]/t[s+1],h=s+1;h<this.m;h++)i[h][M]+=j*o[h]}for(var f=s+1;f<this.n;f++)this.V[f][s]=t[f]}}var u=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=i[e][e]),this.m<u&&(this.s[u-1]=0),l+1<u&&(t[l]=i[l][u-1]),t[u-1]=0;for(var y=e;y<a;y++){for(var p=0;p<this.m;p++)this.U[p][y]=0;this.U[y][y]=1}for(var A=e-1;A>=0;A--)if(this.s[A]!==0){for(var L=A+1;L<a;L++){for(var O=0,G=A;G<this.m;G++)O+=this.U[G][A]*this.U[G][L];O=-O/this.U[A][A];for(var b=A;b<this.m;b++)this.U[b][L]+=O*this.U[b][A]}for(var P=A;P<this.m;P++)this.U[P][A]=-this.U[P][A];this.U[A][A]=1+this.U[A][A];for(var F=0;F<A-1;F++)this.U[F][A]=0}else{for(var V=0;V<this.m;V++)this.U[V][A]=0;this.U[A][A]=1}for(var z=this.n-1;z>=0;z--){if(function(Lt,lt){return Lt&<}(z<l,t[z]!==0))for(var U=z+1;U<a;U++){for(var x=0,H=z+1;H<this.n;H++)x+=this.V[H][z]*this.V[H][U];x=-x/this.V[z+1][z];for(var $=z+1;$<this.n;$++)this.V[$][U]+=x*this.V[$][z]}for(var tt=0;tt<this.n;tt++)this.V[tt][z]=0;this.V[z][z]=1}for(var ot=u-1,wt=Math.pow(2,-52),Nt=Math.pow(2,-966);u>0;){var B=void 0,St=void 0;for(B=u-2;B>=-1&&B!==-1;B--)if(Math.abs(t[B])<=Nt+wt*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){t[B]=0;break}if(B===u-2)St=4;else{var Tt=void 0;for(Tt=u-1;Tt>=B&&Tt!==B;Tt--){var st=(Tt!==u?Math.abs(t[Tt]):0)+(Tt!==B+1?Math.abs(t[Tt-1]):0);if(Math.abs(this.s[Tt])<=Nt+wt*st){this.s[Tt]=0;break}}Tt===B?St=3:Tt===u-1?St=1:(St=2,B=Tt)}switch(B++,St){case 1:var ht=t[u-2];t[u-2]=0;for(var it=u-2;it>=B;it--){var ct=c.hypot(this.s[it],ht),It=this.s[it]/ct,mt=ht/ct;this.s[it]=ct,it!==B&&(ht=-mt*t[it-1],t[it-1]=It*t[it-1]);for(var gt=0;gt<this.n;gt++)ct=It*this.V[gt][it]+mt*this.V[gt][u-1],this.V[gt][u-1]=-mt*this.V[gt][it]+It*this.V[gt][u-1],this.V[gt][it]=ct}break;case 2:var _t=t[B-1];t[B-1]=0;for(var vt=B;vt<u;vt++){var Mt=c.hypot(this.s[vt],_t),Rt=this.s[vt]/Mt,Ot=_t/Mt;this.s[vt]=Mt,_t=-Ot*t[vt],t[vt]=Rt*t[vt];for(var D=0;D<this.m;D++)Mt=Rt*this.U[D][vt]+Ot*this.U[D][B-1],this.U[D][B-1]=-Ot*this.U[D][vt]+Rt*this.U[D][B-1],this.U[D][vt]=Mt}break;case 3:var Y=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[B])),Math.abs(t[B])),Q=this.s[u-1]/Y,K=this.s[u-2]/Y,nt=t[u-2]/Y,Ct=this.s[B]/Y,at=t[B]/Y,ft=((K+Q)*(K-Q)+nt*nt)/2,yt=Q*nt*(Q*nt),kt=0;(function(Lt,lt){return Lt||lt})(ft!==0,yt!==0)&&(kt=Math.sqrt(ft*ft+yt),ft<0&&(kt=-kt),kt=yt/(ft+kt));for(var Dt=(Ct+Q)*(Ct-Q)+kt,Et=Ct*at,q=B;q<u-1;q++){var Z=c.hypot(Dt,Et),ut=Dt/Z,pt=Et/Z;q!==B&&(t[q-1]=Z),Dt=ut*this.s[q]+pt*t[q],t[q]=ut*t[q]-pt*this.s[q],Et=pt*this.s[q+1],this.s[q+1]=ut*this.s[q+1];for(var et=0;et<this.n;et++)Z=ut*this.V[et][q]+pt*this.V[et][q+1],this.V[et][q+1]=-pt*this.V[et][q]+ut*this.V[et][q+1],this.V[et][q]=Z;if(ut=Dt/(Z=c.hypot(Dt,Et)),pt=Et/Z,this.s[q]=Z,Dt=ut*t[q]+pt*this.s[q+1],this.s[q+1]=-pt*t[q]+ut*this.s[q+1],Et=pt*t[q+1],t[q+1]=ut*t[q+1],q<this.m-1)for(var xt=0;xt<this.m;xt++)Z=ut*this.U[xt][q]+pt*this.U[xt][q+1],this.U[xt][q+1]=-pt*this.U[xt][q]+ut*this.U[xt][q+1],this.U[xt][q]=Z}t[u-2]=Dt;break;case 4:if(this.s[B]<=0){this.s[B]=this.s[B]<0?-this.s[B]:0;for(var Ut=0;Ut<=ot;Ut++)this.V[Ut][B]=-this.V[Ut][B]}for(;B<ot&&!(this.s[B]>=this.s[B+1]);){var bt=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=bt,B<this.n-1)for(var Yt=0;Yt<this.n;Yt++)bt=this.V[Yt][B+1],this.V[Yt][B+1]=this.V[Yt][B],this.V[Yt][B]=bt;if(B<this.m-1)for(var Gt=0;Gt<this.m;Gt++)bt=this.U[Gt][B+1],this.U[Gt][B+1]=this.U[Gt][B],this.U[Gt][B]=bt;B++}u--}}return{U:this.U,V:this.V,S:this.s}},c.hypot=function(i,a){var r=void 0;return Math.abs(i)>Math.abs(a)?(r=a/i,r=Math.abs(i)*Math.sqrt(1+r*r)):a!=0?(r=i/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},I.exports=c},function(I,_,T){var c=function(){function a(r,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,n,t){return n&&a(r.prototype,n),t&&a(r,t),r}}(),i=function(){function a(r,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,e=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")})(this,a),this.sequence1=r,this.sequence2=n,this.match_score=t,this.mismatch_penalty=o,this.gap_penalty=e,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[l][s]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[g][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return c(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var t=1;t<this.iMax;t++)for(var o=1;o<this.jMax;o++){var e=[this.sequence1[t-1]===this.sequence2[o-1]?this.grid[t-1][o-1]+this.match_score:this.grid[t-1][o-1]+this.mismatch_penalty,this.grid[t-1][o]+this.gap_penalty,this.grid[t][o-1]+this.gap_penalty],l=this.arrayAllMaxIndexes(e);this.grid[t][o]=e[l[0]],this.tracebackGrid[t][o]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],t=this.tracebackGrid[n.pos[0]][n.pos[1]];t[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),t[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),t[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var t=[],o=-1;(o=r.indexOf(n,o+1))!==-1;)t.push(o);return t}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),a}();I.exports=i},function(I,_,T){var c=function(){};c.FDLayout=T(18),c.FDLayoutConstants=T(4),c.FDLayoutEdge=T(19),c.FDLayoutNode=T(20),c.DimensionD=T(21),c.HashMap=T(22),c.HashSet=T(23),c.IGeometry=T(8),c.IMath=T(9),c.Integer=T(10),c.Point=T(12),c.PointD=T(5),c.RandomSeed=T(16),c.RectangleD=T(13),c.Transform=T(17),c.UniqueIDGeneretor=T(14),c.Quicksort=T(25),c.LinkedList=T(11),c.LGraphObject=T(2),c.LGraph=T(6),c.LEdge=T(1),c.LGraphManager=T(7),c.LNode=T(3),c.Layout=T(15),c.LayoutConstants=T(0),c.NeedlemanWunsch=T(27),c.Matrix=T(24),c.SVD=T(26),I.exports=c},function(I,_,T){function c(){this.listeners=[]}var i=c.prototype;i.addListener=function(a,r){this.listeners.push({event:a,callback:r})},i.removeListener=function(a,r){for(var n=this.listeners.length;n>=0;n--){var t=this.listeners[n];t.event===a&&t.callback===r&&this.listeners.splice(n,1)}},i.emit=function(a,r){for(var n=0;n<this.listeners.length;n++){var t=this.listeners[n];a===t.event&&t.callback(r)}},I.exports=c}])},_e.exports=N());var N}var Ce;function lr(){return Ce?Le.exports:(Ce=1,N=function(I){return _={45:(i,a,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),i.exports=n},806:(i,a,r)=>{var n=r(551).FDLayoutConstants;function t(){}for(var o in n)t[o]=n[o];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,t.ENFORCE_CONSTRAINTS=!0,t.APPLY_LAYOUT=!0,t.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,t.TREE_REDUCTION_ON_INCREMENTAL=!0,t.PURE_INCREMENTAL=t.DEFAULT_INCREMENTAL,i.exports=t},767:(i,a,r)=>{var n=r(551).FDLayoutEdge;function t(e,l,s){n.call(this,e,l,s)}for(var o in t.prototype=Object.create(n.prototype),n)t[o]=n[o];i.exports=t},880:(i,a,r)=>{var n=r(551).LGraph;function t(e,l,s){n.call(this,e,l,s)}for(var o in t.prototype=Object.create(n.prototype),n)t[o]=n[o];i.exports=t},578:(i,a,r)=>{var n=r(551).LGraphManager;function t(e){n.call(this,e)}for(var o in t.prototype=Object.create(n.prototype),n)t[o]=n[o];i.exports=t},765:(i,a,r)=>{var n=r(551).FDLayout,t=r(578),o=r(880),e=r(991),l=r(767),s=r(806),g=r(902),d=r(551).FDLayoutConstants,v=r(551).LayoutConstants,m=r(551).Point,E=r(551).PointD,w=r(551).DimensionD,C=r(551).Layout,S=r(551).Integer,R=r(551).IGeometry,k=r(551).LGraph,X=r(551).Transform,W=r(551).LinkedList;function M(){n.call(this),this.toBeTiled={},this.constraints={}}for(var j in M.prototype=Object.create(n.prototype),n)M[j]=n[j];M.prototype.newGraphManager=function(){var h=new t(this);return this.graphManager=h,h},M.prototype.newGraph=function(h){return new o(null,this.graphManager,h)},M.prototype.newNode=function(h){return new e(this.graphManager,h)},M.prototype.newEdge=function(h){return new l(null,null,h)},M.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){return v.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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)s.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),f=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(y){return f.has(y)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var h=this.getFlatForest();if(h.length>0)this.positionNodesRadially(h);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(y){return f.has(y)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var h=this.graphManager.getAllNodes(),f={},u=0;u<h.length;u++){var y=h[u].rect,p=h[u].id;f[p]={id:p,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return f},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!h;)h=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var h=this.getAllNodes(),f=0;f<h.length;f++)h[f].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),f=0;f<h.length;f++)h[f].move()},M.prototype.initConstraintVariables=function(){var h=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var f=this.graphManager.getAllNodes(),u=0;u<f.length;u++){var y=f[u];this.idToNodeMap.set(y.id,y)}var p=function x(H){for(var $,tt=H.getChild().getNodes(),ot=0,wt=0;wt<tt.length;wt++)($=tt[wt]).getChild()==null?h.fixedNodeSet.has($.id)&&(ot+=100):ot+=x($);return ot};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(x){h.fixedNodeSet.add(x.nodeId)}),f=this.graphManager.getAllNodes(),u=0;u<f.length;u++)if((y=f[u]).getChild()!=null){var A=p(y);A>0&&(y.fixedNodeWeight=A)}}if(this.constraints.relativePlacementConstraint){var L=new Map,O=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 G=this.constraints.alignmentConstraint.vertical;for(u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(x){L.set(x,"dummy"+u),h.dummyToNodeForVerticalAlignment.get("dummy"+u).push(x),h.fixedNodeSet.has(x)&&h.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var b=this.constraints.alignmentConstraint.horizontal;for(u=0;u<b.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),b[u].forEach(function(x){O.set(x,"dummy"+u),h.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(x),h.fixedNodeSet.has(x)&&h.fixedNodesOnVertical.add("dummy"+u)})}}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(x){var H,$,tt;for(tt=x.length-1;tt>=2*x.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),$=x[tt],x[tt]=x[H],x[H]=$;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 H=L.has(x.left)?L.get(x.left):x.left,$=L.has(x.right)?L.get(x.right):x.right;h.nodesInRelativeHorizontal.includes(H)||(h.nodesInRelativeHorizontal.push(H),h.nodeToRelativeConstraintMapHorizontal.set(H,[]),h.dummyToNodeForVerticalAlignment.has(H)?h.nodeToTempPositionMapHorizontal.set(H,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set(H,h.idToNodeMap.get(H).getCenterX())),h.nodesInRelativeHorizontal.includes($)||(h.nodesInRelativeHorizontal.push($),h.nodeToRelativeConstraintMapHorizontal.set($,[]),h.dummyToNodeForVerticalAlignment.has($)?h.nodeToTempPositionMapHorizontal.set($,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set($,h.idToNodeMap.get($).getCenterX())),h.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:x.gap}),h.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:x.gap})}else{var tt=O.has(x.top)?O.get(x.top):x.top,ot=O.has(x.bottom)?O.get(x.bottom):x.bottom;h.nodesInRelativeVertical.includes(tt)||(h.nodesInRelativeVertical.push(tt),h.nodeToRelativeConstraintMapVertical.set(tt,[]),h.dummyToNodeForHorizontalAlignment.has(tt)?h.nodeToTempPositionMapVertical.set(tt,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(tt,h.idToNodeMap.get(tt).getCenterY())),h.nodesInRelativeVertical.includes(ot)||(h.nodesInRelativeVertical.push(ot),h.nodeToRelativeConstraintMapVertical.set(ot,[]),h.dummyToNodeForHorizontalAlignment.has(ot)?h.nodeToTempPositionMapVertical.set(ot,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(ot)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(ot,h.idToNodeMap.get(ot).getCenterY())),h.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ot,gap:x.gap}),h.nodeToRelativeConstraintMapVertical.get(ot).push({top:tt,gap:x.gap})}});else{var P=new Map,F=new Map;this.constraints.relativePlacementConstraint.forEach(function(x){if(x.left){var H=L.has(x.left)?L.get(x.left):x.left,$=L.has(x.right)?L.get(x.right):x.right;P.has(H)?P.get(H).push($):P.set(H,[$]),P.has($)?P.get($).push(H):P.set($,[H])}else{var tt=O.has(x.top)?O.get(x.top):x.top,ot=O.has(x.bottom)?O.get(x.bottom):x.bottom;F.has(tt)?F.get(tt).push(ot):F.set(tt,[ot]),F.has(ot)?F.get(ot).push(tt):F.set(ot,[tt])}});var V=function(x,H){var $=[],tt=[],ot=new W,wt=new Set,Nt=0;return x.forEach(function(B,St){if(!wt.has(St)){$[Nt]=[],tt[Nt]=!1;var Tt=St;for(ot.push(Tt),wt.add(Tt),$[Nt].push(Tt);ot.length!=0;)Tt=ot.shift(),H.has(Tt)&&(tt[Nt]=!0),x.get(Tt).forEach(function(st){wt.has(st)||(ot.push(st),wt.add(st),$[Nt].push(st))});Nt++}}),{components:$,isFixed:tt}},z=V(P,h.fixedNodesOnHorizontal);this.componentsOnHorizontal=z.components,this.fixedComponentsOnHorizontal=z.isFixed;var U=V(F,h.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},M.prototype.updateDisplacements=function(){var h=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var x=h.idToNodeMap.get(U.nodeId);x.displacementX=0,x.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var f=this.constraints.alignmentConstraint.vertical,u=0;u<f.length;u++){for(var y=0,p=0;p<f[u].length;p++){if(this.fixedNodeSet.has(f[u][p])){y=0;break}y+=this.idToNodeMap.get(f[u][p]).displacementX}var A=y/f[u].length;for(p=0;p<f[u].length;p++)this.idToNodeMap.get(f[u][p]).displacementX=A}if(this.constraints.alignmentConstraint.horizontal){var L=this.constraints.alignmentConstraint.horizontal;for(u=0;u<L.length;u++){var O=0;for(p=0;p<L[u].length;p++){if(this.fixedNodeSet.has(L[u][p])){O=0;break}O+=this.idToNodeMap.get(L[u][p]).displacementY}var G=O/L[u].length;for(p=0;p<L[u].length;p++)this.idToNodeMap.get(L[u][p]).displacementY=G}}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!h.fixedNodesOnHorizontal.has(U)){var x=0;x=h.dummyToNodeForVerticalAlignment.has(U)?h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:h.idToNodeMap.get(U).displacementX,h.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(H){var $;H.right?($=h.nodeToTempPositionMapHorizontal.get(H.right)-h.nodeToTempPositionMapHorizontal.get(U)-x)<H.gap&&(x-=H.gap-$):($=h.nodeToTempPositionMapHorizontal.get(U)-h.nodeToTempPositionMapHorizontal.get(H.left)+x)<H.gap&&(x+=H.gap-$)}),h.nodeToTempPositionMapHorizontal.set(U,h.nodeToTempPositionMapHorizontal.get(U)+x),h.dummyToNodeForVerticalAlignment.has(U)?h.dummyToNodeForVerticalAlignment.get(U).forEach(function(H){h.idToNodeMap.get(H).displacementX=x}):h.idToNodeMap.get(U).displacementX=x}}),this.nodesInRelativeVertical.forEach(function(U){if(!h.fixedNodesOnHorizontal.has(U)){var x=0;x=h.dummyToNodeForHorizontalAlignment.has(U)?h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:h.idToNodeMap.get(U).displacementY,h.nodeToRelativeConstraintMapVertical.get(U).forEach(function(H){var $;H.bottom?($=h.nodeToTempPositionMapVertical.get(H.bottom)-h.nodeToTempPositionMapVertical.get(U)-x)<H.gap&&(x-=H.gap-$):($=h.nodeToTempPositionMapVertical.get(U)-h.nodeToTempPositionMapVertical.get(H.top)+x)<H.gap&&(x+=H.gap-$)}),h.nodeToTempPositionMapVertical.set(U,h.nodeToTempPositionMapVertical.get(U)+x),h.dummyToNodeForHorizontalAlignment.has(U)?h.dummyToNodeForHorizontalAlignment.get(U).forEach(function(H){h.idToNodeMap.get(H).displacementY=x}):h.idToNodeMap.get(U).displacementY=x}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var b=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(p=0;p<b.length;p++)this.dummyToNodeForVerticalAlignment.has(b[p])?this.dummyToNodeForVerticalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(b[p]).displacementX=0;else{var P=0,F=0;for(p=0;p<b.length;p++)this.dummyToNodeForVerticalAlignment.has(b[p])?(P+=(z=this.dummyToNodeForVerticalAlignment.get(b[p])).length*this.idToNodeMap.get(z[0]).displacementX,F+=z.length):(P+=this.idToNodeMap.get(b[p]).displacementX,F++);var V=P/F;for(p=0;p<b.length;p++)this.dummyToNodeForVerticalAlignment.has(b[p])?this.dummyToNodeForVerticalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementX=V}):this.idToNodeMap.get(b[p]).displacementX=V}}for(u=0;u<this.componentsOnVertical.length;u++)if(b=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(p=0;p<b.length;p++)this.dummyToNodeForHorizontalAlignment.has(b[p])?this.dummyToNodeForHorizontalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(b[p]).displacementY=0;else{for(P=0,F=0,p=0;p<b.length;p++){var z;this.dummyToNodeForHorizontalAlignment.has(b[p])?(P+=(z=this.dummyToNodeForHorizontalAlignment.get(b[p])).length*this.idToNodeMap.get(z[0]).displacementY,F+=z.length):(P+=this.idToNodeMap.get(b[p]).displacementY,F++)}for(V=P/F,p=0;p<b.length;p++)this.dummyToNodeForHorizontalAlignment.has(b[p])?this.dummyToNodeForHorizontalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementY=V}):this.idToNodeMap.get(b[p]).displacementY=V}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var h,f,u=[],y=this.graphManager.getGraphs(),p=y.length;for(f=0;f<p;f++)(h=y[f]).updateConnected(),h.isConnected||(u=u.concat(h.getNodes()));return u},M.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var f,u=new Set;for(f=0;f<h.length;f++){var y=h[f];if(!u.has(y)){var p=y.getSource(),A=y.getTarget();if(p==A)y.getBendpoints().push(new E),y.getBendpoints().push(new E),this.createDummyNodesForBendpoints(y),u.add(y);else{var L=[];if(L=(L=L.concat(p.getEdgeListToNode(A))).concat(A.getEdgeListToNode(p)),!u.has(L[0])){var O;if(L.length>1)for(O=0;O<L.length;O++){var G=L[O];G.getBendpoints().push(new E),this.createDummyNodesForBendpoints(G)}L.forEach(function(b){u.add(b)})}}}if(u.size==h.length)break}},M.prototype.positionNodesRadially=function(h){for(var f=new m(0,0),u=Math.ceil(Math.sqrt(h.length)),y=0,p=0,A=0,L=new E(0,0),O=0;O<h.length;O++){O%u==0&&(A=0,p=y,O!=0&&(p+=s.DEFAULT_COMPONENT_SEPERATION),y=0);var G=h[O],b=C.findCenterOfTree(G);f.x=A,f.y=p,(L=M.radialLayout(G,b,f)).y>y&&(y=Math.floor(L.y)),A=Math.floor(L.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(v.WORLD_CENTER_X-L.x/2,v.WORLD_CENTER_Y-L.y/2))},M.radialLayout=function(h,f,u){var y=Math.max(this.maxDiagonalInTree(h),s.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(f,null,0,359,0,y);var p=k.calculateBounds(h),A=new X;A.setDeviceOrgX(p.getMinX()),A.setDeviceOrgY(p.getMinY()),A.setWorldOrgX(u.x),A.setWorldOrgY(u.y);for(var L=0;L<h.length;L++)h[L].transform(A);var O=new E(p.getMaxX(),p.getMaxY());return A.inverseTransformPoint(O)},M.branchRadialLayout=function(h,f,u,y,p,A){var L=(y-u+1)/2;L<0&&(L+=180);var O=(L+u)%360*R.TWO_PI/360,G=p*Math.cos(O),b=p*Math.sin(O);h.setCenter(G,b);var P=[],F=(P=P.concat(h.getEdges())).length;f!=null&&F--;for(var V,z=0,U=P.length,x=h.getEdgesBetween(f);x.length>1;){var H=x[0];x.splice(0,1);var $=P.indexOf(H);$>=0&&P.splice($,1),U--,F--}V=f!=null?(P.indexOf(x[0])+1)%U:0;for(var tt=Math.abs(y-u)/F,ot=V;z!=F;ot=++ot%U){var wt=P[ot].getOtherEnd(h);if(wt!=f){var Nt=(u+z*tt)%360,B=(Nt+tt)%360;M.branchRadialLayout(wt,h,Nt,B,p+A,A),z++}}},M.maxDiagonalInTree=function(h){for(var f=S.MIN_VALUE,u=0;u<h.length;u++){var y=h[u].getDiagonal();y>f&&(f=y)}return f},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var h=this,f={};this.memberGroups={},this.idToDummyNode={};for(var u=[],y=this.graphManager.getAllNodes(),p=0;p<y.length;p++){var A=(L=y[p]).getParent();this.getNodeDegreeWithChildren(L)!==0||A.id!=null&&this.getToBeTiled(A)||u.push(L)}for(p=0;p<u.length;p++){var L,O=(L=u[p]).getParent().id;f[O]===void 0&&(f[O]=[]),f[O]=f[O].concat(L)}Object.keys(f).forEach(function(G){if(f[G].length>1){var b="DummyCompound_"+G;h.memberGroups[b]=f[G];var P=f[G][0].getParent(),F=new e(h.graphManager);F.id=b,F.paddingLeft=P.paddingLeft||0,F.paddingRight=P.paddingRight||0,F.paddingBottom=P.paddingBottom||0,F.paddingTop=P.paddingTop||0,h.idToDummyNode[b]=F;var V=h.getGraphManager().add(h.newGraph(),F),z=P.getChild();z.add(F);for(var U=0;U<f[G].length;U++){var x=f[G][U];z.remove(x),V.add(x)}}})},M.prototype.clearCompounds=function(){var h={},f={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)f[this.compoundOrder[u].id]=this.compoundOrder[u],h[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,f)},M.prototype.clearZeroDegreeMembers=function(){var h=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var y=h.idToDummyNode[u];if(f[u]=h.tileNodes(h.memberGroups[u],y.paddingLeft+y.paddingRight),y.rect.width=f[u].width,y.rect.height=f[u].height,y.setCenter(f[u].centerX,f[u].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var p=y.rect.width,A=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(p+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>p?(y.rect.x-=(y.labelWidth-p)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-p)/2):y.labelPosHorizontal=="right"&&y.setWidth(p+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(A+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>A?(y.rect.y-=(y.labelHeight-A)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-A)/2):y.labelPosVertical=="bottom"&&y.setHeight(A+y.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var f=this.compoundOrder[h],u=f.id,y=f.paddingLeft,p=f.paddingTop,A=f.labelMarginLeft,L=f.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],f.rect.x,f.rect.y,y,p,A,L)}},M.prototype.repopulateZeroDegreeMembers=function(){var h=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(u){var y=h.idToDummyNode[u],p=y.paddingLeft,A=y.paddingTop,L=y.labelMarginLeft,O=y.labelMarginTop;h.adjustLocations(f[u],y.rect.x,y.rect.y,p,A,L,O)})},M.prototype.getToBeTiled=function(h){var f=h.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var u=h.getChild();if(u==null)return this.toBeTiled[f]=!1,!1;for(var y=u.getNodes(),p=0;p<y.length;p++){var A=y[p];if(this.getNodeDegree(A)>0)return this.toBeTiled[f]=!1,!1;if(A.getChild()!=null){if(!this.getToBeTiled(A))return this.toBeTiled[f]=!1,!1}else this.toBeTiled[A.id]=!1}return this.toBeTiled[f]=!0,!0},M.prototype.getNodeDegree=function(h){h.id;for(var f=h.getEdges(),u=0,y=0;y<f.length;y++){var p=f[y];p.getSource().id!==p.getTarget().id&&(u+=1)}return u},M.prototype.getNodeDegreeWithChildren=function(h){var f=this.getNodeDegree(h);if(h.getChild()==null)return f;for(var u=h.getChild().getNodes(),y=0;y<u.length;y++){var p=u[y];f+=this.getNodeDegreeWithChildren(p)}return f},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(h){for(var f=0;f<h.length;f++){var u=h[f];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},M.prototype.adjustLocations=function(h,f,u,y,p,A,L){u+=p+L;for(var O=f+=y+A,G=0;G<h.rows.length;G++){var b=h.rows[G];f=O;for(var P=0,F=0;F<b.length;F++){var V=b[F];V.rect.x=f,V.rect.y=u,f+=V.rect.width+h.horizontalPadding,V.rect.height>P&&(P=V.rect.height)}u+=P+h.verticalPadding}},M.prototype.tileCompoundMembers=function(h,f){var u=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(y){var p=f[y];if(u.tiledMemberPack[y]=u.tileNodes(h[y],p.paddingLeft+p.paddingRight),p.rect.width=u.tiledMemberPack[y].width,p.rect.height=u.tiledMemberPack[y].height,p.setCenter(u.tiledMemberPack[y].centerX,u.tiledMemberPack[y].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var A=p.rect.width,L=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(A+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>A?(p.rect.x-=(p.labelWidth-A)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-A)/2):p.labelPosHorizontal=="right"&&p.setWidth(A+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(L+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>L?(p.rect.y-=(p.labelHeight-L)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-L)/2):p.labelPosVertical=="bottom"&&p.setHeight(L+p.labelHeight))}})},M.prototype.tileNodes=function(h,f){var u=this.tileNodesByFavoringDim(h,f,!0),y=this.tileNodesByFavoringDim(h,f,!1),p=this.getOrgRatio(u);return this.getOrgRatio(y)<p?y:u},M.prototype.getOrgRatio=function(h){var f=h.width/h.height;return f<1&&(f=1/f),f},M.prototype.calcIdealRowWidth=function(h,f){var u=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,p=h.length,A=0,L=0,O=0;h.forEach(function(U){A+=U.getWidth(),L+=U.getHeight(),U.getWidth()>O&&(O=U.getWidth())});var G,b=A/p,P=L/p,F=Math.pow(u-y,2)+4*(b+y)*(P+u)*p,V=(y-u+Math.sqrt(F))/(2*(b+y));f?(G=Math.ceil(V))==V&&G++:G=Math.floor(V);var z=G*(b+y)-y;return O>z&&(z=O),z+=2*y},M.prototype.tileNodesByFavoringDim=function(h,f,u){var y=s.TILING_PADDING_VERTICAL,p=s.TILING_PADDING_HORIZONTAL,A=s.TILING_COMPARE_BY,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:y,horizontalPadding:p,centerX:0,centerY:0};A&&(L.idealRowWidth=this.calcIdealRowWidth(h,u));var O=function(U){return U.rect.width*U.rect.height},G=function(U,x){return O(x)-O(U)};h.sort(function(U,x){var H=G;return L.idealRowWidth?(H=A)(U.id,x.id):H(U,x)});for(var b=0,P=0,F=0;F<h.length;F++)b+=(V=h[F]).getCenterX(),P+=V.getCenterY();for(L.centerX=b/h.length,L.centerY=P/h.length,F=0;F<h.length;F++){var V=h[F];if(L.rows.length==0)this.insertNodeToRow(L,V,0,f);else if(this.canAddHorizontal(L,V.rect.width,V.rect.height)){var z=L.rows.length-1;L.idealRowWidth||(z=this.getShortestRowIndex(L)),this.insertNodeToRow(L,V,z,f)}else this.insertNodeToRow(L,V,L.rows.length,f);this.shiftToLastRow(L)}return L},M.prototype.insertNodeToRow=function(h,f,u,y){var p=y;u==h.rows.length&&(h.rows.push([]),h.rowWidth.push(p),h.rowHeight.push(0));var A=h.rowWidth[u]+f.rect.width;h.rows[u].length>0&&(A+=h.horizontalPadding),h.rowWidth[u]=A,h.width<A&&(h.width=A);var L=f.rect.height;u>0&&(L+=h.verticalPadding);var O=0;L>h.rowHeight[u]&&(O=h.rowHeight[u],h.rowHeight[u]=L,O=h.rowHeight[u]-O),h.height+=O,h.rows[u].push(f)},M.prototype.getShortestRowIndex=function(h){for(var f=-1,u=Number.MAX_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]<u&&(f=y,u=h.rowWidth[y]);return f},M.prototype.getLongestRowIndex=function(h){for(var f=-1,u=Number.MIN_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]>u&&(f=y,u=h.rowWidth[y]);return f},M.prototype.canAddHorizontal=function(h,f,u){if(h.idealRowWidth){var y=h.rows.length-1;return h.rowWidth[y]+f+h.horizontalPadding<=h.idealRowWidth}var p=this.getShortestRowIndex(h);if(p<0)return!0;var A=h.rowWidth[p];if(A+h.horizontalPadding+f<=h.width)return!0;var L,O,G=0;return h.rowHeight[p]<u&&p>0&&(G=u+h.verticalPadding-h.rowHeight[p]),L=h.width-A>=f+h.horizontalPadding?(h.height+G)/(A+f+h.horizontalPadding):(h.height+G)/h.width,G=u+h.verticalPadding,(O=h.width<f?(h.height+G)/f:(h.height+G)/h.width)<1&&(O=1/O),L<1&&(L=1/L),L<O},M.prototype.shiftToLastRow=function(h){var f=this.getLongestRowIndex(h),u=h.rowWidth.length-1,y=h.rows[f],p=y[y.length-1],A=p.width+h.horizontalPadding;if(h.width-h.rowWidth[u]>A&&f!=u){y.splice(-1,1),h.rows[u].push(p),h.rowWidth[f]=h.rowWidth[f]-A,h.rowWidth[u]=h.rowWidth[u]+A,h.width=h.rowWidth[instance.getLongestRowIndex(h)];for(var L=Number.MIN_VALUE,O=0;O<y.length;O++)y[O].height>L&&(L=y[O].height);f>0&&(L+=h.verticalPadding);var G=h.rowHeight[f]+h.rowHeight[u];h.rowHeight[f]=L,h.rowHeight[u]<p.height+h.verticalPadding&&(h.rowHeight[u]=p.height+h.verticalPadding);var b=h.rowHeight[f]+h.rowHeight[u];h.height+=b-G,this.shiftToLastRow(h)}},M.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var h,f=[],u=!0;u;){var y=this.graphManager.getAllNodes(),p=[];u=!1;for(var A=0;A<y.length;A++)if((h=y[A]).getEdges().length==1&&!h.getEdges()[0].isInterGraph&&h.getChild()==null){if(s.PURE_INCREMENTAL){var L=h.getEdges()[0].getOtherEnd(h),O=new w(h.getCenterX()-L.getCenterX(),h.getCenterY()-L.getCenterY());p.push([h,h.getEdges()[0],h.getOwner(),O])}else p.push([h,h.getEdges()[0],h.getOwner()]);u=!0}if(u==1){for(var G=[],b=0;b<p.length;b++)p[b][0].getEdges().length==1&&(G.push(p[b]),p[b][0].getOwner().remove(p[b][0]));f.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=f},M.prototype.growTree=function(h){for(var f,u=h[h.length-1],y=0;y<u.length;y++)f=u[y],this.findPlaceforPrunedNode(f),f[2].add(f[0]),f[2].add(f[1],f[1].source,f[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(h){var f,u,y=h[0];if(u=y==h[1].source?h[1].target:h[1].source,s.PURE_INCREMENTAL)y.setCenter(u.getCenterX()+h[3].getWidth(),u.getCenterY()+h[3].getHeight());else{var p=u.startX,A=u.finishX,L=u.startY,O=u.finishY,G=[0,0,0,0];if(L>0)for(var b=p;b<=A;b++)G[0]+=this.grid[b][L-1].length+this.grid[b][L].length-1;if(A<this.grid.length-1)for(b=L;b<=O;b++)G[1]+=this.grid[A+1][b].length+this.grid[A][b].length-1;if(O<this.grid[0].length-1)for(b=p;b<=A;b++)G[2]+=this.grid[b][O+1].length+this.grid[b][O].length-1;if(p>0)for(b=L;b<=O;b++)G[3]+=this.grid[p-1][b].length+this.grid[p][b].length-1;for(var P,F,V=S.MAX_VALUE,z=0;z<G.length;z++)G[z]<V?(V=G[z],P=1,F=z):G[z]==V&&P++;if(P==3&&V==0)G[0]==0&&G[1]==0&&G[2]==0?f=1:G[0]==0&&G[1]==0&&G[3]==0?f=0:G[0]==0&&G[2]==0&&G[3]==0?f=3:G[1]==0&&G[2]==0&&G[3]==0&&(f=2);else if(P==2&&V==0){var U=Math.floor(2*Math.random());f=G[0]==0&&G[1]==0?U==0?0:1:G[0]==0&&G[2]==0?U==0?0:2:G[0]==0&&G[3]==0?U==0?0:3:G[1]==0&&G[2]==0?U==0?1:2:G[1]==0&&G[3]==0?U==0?1:3:U==0?2:3}else f=P==4&&V==0?U=Math.floor(4*Math.random()):F;f==0?y.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-d.DEFAULT_EDGE_LENGTH-y.getHeight()/2):f==1?y.setCenter(u.getCenterX()+u.getWidth()/2+d.DEFAULT_EDGE_LENGTH+y.getWidth()/2,u.getCenterY()):f==2?y.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+d.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(u.getCenterX()-u.getWidth()/2-d.DEFAULT_EDGE_LENGTH-y.getWidth()/2,u.getCenterY())}},i.exports=M},991:(i,a,r)=>{var n=r(551).FDLayoutNode,t=r(551).IMath;function o(l,s,g,d){n.call(this,l,s,g,d)}for(var e in o.prototype=Object.create(n.prototype),n)o[e]=n[e];o.prototype.calculateDisplacement=function(){var l=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*t.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(l,s){for(var g,d=this.getChild().getNodes(),v=0;v<d.length;v++)(g=d[v]).getChild()==null?(g.displacementX+=l,g.displacementY+=s):g.propogateDisplacementToChildren(l,s)},o.prototype.move=function(){var l=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),l.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},o.prototype.setPred1=function(l){this.pred1=l},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(l){this.next=l},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(l){this.processed=l},o.prototype.isProcessed=function(){return processed},i.exports=o},902:(i,a,r)=>{function n(g){if(Array.isArray(g)){for(var d=0,v=Array(g.length);d<g.length;d++)v[d]=g[d];return v}return Array.from(g)}var t=r(806),o=r(551).LinkedList,e=r(551).Matrix,l=r(551).SVD;function s(){}s.handleConstraints=function(g){var d={};d.fixedNodeConstraint=g.constraints.fixedNodeConstraint,d.alignmentConstraint=g.constraints.alignmentConstraint,d.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var v=new Map,m=new Map,E=[],w=[],C=g.getAllNodes(),S=0,R=0;R<C.length;R++){var k=C[R];k.getChild()==null&&(m.set(k.id,S++),E.push(k.getCenterX()),w.push(k.getCenterY()),v.set(k.id,k))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(D){D.gap||D.gap==0||(D.left?D.gap=t.DEFAULT_EDGE_LENGTH+v.get(D.left).getWidth()/2+v.get(D.right).getWidth()/2:D.gap=t.DEFAULT_EDGE_LENGTH+v.get(D.top).getHeight()/2+v.get(D.bottom).getHeight()/2)});var X=function(D){var Y=0,Q=0;return D.forEach(function(K){Y+=E[m.get(K)],Q+=w[m.get(K)]}),{x:Y/D.size,y:Q/D.size}},W=function(D,Y,Q,K,nt){var Ct=new Map;D.forEach(function(q,Z){Ct.set(Z,0)}),D.forEach(function(q,Z){q.forEach(function(ut){Ct.set(ut.id,Ct.get(ut.id)+1)})});var at=new Map,ft=new Map,yt=new o;Ct.forEach(function(q,Z){q==0?(yt.push(Z),Q||(Y=="horizontal"?at.set(Z,m.has(Z)?E[m.get(Z)]:K.get(Z)):at.set(Z,m.has(Z)?w[m.get(Z)]:K.get(Z)))):at.set(Z,Number.NEGATIVE_INFINITY),Q&&ft.set(Z,new Set([Z]))}),Q&&nt.forEach(function(q){var Z=[];if(q.forEach(function(et){Q.has(et)&&Z.push(et)}),Z.length>0){var ut=0;Z.forEach(function(et){Y=="horizontal"?(at.set(et,m.has(et)?E[m.get(et)]:K.get(et)),ut+=at.get(et)):(at.set(et,m.has(et)?w[m.get(et)]:K.get(et)),ut+=at.get(et))}),ut/=Z.length,q.forEach(function(et){Q.has(et)||at.set(et,ut)})}else{var pt=0;q.forEach(function(et){pt+=Y=="horizontal"?m.has(et)?E[m.get(et)]:K.get(et):m.has(et)?w[m.get(et)]:K.get(et)}),pt/=q.length,q.forEach(function(et){at.set(et,pt)})}});for(var kt=function(){var q=yt.shift();D.get(q).forEach(function(Z){if(at.get(Z.id)<at.get(q)+Z.gap)if(Q&&Q.has(Z.id)){var ut=void 0;if(ut=Y=="horizontal"?m.has(Z.id)?E[m.get(Z.id)]:K.get(Z.id):m.has(Z.id)?w[m.get(Z.id)]:K.get(Z.id),at.set(Z.id,ut),ut<at.get(q)+Z.gap){var pt=at.get(q)+Z.gap-ut;ft.get(q).forEach(function(et){at.set(et,at.get(et)-pt)})}}else at.set(Z.id,at.get(q)+Z.gap);Ct.set(Z.id,Ct.get(Z.id)-1),Ct.get(Z.id)==0&&yt.push(Z.id),Q&&ft.set(Z.id,function(et,xt){var Ut=new Set(et),bt=!0,Yt=!1,Gt=void 0;try{for(var Lt,lt=xt[Symbol.iterator]();!(bt=(Lt=lt.next()).done);bt=!0){var Pt=Lt.value;Ut.add(Pt)}}catch(Xt){Yt=!0,Gt=Xt}finally{try{!bt&<.return&<.return()}finally{if(Yt)throw Gt}}return Ut}(ft.get(q),ft.get(Z.id)))})};yt.length!=0;)kt();if(Q){var Dt=new Set;D.forEach(function(q,Z){q.length==0&&Dt.add(Z)});var Et=[];ft.forEach(function(q,Z){if(Dt.has(Z)){var ut=!1,pt=!0,et=!1,xt=void 0;try{for(var Ut,bt=q[Symbol.iterator]();!(pt=(Ut=bt.next()).done);pt=!0){var Yt=Ut.value;Q.has(Yt)&&(ut=!0)}}catch(lt){et=!0,xt=lt}finally{try{!pt&&bt.return&&bt.return()}finally{if(et)throw xt}}if(!ut){var Gt=!1,Lt=void 0;Et.forEach(function(lt,Pt){lt.has([].concat(n(q))[0])&&(Gt=!0,Lt=Pt)}),Gt?q.forEach(function(lt){Et[Lt].add(lt)}):Et.push(new Set(q))}}}),Et.forEach(function(q,Z){var ut=Number.POSITIVE_INFINITY,pt=Number.POSITIVE_INFINITY,et=Number.NEGATIVE_INFINITY,xt=Number.NEGATIVE_INFINITY,Ut=!0,bt=!1,Yt=void 0;try{for(var Gt,Lt=q[Symbol.iterator]();!(Ut=(Gt=Lt.next()).done);Ut=!0){var lt=Gt.value,Pt=void 0;Pt=Y=="horizontal"?m.has(lt)?E[m.get(lt)]:K.get(lt):m.has(lt)?w[m.get(lt)]:K.get(lt);var Xt=at.get(lt);Pt<ut&&(ut=Pt),Pt>et&&(et=Pt),Xt<pt&&(pt=Xt),Xt>xt&&(xt=Xt)}}catch(jt){bt=!0,Yt=jt}finally{try{!Ut&&Lt.return&&Lt.return()}finally{if(bt)throw Yt}}var $t=(ut+et)/2-(pt+xt)/2,te=!0,qt=!1,Zt=void 0;try{for(var Jt,Wt=q[Symbol.iterator]();!(te=(Jt=Wt.next()).done);te=!0){var re=Jt.value;at.set(re,at.get(re)+$t)}}catch(jt){qt=!0,Zt=jt}finally{try{!te&&Wt.return&&Wt.return()}finally{if(qt)throw Zt}}})}return at},M=function(D){var Y=0,Q=0,K=0,nt=0;if(D.forEach(function(yt){yt.left?E[m.get(yt.left)]-E[m.get(yt.right)]>=0?Y++:Q++:w[m.get(yt.top)]-w[m.get(yt.bottom)]>=0?K++:nt++}),Y>Q&&K>nt)for(var Ct=0;Ct<m.size;Ct++)E[Ct]=-1*E[Ct],w[Ct]=-1*w[Ct];else if(Y>Q)for(var at=0;at<m.size;at++)E[at]=-1*E[at];else if(K>nt)for(var ft=0;ft<m.size;ft++)w[ft]=-1*w[ft]},j=function(D){var Y=[],Q=new o,K=new Set,nt=0;return D.forEach(function(Ct,at){if(!K.has(at)){Y[nt]=[];var ft=at;for(Q.push(ft),K.add(ft),Y[nt].push(ft);Q.length!=0;)ft=Q.shift(),D.get(ft).forEach(function(yt){K.has(yt.id)||(Q.push(yt.id),K.add(yt.id),Y[nt].push(yt.id))});nt++}}),Y},h=function(D){var Y=new Map;return D.forEach(function(Q,K){Y.set(K,[])}),D.forEach(function(Q,K){Q.forEach(function(nt){Y.get(K).push(nt),Y.get(nt.id).push({id:K,gap:nt.gap,direction:nt.direction})})}),Y},f=function(D){var Y=new Map;return D.forEach(function(Q,K){Y.set(K,[])}),D.forEach(function(Q,K){Q.forEach(function(nt){Y.get(nt.id).push({id:K,gap:nt.gap,direction:nt.direction})})}),Y},u=[],y=[],p=!1,A=!1,L=new Set,O=new Map,G=new Map,b=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(D){L.add(D.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(D){D.left?(O.has(D.left)?O.get(D.left).push({id:D.right,gap:D.gap,direction:"horizontal"}):O.set(D.left,[{id:D.right,gap:D.gap,direction:"horizontal"}]),O.has(D.right)||O.set(D.right,[])):(O.has(D.top)?O.get(D.top).push({id:D.bottom,gap:D.gap,direction:"vertical"}):O.set(D.top,[{id:D.bottom,gap:D.gap,direction:"vertical"}]),O.has(D.bottom)||O.set(D.bottom,[]))}),G=h(O),b=j(G)),t.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(D,Y){u[Y]=[D.position.x,D.position.y],y[Y]=[E[m.get(D.nodeId)],w[m.get(D.nodeId)]]}),p=!0;else if(d.alignmentConstraint)(function(){var D=0;if(d.alignmentConstraint.vertical){for(var Y=d.alignmentConstraint.vertical,Q=function(ft){var yt=new Set;Y[ft].forEach(function(Et){yt.add(Et)});var kt=new Set([].concat(n(yt)).filter(function(Et){return L.has(Et)})),Dt=void 0;Dt=kt.size>0?E[m.get(kt.values().next().value)]:X(yt).x,Y[ft].forEach(function(Et){u[D]=[Dt,w[m.get(Et)]],y[D]=[E[m.get(Et)],w[m.get(Et)]],D++})},K=0;K<Y.length;K++)Q(K);p=!0}if(d.alignmentConstraint.horizontal){for(var nt=d.alignmentConstraint.horizontal,Ct=function(ft){var yt=new Set;nt[ft].forEach(function(Et){yt.add(Et)});var kt=new Set([].concat(n(yt)).filter(function(Et){return L.has(Et)})),Dt=void 0;Dt=kt.size>0?E[m.get(kt.values().next().value)]:X(yt).y,nt[ft].forEach(function(Et){u[D]=[E[m.get(Et)],Dt],y[D]=[E[m.get(Et)],w[m.get(Et)]],D++})},at=0;at<nt.length;at++)Ct(at);p=!0}d.relativePlacementConstraint&&(A=!0)})();else if(d.relativePlacementConstraint){for(var P=0,F=0,V=0;V<b.length;V++)b[V].length>P&&(P=b[V].length,F=V);if(P<G.size/2)M(d.relativePlacementConstraint),p=!1,A=!1;else{var z=new Map,U=new Map,x=[];b[F].forEach(function(D){O.get(D).forEach(function(Y){Y.direction=="horizontal"?(z.has(D)?z.get(D).push(Y):z.set(D,[Y]),z.has(Y.id)||z.set(Y.id,[]),x.push({left:D,right:Y.id})):(U.has(D)?U.get(D).push(Y):U.set(D,[Y]),U.has(Y.id)||U.set(Y.id,[]),x.push({top:D,bottom:Y.id}))})}),M(x),A=!1;var H=W(z,"horizontal"),$=W(U,"vertical");b[F].forEach(function(D,Y){y[Y]=[E[m.get(D)],w[m.get(D)]],u[Y]=[],H.has(D)?u[Y][0]=H.get(D):u[Y][0]=E[m.get(D)],$.has(D)?u[Y][1]=$.get(D):u[Y][1]=w[m.get(D)]}),p=!0}}if(p){for(var tt,ot=e.transpose(u),wt=e.transpose(y),Nt=0;Nt<ot.length;Nt++)ot[Nt]=e.multGamma(ot[Nt]),wt[Nt]=e.multGamma(wt[Nt]);var B=e.multMat(ot,e.transpose(wt)),St=l.svd(B);tt=e.multMat(St.V,e.transpose(St.U));for(var Tt=0;Tt<m.size;Tt++){var st=[E[Tt],w[Tt]],ht=[tt[0][0],tt[1][0]],it=[tt[0][1],tt[1][1]];E[Tt]=e.dotProduct(st,ht),w[Tt]=e.dotProduct(st,it)}A&&M(d.relativePlacementConstraint)}}if(t.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var ct={x:0,y:0};d.fixedNodeConstraint.forEach(function(D,Y){var Q,K,nt={x:E[m.get(D.nodeId)],y:w[m.get(D.nodeId)]},Ct=D.position,at=(K=nt,{x:(Q=Ct).x-K.x,y:Q.y-K.y});ct.x+=at.x,ct.y+=at.y}),ct.x/=d.fixedNodeConstraint.length,ct.y/=d.fixedNodeConstraint.length,E.forEach(function(D,Y){E[Y]+=ct.x}),w.forEach(function(D,Y){w[Y]+=ct.y}),d.fixedNodeConstraint.forEach(function(D){E[m.get(D.nodeId)]=D.position.x,w[m.get(D.nodeId)]=D.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var It=d.alignmentConstraint.vertical,mt=function(D){var Y=new Set;It[D].forEach(function(nt){Y.add(nt)});var Q=new Set([].concat(n(Y)).filter(function(nt){return L.has(nt)})),K=void 0;K=Q.size>0?E[m.get(Q.values().next().value)]:X(Y).x,Y.forEach(function(nt){L.has(nt)||(E[m.get(nt)]=K)})},gt=0;gt<It.length;gt++)mt(gt);if(d.alignmentConstraint.horizontal)for(var _t=d.alignmentConstraint.horizontal,vt=function(D){var Y=new Set;_t[D].forEach(function(nt){Y.add(nt)});var Q=new Set([].concat(n(Y)).filter(function(nt){return L.has(nt)})),K=void 0;K=Q.size>0?w[m.get(Q.values().next().value)]:X(Y).y,Y.forEach(function(nt){L.has(nt)||(w[m.get(nt)]=K)})},Mt=0;Mt<_t.length;Mt++)vt(Mt)}d.relativePlacementConstraint&&function(){var D=new Map,Y=new Map,Q=new Map,K=new Map,nt=new Map,Ct=new Map,at=new Set,ft=new Set;if(L.forEach(function(rt){at.add(rt),ft.add(rt)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var yt=d.alignmentConstraint.vertical,kt=function(rt){Q.set("dummy"+rt,[]),yt[rt].forEach(function(At){D.set(At,"dummy"+rt),Q.get("dummy"+rt).push(At),L.has(At)&&at.add("dummy"+rt)}),nt.set("dummy"+rt,E[m.get(yt[rt][0])])},Dt=0;Dt<yt.length;Dt++)kt(Dt);if(d.alignmentConstraint.horizontal)for(var Et=d.alignmentConstraint.horizontal,q=function(rt){K.set("dummy"+rt,[]),Et[rt].forEach(function(At){Y.set(At,"dummy"+rt),K.get("dummy"+rt).push(At),L.has(At)&&ft.add("dummy"+rt)}),Ct.set("dummy"+rt,w[m.get(Et[rt][0])])},Z=0;Z<Et.length;Z++)q(Z)}var ut=new Map,pt=new Map,et=function(rt){O.get(rt).forEach(function(At){var zt=void 0,Vt=void 0;At.direction=="horizontal"?(zt=D.get(rt)?D.get(rt):rt,Vt=D.get(At.id)?{id:D.get(At.id),gap:At.gap,direction:At.direction}:At,ut.has(zt)?ut.get(zt).push(Vt):ut.set(zt,[Vt]),ut.has(Vt.id)||ut.set(Vt.id,[])):(zt=Y.get(rt)?Y.get(rt):rt,Vt=Y.get(At.id)?{id:Y.get(At.id),gap:At.gap,direction:At.direction}:At,pt.has(zt)?pt.get(zt).push(Vt):pt.set(zt,[Vt]),pt.has(Vt.id)||pt.set(Vt.id,[]))})},xt=!0,Ut=!1,bt=void 0;try{for(var Yt,Gt=O.keys()[Symbol.iterator]();!(xt=(Yt=Gt.next()).done);xt=!0)et(Yt.value)}catch(rt){Ut=!0,bt=rt}finally{try{!xt&&Gt.return&&Gt.return()}finally{if(Ut)throw bt}}var Lt=h(ut),lt=h(pt),Pt=j(Lt),Xt=j(lt),$t=f(ut),te=f(pt),qt=[],Zt=[];Pt.forEach(function(rt,At){qt[At]=[],rt.forEach(function(zt){$t.get(zt).length==0&&qt[At].push(zt)})}),Xt.forEach(function(rt,At){Zt[At]=[],rt.forEach(function(zt){te.get(zt).length==0&&Zt[At].push(zt)})});var Jt=W(ut,"horizontal",at,nt,qt),Wt=W(pt,"vertical",ft,Ct,Zt),re=function(rt){Q.get(rt)?Q.get(rt).forEach(function(At){E[m.get(At)]=Jt.get(rt)}):E[m.get(rt)]=Jt.get(rt)},jt=!0,fe=!1,me=void 0;try{for(var ve,se=Jt.keys()[Symbol.iterator]();!(jt=(ve=se.next()).done);jt=!0)re(ve.value)}catch(rt){fe=!0,me=rt}finally{try{!jt&&se.return&&se.return()}finally{if(fe)throw me}}var Ve=function(rt){K.get(rt)?K.get(rt).forEach(function(At){w[m.get(At)]=Wt.get(rt)}):w[m.get(rt)]=Wt.get(rt)},ae=!0,ye=!1,Ee=void 0;try{for(var Ne,he=Wt.keys()[Symbol.iterator]();!(ae=(Ne=he.next()).done);ae=!0)Ve(Ne.value)}catch(rt){ye=!0,Ee=rt}finally{try{!ae&&he.return&&he.return()}finally{if(ye)throw Ee}}}()}for(var Rt=0;Rt<C.length;Rt++){var Ot=C[Rt];Ot.getChild()==null&&Ot.setCenter(E[m.get(Ot.id)],w[m.get(Ot.id)])}},i.exports=s},551:i=>{i.exports=I}},T={},c=function i(a){var r=T[a];if(r!==void 0)return r.exports;var n=T[a]={exports:{}};return _[a](n,n.exports,i),n.exports}(45),c;var _,T,c},Le.exports=N(hr()));var N}var Me,Oe,xe,ce;const dr=sr(Me?Ie.exports:(Me=1,Ie.exports=(Oe=lr(),xe={658:N=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(I){for(var _=arguments.length,T=Array(_>1?_-1:0),c=1;c<_;c++)T[c-1]=arguments[c];return T.forEach(function(i){Object.keys(i).forEach(function(a){return I[a]=i[a]})}),I}},548:(N,I,_)=>{var T=function(a,r){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return function(n,t){var o=[],e=!0,l=!1,s=void 0;try{for(var g,d=n[Symbol.iterator]();!(e=(g=d.next()).done)&&(o.push(g.value),!t||o.length!==t);e=!0);}catch(v){l=!0,s=v}finally{try{!e&&d.return&&d.return()}finally{if(l)throw s}}return o}(a,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=_(140).layoutBase.LinkedList,i={getTopMostNodes:function(a){for(var r={},n=0;n<a.length;n++)r[a[n].id()]=!0;var t=a.filter(function(o,e){typeof o=="number"&&(o=e);for(var l=o.parent()[0];l!=null;){if(r[l.id()])return!1;l=l.parent()[0]}return!0});return t},connectComponents:function(a,r,n,t){var o=new c,e=new Set,l=[],s=void 0,g=void 0,d=void 0,v=!1,m=1,E=[],w=[],C=function(){var S=a.collection();w.push(S);var R=n[0],k=a.collection();k.merge(R).merge(R.descendants().intersection(r)),l.push(R),k.forEach(function(M){o.push(M),e.add(M),S.merge(M)});for(var X=function(){R=o.shift();var M=a.collection();R.neighborhood().nodes().forEach(function(f){r.intersection(R.edgesWith(f)).length>0&&M.merge(f)});for(var j=0;j<M.length;j++){var h=M[j];(s=n.intersection(h.union(h.ancestors())))==null||e.has(s[0])||s.union(s.descendants()).forEach(function(f){o.push(f),e.add(f),S.merge(f),n.has(f)&&l.push(f)})}};o.length!=0;)X();if(S.forEach(function(M){r.intersection(M.connectedEdges()).forEach(function(j){S.has(j.source())&&S.has(j.target())&&S.merge(j)})}),l.length==n.length&&(v=!0),!v||v&&m>1){g=l[0],d=g.connectedEdges().length,l.forEach(function(M){M.connectedEdges().length<d&&(d=M.connectedEdges().length,g=M)}),E.push(g.id());var W=a.collection();W.merge(l[0]),l.forEach(function(M){W.merge(M)}),l=[],n=n.difference(W),m++}};do C();while(!v);return t&&E.length>0&&t.set("dummy"+(t.size+1),E),w},relocateComponent:function(a,r,n){if(!n.fixedNodeConstraint){var t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if(n.quality=="draft"){var s=!0,g=!1,d=void 0;try{for(var v,m=r.nodeIndexes[Symbol.iterator]();!(s=(v=m.next()).done);s=!0){var E=v.value,w=T(E,2),C=w[0],S=w[1],R=n.cy.getElementById(C);if(R){var k=R.boundingBox(),X=r.xCoords[S]-k.w/2,W=r.xCoords[S]+k.w/2,M=r.yCoords[S]-k.h/2,j=r.yCoords[S]+k.h/2;X<t&&(t=X),W>o&&(o=W),M<e&&(e=M),j>l&&(l=j)}}}catch(p){g=!0,d=p}finally{try{!s&&m.return&&m.return()}finally{if(g)throw d}}var h=a.x-(o+t)/2,f=a.y-(l+e)/2;r.xCoords=r.xCoords.map(function(p){return p+h}),r.yCoords=r.yCoords.map(function(p){return p+f})}else{Object.keys(r).forEach(function(p){var A=r[p],L=A.getRect().x,O=A.getRect().x+A.getRect().width,G=A.getRect().y,b=A.getRect().y+A.getRect().height;L<t&&(t=L),O>o&&(o=O),G<e&&(e=G),b>l&&(l=b)});var u=a.x-(o+t)/2,y=a.y-(l+e)/2;Object.keys(r).forEach(function(p){var A=r[p];A.setCenter(A.getCenterX()+u,A.getCenterY()+y)})}}},calcBoundingBox:function(a,r,n,t){for(var o=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,g=void 0,d=void 0,v=void 0,m=void 0,E=a.descendants().not(":parent"),w=E.length,C=0;C<w;C++){var S=E[C];o>(g=r[t.get(S.id())]-S.width()/2)&&(o=g),e<(d=r[t.get(S.id())]+S.width()/2)&&(e=d),l>(v=n[t.get(S.id())]-S.height()/2)&&(l=v),s<(m=n[t.get(S.id())]+S.height()/2)&&(s=m)}var R={};return R.topLeftX=o,R.topLeftY=l,R.width=e-o,R.height=s-l,R},calcParentsWithoutChildren:function(a,r){var n=a.collection();return r.nodes(":parent").forEach(function(t){var o=!1;t.children().forEach(function(e){e.css("display")!="none"&&(o=!0)}),o||n.merge(t)}),n}};N.exports=i},816:(N,I,_)=>{var T=_(548),c=_(140).CoSELayout,i=_(140).CoSENode,a=_(140).layoutBase.PointD,r=_(140).layoutBase.DimensionD,n=_(140).layoutBase.LayoutConstants,t=_(140).layoutBase.FDLayoutConstants,o=_(140).CoSEConstants;N.exports={coseLayout:function(e,l){var s=e.cy,g=e.eles,d=g.nodes(),v=g.edges(),m=void 0,E=void 0,w=void 0,C={};e.randomize&&(m=l.nodeIndexes,E=l.xCoords,w=l.yCoords);var S=function(M){return typeof M=="function"},R=function(M,j){return S(M)?M(j):M},k=T.calcParentsWithoutChildren(s,g);e.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(o.MAX_ITERATIONS=t.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(o.TILING_COMPARE_BY=e.tilingCompareBy),e.quality=="proof"?n.QUALITY=2:n.QUALITY=0,o.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!e.randomize,o.ANIMATE=t.ANIMATE=n.ANIMATE=e.animate,o.TILE=e.tile,o.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical=="function"?e.tilingPaddingVertical.call():e.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal=="function"?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,o.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!0,o.PURE_INCREMENTAL=!e.randomize,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step=="transformed"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!1),e.step=="enforced"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!1),e.step=="cose"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!0),e.step=="all"&&(e.randomize?o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?o.TREE_REDUCTION_ON_INCREMENTAL=!1:o.TREE_REDUCTION_ON_INCREMENTAL=!0;var X=new c,W=X.newGraphManager();return function M(j,h,f,u){for(var y=h.length,p=0;p<y;p++){var A=h[p],L=null;A.intersection(k).length==0&&(L=A.children());var O=void 0,G=A.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(A.outerWidth()!=null&&A.outerHeight()!=null)if(u.randomize)if(A.isParent()){var b=T.calcBoundingBox(A,E,w,m);O=A.intersection(k).length==0?j.add(new i(f.graphManager,new a(b.topLeftX,b.topLeftY),new r(b.width,b.height))):j.add(new i(f.graphManager,new a(b.topLeftX,b.topLeftY),new r(parseFloat(G.w),parseFloat(G.h))))}else O=j.add(new i(f.graphManager,new a(E[m.get(A.id())]-G.w/2,w[m.get(A.id())]-G.h/2),new r(parseFloat(G.w),parseFloat(G.h))));else O=j.add(new i(f.graphManager,new a(A.position("x")-G.w/2,A.position("y")-G.h/2),new r(parseFloat(G.w),parseFloat(G.h))));else O=j.add(new i(this.graphManager));O.id=A.data("id"),O.nodeRepulsion=R(u.nodeRepulsion,A),O.paddingLeft=parseInt(A.css("padding")),O.paddingTop=parseInt(A.css("padding")),O.paddingRight=parseInt(A.css("padding")),O.paddingBottom=parseInt(A.css("padding")),u.nodeDimensionsIncludeLabels&&(O.labelWidth=A.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,O.labelHeight=A.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,O.labelPosVertical=A.css("text-valign"),O.labelPosHorizontal=A.css("text-halign")),C[A.data("id")]=O,isNaN(O.rect.x)&&(O.rect.x=0),isNaN(O.rect.y)&&(O.rect.y=0),L!=null&&L.length>0&&M(f.getGraphManager().add(f.newGraph(),O),L,f,u)}}(W.addRoot(),T.getTopMostNodes(d),X,e),function(M,j,h){for(var f=0,u=0,y=0;y<h.length;y++){var p=h[y],A=C[p.data("source")],L=C[p.data("target")];if(A&&L&&A!==L&&A.getEdgesBetween(L).length==0){var O=j.add(M.newEdge(),A,L);O.id=p.id(),O.idealLength=R(e.idealEdgeLength,p),O.edgeElasticity=R(e.edgeElasticity,p),f+=O.idealLength,u++}}e.idealEdgeLength!=null&&(u>0?o.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=f/u:S(e.idealEdgeLength)?o.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=50:o.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,o.MIN_REPULSION_DIST=t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,o.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH)}(X,W,v),function(M,j){j.fixedNodeConstraint&&(M.constraints.fixedNodeConstraint=j.fixedNodeConstraint),j.alignmentConstraint&&(M.constraints.alignmentConstraint=j.alignmentConstraint),j.relativePlacementConstraint&&(M.constraints.relativePlacementConstraint=j.relativePlacementConstraint)}(X,e),X.runLayout(),C}}},212:(N,I,_)=>{var T=function(){function o(e,l){for(var s=0;s<l.length;s++){var g=l[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(e,g.key,g)}}return function(e,l,s){return l&&o(e.prototype,l),s&&o(e,s),e}}(),c=_(658),i=_(548),a=_(657).spectralLayout,r=_(816).coseLayout,n=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(o){return 4500},idealEdgeLength:function(o){return 50},edgeElasticity:function(o){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),t=function(){function o(e){(function(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")})(this,o),this.options=c({},n,e)}return T(o,[{key:"run",value:function(){var e=this.options,l=e.cy,s=e.eles,g=[],d=[],v=void 0,m=[];!e.fixedNodeConstraint||Array.isArray(e.fixedNodeConstraint)&&e.fixedNodeConstraint.length!=0||(e.fixedNodeConstraint=void 0),e.alignmentConstraint&&(!e.alignmentConstraint.vertical||Array.isArray(e.alignmentConstraint.vertical)&&e.alignmentConstraint.vertical.length!=0||(e.alignmentConstraint.vertical=void 0),!e.alignmentConstraint.horizontal||Array.isArray(e.alignmentConstraint.horizontal)&&e.alignmentConstraint.horizontal.length!=0||(e.alignmentConstraint.horizontal=void 0)),!e.relativePlacementConstraint||Array.isArray(e.relativePlacementConstraint)&&e.relativePlacementConstraint.length!=0||(e.relativePlacementConstraint=void 0),(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint)&&(e.tile=!1,e.packComponents=!1);var E=void 0,w=!1;if(l.layoutUtilities&&e.packComponents&&((E=l.layoutUtilities("get"))||(E=l.layoutUtilities()),w=!0),s.nodes().length>0)if(w){var C=i.getTopMostNodes(e.eles.nodes());if((v=i.connectComponents(l,e.eles,C)).forEach(function(P){var F=P.boundingBox();m.push({x:F.x1+F.w/2,y:F.y1+F.h/2})}),e.randomize&&v.forEach(function(P){e.eles=P,g.push(a(e))}),e.quality=="default"||e.quality=="proof"){var S=l.collection();if(e.tile){var R=new Map,k=0,X={nodeIndexes:R,xCoords:[],yCoords:[]},W=[];if(v.forEach(function(P,F){P.edges().length==0&&(P.nodes().forEach(function(V,z){S.merge(P.nodes()[z]),V.isParent()||(X.nodeIndexes.set(P.nodes()[z].id(),k++),X.xCoords.push(P.nodes()[0].position().x),X.yCoords.push(P.nodes()[0].position().y))}),W.push(F))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),v.push(S),g.push(X);for(var j=W.length-1;j>=0;j--)v.splice(W[j],1),g.splice(W[j],1),m.splice(W[j],1)}}v.forEach(function(P,F){e.eles=P,d.push(r(e,g[F])),i.relocateComponent(m[F],d[F],e)})}else v.forEach(function(P,F){i.relocateComponent(m[F],g[F],e)});var h=new Set;if(v.length>1){var f=[],u=s.filter(function(P){return P.css("display")=="none"});v.forEach(function(P,F){var V=void 0;if(e.quality=="draft"&&(V=g[F].nodeIndexes),P.nodes().not(u).length>0){var z={edges:[],nodes:[]},U=void 0;P.nodes().not(u).forEach(function(x){if(e.quality=="draft")if(x.isParent()){var H=i.calcBoundingBox(x,g[F].xCoords,g[F].yCoords,V);z.nodes.push({x:H.topLeftX,y:H.topLeftY,width:H.width,height:H.height})}else U=V.get(x.id()),z.nodes.push({x:g[F].xCoords[U]-x.boundingbox().w/2,y:g[F].yCoords[U]-x.boundingbox().h/2,width:x.boundingbox().w,height:x.boundingbox().h});else d[F][x.id()]&&z.nodes.push({x:d[F][x.id()].getLeft(),y:d[F][x.id()].getTop(),width:d[F][x.id()].getWidth(),height:d[F][x.id()].getHeight()})}),P.edges().forEach(function(x){var H=x.source(),$=x.target();if(H.css("display")!="none"&&$.css("display")!="none")if(e.quality=="draft"){var tt=V.get(H.id()),ot=V.get($.id()),wt=[],Nt=[];if(H.isParent()){var B=i.calcBoundingBox(H,g[F].xCoords,g[F].yCoords,V);wt.push(B.topLeftX+B.width/2),wt.push(B.topLeftY+B.height/2)}else wt.push(g[F].xCoords[tt]),wt.push(g[F].yCoords[tt]);if($.isParent()){var St=i.calcBoundingBox($,g[F].xCoords,g[F].yCoords,V);Nt.push(St.topLeftX+St.width/2),Nt.push(St.topLeftY+St.height/2)}else Nt.push(g[F].xCoords[ot]),Nt.push(g[F].yCoords[ot]);z.edges.push({startX:wt[0],startY:wt[1],endX:Nt[0],endY:Nt[1]})}else d[F][H.id()]&&d[F][$.id()]&&z.edges.push({startX:d[F][H.id()].getCenterX(),startY:d[F][H.id()].getCenterY(),endX:d[F][$.id()].getCenterX(),endY:d[F][$.id()].getCenterY()})}),z.nodes.length>0&&(f.push(z),h.add(F))}});var y=E.packComponents(f,e.randomize).shifts;if(e.quality=="draft")g.forEach(function(P,F){var V=P.xCoords.map(function(U){return U+y[F].dx}),z=P.yCoords.map(function(U){return U+y[F].dy});P.xCoords=V,P.yCoords=z});else{var p=0;h.forEach(function(P){Object.keys(d[P]).forEach(function(F){var V=d[P][F];V.setCenter(V.getCenterX()+y[p].dx,V.getCenterY()+y[p].dy)}),p++})}}}else{var A=e.eles.boundingBox();if(m.push({x:A.x1+A.w/2,y:A.y1+A.h/2}),e.randomize){var L=a(e);g.push(L)}e.quality=="default"||e.quality=="proof"?(d.push(r(e,g[0])),i.relocateComponent(m[0],d[0],e)):i.relocateComponent(m[0],g[0],e)}var O=function(P,F){if(e.quality=="default"||e.quality=="proof"){typeof P=="number"&&(P=F);var V=void 0,z=void 0,U=P.data("id");return d.forEach(function(H){U in H&&(V={x:H[U].getRect().getCenterX(),y:H[U].getRect().getCenterY()},z=H[U])}),e.nodeDimensionsIncludeLabels&&(z.labelWidth&&(z.labelPosHorizontal=="left"?V.x+=z.labelWidth/2:z.labelPosHorizontal=="right"&&(V.x-=z.labelWidth/2)),z.labelHeight&&(z.labelPosVertical=="top"?V.y+=z.labelHeight/2:z.labelPosVertical=="bottom"&&(V.y-=z.labelHeight/2))),V==null&&(V={x:P.position("x"),y:P.position("y")}),{x:V.x,y:V.y}}var x=void 0;return g.forEach(function(H){var $=H.nodeIndexes.get(P.id());$!=null&&(x={x:H.xCoords[$],y:H.yCoords[$]})}),x==null&&(x={x:P.position("x"),y:P.position("y")}),{x:x.x,y:x.y}};if(e.quality=="default"||e.quality=="proof"||e.randomize){var G=i.calcParentsWithoutChildren(l,s),b=s.filter(function(P){return P.css("display")=="none"});e.eles=s.not(b),s.nodes().not(":parent").not(b).layoutPositions(this,e,O),G.length>0&&G.forEach(function(P){P.position(O(P))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=t},657:(N,I,_)=>{var T=_(548),c=_(140).layoutBase.Matrix,i=_(140).layoutBase.SVD;N.exports={spectralLayout:function(a){var r=a.cy,n=a.eles,t=n.nodes(),o=n.nodes(":parent"),e=new Map,l=new Map,s=new Map,g=[],d=[],v=[],m=[],E=[],w=[],C=[],S=[],R=void 0,k=1e8,X=1e-9,W=a.piTol,M=a.samplingType,j=a.nodeSeparation,h=void 0,f=function(st,ht,it){for(var ct=[],It=0,mt=0,gt=0,_t=void 0,vt=[],Mt=0,Rt=1,Ot=0;Ot<R;Ot++)vt[Ot]=k;for(ct[mt]=st,vt[st]=0;mt>=It;){gt=ct[It++];for(var D=g[gt],Y=0;Y<D.length;Y++)vt[_t=l.get(D[Y])]==k&&(vt[_t]=vt[gt]+1,ct[++mt]=_t);w[gt][ht]=vt[gt]*j}if(it){for(var Q=0;Q<R;Q++)w[Q][ht]<E[Q]&&(E[Q]=w[Q][ht]);for(var K=0;K<R;K++)E[K]>Mt&&(Mt=E[K],Rt=K)}return Rt};T.connectComponents(r,n,T.getTopMostNodes(t),e),o.forEach(function(st){T.connectComponents(r,n,T.getTopMostNodes(st.descendants().intersection(n)),e)});for(var u=0,y=0;y<t.length;y++)t[y].isParent()||l.set(t[y].id(),u++);var p=!0,A=!1,L=void 0;try{for(var O,G=e.keys()[Symbol.iterator]();!(p=(O=G.next()).done);p=!0){var b=O.value;l.set(b,u++)}}catch(st){A=!0,L=st}finally{try{!p&&G.return&&G.return()}finally{if(A)throw L}}for(var P=0;P<l.size;P++)g[P]=[];o.forEach(function(st){for(var ht=st.children().intersection(n);ht.nodes(":childless").length==0;)ht=ht.nodes()[0].children().intersection(n);var it=0,ct=ht.nodes(":childless")[0].connectedEdges().length;ht.nodes(":childless").forEach(function(It,mt){It.connectedEdges().length<ct&&(ct=It.connectedEdges().length,it=mt)}),s.set(st.id(),ht.nodes(":childless")[it].id())}),t.forEach(function(st){var ht=void 0;ht=st.isParent()?l.get(s.get(st.id())):l.get(st.id()),st.neighborhood().nodes().forEach(function(it){n.intersection(st.edgesWith(it)).length>0&&(it.isParent()?g[ht].push(s.get(it.id())):g[ht].push(it.id()))})});var F=function(st){var ht=l.get(st),it=void 0;e.get(st).forEach(function(ct){it=r.getElementById(ct).isParent()?s.get(ct):ct,g[ht].push(it),g[l.get(it)].push(st)})},V=!0,z=!1,U=void 0;try{for(var x,H=e.keys()[Symbol.iterator]();!(V=(x=H.next()).done);V=!0)F(x.value)}catch(st){z=!0,U=st}finally{try{!V&&H.return&&H.return()}finally{if(z)throw U}}var $=void 0;if((R=l.size)>2){h=R<a.sampleSize?R:a.sampleSize;for(var tt=0;tt<R;tt++)w[tt]=[];for(var ot=0;ot<h;ot++)S[ot]=[];return a.quality=="draft"||a.step=="all"?(function(st){var ht=void 0;if(st){ht=Math.floor(Math.random()*R);for(var it=0;it<R;it++)E[it]=k;for(var ct=0;ct<h;ct++)m[ct]=ht,ht=f(ht,ct,st)}else{(function(){for(var Rt=0,Ot=0,D=!1;Ot<h;){Rt=Math.floor(Math.random()*R),D=!1;for(var Y=0;Y<Ot;Y++)if(m[Y]==Rt){D=!0;break}D||(m[Ot]=Rt,Ot++)}})();for(var It=0;It<h;It++)f(m[It],It,st)}for(var mt=0;mt<R;mt++)for(var gt=0;gt<h;gt++)w[mt][gt]*=w[mt][gt];for(var _t=0;_t<h;_t++)C[_t]=[];for(var vt=0;vt<h;vt++)for(var Mt=0;Mt<h;Mt++)C[vt][Mt]=w[m[Mt]][vt]}(M),function(){for(var st=i.svd(C),ht=st.S,it=st.U,ct=st.V,It=ht[0]*ht[0]*ht[0],mt=[],gt=0;gt<h;gt++){mt[gt]=[];for(var _t=0;_t<h;_t++)mt[gt][_t]=0,gt==_t&&(mt[gt][_t]=ht[gt]/(ht[gt]*ht[gt]+It/(ht[gt]*ht[gt])))}S=c.multMat(c.multMat(ct,mt),c.transpose(it))}(),function(){for(var st=void 0,ht=void 0,it=[],ct=[],It=[],mt=[],gt=0;gt<R;gt++)it[gt]=Math.random(),ct[gt]=Math.random();it=c.normalize(it),ct=c.normalize(ct);for(var _t=X,vt=X,Mt=void 0;;){for(var Rt=0;Rt<R;Rt++)It[Rt]=it[Rt];if(it=c.multGamma(c.multL(c.multGamma(It),w,S)),st=c.dotProduct(It,it),it=c.normalize(it),_t=c.dotProduct(It,it),(Mt=Math.abs(_t/vt))<=1+W&&Mt>=1)break;vt=_t}for(var Ot=0;Ot<R;Ot++)It[Ot]=it[Ot];for(vt=X;;){for(var D=0;D<R;D++)mt[D]=ct[D];if(mt=c.minusOp(mt,c.multCons(It,c.dotProduct(It,mt))),ct=c.multGamma(c.multL(c.multGamma(mt),w,S)),ht=c.dotProduct(mt,ct),ct=c.normalize(ct),_t=c.dotProduct(mt,ct),(Mt=Math.abs(_t/vt))<=1+W&&Mt>=1)break;vt=_t}for(var Y=0;Y<R;Y++)mt[Y]=ct[Y];d=c.multCons(It,Math.sqrt(Math.abs(st))),v=c.multCons(mt,Math.sqrt(Math.abs(ht)))}(),$={nodeIndexes:l,xCoords:d,yCoords:v}):(l.forEach(function(st,ht){d.push(r.getElementById(ht).position("x")),v.push(r.getElementById(ht).position("y"))}),$={nodeIndexes:l,xCoords:d,yCoords:v}),$}var wt=l.keys(),Nt=r.getElementById(wt.next().value),B=Nt.position(),St=Nt.outerWidth();if(d.push(B.x),v.push(B.y),R==2){var Tt=r.getElementById(wt.next().value).outerWidth();d.push(B.x+St/2+Tt/2+a.idealEdgeLength),v.push(B.y)}return $={nodeIndexes:l,xCoords:d,yCoords:v}}}},579:(N,I,_)=>{var T=_(212),c=function(i){i&&i("layout","fcose",T)};typeof cytoscape<"u"&&c(cytoscape),N.exports=c},140:N=>{N.exports=Oe}},ce={},function N(I){var _=ce[I];if(_!==void 0)return _.exports;var T=ce[I]={exports:{}};return xe[I](T,T.exports,N),T.exports}(579))));var De={L:"left",R:"right",T:"top",B:"bottom"},Re={L:J(N=>`${N},${N/2} 0,${N} 0,0`,"L"),R:J(N=>`0,${N/2} ${N},0 ${N},${N}`,"R"),T:J(N=>`0,0 ${N},0 ${N/2},${N}`,"T"),B:J(N=>`${N/2},0 ${N},${N} 0,${N}`,"B")},ie={L:J((N,I)=>N-I+2,"L"),R:J((N,I)=>N-2,"R"),T:J((N,I)=>N-I+2,"T"),B:J((N,I)=>N-2,"B")},cr=J(function(N){return Ht(N)?N==="L"?"R":"L":N==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=J(function(N){return N==="L"||N==="R"||N==="T"||N==="B"},"isArchitectureDirection"),Ht=J(function(N){return N==="L"||N==="R"},"isArchitectureDirectionX"),Bt=J(function(N){return N==="T"||N==="B"},"isArchitectureDirectionY"),ge=J(function(N,I){const _=Ht(N)&&Bt(I),T=Bt(N)&&Ht(I);return _||T},"isArchitectureDirectionXY"),gr=J(function(N){const I=N[0],_=N[1],T=Ht(I)&&Bt(_),c=Bt(I)&&Ht(_);return T||c},"isArchitecturePairXY"),ur=J(function(N){return N!=="LL"&&N!=="RR"&&N!=="TT"&&N!=="BB"},"isValidArchitectureDirectionPair"),ue=J(function(N,I){const _=`${N}${I}`;return ur(_)?_:void 0},"getArchitectureDirectionPair"),pr=J(function([N,I],_){const T=_[0],c=_[1];return Ht(T)?Bt(c)?[N+(T==="L"?-1:1),I+(c==="T"?1:-1)]:[N+(T==="L"?-1:1),I]:Ht(c)?[N+(c==="L"?1:-1),I+(T==="T"?1:-1)]:[N,I+(T==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),fr=J(function(N){return N==="LT"||N==="TL"?[1,1]:N==="BL"||N==="LB"?[1,-1]:N==="BR"||N==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=J(function(N,I){return ge(N,I)?"bend":Ht(N)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),vr=J(function(N){return N.type==="service"},"isArchitectureService"),yr=J(function(N){return N.type==="junction"},"isArchitectureJunction"),Ge=J(N=>N.data(),"edgeData"),Kt=J(N=>N.data(),"nodeData"),Fe=tr.architecture,dt=new ir(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Fe,dataStructures:void 0,elements:{}})),Er=J(()=>{dt.reset(),Qe()},"clear"),Nr=J(function({id:N,icon:I,in:_,title:T,iconText:c}){if(dt.records.registeredIds[N]!==void 0)throw new Error(`The service id [${N}] is already in use by another ${dt.records.registeredIds[N]}`);if(_!==void 0){if(N===_)throw new Error(`The service [${N}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The service [${N}]'s parent does not exist. Please make sure the parent is created before this service`);if(dt.records.registeredIds[_]==="node")throw new Error(`The service [${N}]'s parent is not a group`)}dt.records.registeredIds[N]="node",dt.records.nodes[N]={id:N,type:"service",icon:I,iconText:c,title:T,edges:[],in:_}},"addService"),Tr=J(()=>Object.values(dt.records.nodes).filter(vr),"getServices"),Ar=J(function({id:N,in:I}){dt.records.registeredIds[N]="node",dt.records.nodes[N]={id:N,type:"junction",edges:[],in:I}},"addJunction"),wr=J(()=>Object.values(dt.records.nodes).filter(yr),"getJunctions"),Ir=J(()=>Object.values(dt.records.nodes),"getNodes"),pe=J(N=>dt.records.nodes[N],"getNode"),Lr=J(function({id:N,icon:I,in:_,title:T}){if(dt.records.registeredIds[N]!==void 0)throw new Error(`The group id [${N}] is already in use by another ${dt.records.registeredIds[N]}`);if(_!==void 0){if(N===_)throw new Error(`The group [${N}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The group [${N}]'s parent does not exist. Please make sure the parent is created before this group`);if(dt.records.registeredIds[_]==="node")throw new Error(`The group [${N}]'s parent is not a group`)}dt.records.registeredIds[N]="group",dt.records.groups[N]={id:N,icon:I,title:T,in:_}},"addGroup"),_r=J(()=>Object.values(dt.records.groups),"getGroups"),Cr=J(function({lhsId:N,rhsId:I,lhsDir:_,rhsDir:T,lhsInto:c,rhsInto:i,lhsGroup:a,rhsGroup:r,title:n}){if(!be(_))throw new Error(`Invalid direction given for left hand side of edge ${N}--${I}. Expected (L,R,T,B) got ${_}`);if(!be(T))throw new Error(`Invalid direction given for right hand side of edge ${N}--${I}. Expected (L,R,T,B) got ${T}`);if(dt.records.nodes[N]===void 0&&dt.records.groups[N]===void 0)throw new Error(`The left-hand id [${N}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(dt.records.nodes[I]===void 0&&dt.records.groups[N]===void 0)throw new Error(`The right-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);const t=dt.records.nodes[N].in,o=dt.records.nodes[I].in;if(a&&t&&o&&t==o)throw new Error(`The left-hand id [${N}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&t&&o&&t==o)throw new Error(`The right-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:N,lhsDir:_,lhsInto:c,lhsGroup:a,rhsId:I,rhsDir:T,rhsInto:i,rhsGroup:r,title:n};dt.records.edges.push(e),dt.records.nodes[N]&&dt.records.nodes[I]&&(dt.records.nodes[N].edges.push(dt.records.edges[dt.records.edges.length-1]),dt.records.nodes[I].edges.push(dt.records.edges[dt.records.edges.length-1]))},"addEdge"),Mr=J(()=>dt.records.edges,"getEdges"),Or=J(()=>{if(dt.records.dataStructures===void 0){const N={},I=Object.entries(dt.records.nodes).reduce((r,[n,t])=>(r[n]=t.edges.reduce((o,e)=>{var g,d;const l=(g=pe(e.lhsId))==null?void 0:g.in,s=(d=pe(e.rhsId))==null?void 0:d.in;if(l&&s&&l!==s){const v=mr(e.lhsDir,e.rhsDir);v!=="bend"&&(N[l]??(N[l]={}),N[l][s]=v,N[s]??(N[s]={}),N[s][l]=v)}if(e.lhsId===n){const v=ue(e.lhsDir,e.rhsDir);v&&(o[v]=e.rhsId)}else{const v=ue(e.rhsDir,e.lhsDir);v&&(o[v]=e.lhsId)}return o},{}),r),{}),_=Object.keys(I)[0],T={[_]:1},c=Object.keys(I).reduce((r,n)=>n===_?r:{...r,[n]:1},{}),i=J(r=>{const n={[r]:[0,0]},t=[r];for(;t.length>0;){const o=t.shift();if(o){T[o]=1,delete c[o];const e=I[o],[l,s]=n[o];Object.entries(e).forEach(([g,d])=>{T[d]||(n[d]=pr([l,s],g),t.push(d))})}}return n},"BFS"),a=[i(_)];for(;Object.keys(c).length>0;)a.push(i(Object.keys(c)[0]));dt.records.dataStructures={adjList:I,spatialMaps:a,groupAlignments:N}}return dt.records.dataStructures},"getDataStructures"),oe={clear:Er,setDiagramTitle:Ze,getDiagramTitle:qe,setAccTitle:$e,getAccTitle:je,setAccDescription:We,getAccDescription:Be,addService:Nr,getServices:Tr,addJunction:Ar,getJunctions:wr,getNodes:Ir,getNode:pe,addGroup:Lr,getGroups:_r,addEdge:Cr,getEdges:Mr,setElementForId:J((N,I)=>{dt.records.elements[N]=I},"setElementForId"),getElementById:J(N=>dt.records.elements[N],"getElementById"),getDataStructures:Or};function Ft(N){const I=ne().architecture;return I!=null&&I[N]?I[N]:Fe[N]}J(Ft,"getConfigField");var xr=J((N,I)=>{nr(N,I),N.groups.map(I.addGroup),N.services.map(_=>I.addService({..._,type:"service"})),N.junctions.map(_=>I.addJunction({..._,type:"junction"})),N.edges.map(I.addEdge)},"populateDb"),Dr={parse:J(async N=>{const I=await or("architecture",N);Te.debug(I),xr(I,oe)},"parse")},Rr=J(N=>`
|
1
|
+
import{_ as J,g as Be,s as We,a as je,b as $e,q as qe,p as Ze,I as Je,S as Ke,y as Qe,l as Te,a3 as le,c as ne,aj as de,G as tr,ak as er,al as rr}from"./mermaid-Cyd4c5_r.js";import{p as nr}from"./chunk-4BMEZGHF-dUAiRK8Z.js";import{I as ir}from"./chunk-XZIHB7SX-FQvX5QwS.js";import{p as or}from"./radar-MK3ICKWK-CCBSeOSd.js";import{c as Ae}from"./cytoscape.esm-C11VZyMT.js";import{y as sr}from"./index-CS3B05kJ.js";import{s as ar}from"./transform-BzDy4yXW.js";import"./step-BwsUM5iJ.js";import"./_baseEach-B0F-lrb2.js";import"./_baseUniq-ZF08PXee.js";import"./min-CU6F9inI.js";import"./_baseMap-B6pQR1pp.js";import"./clone-DrilLVL8.js";import"./_createAggregator-Cmu_Jz9i.js";import"./timer-B5eI7Tcu.js";var we,Ie={exports:{}},Le={exports:{}},_e={exports:{}};function hr(){return we?_e.exports:(we=1,N=function(){return function(I){var _={};function T(c){if(_[c])return _[c].exports;var i=_[c]={i:c,l:!1,exports:{}};return I[c].call(i.exports,i,i.exports,T),i.l=!0,i.exports}return T.m=I,T.c=_,T.i=function(c){return c},T.d=function(c,i,a){T.o(c,i)||Object.defineProperty(c,i,{configurable:!1,enumerable:!0,get:a})},T.n=function(c){var i=c&&c.__esModule?function(){return c.default}:function(){return c};return T.d(i,"a",i),i},T.o=function(c,i){return Object.prototype.hasOwnProperty.call(c,i)},T.p="",T(T.s=28)}([function(I,_,T){function c(){}c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,I.exports=c},function(I,_,T){var c=T(2),i=T(8),a=T(9);function r(t,o,e){c.call(this,e),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=e,this.bendpoints=[],this.source=t,this.target=o}for(var n in r.prototype=Object.create(c.prototype),c)r[n]=c[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(t,o){for(var e=this.getOtherEnd(t),l=o.getGraphManager().getRoot();;){if(e.getOwner()==o)return e;if(e.getOwner()==l)break;e=e.getOwner().getParent()}return null},r.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},I.exports=r},function(I,_,T){I.exports=function(c){this.vGraphObject=c}},function(I,_,T){var c=T(2),i=T(10),a=T(13),r=T(0),n=T(16),t=T(5);function o(l,s,g,d){g==null&&d==null&&(d=s),c.call(this,d),l.graphManager!=null&&(l=l.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=l,this.rect=g!=null&&s!=null?new a(s.x,s.y,g.width,g.height):new a}for(var e in o.prototype=Object.create(c.prototype),c)o[e]=c[e];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(l){this.rect.width=l},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(l){this.rect.height=l},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new t(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new t(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(l,s){this.rect.x=l.x,this.rect.y=l.y,this.rect.width=s.width,this.rect.height=s.height},o.prototype.setCenter=function(l,s){this.rect.x=l-this.rect.width/2,this.rect.y=s-this.rect.height/2},o.prototype.setLocation=function(l,s){this.rect.x=l,this.rect.y=s},o.prototype.moveBy=function(l,s){this.rect.x+=l,this.rect.y+=s},o.prototype.getEdgeListToNode=function(l){var s=[],g=this;return g.edges.forEach(function(d){if(d.target==l){if(d.source!=g)throw"Incorrect edge source!";s.push(d)}}),s},o.prototype.getEdgesBetween=function(l){var s=[],g=this;return g.edges.forEach(function(d){if(d.source!=g&&d.target!=g)throw"Incorrect edge source and/or target";d.target!=l&&d.source!=l||s.push(d)}),s},o.prototype.getNeighborsList=function(){var l=new Set,s=this;return s.edges.forEach(function(g){if(g.source==s)l.add(g.target);else{if(g.target!=s)throw"Incorrect incidency!";l.add(g.source)}}),l},o.prototype.withChildren=function(){var l=new Set;if(l.add(this),this.child!=null)for(var s=this.child.getNodes(),g=0;g<s.length;g++)s[g].withChildren().forEach(function(d){l.add(d)});return l},o.prototype.getNoOfChildren=function(){var l=0;if(this.child==null)l=1;else for(var s=this.child.getNodes(),g=0;g<s.length;g++)l+=s[g].getNoOfChildren();return l==0&&(l=1),l},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},o.prototype.scatter=function(){var l,s,g=-r.INITIAL_WORLD_BOUNDARY,d=r.INITIAL_WORLD_BOUNDARY;l=r.WORLD_CENTER_X+n.nextDouble()*(d-g)+g;var v=-r.INITIAL_WORLD_BOUNDARY,m=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+n.nextDouble()*(m-v)+v,this.rect.x=l,this.rect.y=s},o.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var l=this.getChild();if(l.updateBounds(!0),this.rect.x=l.getLeft(),this.rect.y=l.getTop(),this.setWidth(l.getRight()-l.getLeft()),this.setHeight(l.getBottom()-l.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=l.getRight()-l.getLeft(),g=l.getBottom()-l.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(l){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var g=this.rect.y;g>r.WORLD_BOUNDARY?g=r.WORLD_BOUNDARY:g<-r.WORLD_BOUNDARY&&(g=-r.WORLD_BOUNDARY);var d=new t(s,g),v=l.inverseTransformPoint(d);this.setLocation(v.x,v.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},I.exports=o},function(I,_,T){var c=T(0);function i(){}for(var a in c)i[a]=c[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=3*i.MAX_NODE_DISPLACEMENT_INCREMENTAL,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,I.exports=i},function(I,_,T){function c(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(i){this.x=i},c.prototype.setY=function(i){this.y=i},c.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},I.exports=c},function(I,_,T){var c=T(2),i=T(10),a=T(0),r=T(7),n=T(3),t=T(1),o=T(13),e=T(12),l=T(11);function s(d,v,m){c.call(this,m),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,v!=null&&v instanceof r?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}for(var g in s.prototype=Object.create(c.prototype),c)s[g]=c[g];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(d,v,m){if(v==null&&m==null){var E=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(E)>-1)throw"Node already in graph!";return E.owner=this,this.getNodes().push(E),E}var w=d;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(m)>-1))throw"Source or target not in graph!";if(v.owner!=m.owner||v.owner!=this)throw"Both owners must be this graph!";return v.owner!=m.owner?null:(w.source=v,w.target=m,w.isInterGraph=!1,this.getEdges().push(w),v.edges.push(w),m!=v&&m.edges.push(w),w)},s.prototype.remove=function(d){var v=d;if(d instanceof n){if(v==null)throw"Node is null!";if(v.owner==null||v.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var m=v.edges.slice(),E=m.length,w=0;w<E;w++)(C=m[w]).isInterGraph?this.graphManager.remove(C):C.source.owner.remove(C);if((S=this.nodes.indexOf(v))==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(d instanceof t){var C;if((C=d)==null)throw"Edge is null!";if(C.source==null||C.target==null)throw"Source and/or target is null!";if(C.source.owner==null||C.target.owner==null||C.source.owner!=this||C.target.owner!=this)throw"Source and/or target owner is invalid!";var S,R=C.source.edges.indexOf(C),k=C.target.edges.indexOf(C);if(!(R>-1&&k>-1))throw"Source and/or target doesn't know this edge!";if(C.source.edges.splice(R,1),C.target!=C.source&&C.target.edges.splice(k,1),(S=C.source.owner.getEdges().indexOf(C))==-1)throw"Not in owner's edge list!";C.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var d,v,m,E=i.MAX_VALUE,w=i.MAX_VALUE,C=this.getNodes(),S=C.length,R=0;R<S;R++){var k=C[R];E>(d=k.getTop())&&(E=d),w>(v=k.getLeft())&&(w=v)}return E==i.MAX_VALUE?null:(m=C[0].getParent().paddingLeft!=null?C[0].getParent().paddingLeft:this.margin,this.left=w-m,this.top=E-m,new e(this.left,this.top))},s.prototype.updateBounds=function(d){for(var v,m,E,w,C,S=i.MAX_VALUE,R=-i.MAX_VALUE,k=i.MAX_VALUE,X=-i.MAX_VALUE,W=this.nodes,M=W.length,j=0;j<M;j++){var h=W[j];d&&h.child!=null&&h.updateBounds(),S>(v=h.getLeft())&&(S=v),R<(m=h.getRight())&&(R=m),k>(E=h.getTop())&&(k=E),X<(w=h.getBottom())&&(X=w)}var f=new o(S,k,R-S,X-k);S==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),C=W[0].getParent().paddingLeft!=null?W[0].getParent().paddingLeft:this.margin,this.left=f.x-C,this.right=f.x+f.width+C,this.top=f.y-C,this.bottom=f.y+f.height+C},s.calculateBounds=function(d){for(var v,m,E,w,C=i.MAX_VALUE,S=-i.MAX_VALUE,R=i.MAX_VALUE,k=-i.MAX_VALUE,X=d.length,W=0;W<X;W++){var M=d[W];C>(v=M.getLeft())&&(C=v),S<(m=M.getRight())&&(S=m),R>(E=M.getTop())&&(R=E),k<(w=M.getBottom())&&(k=w)}return new o(C,R,S-C,k-R)},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var d=0,v=this.nodes,m=v.length,E=0;E<m;E++)d+=v[E].calcEstimatedSize();return this.estimatedSize=d==0?a.EMPTY_COMPOUND_NODE_SIZE:d/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var d=this;if(this.nodes.length!=0){var v,m,E=new l,w=new Set,C=this.nodes[0];for(C.withChildren().forEach(function(X){E.push(X),w.add(X)});E.length!==0;)for(var S=(v=(C=E.shift()).getEdges()).length,R=0;R<S;R++)(m=v[R].getOtherEndInGraph(C,this))==null||w.has(m)||m.withChildren().forEach(function(X){E.push(X),w.add(X)});if(this.isConnected=!1,w.size>=this.nodes.length){var k=0;w.forEach(function(X){X.owner==d&&k++}),k==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},I.exports=s},function(I,_,T){var c,i=T(1);function a(r){c=T(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),t=this.add(r,n);return this.setRootGraph(t),this.rootGraph},a.prototype.add=function(r,n,t,o,e){if(t==null&&o==null&&e==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}e=t,t=r;var l=(o=n).getOwner(),s=e.getOwner();if(l==null||l.getGraphManager()!=this)throw"Source not in this graph mgr!";if(s==null||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(l==s)return t.isInterGraph=!1,l.add(t,o,e);if(t.isInterGraph=!0,t.source=o,t.target=e,this.edges.indexOf(t)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(t),t.source==null||t.target==null)throw"Edge source and/or target is null!";if(t.source.edges.indexOf(t)!=-1||t.target.edges.indexOf(t)!=-1)throw"Edge already in source and/or target incidency list!";return t.source.edges.push(t),t.target.edges.push(t),t},a.prototype.remove=function(r){if(r instanceof c){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(n!=this.rootGraph&&(n.parent==null||n.parent.graphManager!=this))throw"Invalid parent node!";for(var t,o=[],e=(o=o.concat(n.getEdges())).length,l=0;l<e;l++)t=o[l],n.remove(t);var s,g=[];for(e=(g=g.concat(n.getNodes())).length,l=0;l<e;l++)s=g[l],n.remove(s);n==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(n);this.graphs.splice(d,1),n.parent=null}else if(r instanceof i){if((t=r)==null)throw"Edge is null!";if(!t.isInterGraph)throw"Not an inter-graph edge!";if(t.source==null||t.target==null)throw"Source and/or target is null!";if(t.source.edges.indexOf(t)==-1||t.target.edges.indexOf(t)==-1)throw"Source and/or target doesn't know this edge!";if(d=t.source.edges.indexOf(t),t.source.edges.splice(d,1),d=t.target.edges.indexOf(t),t.target.edges.splice(d,1),t.source.owner==null||t.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(t.source.owner.getGraphManager().edges.indexOf(t)==-1)throw"Not in owner graph manager's edge list!";d=t.source.owner.getGraphManager().edges.indexOf(t),t.source.owner.getGraphManager().edges.splice(d,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],n=this.getGraphs(),t=n.length,o=0;o<t;o++)r=r.concat(n[o].getNodes());this.allNodes=r}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],n=this.getGraphs();n.length;for(var t=0;t<n.length;t++)r=r.concat(n[t].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(r,n){if(r==null||n==null)throw"assert failed";if(r==n)return!0;for(var t,o=r.getOwner();(t=o.getParent())!=null;){if(t==n)return!0;if((o=t.getOwner())==null)break}for(o=n.getOwner();(t=o.getParent())!=null;){if(t==r)return!0;if((o=t.getOwner())==null)break}return!1},a.prototype.calcLowestCommonAncestors=function(){for(var r,n,t,o,e,l=this.getAllEdges(),s=l.length,g=0;g<s;g++)if(n=(r=l[g]).source,t=r.target,r.lca=null,r.sourceInLca=n,r.targetInLca=t,n!=t){for(o=n.getOwner();r.lca==null;){for(r.targetInLca=t,e=t.getOwner();r.lca==null;){if(e==o){r.lca=e;break}if(e==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=e.getParent(),e=r.targetInLca.getOwner()}if(o==this.rootGraph)break;r.lca==null&&(r.sourceInLca=o.getParent(),o=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}else r.lca=n.getOwner()},a.prototype.calcLowestCommonAncestor=function(r,n){if(r==n)return r.getOwner();for(var t=r.getOwner();t!=null;){for(var o=n.getOwner();o!=null;){if(o==t)return o;o=o.getParent().getOwner()}t=t.getParent().getOwner()}return t},a.prototype.calcInclusionTreeDepths=function(r,n){var t;r==null&&n==null&&(r=this.rootGraph,n=1);for(var o=r.getNodes(),e=o.length,l=0;l<e;l++)(t=o[l]).inclusionTreeDepth=n,t.child!=null&&this.calcInclusionTreeDepths(t.child,n+1)},a.prototype.includesInvalidEdge=function(){for(var r,n=[],t=this.edges.length,o=0;o<t;o++)r=this.edges[o],this.isOneAncestorOfOther(r.source,r.target)&&n.push(r);for(o=0;o<n.length;o++)this.remove(n[o]);return!1},I.exports=a},function(I,_,T){var c=T(12);function i(){}i.calcSeparationAmount=function(a,r,n,t){if(!a.intersects(r))throw"assert failed";var o=new Array(2);this.decideDirectionsForOverlappingNodes(a,r,o),n[0]=Math.min(a.getRight(),r.getRight())-Math.max(a.x,r.x),n[1]=Math.min(a.getBottom(),r.getBottom())-Math.max(a.y,r.y),a.getX()<=r.getX()&&a.getRight()>=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var e=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(e=1);var l=e*n[0],s=n[1]/e;n[0]<s?s=n[0]:l=n[1],n[0]=-1*o[0]*(s/2+t),n[1]=-1*o[1]*(l/2+t)},i.decideDirectionsForOverlappingNodes=function(a,r,n){a.getCenterX()<r.getCenterX()?n[0]=-1:n[0]=1,a.getCenterY()<r.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(a,r,n){var t=a.getCenterX(),o=a.getCenterY(),e=r.getCenterX(),l=r.getCenterY();if(a.intersects(r))return n[0]=t,n[1]=o,n[2]=e,n[3]=l,!0;var s=a.getX(),g=a.getY(),d=a.getRight(),v=a.getX(),m=a.getBottom(),E=a.getRight(),w=a.getWidthHalf(),C=a.getHeightHalf(),S=r.getX(),R=r.getY(),k=r.getRight(),X=r.getX(),W=r.getBottom(),M=r.getRight(),j=r.getWidthHalf(),h=r.getHeightHalf(),f=!1,u=!1;if(t===e){if(o>l)return n[0]=t,n[1]=g,n[2]=e,n[3]=W,!1;if(o<l)return n[0]=t,n[1]=m,n[2]=e,n[3]=R,!1}else if(o===l){if(t>e)return n[0]=s,n[1]=o,n[2]=k,n[3]=l,!1;if(t<e)return n[0]=d,n[1]=o,n[2]=S,n[3]=l,!1}else{var y=a.height/a.width,p=r.height/r.width,A=(l-o)/(e-t),L=void 0,O=void 0,G=void 0,b=void 0,P=void 0,F=void 0;if(-y===A?t>e?(n[0]=v,n[1]=m,f=!0):(n[0]=d,n[1]=g,f=!0):y===A&&(t>e?(n[0]=s,n[1]=g,f=!0):(n[0]=E,n[1]=m,f=!0)),-p===A?e>t?(n[2]=X,n[3]=W,u=!0):(n[2]=k,n[3]=R,u=!0):p===A&&(e>t?(n[2]=S,n[3]=R,u=!0):(n[2]=M,n[3]=W,u=!0)),f&&u)return!1;if(t>e?o>l?(L=this.getCardinalDirection(y,A,4),O=this.getCardinalDirection(p,A,2)):(L=this.getCardinalDirection(-y,A,3),O=this.getCardinalDirection(-p,A,1)):o>l?(L=this.getCardinalDirection(-y,A,1),O=this.getCardinalDirection(-p,A,3)):(L=this.getCardinalDirection(y,A,2),O=this.getCardinalDirection(p,A,4)),!f)switch(L){case 1:b=g,G=t+-C/A,n[0]=G,n[1]=b;break;case 2:G=E,b=o+w*A,n[0]=G,n[1]=b;break;case 3:b=m,G=t+C/A,n[0]=G,n[1]=b;break;case 4:G=v,b=o+-w*A,n[0]=G,n[1]=b}if(!u)switch(O){case 1:F=R,P=e+-h/A,n[2]=P,n[3]=F;break;case 2:P=M,F=l+j*A,n[2]=P,n[3]=F;break;case 3:F=W,P=e+h/A,n[2]=P,n[3]=F;break;case 4:P=X,F=l+-j*A,n[2]=P,n[3]=F}}return!1},i.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},i.getIntersection=function(a,r,n,t){if(t==null)return this.getIntersection2(a,r,n);var o,e,l,s,g,d,v,m=a.x,E=a.y,w=r.x,C=r.y,S=n.x,R=n.y,k=t.x,X=t.y;return(v=(o=C-E)*(s=S-k)-(e=X-R)*(l=m-w))===0?null:new c((l*(d=k*R-S*X)-s*(g=w*E-m*C))/v,(e*g-o*d)/v)},i.angleOfVector=function(a,r,n,t){var o=void 0;return a!==n?(o=Math.atan((t-r)/(n-a)),n<a?o+=Math.PI:t<r&&(o+=this.TWO_PI)):o=t<r?this.ONE_AND_HALF_PI:this.HALF_PI,o},i.doIntersect=function(a,r,n,t){var o=a.x,e=a.y,l=r.x,s=r.y,g=n.x,d=n.y,v=t.x,m=t.y,E=(l-o)*(m-d)-(v-g)*(s-e);if(E===0)return!1;var w=((m-d)*(v-o)+(g-v)*(m-e))/E,C=((e-s)*(v-o)+(l-o)*(m-e))/E;return 0<w&&w<1&&0<C&&C<1},i.findCircleLineIntersections=function(a,r,n,t,o,e,l){var s=(n-a)*(n-a)+(t-r)*(t-r),g=2*((a-o)*(n-a)+(r-e)*(t-r)),d=(a-o)*(a-o)+(r-e)*(r-e)-l*l;if(g*g-4*s*d>=0){var v=(-g+Math.sqrt(g*g-4*s*d))/(2*s),m=(-g-Math.sqrt(g*g-4*s*d))/(2*s);return v>=0&&v<=1?[v]:m>=0&&m<=1?[m]:null}return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,I.exports=i},function(I,_,T){function c(){}c.sign=function(i){return i>0?1:i<0?-1:0},c.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},c.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},I.exports=c},function(I,_,T){function c(){}c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,I.exports=c},function(I,_,T){var c=function(){function t(o,e){for(var l=0;l<e.length;l++){var s=e[l];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(o,s.key,s)}}return function(o,e,l){return e&&t(o.prototype,e),l&&t(o,l),o}}(),i=function(t){return{value:t,next:null,prev:null}},a=function(t,o,e,l){return t!==null?t.next=o:l.head=o,e!==null?e.prev=o:l.tail=o,o.prev=t,o.next=e,l.length++,o},r=function(t,o){var e=t.prev,l=t.next;return e!==null?e.next=l:o.head=l,l!==null?l.prev=e:o.tail=e,t.prev=t.next=null,o.length--,t},n=function(){function t(o){var e=this;(function(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),this.length=0,this.head=null,this.tail=null,o!=null&&o.forEach(function(l){return e.push(l)})}return c(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(o,e){return a(e.prev,i(o),e,this)}},{key:"insertAfter",value:function(o,e){return a(e,i(o),e.next,this)}},{key:"insertNodeBefore",value:function(o,e){return a(e.prev,o,e,this)}},{key:"insertNodeAfter",value:function(o,e){return a(e,o,e.next,this)}},{key:"push",value:function(o){return a(this.tail,i(o),null,this)}},{key:"unshift",value:function(o){return a(null,i(o),this.head,this)}},{key:"remove",value:function(o){return r(o,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(o){if(o<=this.length()){for(var e=1,l=this.head;e<o;)l=l.next,e++;return l.value}}},{key:"set_object_at",value:function(o,e){if(o<=this.length()){for(var l=1,s=this.head;l<o;)s=s.next,l++;s.value=e}}}]),t}();I.exports=n},function(I,_,T){function c(i,a,r){this.x=null,this.y=null,i==null&&a==null&&r==null?(this.x=0,this.y=0):typeof i=="number"&&typeof a=="number"&&r==null?(this.x=i,this.y=a):i.constructor.name=="Point"&&a==null&&r==null&&(r=i,this.x=r.x,this.y=r.y)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(i,a,r){i.constructor.name=="Point"&&a==null&&r==null?(r=i,this.setLocation(r.x,r.y)):typeof i=="number"&&typeof a=="number"&&r==null&&(parseInt(i)==i&&parseInt(a)==a?this.move(i,a):(this.x=Math.floor(i+.5),this.y=Math.floor(a+.5)))},c.prototype.move=function(i,a){this.x=i,this.y=a},c.prototype.translate=function(i,a){this.x+=i,this.y+=a},c.prototype.equals=function(i){if(i.constructor.name=="Point"){var a=i;return this.x==a.x&&this.y==a.y}return this==i},c.prototype.toString=function(){return new c().constructor.name+"[x="+this.x+",y="+this.y+"]"},I.exports=c},function(I,_,T){function c(i,a,r,n){this.x=0,this.y=0,this.width=0,this.height=0,i!=null&&a!=null&&r!=null&&n!=null&&(this.x=i,this.y=a,this.width=r,this.height=n)}c.prototype.getX=function(){return this.x},c.prototype.setX=function(i){this.x=i},c.prototype.getY=function(){return this.y},c.prototype.setY=function(i){this.y=i},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(i){this.width=i},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(i){this.height=i},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(i){return!(this.getRight()<i.x||this.getBottom()<i.y||i.getRight()<this.x||i.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},I.exports=c},function(I,_,T){var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function i(){}i.lastID=0,i.createID=function(a){return i.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=i.getString(),i.lastID++),a.uniqueID)},i.getString=function(a){return a==null&&(a=i.lastID),"Object#"+a},i.isPrimitive=function(a){var r=a===void 0?"undefined":c(a);return a==null||r!="object"&&r!="function"},I.exports=i},function(I,_,T){function c(g){if(Array.isArray(g)){for(var d=0,v=Array(g.length);d<g.length;d++)v[d]=g[d];return v}return Array.from(g)}var i=T(0),a=T(7),r=T(3),n=T(1),t=T(6),o=T(5),e=T(17),l=T(29);function s(g){l.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}s.RANDOM_SEED=1,s.prototype=Object.create(l.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var g=new a(this);return this.graphManager=g,g},s.prototype.newGraph=function(g){return new t(null,this.graphManager,g)},s.prototype.newNode=function(g){return new r(this.graphManager,g)},s.prototype.newEdge=function(g){return new n(null,null,g)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){var g;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),g=!this.checkLayoutSuccess()&&this.layout(),i.ANIMATE!=="during"&&(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),d=0;d<g.length;d++)g[d];var v=this.graphManager.getRoot().getNodes();for(d=0;d<v.length;d++)v[d];this.update(this.graphManager.getRoot())}},s.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof r){var d=g;if(d.getChild()!=null)for(var v=d.getChild().getNodes(),m=0;m<v.length;m++)update(v[m]);d.vGraphObject!=null&&d.vGraphObject.update(d)}else if(g instanceof n){var E=g;E.vGraphObject!=null&&E.vGraphObject.update(E)}else if(g instanceof t){var w=g;w.vGraphObject!=null&&w.vGraphObject.update(w)}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(g){if(g==null)this.transform(new o(0,0));else{var d=new e,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(v.x),d.setDeviceOrgY(v.y);for(var m=this.getAllNodes(),E=0;E<m.length;E++)m[E].transform(d)}}},s.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,v,m=g.getNodes(),E=0;E<m.length;E++)(v=(d=m[E]).getChild())==null||v.getNodes().length==0?d.scatter():(this.positionNodesRandomly(v),d.updateBounds())},s.prototype.getFlatForest=function(){for(var g=[],d=!0,v=this.graphManager.getRoot().getNodes(),m=!0,E=0;E<v.length;E++)v[E].getChild()!=null&&(m=!1);if(!m)return g;var w=new Set,C=[],S=new Map,R=[];for(R=R.concat(v);R.length>0&&d;){for(C.push(R[0]);C.length>0&&d;){var k=C[0];C.splice(0,1),w.add(k);var X=k.getEdges();for(E=0;E<X.length;E++){var W=X[E].getOtherEnd(k);if(S.get(k)!=W){if(w.has(W)){d=!1;break}C.push(W),S.set(W,k)}}}if(d){var M=[].concat(c(w));for(g.push(M),E=0;E<M.length;E++){var j=M[E],h=R.indexOf(j);h>-1&&R.splice(h,1)}w=new Set,S=new Map}else g=[]}return g},s.prototype.createDummyNodesForBendpoints=function(g){for(var d=[],v=g.source,m=this.graphManager.calcLowestCommonAncestor(g.source,g.target),E=0;E<g.bendpoints.length;E++){var w=this.newNode(null);w.setRect(new Point(0,0),new Dimension(1,1)),m.add(w);var C=this.newEdge(null);this.graphManager.add(C,v,w),d.add(w),v=w}return C=this.newEdge(null),this.graphManager.add(C,v,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph()?this.graphManager.remove(g):m.remove(g),d},s.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(c(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var v=g[d];if(v.bendpoints.length>0){for(var m=this.edgeToDummyNodes.get(v),E=0;E<m.length;E++){var w=m[E],C=new o(w.getCenterX(),w.getCenterY()),S=v.bendpoints.get(E);S.x=C.x,S.y=C.y,w.getOwner().remove(w)}this.graphManager.add(v,v.source,v.target)}}},s.transform=function(g,d,v,m){if(v!=null&&m!=null){var E=d;return g<=50?E-=(d-d/v)/50*(50-g):E+=(d*m-d)/50*(g-50),E}var w,C;return g<=50?(w=9*d/500,C=d/10):(w=9*d/50,C=-8*d),w*g+C},s.findCenterOfTree=function(g){var d=[];d=d.concat(g);var v=[],m=new Map,E=!1,w=null;d.length!=1&&d.length!=2||(E=!0,w=d[0]);for(var C=0;C<d.length;C++){var S=(X=d[C]).getNeighborsList().size;m.set(X,X.getNeighborsList().size),S==1&&v.push(X)}var R=[];for(R=R.concat(v);!E;){var k=[];for(k=k.concat(R),R=[],C=0;C<d.length;C++){var X=d[C],W=d.indexOf(X);W>=0&&d.splice(W,1),X.getNeighborsList().forEach(function(M){if(v.indexOf(M)<0){var j=m.get(M)-1;j==1&&R.push(M),m.set(M,j)}})}v=v.concat(R),d.length!=1&&d.length!=2||(E=!0,w=d[0])}return w},s.prototype.setGraphManager=function(g){this.graphManager=g},I.exports=s},function(I,_,T){function c(){}c.seed=1,c.x=0,c.nextDouble=function(){return c.x=1e4*Math.sin(c.seed++),c.x-Math.floor(c.x)},I.exports=c},function(I,_,T){var c=T(5);function i(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},i.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},i.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},i.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},i.prototype.inverseTransformPoint=function(a){return new c(this.inverseTransformX(a.x),this.inverseTransformY(a.y))},I.exports=i},function(I,_,T){var c=T(15),i=T(4),a=T(0),r=T(8),n=T(9);function t(){c.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var o in t.prototype=Object.create(c.prototype),c)t[o]=c[o];t.prototype.initParameters=function(){c.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},t.prototype.calcIdealEdgeLengths=function(){for(var e,l,s,g,d,v,m,E=this.getGraphManager().getAllEdges(),w=0;w<E.length;w++)l=(e=E[w]).idealLength,e.isInterGraph&&(g=e.getSource(),d=e.getTarget(),v=e.getSourceInLca().getEstimatedSize(),m=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=v+m-2*a.SIMPLE_NODE_SIZE),s=e.getLca().getInclusionTreeDepth(),e.idealLength+=l*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*s))},t.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},t.prototype.calcSpringForces=function(){for(var e,l=this.getAllEdges(),s=0;s<l.length;s++)e=l[s],this.calcSpringForce(e,e.idealLength)},t.prototype.calcRepulsionForces=function(){var e,l,s,g,d,v=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],m=arguments.length>1&&arguments[1]!==void 0&&arguments[1],E=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&v&&this.updateGrid(),d=new Set,e=0;e<E.length;e++)s=E[e],this.calculateRepulsionForceOfANode(s,d,v,m),d.add(s);else for(e=0;e<E.length;e++)for(s=E[e],l=e+1;l<E.length;l++)g=E[l],s.getOwner()==g.getOwner()&&this.calcRepulsionForce(s,g)},t.prototype.calcGravitationalForces=function(){for(var e,l=this.getAllNodesToApplyGravitation(),s=0;s<l.length;s++)e=l[s],this.calcGravitationalForce(e)},t.prototype.moveNodes=function(){for(var e=this.getAllNodes(),l=0;l<e.length;l++)e[l].move()},t.prototype.calcSpringForce=function(e,l){var s,g,d,v,m=e.getSource(),E=e.getTarget();if(this.uniformLeafNodeSizes&&m.getChild()==null&&E.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;(s=e.getLength())!=0&&(d=(g=e.edgeElasticity*(s-l))*(e.lengthX/s),v=g*(e.lengthY/s),m.springForceX+=d,m.springForceY+=v,E.springForceX-=d,E.springForceY-=v)},t.prototype.calcRepulsionForce=function(e,l){var s,g,d,v,m,E,w,C=e.getRect(),S=l.getRect(),R=new Array(2),k=new Array(4);if(C.intersects(S)){r.calcSeparationAmount(C,S,R,i.DEFAULT_EDGE_LENGTH/2),E=2*R[0],w=2*R[1];var X=e.noOfChildren*l.noOfChildren/(e.noOfChildren+l.noOfChildren);e.repulsionForceX-=X*E,e.repulsionForceY-=X*w,l.repulsionForceX+=X*E,l.repulsionForceY+=X*w}else this.uniformLeafNodeSizes&&e.getChild()==null&&l.getChild()==null?(s=S.getCenterX()-C.getCenterX(),g=S.getCenterY()-C.getCenterY()):(r.getIntersection(C,S,k),s=k[2]-k[0],g=k[3]-k[1]),Math.abs(s)<i.MIN_REPULSION_DIST&&(s=n.sign(s)*i.MIN_REPULSION_DIST),Math.abs(g)<i.MIN_REPULSION_DIST&&(g=n.sign(g)*i.MIN_REPULSION_DIST),d=s*s+g*g,v=Math.sqrt(d),E=(m=(e.nodeRepulsion/2+l.nodeRepulsion/2)*e.noOfChildren*l.noOfChildren/d)*s/v,w=m*g/v,e.repulsionForceX-=E,e.repulsionForceY-=w,l.repulsionForceX+=E,l.repulsionForceY+=w},t.prototype.calcGravitationalForce=function(e){var l,s,g,d,v,m,E,w;s=((l=e.getOwner()).getRight()+l.getLeft())/2,g=(l.getTop()+l.getBottom())/2,d=e.getCenterX()-s,v=e.getCenterY()-g,m=Math.abs(d)+e.getWidth()/2,E=Math.abs(v)+e.getHeight()/2,e.getOwner()==this.graphManager.getRoot()?(m>(w=l.getEstimatedSize()*this.gravityRangeFactor)||E>w)&&(e.gravitationForceX=-this.gravityConstant*d,e.gravitationForceY=-this.gravityConstant*v):(m>(w=l.getEstimatedSize()*this.compoundGravityRangeFactor)||E>w)&&(e.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant)},t.prototype.isConverged=function(){var e,l=!1;return this.totalIterations>this.maxIterations/3&&(l=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||l},t.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},t.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,l=this.graphManager.getAllNodes(),s=0;s<l.length;s++)(e=l[s]).noOfChildren=e.getNoOfChildren()},t.prototype.calcGrid=function(e){var l,s;l=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var g=new Array(l),d=0;d<l;d++)g[d]=new Array(s);for(d=0;d<l;d++)for(var v=0;v<s;v++)g[d][v]=new Array;return g},t.prototype.addNodeToGrid=function(e,l,s){var g,d,v,m;g=parseInt(Math.floor((e.getRect().x-l)/this.repulsionRange)),d=parseInt(Math.floor((e.getRect().width+e.getRect().x-l)/this.repulsionRange)),v=parseInt(Math.floor((e.getRect().y-s)/this.repulsionRange)),m=parseInt(Math.floor((e.getRect().height+e.getRect().y-s)/this.repulsionRange));for(var E=g;E<=d;E++)for(var w=v;w<=m;w++)this.grid[E][w].push(e),e.setGridCoordinates(g,d,v,m)},t.prototype.updateGrid=function(){var e,l,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<s.length;e++)l=s[e],this.addNodeToGrid(l,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},t.prototype.calculateRepulsionForceOfANode=function(e,l,s,g){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&s||g){var d,v=new Set;e.surrounding=new Array;for(var m=this.grid,E=e.startX-1;E<e.finishX+2;E++)for(var w=e.startY-1;w<e.finishY+2;w++)if(!(E<0||w<0||E>=m.length||w>=m[0].length)){for(var C=0;C<m[E][w].length;C++)if(d=m[E][w][C],e.getOwner()==d.getOwner()&&e!=d&&!l.has(d)&&!v.has(d)){var S=Math.abs(e.getCenterX()-d.getCenterX())-(e.getWidth()/2+d.getWidth()/2),R=Math.abs(e.getCenterY()-d.getCenterY())-(e.getHeight()/2+d.getHeight()/2);S<=this.repulsionRange&&R<=this.repulsionRange&&v.add(d)}}e.surrounding=[].concat(function(k){if(Array.isArray(k)){for(var X=0,W=Array(k.length);X<k.length;X++)W[X]=k[X];return W}return Array.from(k)}(v))}for(E=0;E<e.surrounding.length;E++)this.calcRepulsionForce(e,e.surrounding[E])},t.prototype.calcRepulsionRange=function(){return 0},I.exports=t},function(I,_,T){var c=T(1),i=T(4);function a(n,t,o){c.call(this,n,t,o),this.idealLength=i.DEFAULT_EDGE_LENGTH,this.edgeElasticity=i.DEFAULT_SPRING_STRENGTH}for(var r in a.prototype=Object.create(c.prototype),c)a[r]=c[r];I.exports=a},function(I,_,T){var c=T(3),i=T(4);function a(n,t,o,e){c.call(this,n,t,o,e),this.nodeRepulsion=i.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=[]}for(var r in a.prototype=Object.create(c.prototype),c)a[r]=c[r];a.prototype.setGridCoordinates=function(n,t,o,e){this.startX=n,this.finishX=t,this.startY=o,this.finishY=e},I.exports=a},function(I,_,T){function c(i,a){this.width=0,this.height=0,i!==null&&a!==null&&(this.height=a,this.width=i)}c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(i){this.width=i},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(i){this.height=i},I.exports=c},function(I,_,T){var c=T(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(a,r){var n=c.createID(a);this.contains(n)||(this.map[n]=r,this.keys.push(a))},i.prototype.contains=function(a){return c.createID(a),this.map[a]!=null},i.prototype.get=function(a){var r=c.createID(a);return this.map[r]},i.prototype.keySet=function(){return this.keys},I.exports=i},function(I,_,T){var c=T(14);function i(){this.set={}}i.prototype.add=function(a){var r=c.createID(a);this.contains(r)||(this.set[r]=a)},i.prototype.remove=function(a){delete this.set[c.createID(a)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(a){return this.set[c.createID(a)]==a},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(a){for(var r=Object.keys(this.set),n=r.length,t=0;t<n;t++)a.push(this.set[r[t]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(a){for(var r=a.length,n=0;n<r;n++){var t=a[n];this.add(t)}},I.exports=i},function(I,_,T){function c(){}c.multMat=function(i,a){for(var r=[],n=0;n<i.length;n++){r[n]=[];for(var t=0;t<a[0].length;t++){r[n][t]=0;for(var o=0;o<i[0].length;o++)r[n][t]+=i[n][o]*a[o][t]}}return r},c.transpose=function(i){for(var a=[],r=0;r<i[0].length;r++){a[r]=[];for(var n=0;n<i.length;n++)a[r][n]=i[n][r]}return a},c.multCons=function(i,a){for(var r=[],n=0;n<i.length;n++)r[n]=i[n]*a;return r},c.minusOp=function(i,a){for(var r=[],n=0;n<i.length;n++)r[n]=i[n]-a[n];return r},c.dotProduct=function(i,a){for(var r=0,n=0;n<i.length;n++)r+=i[n]*a[n];return r},c.mag=function(i){return Math.sqrt(this.dotProduct(i,i))},c.normalize=function(i){for(var a=[],r=this.mag(i),n=0;n<i.length;n++)a[n]=i[n]/r;return a},c.multGamma=function(i){for(var a=[],r=0,n=0;n<i.length;n++)r+=i[n];r*=-1/i.length;for(var t=0;t<i.length;t++)a[t]=r+i[t];return a},c.multL=function(i,a,r){for(var n=[],t=[],o=[],e=0;e<a[0].length;e++){for(var l=0,s=0;s<a.length;s++)l+=-.5*a[s][e]*i[s];t[e]=l}for(var g=0;g<r.length;g++){for(var d=0,v=0;v<r.length;v++)d+=r[g][v]*t[v];o[g]=d}for(var m=0;m<a.length;m++){for(var E=0,w=0;w<a[0].length;w++)E+=a[m][w]*o[w];n[m]=E}return n},I.exports=c},function(I,_,T){var c=function(){function r(n,t){for(var o=0;o<t.length;o++){var e=t[o];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}return function(n,t,o){return t&&r(n.prototype,t),o&&r(n,o),n}}(),i=T(11),a=function(){function r(n,t){(function(e,l){if(!(e instanceof l))throw new TypeError("Cannot call a class as a function")})(this,r),t===null&&t===void 0||(this.compareFunction=this._defaultCompareFunction);var o=void 0;o=n instanceof i?n.size():n.length,this._quicksort(n,0,o-1)}return c(r,[{key:"_quicksort",value:function(n,t,o){if(t<o){var e=this._partition(n,t,o);this._quicksort(n,t,e),this._quicksort(n,e+1,o)}}},{key:"_partition",value:function(n,t,o){for(var e=this._get(n,t),l=t,s=o;;){for(;this.compareFunction(e,this._get(n,s));)s--;for(;this.compareFunction(this._get(n,l),e);)l++;if(!(l<s))return s;this._swap(n,l,s),l++,s--}}},{key:"_get",value:function(n,t){return n instanceof i?n.get_object_at(t):n[t]}},{key:"_set",value:function(n,t,o){n instanceof i?n.set_object_at(t,o):n[t]=o}},{key:"_swap",value:function(n,t,o){var e=this._get(n,t);this._set(n,t,this._get(n,o)),this._set(n,o,e)}},{key:"_defaultCompareFunction",value:function(n,t){return t>n}}]),r}();I.exports=a},function(I,_,T){function c(){}c.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=function(Lt){for(var lt=[];Lt-- >0;)lt.push(0);return lt}(Math.min(this.m+1,this.n)),this.U=function Lt(lt){if(lt.length==0)return 0;for(var Pt=[],Xt=0;Xt<lt[0];Xt++)Pt.push(Lt(lt.slice(1)));return Pt}([this.m,a]),this.V=function(Lt){return function lt(Pt){if(Pt.length==0)return 0;for(var Xt=[],$t=0;$t<Pt[0];$t++)Xt.push(lt(Pt.slice(1)));return Xt}(Lt)}([this.n,this.n]);for(var r,n,t=function(Lt){for(var lt=[];Lt-- >0;)lt.push(0);return lt}(this.n),o=function(Lt){for(var lt=[];Lt-- >0;)lt.push(0);return lt}(this.m),e=Math.min(this.m-1,this.n),l=Math.max(0,Math.min(this.n-2,this.m)),s=0;s<Math.max(e,l);s++){if(s<e){this.s[s]=0;for(var g=s;g<this.m;g++)this.s[s]=c.hypot(this.s[s],i[g][s]);if(this.s[s]!==0){i[s][s]<0&&(this.s[s]=-this.s[s]);for(var d=s;d<this.m;d++)i[d][s]/=this.s[s];i[s][s]+=1}this.s[s]=-this.s[s]}for(var v=s+1;v<this.n;v++){if(r=s<e,n=this.s[s]!==0,r&&n){for(var m=0,E=s;E<this.m;E++)m+=i[E][s]*i[E][v];m=-m/i[s][s];for(var w=s;w<this.m;w++)i[w][v]+=m*i[w][s]}t[v]=i[s][v]}if(function(Lt,lt){return lt}(0,s<e))for(var C=s;C<this.m;C++)this.U[C][s]=i[C][s];if(s<l){t[s]=0;for(var S=s+1;S<this.n;S++)t[s]=c.hypot(t[s],t[S]);if(t[s]!==0){t[s+1]<0&&(t[s]=-t[s]);for(var R=s+1;R<this.n;R++)t[R]/=t[s];t[s+1]+=1}if(t[s]=-t[s],function(Lt,lt){return Lt&<}(s+1<this.m,t[s]!==0)){for(var k=s+1;k<this.m;k++)o[k]=0;for(var X=s+1;X<this.n;X++)for(var W=s+1;W<this.m;W++)o[W]+=t[X]*i[W][X];for(var M=s+1;M<this.n;M++)for(var j=-t[M]/t[s+1],h=s+1;h<this.m;h++)i[h][M]+=j*o[h]}for(var f=s+1;f<this.n;f++)this.V[f][s]=t[f]}}var u=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=i[e][e]),this.m<u&&(this.s[u-1]=0),l+1<u&&(t[l]=i[l][u-1]),t[u-1]=0;for(var y=e;y<a;y++){for(var p=0;p<this.m;p++)this.U[p][y]=0;this.U[y][y]=1}for(var A=e-1;A>=0;A--)if(this.s[A]!==0){for(var L=A+1;L<a;L++){for(var O=0,G=A;G<this.m;G++)O+=this.U[G][A]*this.U[G][L];O=-O/this.U[A][A];for(var b=A;b<this.m;b++)this.U[b][L]+=O*this.U[b][A]}for(var P=A;P<this.m;P++)this.U[P][A]=-this.U[P][A];this.U[A][A]=1+this.U[A][A];for(var F=0;F<A-1;F++)this.U[F][A]=0}else{for(var V=0;V<this.m;V++)this.U[V][A]=0;this.U[A][A]=1}for(var z=this.n-1;z>=0;z--){if(function(Lt,lt){return Lt&<}(z<l,t[z]!==0))for(var U=z+1;U<a;U++){for(var x=0,H=z+1;H<this.n;H++)x+=this.V[H][z]*this.V[H][U];x=-x/this.V[z+1][z];for(var $=z+1;$<this.n;$++)this.V[$][U]+=x*this.V[$][z]}for(var tt=0;tt<this.n;tt++)this.V[tt][z]=0;this.V[z][z]=1}for(var ot=u-1,wt=Math.pow(2,-52),Nt=Math.pow(2,-966);u>0;){var B=void 0,St=void 0;for(B=u-2;B>=-1&&B!==-1;B--)if(Math.abs(t[B])<=Nt+wt*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){t[B]=0;break}if(B===u-2)St=4;else{var Tt=void 0;for(Tt=u-1;Tt>=B&&Tt!==B;Tt--){var st=(Tt!==u?Math.abs(t[Tt]):0)+(Tt!==B+1?Math.abs(t[Tt-1]):0);if(Math.abs(this.s[Tt])<=Nt+wt*st){this.s[Tt]=0;break}}Tt===B?St=3:Tt===u-1?St=1:(St=2,B=Tt)}switch(B++,St){case 1:var ht=t[u-2];t[u-2]=0;for(var it=u-2;it>=B;it--){var ct=c.hypot(this.s[it],ht),It=this.s[it]/ct,mt=ht/ct;this.s[it]=ct,it!==B&&(ht=-mt*t[it-1],t[it-1]=It*t[it-1]);for(var gt=0;gt<this.n;gt++)ct=It*this.V[gt][it]+mt*this.V[gt][u-1],this.V[gt][u-1]=-mt*this.V[gt][it]+It*this.V[gt][u-1],this.V[gt][it]=ct}break;case 2:var _t=t[B-1];t[B-1]=0;for(var vt=B;vt<u;vt++){var Mt=c.hypot(this.s[vt],_t),Rt=this.s[vt]/Mt,Ot=_t/Mt;this.s[vt]=Mt,_t=-Ot*t[vt],t[vt]=Rt*t[vt];for(var D=0;D<this.m;D++)Mt=Rt*this.U[D][vt]+Ot*this.U[D][B-1],this.U[D][B-1]=-Ot*this.U[D][vt]+Rt*this.U[D][B-1],this.U[D][vt]=Mt}break;case 3:var Y=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[u-1]),Math.abs(this.s[u-2])),Math.abs(t[u-2])),Math.abs(this.s[B])),Math.abs(t[B])),Q=this.s[u-1]/Y,K=this.s[u-2]/Y,nt=t[u-2]/Y,Ct=this.s[B]/Y,at=t[B]/Y,ft=((K+Q)*(K-Q)+nt*nt)/2,yt=Q*nt*(Q*nt),kt=0;(function(Lt,lt){return Lt||lt})(ft!==0,yt!==0)&&(kt=Math.sqrt(ft*ft+yt),ft<0&&(kt=-kt),kt=yt/(ft+kt));for(var Dt=(Ct+Q)*(Ct-Q)+kt,Et=Ct*at,q=B;q<u-1;q++){var Z=c.hypot(Dt,Et),ut=Dt/Z,pt=Et/Z;q!==B&&(t[q-1]=Z),Dt=ut*this.s[q]+pt*t[q],t[q]=ut*t[q]-pt*this.s[q],Et=pt*this.s[q+1],this.s[q+1]=ut*this.s[q+1];for(var et=0;et<this.n;et++)Z=ut*this.V[et][q]+pt*this.V[et][q+1],this.V[et][q+1]=-pt*this.V[et][q]+ut*this.V[et][q+1],this.V[et][q]=Z;if(ut=Dt/(Z=c.hypot(Dt,Et)),pt=Et/Z,this.s[q]=Z,Dt=ut*t[q]+pt*this.s[q+1],this.s[q+1]=-pt*t[q]+ut*this.s[q+1],Et=pt*t[q+1],t[q+1]=ut*t[q+1],q<this.m-1)for(var xt=0;xt<this.m;xt++)Z=ut*this.U[xt][q]+pt*this.U[xt][q+1],this.U[xt][q+1]=-pt*this.U[xt][q]+ut*this.U[xt][q+1],this.U[xt][q]=Z}t[u-2]=Dt;break;case 4:if(this.s[B]<=0){this.s[B]=this.s[B]<0?-this.s[B]:0;for(var Ut=0;Ut<=ot;Ut++)this.V[Ut][B]=-this.V[Ut][B]}for(;B<ot&&!(this.s[B]>=this.s[B+1]);){var bt=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=bt,B<this.n-1)for(var Yt=0;Yt<this.n;Yt++)bt=this.V[Yt][B+1],this.V[Yt][B+1]=this.V[Yt][B],this.V[Yt][B]=bt;if(B<this.m-1)for(var Gt=0;Gt<this.m;Gt++)bt=this.U[Gt][B+1],this.U[Gt][B+1]=this.U[Gt][B],this.U[Gt][B]=bt;B++}u--}}return{U:this.U,V:this.V,S:this.s}},c.hypot=function(i,a){var r=void 0;return Math.abs(i)>Math.abs(a)?(r=a/i,r=Math.abs(i)*Math.sqrt(1+r*r)):a!=0?(r=i/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},I.exports=c},function(I,_,T){var c=function(){function a(r,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(r,o.key,o)}}return function(r,n,t){return n&&a(r.prototype,n),t&&a(r,t),r}}(),i=function(){function a(r,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,e=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")})(this,a),this.sequence1=r,this.sequence2=n,this.match_score=t,this.mismatch_penalty=o,this.gap_penalty=e,this.iMax=r.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var l=0;l<this.iMax;l++){this.grid[l]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[l][s]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[g][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return c(a,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var r=1;r<this.jMax;r++)this.grid[0][r]=this.grid[0][r-1]+this.gap_penalty,this.tracebackGrid[0][r]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var t=1;t<this.iMax;t++)for(var o=1;o<this.jMax;o++){var e=[this.sequence1[t-1]===this.sequence2[o-1]?this.grid[t-1][o-1]+this.match_score:this.grid[t-1][o-1]+this.mismatch_penalty,this.grid[t-1][o]+this.gap_penalty,this.grid[t][o-1]+this.gap_penalty],l=this.arrayAllMaxIndexes(e);this.grid[t][o]=e[l[0]],this.tracebackGrid[t][o]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var r=[];for(r.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});r[0];){var n=r[0],t=this.tracebackGrid[n.pos[0]][n.pos[1]];t[0]&&r.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),t[1]&&r.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),t[2]&&r.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),r.shift()}return this.alignments}},{key:"getAllIndexes",value:function(r,n){for(var t=[],o=-1;(o=r.indexOf(n,o+1))!==-1;)t.push(o);return t}},{key:"arrayAllMaxIndexes",value:function(r){return this.getAllIndexes(r,Math.max.apply(null,r))}}]),a}();I.exports=i},function(I,_,T){var c=function(){};c.FDLayout=T(18),c.FDLayoutConstants=T(4),c.FDLayoutEdge=T(19),c.FDLayoutNode=T(20),c.DimensionD=T(21),c.HashMap=T(22),c.HashSet=T(23),c.IGeometry=T(8),c.IMath=T(9),c.Integer=T(10),c.Point=T(12),c.PointD=T(5),c.RandomSeed=T(16),c.RectangleD=T(13),c.Transform=T(17),c.UniqueIDGeneretor=T(14),c.Quicksort=T(25),c.LinkedList=T(11),c.LGraphObject=T(2),c.LGraph=T(6),c.LEdge=T(1),c.LGraphManager=T(7),c.LNode=T(3),c.Layout=T(15),c.LayoutConstants=T(0),c.NeedlemanWunsch=T(27),c.Matrix=T(24),c.SVD=T(26),I.exports=c},function(I,_,T){function c(){this.listeners=[]}var i=c.prototype;i.addListener=function(a,r){this.listeners.push({event:a,callback:r})},i.removeListener=function(a,r){for(var n=this.listeners.length;n>=0;n--){var t=this.listeners[n];t.event===a&&t.callback===r&&this.listeners.splice(n,1)}},i.emit=function(a,r){for(var n=0;n<this.listeners.length;n++){var t=this.listeners[n];a===t.event&&t.callback(r)}},I.exports=c}])},_e.exports=N());var N}var Ce;function lr(){return Ce?Le.exports:(Ce=1,N=function(I){return _={45:(i,a,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),i.exports=n},806:(i,a,r)=>{var n=r(551).FDLayoutConstants;function t(){}for(var o in n)t[o]=n[o];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,t.ENFORCE_CONSTRAINTS=!0,t.APPLY_LAYOUT=!0,t.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,t.TREE_REDUCTION_ON_INCREMENTAL=!0,t.PURE_INCREMENTAL=t.DEFAULT_INCREMENTAL,i.exports=t},767:(i,a,r)=>{var n=r(551).FDLayoutEdge;function t(e,l,s){n.call(this,e,l,s)}for(var o in t.prototype=Object.create(n.prototype),n)t[o]=n[o];i.exports=t},880:(i,a,r)=>{var n=r(551).LGraph;function t(e,l,s){n.call(this,e,l,s)}for(var o in t.prototype=Object.create(n.prototype),n)t[o]=n[o];i.exports=t},578:(i,a,r)=>{var n=r(551).LGraphManager;function t(e){n.call(this,e)}for(var o in t.prototype=Object.create(n.prototype),n)t[o]=n[o];i.exports=t},765:(i,a,r)=>{var n=r(551).FDLayout,t=r(578),o=r(880),e=r(991),l=r(767),s=r(806),g=r(902),d=r(551).FDLayoutConstants,v=r(551).LayoutConstants,m=r(551).Point,E=r(551).PointD,w=r(551).DimensionD,C=r(551).Layout,S=r(551).Integer,R=r(551).IGeometry,k=r(551).LGraph,X=r(551).Transform,W=r(551).LinkedList;function M(){n.call(this),this.toBeTiled={},this.constraints={}}for(var j in M.prototype=Object.create(n.prototype),n)M[j]=n[j];M.prototype.newGraphManager=function(){var h=new t(this);return this.graphManager=h,h},M.prototype.newGraph=function(h){return new o(null,this.graphManager,h)},M.prototype.newNode=function(h){return new e(this.graphManager,h)},M.prototype.newEdge=function(h){return new l(null,null,h)},M.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){return v.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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)s.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),f=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(y){return f.has(y)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var h=this.getFlatForest();if(h.length>0)this.positionNodesRadially(h);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(y){return f.has(y)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),s.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,y=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,y),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var h=this.graphManager.getAllNodes(),f={},u=0;u<h.length;u++){var y=h[u].rect,p=h[u].id;f[p]={id:p,x:y.getCenterX(),y:y.getCenterY(),w:y.width,h:y.height}}return f},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var h=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!h;)h=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var h=this.getAllNodes(),f=0;f<h.length;f++)h[f].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),f=0;f<h.length;f++)h[f].move()},M.prototype.initConstraintVariables=function(){var h=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var f=this.graphManager.getAllNodes(),u=0;u<f.length;u++){var y=f[u];this.idToNodeMap.set(y.id,y)}var p=function x(H){for(var $,tt=H.getChild().getNodes(),ot=0,wt=0;wt<tt.length;wt++)($=tt[wt]).getChild()==null?h.fixedNodeSet.has($.id)&&(ot+=100):ot+=x($);return ot};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(x){h.fixedNodeSet.add(x.nodeId)}),f=this.graphManager.getAllNodes(),u=0;u<f.length;u++)if((y=f[u]).getChild()!=null){var A=p(y);A>0&&(y.fixedNodeWeight=A)}}if(this.constraints.relativePlacementConstraint){var L=new Map,O=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 G=this.constraints.alignmentConstraint.vertical;for(u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(x){L.set(x,"dummy"+u),h.dummyToNodeForVerticalAlignment.get("dummy"+u).push(x),h.fixedNodeSet.has(x)&&h.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var b=this.constraints.alignmentConstraint.horizontal;for(u=0;u<b.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),b[u].forEach(function(x){O.set(x,"dummy"+u),h.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(x),h.fixedNodeSet.has(x)&&h.fixedNodesOnVertical.add("dummy"+u)})}}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(x){var H,$,tt;for(tt=x.length-1;tt>=2*x.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),$=x[tt],x[tt]=x[H],x[H]=$;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 H=L.has(x.left)?L.get(x.left):x.left,$=L.has(x.right)?L.get(x.right):x.right;h.nodesInRelativeHorizontal.includes(H)||(h.nodesInRelativeHorizontal.push(H),h.nodeToRelativeConstraintMapHorizontal.set(H,[]),h.dummyToNodeForVerticalAlignment.has(H)?h.nodeToTempPositionMapHorizontal.set(H,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set(H,h.idToNodeMap.get(H).getCenterX())),h.nodesInRelativeHorizontal.includes($)||(h.nodesInRelativeHorizontal.push($),h.nodeToRelativeConstraintMapHorizontal.set($,[]),h.dummyToNodeForVerticalAlignment.has($)?h.nodeToTempPositionMapHorizontal.set($,h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):h.nodeToTempPositionMapHorizontal.set($,h.idToNodeMap.get($).getCenterX())),h.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:x.gap}),h.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:x.gap})}else{var tt=O.has(x.top)?O.get(x.top):x.top,ot=O.has(x.bottom)?O.get(x.bottom):x.bottom;h.nodesInRelativeVertical.includes(tt)||(h.nodesInRelativeVertical.push(tt),h.nodeToRelativeConstraintMapVertical.set(tt,[]),h.dummyToNodeForHorizontalAlignment.has(tt)?h.nodeToTempPositionMapVertical.set(tt,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(tt,h.idToNodeMap.get(tt).getCenterY())),h.nodesInRelativeVertical.includes(ot)||(h.nodesInRelativeVertical.push(ot),h.nodeToRelativeConstraintMapVertical.set(ot,[]),h.dummyToNodeForHorizontalAlignment.has(ot)?h.nodeToTempPositionMapVertical.set(ot,h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(ot)[0]).getCenterY()):h.nodeToTempPositionMapVertical.set(ot,h.idToNodeMap.get(ot).getCenterY())),h.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ot,gap:x.gap}),h.nodeToRelativeConstraintMapVertical.get(ot).push({top:tt,gap:x.gap})}});else{var P=new Map,F=new Map;this.constraints.relativePlacementConstraint.forEach(function(x){if(x.left){var H=L.has(x.left)?L.get(x.left):x.left,$=L.has(x.right)?L.get(x.right):x.right;P.has(H)?P.get(H).push($):P.set(H,[$]),P.has($)?P.get($).push(H):P.set($,[H])}else{var tt=O.has(x.top)?O.get(x.top):x.top,ot=O.has(x.bottom)?O.get(x.bottom):x.bottom;F.has(tt)?F.get(tt).push(ot):F.set(tt,[ot]),F.has(ot)?F.get(ot).push(tt):F.set(ot,[tt])}});var V=function(x,H){var $=[],tt=[],ot=new W,wt=new Set,Nt=0;return x.forEach(function(B,St){if(!wt.has(St)){$[Nt]=[],tt[Nt]=!1;var Tt=St;for(ot.push(Tt),wt.add(Tt),$[Nt].push(Tt);ot.length!=0;)Tt=ot.shift(),H.has(Tt)&&(tt[Nt]=!0),x.get(Tt).forEach(function(st){wt.has(st)||(ot.push(st),wt.add(st),$[Nt].push(st))});Nt++}}),{components:$,isFixed:tt}},z=V(P,h.fixedNodesOnHorizontal);this.componentsOnHorizontal=z.components,this.fixedComponentsOnHorizontal=z.isFixed;var U=V(F,h.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},M.prototype.updateDisplacements=function(){var h=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var x=h.idToNodeMap.get(U.nodeId);x.displacementX=0,x.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var f=this.constraints.alignmentConstraint.vertical,u=0;u<f.length;u++){for(var y=0,p=0;p<f[u].length;p++){if(this.fixedNodeSet.has(f[u][p])){y=0;break}y+=this.idToNodeMap.get(f[u][p]).displacementX}var A=y/f[u].length;for(p=0;p<f[u].length;p++)this.idToNodeMap.get(f[u][p]).displacementX=A}if(this.constraints.alignmentConstraint.horizontal){var L=this.constraints.alignmentConstraint.horizontal;for(u=0;u<L.length;u++){var O=0;for(p=0;p<L[u].length;p++){if(this.fixedNodeSet.has(L[u][p])){O=0;break}O+=this.idToNodeMap.get(L[u][p]).displacementY}var G=O/L[u].length;for(p=0;p<L[u].length;p++)this.idToNodeMap.get(L[u][p]).displacementY=G}}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!h.fixedNodesOnHorizontal.has(U)){var x=0;x=h.dummyToNodeForVerticalAlignment.has(U)?h.idToNodeMap.get(h.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:h.idToNodeMap.get(U).displacementX,h.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(H){var $;H.right?($=h.nodeToTempPositionMapHorizontal.get(H.right)-h.nodeToTempPositionMapHorizontal.get(U)-x)<H.gap&&(x-=H.gap-$):($=h.nodeToTempPositionMapHorizontal.get(U)-h.nodeToTempPositionMapHorizontal.get(H.left)+x)<H.gap&&(x+=H.gap-$)}),h.nodeToTempPositionMapHorizontal.set(U,h.nodeToTempPositionMapHorizontal.get(U)+x),h.dummyToNodeForVerticalAlignment.has(U)?h.dummyToNodeForVerticalAlignment.get(U).forEach(function(H){h.idToNodeMap.get(H).displacementX=x}):h.idToNodeMap.get(U).displacementX=x}}),this.nodesInRelativeVertical.forEach(function(U){if(!h.fixedNodesOnHorizontal.has(U)){var x=0;x=h.dummyToNodeForHorizontalAlignment.has(U)?h.idToNodeMap.get(h.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:h.idToNodeMap.get(U).displacementY,h.nodeToRelativeConstraintMapVertical.get(U).forEach(function(H){var $;H.bottom?($=h.nodeToTempPositionMapVertical.get(H.bottom)-h.nodeToTempPositionMapVertical.get(U)-x)<H.gap&&(x-=H.gap-$):($=h.nodeToTempPositionMapVertical.get(U)-h.nodeToTempPositionMapVertical.get(H.top)+x)<H.gap&&(x+=H.gap-$)}),h.nodeToTempPositionMapVertical.set(U,h.nodeToTempPositionMapVertical.get(U)+x),h.dummyToNodeForHorizontalAlignment.has(U)?h.dummyToNodeForHorizontalAlignment.get(U).forEach(function(H){h.idToNodeMap.get(H).displacementY=x}):h.idToNodeMap.get(U).displacementY=x}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var b=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(p=0;p<b.length;p++)this.dummyToNodeForVerticalAlignment.has(b[p])?this.dummyToNodeForVerticalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(b[p]).displacementX=0;else{var P=0,F=0;for(p=0;p<b.length;p++)this.dummyToNodeForVerticalAlignment.has(b[p])?(P+=(z=this.dummyToNodeForVerticalAlignment.get(b[p])).length*this.idToNodeMap.get(z[0]).displacementX,F+=z.length):(P+=this.idToNodeMap.get(b[p]).displacementX,F++);var V=P/F;for(p=0;p<b.length;p++)this.dummyToNodeForVerticalAlignment.has(b[p])?this.dummyToNodeForVerticalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementX=V}):this.idToNodeMap.get(b[p]).displacementX=V}}for(u=0;u<this.componentsOnVertical.length;u++)if(b=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(p=0;p<b.length;p++)this.dummyToNodeForHorizontalAlignment.has(b[p])?this.dummyToNodeForHorizontalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(b[p]).displacementY=0;else{for(P=0,F=0,p=0;p<b.length;p++){var z;this.dummyToNodeForHorizontalAlignment.has(b[p])?(P+=(z=this.dummyToNodeForHorizontalAlignment.get(b[p])).length*this.idToNodeMap.get(z[0]).displacementY,F+=z.length):(P+=this.idToNodeMap.get(b[p]).displacementY,F++)}for(V=P/F,p=0;p<b.length;p++)this.dummyToNodeForHorizontalAlignment.has(b[p])?this.dummyToNodeForHorizontalAlignment.get(b[p]).forEach(function(U){h.idToNodeMap.get(U).displacementY=V}):this.idToNodeMap.get(b[p]).displacementY=V}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var h,f,u=[],y=this.graphManager.getGraphs(),p=y.length;for(f=0;f<p;f++)(h=y[f]).updateConnected(),h.isConnected||(u=u.concat(h.getNodes()));return u},M.prototype.createBendpoints=function(){var h=[];h=h.concat(this.graphManager.getAllEdges());var f,u=new Set;for(f=0;f<h.length;f++){var y=h[f];if(!u.has(y)){var p=y.getSource(),A=y.getTarget();if(p==A)y.getBendpoints().push(new E),y.getBendpoints().push(new E),this.createDummyNodesForBendpoints(y),u.add(y);else{var L=[];if(L=(L=L.concat(p.getEdgeListToNode(A))).concat(A.getEdgeListToNode(p)),!u.has(L[0])){var O;if(L.length>1)for(O=0;O<L.length;O++){var G=L[O];G.getBendpoints().push(new E),this.createDummyNodesForBendpoints(G)}L.forEach(function(b){u.add(b)})}}}if(u.size==h.length)break}},M.prototype.positionNodesRadially=function(h){for(var f=new m(0,0),u=Math.ceil(Math.sqrt(h.length)),y=0,p=0,A=0,L=new E(0,0),O=0;O<h.length;O++){O%u==0&&(A=0,p=y,O!=0&&(p+=s.DEFAULT_COMPONENT_SEPERATION),y=0);var G=h[O],b=C.findCenterOfTree(G);f.x=A,f.y=p,(L=M.radialLayout(G,b,f)).y>y&&(y=Math.floor(L.y)),A=Math.floor(L.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(v.WORLD_CENTER_X-L.x/2,v.WORLD_CENTER_Y-L.y/2))},M.radialLayout=function(h,f,u){var y=Math.max(this.maxDiagonalInTree(h),s.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(f,null,0,359,0,y);var p=k.calculateBounds(h),A=new X;A.setDeviceOrgX(p.getMinX()),A.setDeviceOrgY(p.getMinY()),A.setWorldOrgX(u.x),A.setWorldOrgY(u.y);for(var L=0;L<h.length;L++)h[L].transform(A);var O=new E(p.getMaxX(),p.getMaxY());return A.inverseTransformPoint(O)},M.branchRadialLayout=function(h,f,u,y,p,A){var L=(y-u+1)/2;L<0&&(L+=180);var O=(L+u)%360*R.TWO_PI/360,G=p*Math.cos(O),b=p*Math.sin(O);h.setCenter(G,b);var P=[],F=(P=P.concat(h.getEdges())).length;f!=null&&F--;for(var V,z=0,U=P.length,x=h.getEdgesBetween(f);x.length>1;){var H=x[0];x.splice(0,1);var $=P.indexOf(H);$>=0&&P.splice($,1),U--,F--}V=f!=null?(P.indexOf(x[0])+1)%U:0;for(var tt=Math.abs(y-u)/F,ot=V;z!=F;ot=++ot%U){var wt=P[ot].getOtherEnd(h);if(wt!=f){var Nt=(u+z*tt)%360,B=(Nt+tt)%360;M.branchRadialLayout(wt,h,Nt,B,p+A,A),z++}}},M.maxDiagonalInTree=function(h){for(var f=S.MIN_VALUE,u=0;u<h.length;u++){var y=h[u].getDiagonal();y>f&&(f=y)}return f},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var h=this,f={};this.memberGroups={},this.idToDummyNode={};for(var u=[],y=this.graphManager.getAllNodes(),p=0;p<y.length;p++){var A=(L=y[p]).getParent();this.getNodeDegreeWithChildren(L)!==0||A.id!=null&&this.getToBeTiled(A)||u.push(L)}for(p=0;p<u.length;p++){var L,O=(L=u[p]).getParent().id;f[O]===void 0&&(f[O]=[]),f[O]=f[O].concat(L)}Object.keys(f).forEach(function(G){if(f[G].length>1){var b="DummyCompound_"+G;h.memberGroups[b]=f[G];var P=f[G][0].getParent(),F=new e(h.graphManager);F.id=b,F.paddingLeft=P.paddingLeft||0,F.paddingRight=P.paddingRight||0,F.paddingBottom=P.paddingBottom||0,F.paddingTop=P.paddingTop||0,h.idToDummyNode[b]=F;var V=h.getGraphManager().add(h.newGraph(),F),z=P.getChild();z.add(F);for(var U=0;U<f[G].length;U++){var x=f[G][U];z.remove(x),V.add(x)}}})},M.prototype.clearCompounds=function(){var h={},f={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)f[this.compoundOrder[u].id]=this.compoundOrder[u],h[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(h,f)},M.prototype.clearZeroDegreeMembers=function(){var h=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var y=h.idToDummyNode[u];if(f[u]=h.tileNodes(h.memberGroups[u],y.paddingLeft+y.paddingRight),y.rect.width=f[u].width,y.rect.height=f[u].height,y.setCenter(f[u].centerX,f[u].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var p=y.rect.width,A=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(p+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>p?(y.rect.x-=(y.labelWidth-p)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-p)/2):y.labelPosHorizontal=="right"&&y.setWidth(p+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(A+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>A?(y.rect.y-=(y.labelHeight-A)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-A)/2):y.labelPosVertical=="bottom"&&y.setHeight(A+y.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var h=this.compoundOrder.length-1;h>=0;h--){var f=this.compoundOrder[h],u=f.id,y=f.paddingLeft,p=f.paddingTop,A=f.labelMarginLeft,L=f.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],f.rect.x,f.rect.y,y,p,A,L)}},M.prototype.repopulateZeroDegreeMembers=function(){var h=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(u){var y=h.idToDummyNode[u],p=y.paddingLeft,A=y.paddingTop,L=y.labelMarginLeft,O=y.labelMarginTop;h.adjustLocations(f[u],y.rect.x,y.rect.y,p,A,L,O)})},M.prototype.getToBeTiled=function(h){var f=h.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var u=h.getChild();if(u==null)return this.toBeTiled[f]=!1,!1;for(var y=u.getNodes(),p=0;p<y.length;p++){var A=y[p];if(this.getNodeDegree(A)>0)return this.toBeTiled[f]=!1,!1;if(A.getChild()!=null){if(!this.getToBeTiled(A))return this.toBeTiled[f]=!1,!1}else this.toBeTiled[A.id]=!1}return this.toBeTiled[f]=!0,!0},M.prototype.getNodeDegree=function(h){h.id;for(var f=h.getEdges(),u=0,y=0;y<f.length;y++){var p=f[y];p.getSource().id!==p.getTarget().id&&(u+=1)}return u},M.prototype.getNodeDegreeWithChildren=function(h){var f=this.getNodeDegree(h);if(h.getChild()==null)return f;for(var u=h.getChild().getNodes(),y=0;y<u.length;y++){var p=u[y];f+=this.getNodeDegreeWithChildren(p)}return f},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(h){for(var f=0;f<h.length;f++){var u=h[f];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},M.prototype.adjustLocations=function(h,f,u,y,p,A,L){u+=p+L;for(var O=f+=y+A,G=0;G<h.rows.length;G++){var b=h.rows[G];f=O;for(var P=0,F=0;F<b.length;F++){var V=b[F];V.rect.x=f,V.rect.y=u,f+=V.rect.width+h.horizontalPadding,V.rect.height>P&&(P=V.rect.height)}u+=P+h.verticalPadding}},M.prototype.tileCompoundMembers=function(h,f){var u=this;this.tiledMemberPack=[],Object.keys(h).forEach(function(y){var p=f[y];if(u.tiledMemberPack[y]=u.tileNodes(h[y],p.paddingLeft+p.paddingRight),p.rect.width=u.tiledMemberPack[y].width,p.rect.height=u.tiledMemberPack[y].height,p.setCenter(u.tiledMemberPack[y].centerX,u.tiledMemberPack[y].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var A=p.rect.width,L=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(A+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>A?(p.rect.x-=(p.labelWidth-A)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-A)/2):p.labelPosHorizontal=="right"&&p.setWidth(A+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(L+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>L?(p.rect.y-=(p.labelHeight-L)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-L)/2):p.labelPosVertical=="bottom"&&p.setHeight(L+p.labelHeight))}})},M.prototype.tileNodes=function(h,f){var u=this.tileNodesByFavoringDim(h,f,!0),y=this.tileNodesByFavoringDim(h,f,!1),p=this.getOrgRatio(u);return this.getOrgRatio(y)<p?y:u},M.prototype.getOrgRatio=function(h){var f=h.width/h.height;return f<1&&(f=1/f),f},M.prototype.calcIdealRowWidth=function(h,f){var u=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,p=h.length,A=0,L=0,O=0;h.forEach(function(U){A+=U.getWidth(),L+=U.getHeight(),U.getWidth()>O&&(O=U.getWidth())});var G,b=A/p,P=L/p,F=Math.pow(u-y,2)+4*(b+y)*(P+u)*p,V=(y-u+Math.sqrt(F))/(2*(b+y));f?(G=Math.ceil(V))==V&&G++:G=Math.floor(V);var z=G*(b+y)-y;return O>z&&(z=O),z+=2*y},M.prototype.tileNodesByFavoringDim=function(h,f,u){var y=s.TILING_PADDING_VERTICAL,p=s.TILING_PADDING_HORIZONTAL,A=s.TILING_COMPARE_BY,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:y,horizontalPadding:p,centerX:0,centerY:0};A&&(L.idealRowWidth=this.calcIdealRowWidth(h,u));var O=function(U){return U.rect.width*U.rect.height},G=function(U,x){return O(x)-O(U)};h.sort(function(U,x){var H=G;return L.idealRowWidth?(H=A)(U.id,x.id):H(U,x)});for(var b=0,P=0,F=0;F<h.length;F++)b+=(V=h[F]).getCenterX(),P+=V.getCenterY();for(L.centerX=b/h.length,L.centerY=P/h.length,F=0;F<h.length;F++){var V=h[F];if(L.rows.length==0)this.insertNodeToRow(L,V,0,f);else if(this.canAddHorizontal(L,V.rect.width,V.rect.height)){var z=L.rows.length-1;L.idealRowWidth||(z=this.getShortestRowIndex(L)),this.insertNodeToRow(L,V,z,f)}else this.insertNodeToRow(L,V,L.rows.length,f);this.shiftToLastRow(L)}return L},M.prototype.insertNodeToRow=function(h,f,u,y){var p=y;u==h.rows.length&&(h.rows.push([]),h.rowWidth.push(p),h.rowHeight.push(0));var A=h.rowWidth[u]+f.rect.width;h.rows[u].length>0&&(A+=h.horizontalPadding),h.rowWidth[u]=A,h.width<A&&(h.width=A);var L=f.rect.height;u>0&&(L+=h.verticalPadding);var O=0;L>h.rowHeight[u]&&(O=h.rowHeight[u],h.rowHeight[u]=L,O=h.rowHeight[u]-O),h.height+=O,h.rows[u].push(f)},M.prototype.getShortestRowIndex=function(h){for(var f=-1,u=Number.MAX_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]<u&&(f=y,u=h.rowWidth[y]);return f},M.prototype.getLongestRowIndex=function(h){for(var f=-1,u=Number.MIN_VALUE,y=0;y<h.rows.length;y++)h.rowWidth[y]>u&&(f=y,u=h.rowWidth[y]);return f},M.prototype.canAddHorizontal=function(h,f,u){if(h.idealRowWidth){var y=h.rows.length-1;return h.rowWidth[y]+f+h.horizontalPadding<=h.idealRowWidth}var p=this.getShortestRowIndex(h);if(p<0)return!0;var A=h.rowWidth[p];if(A+h.horizontalPadding+f<=h.width)return!0;var L,O,G=0;return h.rowHeight[p]<u&&p>0&&(G=u+h.verticalPadding-h.rowHeight[p]),L=h.width-A>=f+h.horizontalPadding?(h.height+G)/(A+f+h.horizontalPadding):(h.height+G)/h.width,G=u+h.verticalPadding,(O=h.width<f?(h.height+G)/f:(h.height+G)/h.width)<1&&(O=1/O),L<1&&(L=1/L),L<O},M.prototype.shiftToLastRow=function(h){var f=this.getLongestRowIndex(h),u=h.rowWidth.length-1,y=h.rows[f],p=y[y.length-1],A=p.width+h.horizontalPadding;if(h.width-h.rowWidth[u]>A&&f!=u){y.splice(-1,1),h.rows[u].push(p),h.rowWidth[f]=h.rowWidth[f]-A,h.rowWidth[u]=h.rowWidth[u]+A,h.width=h.rowWidth[instance.getLongestRowIndex(h)];for(var L=Number.MIN_VALUE,O=0;O<y.length;O++)y[O].height>L&&(L=y[O].height);f>0&&(L+=h.verticalPadding);var G=h.rowHeight[f]+h.rowHeight[u];h.rowHeight[f]=L,h.rowHeight[u]<p.height+h.verticalPadding&&(h.rowHeight[u]=p.height+h.verticalPadding);var b=h.rowHeight[f]+h.rowHeight[u];h.height+=b-G,this.shiftToLastRow(h)}},M.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var h,f=[],u=!0;u;){var y=this.graphManager.getAllNodes(),p=[];u=!1;for(var A=0;A<y.length;A++)if((h=y[A]).getEdges().length==1&&!h.getEdges()[0].isInterGraph&&h.getChild()==null){if(s.PURE_INCREMENTAL){var L=h.getEdges()[0].getOtherEnd(h),O=new w(h.getCenterX()-L.getCenterX(),h.getCenterY()-L.getCenterY());p.push([h,h.getEdges()[0],h.getOwner(),O])}else p.push([h,h.getEdges()[0],h.getOwner()]);u=!0}if(u==1){for(var G=[],b=0;b<p.length;b++)p[b][0].getEdges().length==1&&(G.push(p[b]),p[b][0].getOwner().remove(p[b][0]));f.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=f},M.prototype.growTree=function(h){for(var f,u=h[h.length-1],y=0;y<u.length;y++)f=u[y],this.findPlaceforPrunedNode(f),f[2].add(f[0]),f[2].add(f[1],f[1].source,f[1].target);h.splice(h.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(h){var f,u,y=h[0];if(u=y==h[1].source?h[1].target:h[1].source,s.PURE_INCREMENTAL)y.setCenter(u.getCenterX()+h[3].getWidth(),u.getCenterY()+h[3].getHeight());else{var p=u.startX,A=u.finishX,L=u.startY,O=u.finishY,G=[0,0,0,0];if(L>0)for(var b=p;b<=A;b++)G[0]+=this.grid[b][L-1].length+this.grid[b][L].length-1;if(A<this.grid.length-1)for(b=L;b<=O;b++)G[1]+=this.grid[A+1][b].length+this.grid[A][b].length-1;if(O<this.grid[0].length-1)for(b=p;b<=A;b++)G[2]+=this.grid[b][O+1].length+this.grid[b][O].length-1;if(p>0)for(b=L;b<=O;b++)G[3]+=this.grid[p-1][b].length+this.grid[p][b].length-1;for(var P,F,V=S.MAX_VALUE,z=0;z<G.length;z++)G[z]<V?(V=G[z],P=1,F=z):G[z]==V&&P++;if(P==3&&V==0)G[0]==0&&G[1]==0&&G[2]==0?f=1:G[0]==0&&G[1]==0&&G[3]==0?f=0:G[0]==0&&G[2]==0&&G[3]==0?f=3:G[1]==0&&G[2]==0&&G[3]==0&&(f=2);else if(P==2&&V==0){var U=Math.floor(2*Math.random());f=G[0]==0&&G[1]==0?U==0?0:1:G[0]==0&&G[2]==0?U==0?0:2:G[0]==0&&G[3]==0?U==0?0:3:G[1]==0&&G[2]==0?U==0?1:2:G[1]==0&&G[3]==0?U==0?1:3:U==0?2:3}else f=P==4&&V==0?U=Math.floor(4*Math.random()):F;f==0?y.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-d.DEFAULT_EDGE_LENGTH-y.getHeight()/2):f==1?y.setCenter(u.getCenterX()+u.getWidth()/2+d.DEFAULT_EDGE_LENGTH+y.getWidth()/2,u.getCenterY()):f==2?y.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+d.DEFAULT_EDGE_LENGTH+y.getHeight()/2):y.setCenter(u.getCenterX()-u.getWidth()/2-d.DEFAULT_EDGE_LENGTH-y.getWidth()/2,u.getCenterY())}},i.exports=M},991:(i,a,r)=>{var n=r(551).FDLayoutNode,t=r(551).IMath;function o(l,s,g,d){n.call(this,l,s,g,d)}for(var e in o.prototype=Object.create(n.prototype),n)o[e]=n[e];o.prototype.calculateDisplacement=function(){var l=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*t.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(l,s){for(var g,d=this.getChild().getNodes(),v=0;v<d.length;v++)(g=d[v]).getChild()==null?(g.displacementX+=l,g.displacementY+=s):g.propogateDisplacementToChildren(l,s)},o.prototype.move=function(){var l=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),l.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},o.prototype.setPred1=function(l){this.pred1=l},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(l){this.next=l},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(l){this.processed=l},o.prototype.isProcessed=function(){return processed},i.exports=o},902:(i,a,r)=>{function n(g){if(Array.isArray(g)){for(var d=0,v=Array(g.length);d<g.length;d++)v[d]=g[d];return v}return Array.from(g)}var t=r(806),o=r(551).LinkedList,e=r(551).Matrix,l=r(551).SVD;function s(){}s.handleConstraints=function(g){var d={};d.fixedNodeConstraint=g.constraints.fixedNodeConstraint,d.alignmentConstraint=g.constraints.alignmentConstraint,d.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var v=new Map,m=new Map,E=[],w=[],C=g.getAllNodes(),S=0,R=0;R<C.length;R++){var k=C[R];k.getChild()==null&&(m.set(k.id,S++),E.push(k.getCenterX()),w.push(k.getCenterY()),v.set(k.id,k))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(D){D.gap||D.gap==0||(D.left?D.gap=t.DEFAULT_EDGE_LENGTH+v.get(D.left).getWidth()/2+v.get(D.right).getWidth()/2:D.gap=t.DEFAULT_EDGE_LENGTH+v.get(D.top).getHeight()/2+v.get(D.bottom).getHeight()/2)});var X=function(D){var Y=0,Q=0;return D.forEach(function(K){Y+=E[m.get(K)],Q+=w[m.get(K)]}),{x:Y/D.size,y:Q/D.size}},W=function(D,Y,Q,K,nt){var Ct=new Map;D.forEach(function(q,Z){Ct.set(Z,0)}),D.forEach(function(q,Z){q.forEach(function(ut){Ct.set(ut.id,Ct.get(ut.id)+1)})});var at=new Map,ft=new Map,yt=new o;Ct.forEach(function(q,Z){q==0?(yt.push(Z),Q||(Y=="horizontal"?at.set(Z,m.has(Z)?E[m.get(Z)]:K.get(Z)):at.set(Z,m.has(Z)?w[m.get(Z)]:K.get(Z)))):at.set(Z,Number.NEGATIVE_INFINITY),Q&&ft.set(Z,new Set([Z]))}),Q&&nt.forEach(function(q){var Z=[];if(q.forEach(function(et){Q.has(et)&&Z.push(et)}),Z.length>0){var ut=0;Z.forEach(function(et){Y=="horizontal"?(at.set(et,m.has(et)?E[m.get(et)]:K.get(et)),ut+=at.get(et)):(at.set(et,m.has(et)?w[m.get(et)]:K.get(et)),ut+=at.get(et))}),ut/=Z.length,q.forEach(function(et){Q.has(et)||at.set(et,ut)})}else{var pt=0;q.forEach(function(et){pt+=Y=="horizontal"?m.has(et)?E[m.get(et)]:K.get(et):m.has(et)?w[m.get(et)]:K.get(et)}),pt/=q.length,q.forEach(function(et){at.set(et,pt)})}});for(var kt=function(){var q=yt.shift();D.get(q).forEach(function(Z){if(at.get(Z.id)<at.get(q)+Z.gap)if(Q&&Q.has(Z.id)){var ut=void 0;if(ut=Y=="horizontal"?m.has(Z.id)?E[m.get(Z.id)]:K.get(Z.id):m.has(Z.id)?w[m.get(Z.id)]:K.get(Z.id),at.set(Z.id,ut),ut<at.get(q)+Z.gap){var pt=at.get(q)+Z.gap-ut;ft.get(q).forEach(function(et){at.set(et,at.get(et)-pt)})}}else at.set(Z.id,at.get(q)+Z.gap);Ct.set(Z.id,Ct.get(Z.id)-1),Ct.get(Z.id)==0&&yt.push(Z.id),Q&&ft.set(Z.id,function(et,xt){var Ut=new Set(et),bt=!0,Yt=!1,Gt=void 0;try{for(var Lt,lt=xt[Symbol.iterator]();!(bt=(Lt=lt.next()).done);bt=!0){var Pt=Lt.value;Ut.add(Pt)}}catch(Xt){Yt=!0,Gt=Xt}finally{try{!bt&<.return&<.return()}finally{if(Yt)throw Gt}}return Ut}(ft.get(q),ft.get(Z.id)))})};yt.length!=0;)kt();if(Q){var Dt=new Set;D.forEach(function(q,Z){q.length==0&&Dt.add(Z)});var Et=[];ft.forEach(function(q,Z){if(Dt.has(Z)){var ut=!1,pt=!0,et=!1,xt=void 0;try{for(var Ut,bt=q[Symbol.iterator]();!(pt=(Ut=bt.next()).done);pt=!0){var Yt=Ut.value;Q.has(Yt)&&(ut=!0)}}catch(lt){et=!0,xt=lt}finally{try{!pt&&bt.return&&bt.return()}finally{if(et)throw xt}}if(!ut){var Gt=!1,Lt=void 0;Et.forEach(function(lt,Pt){lt.has([].concat(n(q))[0])&&(Gt=!0,Lt=Pt)}),Gt?q.forEach(function(lt){Et[Lt].add(lt)}):Et.push(new Set(q))}}}),Et.forEach(function(q,Z){var ut=Number.POSITIVE_INFINITY,pt=Number.POSITIVE_INFINITY,et=Number.NEGATIVE_INFINITY,xt=Number.NEGATIVE_INFINITY,Ut=!0,bt=!1,Yt=void 0;try{for(var Gt,Lt=q[Symbol.iterator]();!(Ut=(Gt=Lt.next()).done);Ut=!0){var lt=Gt.value,Pt=void 0;Pt=Y=="horizontal"?m.has(lt)?E[m.get(lt)]:K.get(lt):m.has(lt)?w[m.get(lt)]:K.get(lt);var Xt=at.get(lt);Pt<ut&&(ut=Pt),Pt>et&&(et=Pt),Xt<pt&&(pt=Xt),Xt>xt&&(xt=Xt)}}catch(jt){bt=!0,Yt=jt}finally{try{!Ut&&Lt.return&&Lt.return()}finally{if(bt)throw Yt}}var $t=(ut+et)/2-(pt+xt)/2,te=!0,qt=!1,Zt=void 0;try{for(var Jt,Wt=q[Symbol.iterator]();!(te=(Jt=Wt.next()).done);te=!0){var re=Jt.value;at.set(re,at.get(re)+$t)}}catch(jt){qt=!0,Zt=jt}finally{try{!te&&Wt.return&&Wt.return()}finally{if(qt)throw Zt}}})}return at},M=function(D){var Y=0,Q=0,K=0,nt=0;if(D.forEach(function(yt){yt.left?E[m.get(yt.left)]-E[m.get(yt.right)]>=0?Y++:Q++:w[m.get(yt.top)]-w[m.get(yt.bottom)]>=0?K++:nt++}),Y>Q&&K>nt)for(var Ct=0;Ct<m.size;Ct++)E[Ct]=-1*E[Ct],w[Ct]=-1*w[Ct];else if(Y>Q)for(var at=0;at<m.size;at++)E[at]=-1*E[at];else if(K>nt)for(var ft=0;ft<m.size;ft++)w[ft]=-1*w[ft]},j=function(D){var Y=[],Q=new o,K=new Set,nt=0;return D.forEach(function(Ct,at){if(!K.has(at)){Y[nt]=[];var ft=at;for(Q.push(ft),K.add(ft),Y[nt].push(ft);Q.length!=0;)ft=Q.shift(),D.get(ft).forEach(function(yt){K.has(yt.id)||(Q.push(yt.id),K.add(yt.id),Y[nt].push(yt.id))});nt++}}),Y},h=function(D){var Y=new Map;return D.forEach(function(Q,K){Y.set(K,[])}),D.forEach(function(Q,K){Q.forEach(function(nt){Y.get(K).push(nt),Y.get(nt.id).push({id:K,gap:nt.gap,direction:nt.direction})})}),Y},f=function(D){var Y=new Map;return D.forEach(function(Q,K){Y.set(K,[])}),D.forEach(function(Q,K){Q.forEach(function(nt){Y.get(nt.id).push({id:K,gap:nt.gap,direction:nt.direction})})}),Y},u=[],y=[],p=!1,A=!1,L=new Set,O=new Map,G=new Map,b=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(D){L.add(D.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(D){D.left?(O.has(D.left)?O.get(D.left).push({id:D.right,gap:D.gap,direction:"horizontal"}):O.set(D.left,[{id:D.right,gap:D.gap,direction:"horizontal"}]),O.has(D.right)||O.set(D.right,[])):(O.has(D.top)?O.get(D.top).push({id:D.bottom,gap:D.gap,direction:"vertical"}):O.set(D.top,[{id:D.bottom,gap:D.gap,direction:"vertical"}]),O.has(D.bottom)||O.set(D.bottom,[]))}),G=h(O),b=j(G)),t.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(D,Y){u[Y]=[D.position.x,D.position.y],y[Y]=[E[m.get(D.nodeId)],w[m.get(D.nodeId)]]}),p=!0;else if(d.alignmentConstraint)(function(){var D=0;if(d.alignmentConstraint.vertical){for(var Y=d.alignmentConstraint.vertical,Q=function(ft){var yt=new Set;Y[ft].forEach(function(Et){yt.add(Et)});var kt=new Set([].concat(n(yt)).filter(function(Et){return L.has(Et)})),Dt=void 0;Dt=kt.size>0?E[m.get(kt.values().next().value)]:X(yt).x,Y[ft].forEach(function(Et){u[D]=[Dt,w[m.get(Et)]],y[D]=[E[m.get(Et)],w[m.get(Et)]],D++})},K=0;K<Y.length;K++)Q(K);p=!0}if(d.alignmentConstraint.horizontal){for(var nt=d.alignmentConstraint.horizontal,Ct=function(ft){var yt=new Set;nt[ft].forEach(function(Et){yt.add(Et)});var kt=new Set([].concat(n(yt)).filter(function(Et){return L.has(Et)})),Dt=void 0;Dt=kt.size>0?E[m.get(kt.values().next().value)]:X(yt).y,nt[ft].forEach(function(Et){u[D]=[E[m.get(Et)],Dt],y[D]=[E[m.get(Et)],w[m.get(Et)]],D++})},at=0;at<nt.length;at++)Ct(at);p=!0}d.relativePlacementConstraint&&(A=!0)})();else if(d.relativePlacementConstraint){for(var P=0,F=0,V=0;V<b.length;V++)b[V].length>P&&(P=b[V].length,F=V);if(P<G.size/2)M(d.relativePlacementConstraint),p=!1,A=!1;else{var z=new Map,U=new Map,x=[];b[F].forEach(function(D){O.get(D).forEach(function(Y){Y.direction=="horizontal"?(z.has(D)?z.get(D).push(Y):z.set(D,[Y]),z.has(Y.id)||z.set(Y.id,[]),x.push({left:D,right:Y.id})):(U.has(D)?U.get(D).push(Y):U.set(D,[Y]),U.has(Y.id)||U.set(Y.id,[]),x.push({top:D,bottom:Y.id}))})}),M(x),A=!1;var H=W(z,"horizontal"),$=W(U,"vertical");b[F].forEach(function(D,Y){y[Y]=[E[m.get(D)],w[m.get(D)]],u[Y]=[],H.has(D)?u[Y][0]=H.get(D):u[Y][0]=E[m.get(D)],$.has(D)?u[Y][1]=$.get(D):u[Y][1]=w[m.get(D)]}),p=!0}}if(p){for(var tt,ot=e.transpose(u),wt=e.transpose(y),Nt=0;Nt<ot.length;Nt++)ot[Nt]=e.multGamma(ot[Nt]),wt[Nt]=e.multGamma(wt[Nt]);var B=e.multMat(ot,e.transpose(wt)),St=l.svd(B);tt=e.multMat(St.V,e.transpose(St.U));for(var Tt=0;Tt<m.size;Tt++){var st=[E[Tt],w[Tt]],ht=[tt[0][0],tt[1][0]],it=[tt[0][1],tt[1][1]];E[Tt]=e.dotProduct(st,ht),w[Tt]=e.dotProduct(st,it)}A&&M(d.relativePlacementConstraint)}}if(t.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var ct={x:0,y:0};d.fixedNodeConstraint.forEach(function(D,Y){var Q,K,nt={x:E[m.get(D.nodeId)],y:w[m.get(D.nodeId)]},Ct=D.position,at=(K=nt,{x:(Q=Ct).x-K.x,y:Q.y-K.y});ct.x+=at.x,ct.y+=at.y}),ct.x/=d.fixedNodeConstraint.length,ct.y/=d.fixedNodeConstraint.length,E.forEach(function(D,Y){E[Y]+=ct.x}),w.forEach(function(D,Y){w[Y]+=ct.y}),d.fixedNodeConstraint.forEach(function(D){E[m.get(D.nodeId)]=D.position.x,w[m.get(D.nodeId)]=D.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var It=d.alignmentConstraint.vertical,mt=function(D){var Y=new Set;It[D].forEach(function(nt){Y.add(nt)});var Q=new Set([].concat(n(Y)).filter(function(nt){return L.has(nt)})),K=void 0;K=Q.size>0?E[m.get(Q.values().next().value)]:X(Y).x,Y.forEach(function(nt){L.has(nt)||(E[m.get(nt)]=K)})},gt=0;gt<It.length;gt++)mt(gt);if(d.alignmentConstraint.horizontal)for(var _t=d.alignmentConstraint.horizontal,vt=function(D){var Y=new Set;_t[D].forEach(function(nt){Y.add(nt)});var Q=new Set([].concat(n(Y)).filter(function(nt){return L.has(nt)})),K=void 0;K=Q.size>0?w[m.get(Q.values().next().value)]:X(Y).y,Y.forEach(function(nt){L.has(nt)||(w[m.get(nt)]=K)})},Mt=0;Mt<_t.length;Mt++)vt(Mt)}d.relativePlacementConstraint&&function(){var D=new Map,Y=new Map,Q=new Map,K=new Map,nt=new Map,Ct=new Map,at=new Set,ft=new Set;if(L.forEach(function(rt){at.add(rt),ft.add(rt)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var yt=d.alignmentConstraint.vertical,kt=function(rt){Q.set("dummy"+rt,[]),yt[rt].forEach(function(At){D.set(At,"dummy"+rt),Q.get("dummy"+rt).push(At),L.has(At)&&at.add("dummy"+rt)}),nt.set("dummy"+rt,E[m.get(yt[rt][0])])},Dt=0;Dt<yt.length;Dt++)kt(Dt);if(d.alignmentConstraint.horizontal)for(var Et=d.alignmentConstraint.horizontal,q=function(rt){K.set("dummy"+rt,[]),Et[rt].forEach(function(At){Y.set(At,"dummy"+rt),K.get("dummy"+rt).push(At),L.has(At)&&ft.add("dummy"+rt)}),Ct.set("dummy"+rt,w[m.get(Et[rt][0])])},Z=0;Z<Et.length;Z++)q(Z)}var ut=new Map,pt=new Map,et=function(rt){O.get(rt).forEach(function(At){var zt=void 0,Vt=void 0;At.direction=="horizontal"?(zt=D.get(rt)?D.get(rt):rt,Vt=D.get(At.id)?{id:D.get(At.id),gap:At.gap,direction:At.direction}:At,ut.has(zt)?ut.get(zt).push(Vt):ut.set(zt,[Vt]),ut.has(Vt.id)||ut.set(Vt.id,[])):(zt=Y.get(rt)?Y.get(rt):rt,Vt=Y.get(At.id)?{id:Y.get(At.id),gap:At.gap,direction:At.direction}:At,pt.has(zt)?pt.get(zt).push(Vt):pt.set(zt,[Vt]),pt.has(Vt.id)||pt.set(Vt.id,[]))})},xt=!0,Ut=!1,bt=void 0;try{for(var Yt,Gt=O.keys()[Symbol.iterator]();!(xt=(Yt=Gt.next()).done);xt=!0)et(Yt.value)}catch(rt){Ut=!0,bt=rt}finally{try{!xt&&Gt.return&&Gt.return()}finally{if(Ut)throw bt}}var Lt=h(ut),lt=h(pt),Pt=j(Lt),Xt=j(lt),$t=f(ut),te=f(pt),qt=[],Zt=[];Pt.forEach(function(rt,At){qt[At]=[],rt.forEach(function(zt){$t.get(zt).length==0&&qt[At].push(zt)})}),Xt.forEach(function(rt,At){Zt[At]=[],rt.forEach(function(zt){te.get(zt).length==0&&Zt[At].push(zt)})});var Jt=W(ut,"horizontal",at,nt,qt),Wt=W(pt,"vertical",ft,Ct,Zt),re=function(rt){Q.get(rt)?Q.get(rt).forEach(function(At){E[m.get(At)]=Jt.get(rt)}):E[m.get(rt)]=Jt.get(rt)},jt=!0,fe=!1,me=void 0;try{for(var ve,se=Jt.keys()[Symbol.iterator]();!(jt=(ve=se.next()).done);jt=!0)re(ve.value)}catch(rt){fe=!0,me=rt}finally{try{!jt&&se.return&&se.return()}finally{if(fe)throw me}}var Ve=function(rt){K.get(rt)?K.get(rt).forEach(function(At){w[m.get(At)]=Wt.get(rt)}):w[m.get(rt)]=Wt.get(rt)},ae=!0,ye=!1,Ee=void 0;try{for(var Ne,he=Wt.keys()[Symbol.iterator]();!(ae=(Ne=he.next()).done);ae=!0)Ve(Ne.value)}catch(rt){ye=!0,Ee=rt}finally{try{!ae&&he.return&&he.return()}finally{if(ye)throw Ee}}}()}for(var Rt=0;Rt<C.length;Rt++){var Ot=C[Rt];Ot.getChild()==null&&Ot.setCenter(E[m.get(Ot.id)],w[m.get(Ot.id)])}},i.exports=s},551:i=>{i.exports=I}},T={},c=function i(a){var r=T[a];if(r!==void 0)return r.exports;var n=T[a]={exports:{}};return _[a](n,n.exports,i),n.exports}(45),c;var _,T,c},Le.exports=N(hr()));var N}var Me,Oe,xe,ce;const dr=sr(Me?Ie.exports:(Me=1,Ie.exports=(Oe=lr(),xe={658:N=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(I){for(var _=arguments.length,T=Array(_>1?_-1:0),c=1;c<_;c++)T[c-1]=arguments[c];return T.forEach(function(i){Object.keys(i).forEach(function(a){return I[a]=i[a]})}),I}},548:(N,I,_)=>{var T=function(a,r){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return function(n,t){var o=[],e=!0,l=!1,s=void 0;try{for(var g,d=n[Symbol.iterator]();!(e=(g=d.next()).done)&&(o.push(g.value),!t||o.length!==t);e=!0);}catch(v){l=!0,s=v}finally{try{!e&&d.return&&d.return()}finally{if(l)throw s}}return o}(a,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=_(140).layoutBase.LinkedList,i={getTopMostNodes:function(a){for(var r={},n=0;n<a.length;n++)r[a[n].id()]=!0;var t=a.filter(function(o,e){typeof o=="number"&&(o=e);for(var l=o.parent()[0];l!=null;){if(r[l.id()])return!1;l=l.parent()[0]}return!0});return t},connectComponents:function(a,r,n,t){var o=new c,e=new Set,l=[],s=void 0,g=void 0,d=void 0,v=!1,m=1,E=[],w=[],C=function(){var S=a.collection();w.push(S);var R=n[0],k=a.collection();k.merge(R).merge(R.descendants().intersection(r)),l.push(R),k.forEach(function(M){o.push(M),e.add(M),S.merge(M)});for(var X=function(){R=o.shift();var M=a.collection();R.neighborhood().nodes().forEach(function(f){r.intersection(R.edgesWith(f)).length>0&&M.merge(f)});for(var j=0;j<M.length;j++){var h=M[j];(s=n.intersection(h.union(h.ancestors())))==null||e.has(s[0])||s.union(s.descendants()).forEach(function(f){o.push(f),e.add(f),S.merge(f),n.has(f)&&l.push(f)})}};o.length!=0;)X();if(S.forEach(function(M){r.intersection(M.connectedEdges()).forEach(function(j){S.has(j.source())&&S.has(j.target())&&S.merge(j)})}),l.length==n.length&&(v=!0),!v||v&&m>1){g=l[0],d=g.connectedEdges().length,l.forEach(function(M){M.connectedEdges().length<d&&(d=M.connectedEdges().length,g=M)}),E.push(g.id());var W=a.collection();W.merge(l[0]),l.forEach(function(M){W.merge(M)}),l=[],n=n.difference(W),m++}};do C();while(!v);return t&&E.length>0&&t.set("dummy"+(t.size+1),E),w},relocateComponent:function(a,r,n){if(!n.fixedNodeConstraint){var t=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if(n.quality=="draft"){var s=!0,g=!1,d=void 0;try{for(var v,m=r.nodeIndexes[Symbol.iterator]();!(s=(v=m.next()).done);s=!0){var E=v.value,w=T(E,2),C=w[0],S=w[1],R=n.cy.getElementById(C);if(R){var k=R.boundingBox(),X=r.xCoords[S]-k.w/2,W=r.xCoords[S]+k.w/2,M=r.yCoords[S]-k.h/2,j=r.yCoords[S]+k.h/2;X<t&&(t=X),W>o&&(o=W),M<e&&(e=M),j>l&&(l=j)}}}catch(p){g=!0,d=p}finally{try{!s&&m.return&&m.return()}finally{if(g)throw d}}var h=a.x-(o+t)/2,f=a.y-(l+e)/2;r.xCoords=r.xCoords.map(function(p){return p+h}),r.yCoords=r.yCoords.map(function(p){return p+f})}else{Object.keys(r).forEach(function(p){var A=r[p],L=A.getRect().x,O=A.getRect().x+A.getRect().width,G=A.getRect().y,b=A.getRect().y+A.getRect().height;L<t&&(t=L),O>o&&(o=O),G<e&&(e=G),b>l&&(l=b)});var u=a.x-(o+t)/2,y=a.y-(l+e)/2;Object.keys(r).forEach(function(p){var A=r[p];A.setCenter(A.getCenterX()+u,A.getCenterY()+y)})}}},calcBoundingBox:function(a,r,n,t){for(var o=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,g=void 0,d=void 0,v=void 0,m=void 0,E=a.descendants().not(":parent"),w=E.length,C=0;C<w;C++){var S=E[C];o>(g=r[t.get(S.id())]-S.width()/2)&&(o=g),e<(d=r[t.get(S.id())]+S.width()/2)&&(e=d),l>(v=n[t.get(S.id())]-S.height()/2)&&(l=v),s<(m=n[t.get(S.id())]+S.height()/2)&&(s=m)}var R={};return R.topLeftX=o,R.topLeftY=l,R.width=e-o,R.height=s-l,R},calcParentsWithoutChildren:function(a,r){var n=a.collection();return r.nodes(":parent").forEach(function(t){var o=!1;t.children().forEach(function(e){e.css("display")!="none"&&(o=!0)}),o||n.merge(t)}),n}};N.exports=i},816:(N,I,_)=>{var T=_(548),c=_(140).CoSELayout,i=_(140).CoSENode,a=_(140).layoutBase.PointD,r=_(140).layoutBase.DimensionD,n=_(140).layoutBase.LayoutConstants,t=_(140).layoutBase.FDLayoutConstants,o=_(140).CoSEConstants;N.exports={coseLayout:function(e,l){var s=e.cy,g=e.eles,d=g.nodes(),v=g.edges(),m=void 0,E=void 0,w=void 0,C={};e.randomize&&(m=l.nodeIndexes,E=l.xCoords,w=l.yCoords);var S=function(M){return typeof M=="function"},R=function(M,j){return S(M)?M(j):M},k=T.calcParentsWithoutChildren(s,g);e.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(o.MAX_ITERATIONS=t.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(o.TILING_COMPARE_BY=e.tilingCompareBy),e.quality=="proof"?n.QUALITY=2:n.QUALITY=0,o.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!e.randomize,o.ANIMATE=t.ANIMATE=n.ANIMATE=e.animate,o.TILE=e.tile,o.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical=="function"?e.tilingPaddingVertical.call():e.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal=="function"?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,o.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!0,o.PURE_INCREMENTAL=!e.randomize,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step=="transformed"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!1),e.step=="enforced"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!1),e.step=="cose"&&(o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!1,o.APPLY_LAYOUT=!0),e.step=="all"&&(e.randomize?o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:o.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?o.TREE_REDUCTION_ON_INCREMENTAL=!1:o.TREE_REDUCTION_ON_INCREMENTAL=!0;var X=new c,W=X.newGraphManager();return function M(j,h,f,u){for(var y=h.length,p=0;p<y;p++){var A=h[p],L=null;A.intersection(k).length==0&&(L=A.children());var O=void 0,G=A.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(A.outerWidth()!=null&&A.outerHeight()!=null)if(u.randomize)if(A.isParent()){var b=T.calcBoundingBox(A,E,w,m);O=A.intersection(k).length==0?j.add(new i(f.graphManager,new a(b.topLeftX,b.topLeftY),new r(b.width,b.height))):j.add(new i(f.graphManager,new a(b.topLeftX,b.topLeftY),new r(parseFloat(G.w),parseFloat(G.h))))}else O=j.add(new i(f.graphManager,new a(E[m.get(A.id())]-G.w/2,w[m.get(A.id())]-G.h/2),new r(parseFloat(G.w),parseFloat(G.h))));else O=j.add(new i(f.graphManager,new a(A.position("x")-G.w/2,A.position("y")-G.h/2),new r(parseFloat(G.w),parseFloat(G.h))));else O=j.add(new i(this.graphManager));O.id=A.data("id"),O.nodeRepulsion=R(u.nodeRepulsion,A),O.paddingLeft=parseInt(A.css("padding")),O.paddingTop=parseInt(A.css("padding")),O.paddingRight=parseInt(A.css("padding")),O.paddingBottom=parseInt(A.css("padding")),u.nodeDimensionsIncludeLabels&&(O.labelWidth=A.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,O.labelHeight=A.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,O.labelPosVertical=A.css("text-valign"),O.labelPosHorizontal=A.css("text-halign")),C[A.data("id")]=O,isNaN(O.rect.x)&&(O.rect.x=0),isNaN(O.rect.y)&&(O.rect.y=0),L!=null&&L.length>0&&M(f.getGraphManager().add(f.newGraph(),O),L,f,u)}}(W.addRoot(),T.getTopMostNodes(d),X,e),function(M,j,h){for(var f=0,u=0,y=0;y<h.length;y++){var p=h[y],A=C[p.data("source")],L=C[p.data("target")];if(A&&L&&A!==L&&A.getEdgesBetween(L).length==0){var O=j.add(M.newEdge(),A,L);O.id=p.id(),O.idealLength=R(e.idealEdgeLength,p),O.edgeElasticity=R(e.edgeElasticity,p),f+=O.idealLength,u++}}e.idealEdgeLength!=null&&(u>0?o.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=f/u:S(e.idealEdgeLength)?o.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=50:o.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,o.MIN_REPULSION_DIST=t.MIN_REPULSION_DIST=t.DEFAULT_EDGE_LENGTH/10,o.DEFAULT_RADIAL_SEPARATION=t.DEFAULT_EDGE_LENGTH)}(X,W,v),function(M,j){j.fixedNodeConstraint&&(M.constraints.fixedNodeConstraint=j.fixedNodeConstraint),j.alignmentConstraint&&(M.constraints.alignmentConstraint=j.alignmentConstraint),j.relativePlacementConstraint&&(M.constraints.relativePlacementConstraint=j.relativePlacementConstraint)}(X,e),X.runLayout(),C}}},212:(N,I,_)=>{var T=function(){function o(e,l){for(var s=0;s<l.length;s++){var g=l[s];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(e,g.key,g)}}return function(e,l,s){return l&&o(e.prototype,l),s&&o(e,s),e}}(),c=_(658),i=_(548),a=_(657).spectralLayout,r=_(816).coseLayout,n=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(o){return 4500},idealEdgeLength:function(o){return 50},edgeElasticity:function(o){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),t=function(){function o(e){(function(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")})(this,o),this.options=c({},n,e)}return T(o,[{key:"run",value:function(){var e=this.options,l=e.cy,s=e.eles,g=[],d=[],v=void 0,m=[];!e.fixedNodeConstraint||Array.isArray(e.fixedNodeConstraint)&&e.fixedNodeConstraint.length!=0||(e.fixedNodeConstraint=void 0),e.alignmentConstraint&&(!e.alignmentConstraint.vertical||Array.isArray(e.alignmentConstraint.vertical)&&e.alignmentConstraint.vertical.length!=0||(e.alignmentConstraint.vertical=void 0),!e.alignmentConstraint.horizontal||Array.isArray(e.alignmentConstraint.horizontal)&&e.alignmentConstraint.horizontal.length!=0||(e.alignmentConstraint.horizontal=void 0)),!e.relativePlacementConstraint||Array.isArray(e.relativePlacementConstraint)&&e.relativePlacementConstraint.length!=0||(e.relativePlacementConstraint=void 0),(e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint)&&(e.tile=!1,e.packComponents=!1);var E=void 0,w=!1;if(l.layoutUtilities&&e.packComponents&&((E=l.layoutUtilities("get"))||(E=l.layoutUtilities()),w=!0),s.nodes().length>0)if(w){var C=i.getTopMostNodes(e.eles.nodes());if((v=i.connectComponents(l,e.eles,C)).forEach(function(P){var F=P.boundingBox();m.push({x:F.x1+F.w/2,y:F.y1+F.h/2})}),e.randomize&&v.forEach(function(P){e.eles=P,g.push(a(e))}),e.quality=="default"||e.quality=="proof"){var S=l.collection();if(e.tile){var R=new Map,k=0,X={nodeIndexes:R,xCoords:[],yCoords:[]},W=[];if(v.forEach(function(P,F){P.edges().length==0&&(P.nodes().forEach(function(V,z){S.merge(P.nodes()[z]),V.isParent()||(X.nodeIndexes.set(P.nodes()[z].id(),k++),X.xCoords.push(P.nodes()[0].position().x),X.yCoords.push(P.nodes()[0].position().y))}),W.push(F))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),v.push(S),g.push(X);for(var j=W.length-1;j>=0;j--)v.splice(W[j],1),g.splice(W[j],1),m.splice(W[j],1)}}v.forEach(function(P,F){e.eles=P,d.push(r(e,g[F])),i.relocateComponent(m[F],d[F],e)})}else v.forEach(function(P,F){i.relocateComponent(m[F],g[F],e)});var h=new Set;if(v.length>1){var f=[],u=s.filter(function(P){return P.css("display")=="none"});v.forEach(function(P,F){var V=void 0;if(e.quality=="draft"&&(V=g[F].nodeIndexes),P.nodes().not(u).length>0){var z={edges:[],nodes:[]},U=void 0;P.nodes().not(u).forEach(function(x){if(e.quality=="draft")if(x.isParent()){var H=i.calcBoundingBox(x,g[F].xCoords,g[F].yCoords,V);z.nodes.push({x:H.topLeftX,y:H.topLeftY,width:H.width,height:H.height})}else U=V.get(x.id()),z.nodes.push({x:g[F].xCoords[U]-x.boundingbox().w/2,y:g[F].yCoords[U]-x.boundingbox().h/2,width:x.boundingbox().w,height:x.boundingbox().h});else d[F][x.id()]&&z.nodes.push({x:d[F][x.id()].getLeft(),y:d[F][x.id()].getTop(),width:d[F][x.id()].getWidth(),height:d[F][x.id()].getHeight()})}),P.edges().forEach(function(x){var H=x.source(),$=x.target();if(H.css("display")!="none"&&$.css("display")!="none")if(e.quality=="draft"){var tt=V.get(H.id()),ot=V.get($.id()),wt=[],Nt=[];if(H.isParent()){var B=i.calcBoundingBox(H,g[F].xCoords,g[F].yCoords,V);wt.push(B.topLeftX+B.width/2),wt.push(B.topLeftY+B.height/2)}else wt.push(g[F].xCoords[tt]),wt.push(g[F].yCoords[tt]);if($.isParent()){var St=i.calcBoundingBox($,g[F].xCoords,g[F].yCoords,V);Nt.push(St.topLeftX+St.width/2),Nt.push(St.topLeftY+St.height/2)}else Nt.push(g[F].xCoords[ot]),Nt.push(g[F].yCoords[ot]);z.edges.push({startX:wt[0],startY:wt[1],endX:Nt[0],endY:Nt[1]})}else d[F][H.id()]&&d[F][$.id()]&&z.edges.push({startX:d[F][H.id()].getCenterX(),startY:d[F][H.id()].getCenterY(),endX:d[F][$.id()].getCenterX(),endY:d[F][$.id()].getCenterY()})}),z.nodes.length>0&&(f.push(z),h.add(F))}});var y=E.packComponents(f,e.randomize).shifts;if(e.quality=="draft")g.forEach(function(P,F){var V=P.xCoords.map(function(U){return U+y[F].dx}),z=P.yCoords.map(function(U){return U+y[F].dy});P.xCoords=V,P.yCoords=z});else{var p=0;h.forEach(function(P){Object.keys(d[P]).forEach(function(F){var V=d[P][F];V.setCenter(V.getCenterX()+y[p].dx,V.getCenterY()+y[p].dy)}),p++})}}}else{var A=e.eles.boundingBox();if(m.push({x:A.x1+A.w/2,y:A.y1+A.h/2}),e.randomize){var L=a(e);g.push(L)}e.quality=="default"||e.quality=="proof"?(d.push(r(e,g[0])),i.relocateComponent(m[0],d[0],e)):i.relocateComponent(m[0],g[0],e)}var O=function(P,F){if(e.quality=="default"||e.quality=="proof"){typeof P=="number"&&(P=F);var V=void 0,z=void 0,U=P.data("id");return d.forEach(function(H){U in H&&(V={x:H[U].getRect().getCenterX(),y:H[U].getRect().getCenterY()},z=H[U])}),e.nodeDimensionsIncludeLabels&&(z.labelWidth&&(z.labelPosHorizontal=="left"?V.x+=z.labelWidth/2:z.labelPosHorizontal=="right"&&(V.x-=z.labelWidth/2)),z.labelHeight&&(z.labelPosVertical=="top"?V.y+=z.labelHeight/2:z.labelPosVertical=="bottom"&&(V.y-=z.labelHeight/2))),V==null&&(V={x:P.position("x"),y:P.position("y")}),{x:V.x,y:V.y}}var x=void 0;return g.forEach(function(H){var $=H.nodeIndexes.get(P.id());$!=null&&(x={x:H.xCoords[$],y:H.yCoords[$]})}),x==null&&(x={x:P.position("x"),y:P.position("y")}),{x:x.x,y:x.y}};if(e.quality=="default"||e.quality=="proof"||e.randomize){var G=i.calcParentsWithoutChildren(l,s),b=s.filter(function(P){return P.css("display")=="none"});e.eles=s.not(b),s.nodes().not(":parent").not(b).layoutPositions(this,e,O),G.length>0&&G.forEach(function(P){P.position(O(P))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=t},657:(N,I,_)=>{var T=_(548),c=_(140).layoutBase.Matrix,i=_(140).layoutBase.SVD;N.exports={spectralLayout:function(a){var r=a.cy,n=a.eles,t=n.nodes(),o=n.nodes(":parent"),e=new Map,l=new Map,s=new Map,g=[],d=[],v=[],m=[],E=[],w=[],C=[],S=[],R=void 0,k=1e8,X=1e-9,W=a.piTol,M=a.samplingType,j=a.nodeSeparation,h=void 0,f=function(st,ht,it){for(var ct=[],It=0,mt=0,gt=0,_t=void 0,vt=[],Mt=0,Rt=1,Ot=0;Ot<R;Ot++)vt[Ot]=k;for(ct[mt]=st,vt[st]=0;mt>=It;){gt=ct[It++];for(var D=g[gt],Y=0;Y<D.length;Y++)vt[_t=l.get(D[Y])]==k&&(vt[_t]=vt[gt]+1,ct[++mt]=_t);w[gt][ht]=vt[gt]*j}if(it){for(var Q=0;Q<R;Q++)w[Q][ht]<E[Q]&&(E[Q]=w[Q][ht]);for(var K=0;K<R;K++)E[K]>Mt&&(Mt=E[K],Rt=K)}return Rt};T.connectComponents(r,n,T.getTopMostNodes(t),e),o.forEach(function(st){T.connectComponents(r,n,T.getTopMostNodes(st.descendants().intersection(n)),e)});for(var u=0,y=0;y<t.length;y++)t[y].isParent()||l.set(t[y].id(),u++);var p=!0,A=!1,L=void 0;try{for(var O,G=e.keys()[Symbol.iterator]();!(p=(O=G.next()).done);p=!0){var b=O.value;l.set(b,u++)}}catch(st){A=!0,L=st}finally{try{!p&&G.return&&G.return()}finally{if(A)throw L}}for(var P=0;P<l.size;P++)g[P]=[];o.forEach(function(st){for(var ht=st.children().intersection(n);ht.nodes(":childless").length==0;)ht=ht.nodes()[0].children().intersection(n);var it=0,ct=ht.nodes(":childless")[0].connectedEdges().length;ht.nodes(":childless").forEach(function(It,mt){It.connectedEdges().length<ct&&(ct=It.connectedEdges().length,it=mt)}),s.set(st.id(),ht.nodes(":childless")[it].id())}),t.forEach(function(st){var ht=void 0;ht=st.isParent()?l.get(s.get(st.id())):l.get(st.id()),st.neighborhood().nodes().forEach(function(it){n.intersection(st.edgesWith(it)).length>0&&(it.isParent()?g[ht].push(s.get(it.id())):g[ht].push(it.id()))})});var F=function(st){var ht=l.get(st),it=void 0;e.get(st).forEach(function(ct){it=r.getElementById(ct).isParent()?s.get(ct):ct,g[ht].push(it),g[l.get(it)].push(st)})},V=!0,z=!1,U=void 0;try{for(var x,H=e.keys()[Symbol.iterator]();!(V=(x=H.next()).done);V=!0)F(x.value)}catch(st){z=!0,U=st}finally{try{!V&&H.return&&H.return()}finally{if(z)throw U}}var $=void 0;if((R=l.size)>2){h=R<a.sampleSize?R:a.sampleSize;for(var tt=0;tt<R;tt++)w[tt]=[];for(var ot=0;ot<h;ot++)S[ot]=[];return a.quality=="draft"||a.step=="all"?(function(st){var ht=void 0;if(st){ht=Math.floor(Math.random()*R);for(var it=0;it<R;it++)E[it]=k;for(var ct=0;ct<h;ct++)m[ct]=ht,ht=f(ht,ct,st)}else{(function(){for(var Rt=0,Ot=0,D=!1;Ot<h;){Rt=Math.floor(Math.random()*R),D=!1;for(var Y=0;Y<Ot;Y++)if(m[Y]==Rt){D=!0;break}D||(m[Ot]=Rt,Ot++)}})();for(var It=0;It<h;It++)f(m[It],It,st)}for(var mt=0;mt<R;mt++)for(var gt=0;gt<h;gt++)w[mt][gt]*=w[mt][gt];for(var _t=0;_t<h;_t++)C[_t]=[];for(var vt=0;vt<h;vt++)for(var Mt=0;Mt<h;Mt++)C[vt][Mt]=w[m[Mt]][vt]}(M),function(){for(var st=i.svd(C),ht=st.S,it=st.U,ct=st.V,It=ht[0]*ht[0]*ht[0],mt=[],gt=0;gt<h;gt++){mt[gt]=[];for(var _t=0;_t<h;_t++)mt[gt][_t]=0,gt==_t&&(mt[gt][_t]=ht[gt]/(ht[gt]*ht[gt]+It/(ht[gt]*ht[gt])))}S=c.multMat(c.multMat(ct,mt),c.transpose(it))}(),function(){for(var st=void 0,ht=void 0,it=[],ct=[],It=[],mt=[],gt=0;gt<R;gt++)it[gt]=Math.random(),ct[gt]=Math.random();it=c.normalize(it),ct=c.normalize(ct);for(var _t=X,vt=X,Mt=void 0;;){for(var Rt=0;Rt<R;Rt++)It[Rt]=it[Rt];if(it=c.multGamma(c.multL(c.multGamma(It),w,S)),st=c.dotProduct(It,it),it=c.normalize(it),_t=c.dotProduct(It,it),(Mt=Math.abs(_t/vt))<=1+W&&Mt>=1)break;vt=_t}for(var Ot=0;Ot<R;Ot++)It[Ot]=it[Ot];for(vt=X;;){for(var D=0;D<R;D++)mt[D]=ct[D];if(mt=c.minusOp(mt,c.multCons(It,c.dotProduct(It,mt))),ct=c.multGamma(c.multL(c.multGamma(mt),w,S)),ht=c.dotProduct(mt,ct),ct=c.normalize(ct),_t=c.dotProduct(mt,ct),(Mt=Math.abs(_t/vt))<=1+W&&Mt>=1)break;vt=_t}for(var Y=0;Y<R;Y++)mt[Y]=ct[Y];d=c.multCons(It,Math.sqrt(Math.abs(st))),v=c.multCons(mt,Math.sqrt(Math.abs(ht)))}(),$={nodeIndexes:l,xCoords:d,yCoords:v}):(l.forEach(function(st,ht){d.push(r.getElementById(ht).position("x")),v.push(r.getElementById(ht).position("y"))}),$={nodeIndexes:l,xCoords:d,yCoords:v}),$}var wt=l.keys(),Nt=r.getElementById(wt.next().value),B=Nt.position(),St=Nt.outerWidth();if(d.push(B.x),v.push(B.y),R==2){var Tt=r.getElementById(wt.next().value).outerWidth();d.push(B.x+St/2+Tt/2+a.idealEdgeLength),v.push(B.y)}return $={nodeIndexes:l,xCoords:d,yCoords:v}}}},579:(N,I,_)=>{var T=_(212),c=function(i){i&&i("layout","fcose",T)};typeof cytoscape<"u"&&c(cytoscape),N.exports=c},140:N=>{N.exports=Oe}},ce={},function N(I){var _=ce[I];if(_!==void 0)return _.exports;var T=ce[I]={exports:{}};return xe[I](T,T.exports,N),T.exports}(579))));var De={L:"left",R:"right",T:"top",B:"bottom"},Re={L:J(N=>`${N},${N/2} 0,${N} 0,0`,"L"),R:J(N=>`0,${N/2} ${N},0 ${N},${N}`,"R"),T:J(N=>`0,0 ${N},0 ${N/2},${N}`,"T"),B:J(N=>`${N/2},0 ${N},${N} 0,${N}`,"B")},ie={L:J((N,I)=>N-I+2,"L"),R:J((N,I)=>N-2,"R"),T:J((N,I)=>N-I+2,"T"),B:J((N,I)=>N-2,"B")},cr=J(function(N){return Ht(N)?N==="L"?"R":"L":N==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=J(function(N){return N==="L"||N==="R"||N==="T"||N==="B"},"isArchitectureDirection"),Ht=J(function(N){return N==="L"||N==="R"},"isArchitectureDirectionX"),Bt=J(function(N){return N==="T"||N==="B"},"isArchitectureDirectionY"),ge=J(function(N,I){const _=Ht(N)&&Bt(I),T=Bt(N)&&Ht(I);return _||T},"isArchitectureDirectionXY"),gr=J(function(N){const I=N[0],_=N[1],T=Ht(I)&&Bt(_),c=Bt(I)&&Ht(_);return T||c},"isArchitecturePairXY"),ur=J(function(N){return N!=="LL"&&N!=="RR"&&N!=="TT"&&N!=="BB"},"isValidArchitectureDirectionPair"),ue=J(function(N,I){const _=`${N}${I}`;return ur(_)?_:void 0},"getArchitectureDirectionPair"),pr=J(function([N,I],_){const T=_[0],c=_[1];return Ht(T)?Bt(c)?[N+(T==="L"?-1:1),I+(c==="T"?1:-1)]:[N+(T==="L"?-1:1),I]:Ht(c)?[N+(c==="L"?1:-1),I+(T==="T"?1:-1)]:[N,I+(T==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),fr=J(function(N){return N==="LT"||N==="TL"?[1,1]:N==="BL"||N==="LB"?[1,-1]:N==="BR"||N==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=J(function(N,I){return ge(N,I)?"bend":Ht(N)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),vr=J(function(N){return N.type==="service"},"isArchitectureService"),yr=J(function(N){return N.type==="junction"},"isArchitectureJunction"),Ge=J(N=>N.data(),"edgeData"),Kt=J(N=>N.data(),"nodeData"),Fe=tr.architecture,dt=new ir(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Fe,dataStructures:void 0,elements:{}})),Er=J(()=>{dt.reset(),Qe()},"clear"),Nr=J(function({id:N,icon:I,in:_,title:T,iconText:c}){if(dt.records.registeredIds[N]!==void 0)throw new Error(`The service id [${N}] is already in use by another ${dt.records.registeredIds[N]}`);if(_!==void 0){if(N===_)throw new Error(`The service [${N}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The service [${N}]'s parent does not exist. Please make sure the parent is created before this service`);if(dt.records.registeredIds[_]==="node")throw new Error(`The service [${N}]'s parent is not a group`)}dt.records.registeredIds[N]="node",dt.records.nodes[N]={id:N,type:"service",icon:I,iconText:c,title:T,edges:[],in:_}},"addService"),Tr=J(()=>Object.values(dt.records.nodes).filter(vr),"getServices"),Ar=J(function({id:N,in:I}){dt.records.registeredIds[N]="node",dt.records.nodes[N]={id:N,type:"junction",edges:[],in:I}},"addJunction"),wr=J(()=>Object.values(dt.records.nodes).filter(yr),"getJunctions"),Ir=J(()=>Object.values(dt.records.nodes),"getNodes"),pe=J(N=>dt.records.nodes[N],"getNode"),Lr=J(function({id:N,icon:I,in:_,title:T}){if(dt.records.registeredIds[N]!==void 0)throw new Error(`The group id [${N}] is already in use by another ${dt.records.registeredIds[N]}`);if(_!==void 0){if(N===_)throw new Error(`The group [${N}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The group [${N}]'s parent does not exist. Please make sure the parent is created before this group`);if(dt.records.registeredIds[_]==="node")throw new Error(`The group [${N}]'s parent is not a group`)}dt.records.registeredIds[N]="group",dt.records.groups[N]={id:N,icon:I,title:T,in:_}},"addGroup"),_r=J(()=>Object.values(dt.records.groups),"getGroups"),Cr=J(function({lhsId:N,rhsId:I,lhsDir:_,rhsDir:T,lhsInto:c,rhsInto:i,lhsGroup:a,rhsGroup:r,title:n}){if(!be(_))throw new Error(`Invalid direction given for left hand side of edge ${N}--${I}. Expected (L,R,T,B) got ${_}`);if(!be(T))throw new Error(`Invalid direction given for right hand side of edge ${N}--${I}. Expected (L,R,T,B) got ${T}`);if(dt.records.nodes[N]===void 0&&dt.records.groups[N]===void 0)throw new Error(`The left-hand id [${N}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(dt.records.nodes[I]===void 0&&dt.records.groups[N]===void 0)throw new Error(`The right-hand id [${I}] does not yet exist. Please create the service/group before declaring an edge to it.`);const t=dt.records.nodes[N].in,o=dt.records.nodes[I].in;if(a&&t&&o&&t==o)throw new Error(`The left-hand id [${N}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&t&&o&&t==o)throw new Error(`The right-hand id [${I}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:N,lhsDir:_,lhsInto:c,lhsGroup:a,rhsId:I,rhsDir:T,rhsInto:i,rhsGroup:r,title:n};dt.records.edges.push(e),dt.records.nodes[N]&&dt.records.nodes[I]&&(dt.records.nodes[N].edges.push(dt.records.edges[dt.records.edges.length-1]),dt.records.nodes[I].edges.push(dt.records.edges[dt.records.edges.length-1]))},"addEdge"),Mr=J(()=>dt.records.edges,"getEdges"),Or=J(()=>{if(dt.records.dataStructures===void 0){const N={},I=Object.entries(dt.records.nodes).reduce((r,[n,t])=>(r[n]=t.edges.reduce((o,e)=>{var g,d;const l=(g=pe(e.lhsId))==null?void 0:g.in,s=(d=pe(e.rhsId))==null?void 0:d.in;if(l&&s&&l!==s){const v=mr(e.lhsDir,e.rhsDir);v!=="bend"&&(N[l]??(N[l]={}),N[l][s]=v,N[s]??(N[s]={}),N[s][l]=v)}if(e.lhsId===n){const v=ue(e.lhsDir,e.rhsDir);v&&(o[v]=e.rhsId)}else{const v=ue(e.rhsDir,e.lhsDir);v&&(o[v]=e.lhsId)}return o},{}),r),{}),_=Object.keys(I)[0],T={[_]:1},c=Object.keys(I).reduce((r,n)=>n===_?r:{...r,[n]:1},{}),i=J(r=>{const n={[r]:[0,0]},t=[r];for(;t.length>0;){const o=t.shift();if(o){T[o]=1,delete c[o];const e=I[o],[l,s]=n[o];Object.entries(e).forEach(([g,d])=>{T[d]||(n[d]=pr([l,s],g),t.push(d))})}}return n},"BFS"),a=[i(_)];for(;Object.keys(c).length>0;)a.push(i(Object.keys(c)[0]));dt.records.dataStructures={adjList:I,spatialMaps:a,groupAlignments:N}}return dt.records.dataStructures},"getDataStructures"),oe={clear:Er,setDiagramTitle:Ze,getDiagramTitle:qe,setAccTitle:$e,getAccTitle:je,setAccDescription:We,getAccDescription:Be,addService:Nr,getServices:Tr,addJunction:Ar,getJunctions:wr,getNodes:Ir,getNode:pe,addGroup:Lr,getGroups:_r,addEdge:Cr,getEdges:Mr,setElementForId:J((N,I)=>{dt.records.elements[N]=I},"setElementForId"),getElementById:J(N=>dt.records.elements[N],"getElementById"),getDataStructures:Or};function Ft(N){const I=ne().architecture;return I!=null&&I[N]?I[N]:Fe[N]}J(Ft,"getConfigField");var xr=J((N,I)=>{nr(N,I),N.groups.map(I.addGroup),N.services.map(_=>I.addService({..._,type:"service"})),N.junctions.map(_=>I.addJunction({..._,type:"junction"})),N.edges.map(I.addEdge)},"populateDb"),Dr={parse:J(async N=>{const I=await or("architecture",N);Te.debug(I),xr(I,oe)},"parse")},Rr=J(N=>`
|
2
2
|
.edge {
|
3
3
|
stroke-width: ${N.archEdgeWidth};
|
4
4
|
stroke: ${N.archEdgeColor};
|