@kabmo-labs/kabmo 0.56.0 → 0.57.0

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.
Files changed (122) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +2 -2
  3. package/dist/client/static/js/{Body-jfy4bhk2.js → Body-k96gtstv.js} +1 -1
  4. package/dist/client/static/js/{CsvGrid-4c5t668z.js → CsvGrid-t84xmbk9.js} +1 -1
  5. package/dist/client/static/js/{DocxView-3x7whtvq.js → DocxView-4jda3szm.js} +1 -1
  6. package/dist/client/static/js/{DrawioView-tbkc5dfz.js → DrawioView-9qvvtnvt.js} +1 -1
  7. package/dist/client/static/js/{HtmlPreview-egxkayya.js → HtmlPreview-4pba1ys5.js} +1 -1
  8. package/dist/client/static/js/{ImageView-swhzvw2p.js → ImageView-0gf5xdsv.js} +1 -1
  9. package/dist/client/static/js/{LayoutWrapper-sangsrt5.js → LayoutWrapper-pwbq5syv.js} +1 -1
  10. package/dist/client/static/js/MergeDiffView-m4jkr786.js +1 -0
  11. package/dist/client/static/js/{Modal-1fj8kvme.js → Modal-yjszc3vy.js} +12 -12
  12. package/dist/client/static/js/{PdfView-0k2egsbz.js → PdfView-sny55sne.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-t547rqeb.js → SessionsView-q3800n83.js} +1 -1
  14. package/dist/client/static/js/{SheetView-anb3gavm.js → SheetView-ezqak2b4.js} +1 -1
  15. package/dist/client/static/js/{SvgPreview-e2wrj2hj.js → SvgPreview-q1cvdf4s.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-0rs86b68.js → abnfDiagram-O67JEVCF-ftm2qwa3.js} +1 -1
  17. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-0k3zzxz1.js → architectureDiagram-NJMV4G6O-j8kqfzmf.js} +1 -1
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-t1n1fx96.js → blockDiagram-BEXU5L5S-m3zpsp9h.js} +3 -3
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-93b7eds9.js → c4Diagram-YGBWAQC7-myshvbrx.js} +2 -2
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-bnf85z0f.js → classDiagram-v2-NBCMYWYE-s0cwmsj4.js} +1 -1
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-e290161f.js → cose-bilkent-JH36ORCC-t5t02sfr.js} +1 -1
  22. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-s13ra9ag.js → cynefinDiagram-VND7K2PF-6yxd72sh.js} +1 -1
  23. package/dist/client/static/js/{dagre-6A5THRUB-83wshh5e.js → dagre-6A5THRUB-vft5103m.js} +1 -1
  24. package/dist/client/static/js/{diagram-22UHCM2B-ywh4wqna.js → diagram-22UHCM2B-yy2jfvxt.js} +1 -1
  25. package/dist/client/static/js/{diagram-3UASUU5V-cb53z698.js → diagram-3UASUU5V-1xqhzq20.js} +1 -1
  26. package/dist/client/static/js/{diagram-ATOU4E4O-btf55c44.js → diagram-ATOU4E4O-f11cxgvm.js} +1 -1
  27. package/dist/client/static/js/{diagram-CDSNMT55-p6tbbm1n.js → diagram-CDSNMT55-gqmkfcp7.js} +3 -3
  28. package/dist/client/static/js/{diagram-MLGK6HIB-6kzssf4y.js → diagram-MLGK6HIB-1fg7304a.js} +1 -1
  29. package/dist/client/static/js/{diagram-MPIPVDR6-4v0yncvv.js → diagram-MPIPVDR6-mem80369.js} +1 -1
  30. package/dist/client/static/js/{dockerfile-r422htmd.js → dockerfile-jarjwxp9.js} +1 -1
  31. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mw1gh30z.js → ebnfDiagram-ZINNZB2B-4rcbvfrj.js} +1 -1
  32. package/dist/client/static/js/{elk-276RUBZZ-1pe786ap.js → elk-276RUBZZ-ykd0stxz.js} +1 -1
  33. package/dist/client/static/js/{erDiagram-OPXOYQCR-x7rk70q6.js → erDiagram-OPXOYQCR-b2th9bk4.js} +1 -1
  34. package/dist/client/static/js/flowDiagram-KWPJA3E3-f3bdtc1z.js +1 -0
  35. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j3m5km4p.js → ganttDiagram-FUAMR5RP-64p5r7cx.js} +2 -2
  36. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-fd1kebdy.js → gitGraphDiagram-X574FWY7-z3yc333r.js} +1 -1
  37. package/dist/client/static/js/{index-004x0a3p.js → index-1mm7kyjd.js} +1 -1
  38. package/dist/client/static/js/{index-4dzvjfkd.js → index-2gf593e3.js} +1 -1
  39. package/dist/client/static/js/{index-4jg10xtp.js → index-3w18s59k.js} +1 -1
  40. package/dist/client/static/js/{index-tcp5cp53.js → index-3x3nhs8n.js} +1 -1
  41. package/dist/client/static/js/{index-j1prebvy.js → index-5m0se6fk.js} +1 -1
  42. package/dist/client/static/js/{index-kbk0vmex.js → index-6m5n8b6w.js} +1 -1
  43. package/dist/client/static/js/{index-bnamrpm6.js → index-77wznmg5.js} +1 -1
  44. package/dist/client/static/js/{index-cbbwq25c.js → index-bwwgtesb.js} +1 -1
  45. package/dist/client/static/js/{index-zkef5q39.js → index-c2vc6znd.js} +1 -1
  46. package/dist/client/static/js/{index-4acka5fn.js → index-dxx49b9m.js} +1 -1
  47. package/dist/client/static/js/{index-bxhszdcz.js → index-ebnd5hnr.js} +1 -1
  48. package/dist/client/static/js/{index-g84dwmvr.js → index-ep353yxd.js} +1 -1
  49. package/dist/client/static/js/{index-s6nv35dv.js → index-ewtv8gg7.js} +1 -1
  50. package/dist/client/static/js/{index-jtyzeynv.js → index-g71wn1pr.js} +1 -1
  51. package/dist/client/static/js/{index-473wm10a.js → index-gr07t5c4.js} +1 -1
  52. package/dist/client/static/js/{index-drsy400d.js → index-h4qmywn5.js} +1 -1
  53. package/dist/client/static/js/{index-s4v3vcsn.js → index-hmjb96kb.js} +1 -1
  54. package/dist/client/static/js/{index-q4t5j3x7.js → index-jd2h5tvh.js} +1 -1
  55. package/dist/client/static/js/{index-0mhxw0a1.js → index-k57bandz.js} +1 -1
  56. package/dist/client/static/js/{index-dfha2z56.js → index-k6wms0kx.js} +1 -1
  57. package/dist/client/static/js/{index-7tsdw8wt.js → index-k9v6477a.js} +1 -1
  58. package/dist/client/static/js/{index-4fpyzg5e.js → index-kbaffwp1.js} +20 -20
  59. package/dist/client/static/js/{index-3k45gspr.js → index-mdmtxh1c.js} +1 -1
  60. package/dist/client/static/js/{index-hgsjynb0.js → index-mv83hpva.js} +1 -1
  61. package/dist/client/static/js/{index-qdabc51h.js → index-n71ffk62.js} +2 -2
  62. package/dist/client/static/js/{index-qrwjxqdh.js → index-nr5gwny1.js} +176 -176
  63. package/dist/client/static/js/{index-rm5b3kn8.js → index-q9gbwqbe.js} +3 -3
  64. package/dist/client/static/js/{index-4nyajpeg.js → index-rqpbva78.js} +1 -1
  65. package/dist/client/static/js/{index-q178zgxp.js → index-sw370sk7.js} +1 -1
  66. package/dist/client/static/js/{index-8e66p2a7.js → index-t415df0c.js} +1 -1
  67. package/dist/client/static/js/index-taz2nfym.css +1 -0
  68. package/dist/client/static/js/{index-22frp78d.js → index-w659dhe5.js} +1 -1
  69. package/dist/client/static/js/{index-29b1ysz6.js → index-wgcgshdh.js} +1 -1
  70. package/dist/client/static/js/{index-72v57e07.js → index-x6945djv.js} +1 -1
  71. package/dist/client/static/js/{index-satnfvaz.js → index-y5mf2w81.js} +1 -1
  72. package/dist/client/static/js/{index-jbaceghb.js → index-y69cbdvd.js} +1 -1
  73. package/dist/client/static/js/{index-3hrvhyym.js → index-y6qtx68e.js} +1 -1
  74. package/dist/client/static/js/{index-5fxm2tpg.js → index-yktwxghr.js} +1 -1
  75. package/dist/client/static/js/{index-8n4qwd64.js → index-zj65csnm.js} +2 -2
  76. package/dist/client/static/js/{infoDiagram-VRGFBTTK-1m0br602.js → infoDiagram-VRGFBTTK-59xq3n1b.js} +2 -2
  77. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-zryzhpq6.js → ishikawaDiagram-OU5B5YK6-v18q4qt7.js} +2 -2
  78. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-6apqr7h4.js → journeyDiagram-ZHPQQLJL-etazj0p8.js} +2 -2
  79. package/dist/client/static/js/{kanban-definition-PNTS6WVX-am385c1e.js → kanban-definition-PNTS6WVX-ph15e5p2.js} +1 -1
  80. package/dist/client/static/js/{mermaid.core-k937exrm.js → mermaid.core-7ygd161b.js} +2 -2
  81. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-hx8qq866.js → mindmap-definition-NLK3R4M7-j5xsftrf.js} +1 -1
  82. package/dist/client/static/js/one-dark-pro-4s2rr12v.js +1 -0
  83. package/dist/client/static/js/one-light-3bkk59ww.js +1 -0
  84. package/dist/client/static/js/{pegDiagram-GJSIUBJH-1hasj2h7.js → pegDiagram-GJSIUBJH-09nvb70v.js} +1 -1
  85. package/dist/client/static/js/{pieDiagram-5QR66LMP-x5nwff8r.js → pieDiagram-5QR66LMP-6ymh1960.js} +2 -2
  86. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-gmrcr5jb.js → quadrantDiagram-O4NWA36T-hk61avw2.js} +2 -2
  87. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-rdznfhfb.js → railroadDiagram-XR7U4H2S-3jvqrfnb.js} +1 -1
  88. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-v9wb3ppf.js → requirementDiagram-PLB6GJNP-zthfj48k.js} +1 -1
  89. package/dist/client/static/js/{rust-9cgnbbcs.js → rust-q7n7q6dy.js} +1 -1
  90. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-3p4ddd2h.js → sankeyDiagram-IPEJSGJF-nh5d6xte.js} +1 -1
  91. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-wfcqxjfq.js → sequenceDiagram-PO4LG4MO-crej9b40.js} +4 -4
  92. package/dist/client/static/js/{sizeCapture-INFHLROL-g02k0k8x.js → sizeCapture-INFHLROL-nvvxw58j.js} +1 -1
  93. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-7k449yvg.js → stateDiagram-v2-GCMORJYK-e6tztjnj.js} +1 -1
  94. package/dist/client/static/js/{swimlanes-2SLR337P-zkf2bgm8.js → swimlanes-2SLR337P-xhdqjqmf.js} +1 -1
  95. package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-yex8g4fx.js → swimlanesDiagram-TC7HE7FX-hbwg3m3k.js} +1 -1
  96. package/dist/client/static/js/{timeline-definition-EJHVYXUP-qsfpjr1c.js → timeline-definition-EJHVYXUP-9cve31zc.js} +1 -1
  97. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-b2vprhsr.js → usecaseDiagram-POWQR4AR-asycstwe.js} +1 -1
  98. package/dist/client/static/js/{vennDiagram-UO4OBE2U-x0ffeg2t.js → vennDiagram-UO4OBE2U-gbzk6era.js} +4 -4
  99. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-hsnhaf4f.js → wardleyDiagram-VNRHLVJA-1swwfszr.js} +2 -2
  100. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-90f9aadp.js → xychartDiagram-PMCCYNJV-v7qkwv0b.js} +3 -3
  101. package/package.json +3 -3
  102. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.tsx +25 -62
  103. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.test.tsx +40 -0
  104. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormDialog.tsx +41 -2
  105. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionList.tsx +117 -0
  106. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/SwipeDeck.tsx +220 -0
  107. package/src/client/data/settings/omp-schema.json +59 -7
  108. package/src/client/hooks/chat/timeline/ask-frames-form.test.ts +29 -0
  109. package/src/shared/lib/chat/ask-form/data.ts +25 -6
  110. package/src/shared/lib/chat/ask-form/deck.ts +80 -0
  111. package/src/shared/lib/chat/ask-form/fields.ts +26 -1
  112. package/src/shared/lib/chat/ask-form/index.ts +18 -310
  113. package/src/shared/lib/chat/ask-form/types.ts +14 -2
  114. package/src/shared/lib/chat/ask-form/walker.ts +350 -0
  115. package/src/shared/lib/chat/ask-form.test.ts +41 -0
  116. package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +47 -0
  117. package/src/shared/lib/omp/config/schema-releases.test.ts +4 -2
  118. package/dist/client/static/js/MergeDiffView-bv00y63x.js +0 -1
  119. package/dist/client/static/js/flowDiagram-KWPJA3E3-kfwaac44.js +0 -1
  120. package/dist/client/static/js/index-gedsa0z7.css +0 -1
  121. package/dist/client/static/js/one-dark-pro-phxqe9mx.js +0 -1
  122. package/dist/client/static/js/one-light-vhwh499y.js +0 -1
@@ -1,4 +1,4 @@
1
- import{xe}from"./index-cbbwq25c.js";import{t,l,Y,C,te,Xr,M,O,G,z,j,q,H,m,b,Ae,Fg,Xi,br,ce,Mn,bn}from"./index-4fpyzg5e.js";import{$e}from"./index-cwwg7k5f.js";import{Jr}from"./index-9qf2h9jb.js";import{xn,$n}from"./index-8pqx5n2p.js";var Re=$n(function(ye,Ie){(function(R,A){if(typeof ye==="object"&&typeof Ie==="object")Ie.exports=A();else if(typeof define==="function"&&define.amd)define([],A);else if(typeof ye==="object")ye.layoutBase=A();else R.layoutBase=A()})(ye,function(){return function(L){var R={};function A(d){if(R[d])return R[d].exports;var h=R[d]={i:d,l:!1,exports:{}};return L[d].call(h.exports,h,h.exports,A),h.l=!0,h.exports}return A.m=L,A.c=R,A.i=function(d){return d},A.d=function(d,h,o){if(!A.o(d,h))Object.defineProperty(d,h,{configurable:!1,enumerable:!0,get:o})},A.n=function(d){var h=d&&d.__esModule?function(){return d.default}:function(){return d};return A.d(h,"a",h),h},A.o=function(d,h){return Object.prototype.hasOwnProperty.call(d,h)},A.p="",A(A.s=28)}([function(L,R,A){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1000,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,L.exports=d},function(L,R,A){var d=A(2),h=A(8),o=A(9);function n(g,r,v){d.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=r}n.prototype=Object.create(d.prototype);for(var a in d)n[a]=d[a];n.prototype.getSource=function(){return this.source},n.prototype.getTarget=function(){return this.target},n.prototype.isInterGraph=function(){return this.isInterGraph},n.prototype.getLength=function(){return this.length},n.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},n.prototype.getBendpoints=function(){return this.bendpoints},n.prototype.getLca=function(){return this.lca},n.prototype.getSourceInLca=function(){return this.sourceInLca},n.prototype.getTargetInLca=function(){return this.targetInLca},n.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;else if(this.target===g)return this.source;else throw"Node is not incident with this edge"},n.prototype.getOtherEndInGraph=function(g,r){var v=this.getOtherEnd(g),i=r.getGraphManager().getRoot();while(!0){if(v.getOwner()==r)return v;if(v.getOwner()==i)break;v=v.getOwner().getParent()}return null},n.prototype.updateLength=function(){var g=[,,,,];if(this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),g),!this.isOverlapingSourceAndTarget){if(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},n.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=n},function(L,R,A){function d(h){this.vGraphObject=h}L.exports=d},function(L,R,A){var d=A(2),h=A(10),o=A(13),n=A(0),a=A(16),g=A(5);function r(i,e,c,u){if(c==null&&u==null)u=e;if(d.call(this,u),i.graphManager!=null)i=i.graphManager;if(this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=i,c!=null&&e!=null)this.rect=new o(e.x,e.y,c.width,c.height);else this.rect=new o}r.prototype=Object.create(d.prototype);for(var v in d)r[v]=d[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(i){this.rect.width=i},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(i){this.rect.height=i},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(i,e){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=e.width,this.rect.height=e.height},r.prototype.setCenter=function(i,e){this.rect.x=i-this.rect.width/2,this.rect.y=e-this.rect.height/2},r.prototype.setLocation=function(i,e){this.rect.x=i,this.rect.y=e},r.prototype.moveBy=function(i,e){this.rect.x+=i,this.rect.y+=e},r.prototype.getEdgeListToNode=function(i){var e=[],c,u=this;return u.edges.forEach(function(f){if(f.target==i){if(f.source!=u)throw"Incorrect edge source!";e.push(f)}}),e},r.prototype.getEdgesBetween=function(i){var e=[],c,u=this;return u.edges.forEach(function(f){if(!(f.source==u||f.target==u))throw"Incorrect edge source and/or target";if(f.target==i||f.source==i)e.push(f)}),e},r.prototype.getNeighborsList=function(){var i=new Set,e=this;return e.edges.forEach(function(c){if(c.source==e)i.add(c.target);else{if(c.target!=e)throw"Incorrect incidency!";i.add(c.source)}}),i},r.prototype.withChildren=function(){var i=new Set,e,c;if(i.add(this),this.child!=null){var u=this.child.getNodes();for(var f=0;f<u.length;f++)e=u[f],c=e.withChildren(),c.forEach(function(x){i.add(x)})}return i},r.prototype.getNoOfChildren=function(){var i=0,e;if(this.child==null)i=1;else{var c=this.child.getNodes();for(var u=0;u<c.length;u++)e=c[u],i+=e.getNoOfChildren()}if(i==0)i=1;return i},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},r.prototype.scatter=function(){var i,e,c=-n.INITIAL_WORLD_BOUNDARY,u=n.INITIAL_WORLD_BOUNDARY;i=n.WORLD_CENTER_X+a.nextDouble()*(u-c)+c;var f=-n.INITIAL_WORLD_BOUNDARY,x=n.INITIAL_WORLD_BOUNDARY;e=n.WORLD_CENTER_Y+a.nextDouble()*(x-f)+f,this.rect.x=i,this.rect.y=e},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),n.NODE_DIMENSIONS_INCLUDE_LABELS){var e=i.getRight()-i.getLeft(),c=i.getBottom()-i.getTop();if(this.labelWidth){if(this.labelPosHorizontal=="left")this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth);else if(this.labelPosHorizontal=="center"&&this.labelWidth>e)this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth);else if(this.labelPosHorizontal=="right")this.setWidth(e+this.labelWidth)}if(this.labelHeight){if(this.labelPosVertical=="top")this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight);else if(this.labelPosVertical=="center"&&this.labelHeight>c)this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight);else if(this.labelPosVertical=="bottom")this.setHeight(c+this.labelHeight)}}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(i){var e=this.rect.x;if(e>n.WORLD_BOUNDARY)e=n.WORLD_BOUNDARY;else if(e<-n.WORLD_BOUNDARY)e=-n.WORLD_BOUNDARY;var c=this.rect.y;if(c>n.WORLD_BOUNDARY)c=n.WORLD_BOUNDARY;else if(c<-n.WORLD_BOUNDARY)c=-n.WORLD_BOUNDARY;var u=new g(e,c),f=i.inverseTransformPoint(u);this.setLocation(f.x,f.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},L.exports=r},function(L,R,A){var d=A(0);function h(){}for(var o in d)h[o]=d[o];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=0.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=0.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,h.COOLING_ADAPTATION_FACTOR=0.33,h.ADAPTATION_LOWER_NODE_LIMIT=1000,h.ADAPTATION_UPPER_NODE_LIMIT=5000,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=h},function(L,R,A){function d(h,o){if(h==null&&o==null)this.x=0,this.y=0;else this.x=h,this.y=o}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(h){this.x=h},d.prototype.setY=function(h){this.y=h},d.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},L.exports=d},function(L,R,A){var d=A(2),h=A(10),o=A(0),n=A(7),a=A(3),g=A(1),r=A(13),v=A(12),i=A(11);function e(u,f,x){if(d.call(this,x),this.estimatedSize=h.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,f!=null&&f instanceof n)this.graphManager=f;else if(f!=null&&f instanceof Layout)this.graphManager=f.graphManager}e.prototype=Object.create(d.prototype);for(var c in d)e[c]=d[c];e.prototype.getNodes=function(){return this.nodes},e.prototype.getEdges=function(){return this.edges},e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getParent=function(){return this.parent},e.prototype.getLeft=function(){return this.left},e.prototype.getRight=function(){return this.right},e.prototype.getTop=function(){return this.top},e.prototype.getBottom=function(){return this.bottom},e.prototype.isConnected=function(){return this.isConnected},e.prototype.add=function(u,f,x){if(f==null&&x==null){var E=u;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}else{var T=u;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(x)>-1))throw"Source or target not in graph!";if(!(f.owner==x.owner&&f.owner==this))throw"Both owners must be this graph!";if(f.owner!=x.owner)return null;if(T.source=f,T.target=x,T.isInterGraph=!1,this.getEdges().push(T),f.edges.push(T),x!=f)x.edges.push(T);return T}},e.prototype.remove=function(u){var f=u;if(u instanceof a){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var x=f.edges.slice(),E,T=x.length;for(var D=0;D<T;D++)if(E=x[D],E.isInterGraph)this.graphManager.remove(E);else E.source.owner.remove(E);var X=this.nodes.indexOf(f);if(X==-1)throw"Node not in owner node list!";this.nodes.splice(X,1)}else if(u instanceof g){var E=u;if(E==null)throw"Edge is null!";if(!(E.source!=null&&E.target!=null))throw"Source and/or target is null!";if(!(E.source.owner!=null&&E.target.owner!=null&&E.source.owner==this&&E.target.owner==this))throw"Source and/or target owner is invalid!";var I=E.source.edges.indexOf(E),V=E.target.edges.indexOf(E);if(!(I>-1&&V>-1))throw"Source and/or target doesn't know this edge!";if(E.source.edges.splice(I,1),E.target!=E.source)E.target.edges.splice(V,1);var X=E.source.owner.getEdges().indexOf(E);if(X==-1)throw"Not in owner's edge list!";E.source.owner.getEdges().splice(X,1)}},e.prototype.updateLeftTop=function(){var{MAX_VALUE:u,MAX_VALUE:f}=h,x,E,T,D=this.getNodes(),X=D.length;for(var I=0;I<X;I++){var V=D[I];if(x=V.getTop(),E=V.getLeft(),u>x)u=x;if(f>E)f=E}if(u==h.MAX_VALUE)return null;if(D[0].getParent().paddingLeft!=null)T=D[0].getParent().paddingLeft;else T=this.margin;return this.left=f-T,this.top=u-T,new v(this.left,this.top)},e.prototype.updateBounds=function(u){var f=h.MAX_VALUE,x=-h.MAX_VALUE,E=h.MAX_VALUE,T=-h.MAX_VALUE,D,X,I,V,_,Q=this.nodes,lt=Q.length;for(var P=0;P<lt;P++){var tt=Q[P];if(u&&tt.child!=null)tt.updateBounds();if(D=tt.getLeft(),X=tt.getRight(),I=tt.getTop(),V=tt.getBottom(),f>D)f=D;if(x<X)x=X;if(E>I)E=I;if(T<V)T=V}var s=new r(f,E,x-f,T-E);if(f==h.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(Q[0].getParent().paddingLeft!=null)_=Q[0].getParent().paddingLeft;else _=this.margin;this.left=s.x-_,this.right=s.x+s.width+_,this.top=s.y-_,this.bottom=s.y+s.height+_},e.calculateBounds=function(u){var f=h.MAX_VALUE,x=-h.MAX_VALUE,E=h.MAX_VALUE,T=-h.MAX_VALUE,D,X,I,V,_=u.length;for(var Q=0;Q<_;Q++){var lt=u[Q];if(D=lt.getLeft(),X=lt.getRight(),I=lt.getTop(),V=lt.getBottom(),f>D)f=D;if(x<X)x=X;if(E>I)E=I;if(T<V)T=V}var P=new r(f,E,x-f,T-E);return P},e.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){var u=0,f=this.nodes,x=f.length;for(var E=0;E<x;E++){var T=f[E];u+=T.calcEstimatedSize()}if(u==0)this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=u/Math.sqrt(this.nodes.length);return this.estimatedSize},e.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new i,x=new Set,E=this.nodes[0],T,D,X=E.withChildren();X.forEach(function(P){f.push(P),x.add(P)});while(f.length!==0){E=f.shift(),T=E.getEdges();var I=T.length;for(var V=0;V<I;V++){var _=T[V];if(D=_.getOtherEndInGraph(E,this),D!=null&&!x.has(D)){var Q=D.withChildren();Q.forEach(function(P){f.push(P),x.add(P)})}}}if(this.isConnected=!1,x.size>=this.nodes.length){var lt=0;if(x.forEach(function(P){if(P.owner==u)lt++}),lt==this.nodes.length)this.isConnected=!0}},L.exports=e},function(L,R,A){var d,h=A(1);function o(n){d=A(6),this.layout=n,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var n=this.layout.newGraph(),a=this.layout.newNode(null),g=this.add(n,a);return this.setRootGraph(g),this.rootGraph},o.prototype.add=function(n,a,g,r,v){if(g==null&&r==null&&v==null){if(n==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(n)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(n),n.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return n.parent=a,a.child=n,n}else{v=g,r=a,g=n;var i=r.getOwner(),e=v.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(e!=null&&e.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==e)return g.isInterGraph=!1,i.add(g,r,v);else{if(g.isInterGraph=!0,g.source=r,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}}},o.prototype.remove=function(n){if(n instanceof d){var a=n;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(a.getEdges());var r,v=g.length;for(var i=0;i<v;i++)r=g[i],a.remove(r);var e=[];e=e.concat(a.getNodes());var c;v=e.length;for(var i=0;i<v;i++)c=e[i],a.remove(c);if(a==this.rootGraph)this.setRootGraph(null);var u=this.graphs.indexOf(a);this.graphs.splice(u,1),a.parent=null}else if(n instanceof h){if(r=n,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var u=r.source.edges.indexOf(r);if(r.source.edges.splice(u,1),u=r.target.edges.indexOf(r),r.target.edges.splice(u,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var u=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(u,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){var n=[],a=this.getGraphs(),g=a.length;for(var r=0;r<g;r++)n=n.concat(a[r].getNodes());this.allNodes=n}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var n=[],a=this.getGraphs(),g=a.length;for(var r=0;r<a.length;r++)n=n.concat(a[r].getEdges());n=n.concat(this.edges),this.allEdges=n}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(n){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=n},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(n){if(n.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=n,n.parent==null)n.parent=this.layout.newNode("Root node")},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(n,a){if(!(n!=null&&a!=null))throw"assert failed";if(n==a)return!0;var g=n.getOwner(),r;do{if(r=g.getParent(),r==null)break;if(r==a)return!0;if(g=r.getOwner(),g==null)break}while(!0);g=a.getOwner();do{if(r=g.getParent(),r==null)break;if(r==n)return!0;if(g=r.getOwner(),g==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){var n,a,g,r,v,i=this.getAllEdges(),e=i.length;for(var c=0;c<e;c++){if(n=i[c],a=n.source,g=n.target,n.lca=null,n.sourceInLca=a,n.targetInLca=g,a==g){n.lca=a.getOwner();continue}r=a.getOwner();while(n.lca==null){n.targetInLca=g,v=g.getOwner();while(n.lca==null){if(v==r){n.lca=v;break}if(v==this.rootGraph)break;if(n.lca!=null)throw"assert failed";n.targetInLca=v.getParent(),v=n.targetInLca.getOwner()}if(r==this.rootGraph)break;if(n.lca==null)n.sourceInLca=r.getParent(),r=n.sourceInLca.getOwner()}if(n.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(n,a){if(n==a)return n.getOwner();var g=n.getOwner();do{if(g==null)break;var r=a.getOwner();do{if(r==null)break;if(r==g)return r;r=r.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},o.prototype.calcInclusionTreeDepths=function(n,a){if(n==null&&a==null)n=this.rootGraph,a=1;var g,r=n.getNodes(),v=r.length;for(var i=0;i<v;i++)if(g=r[i],g.inclusionTreeDepth=a,g.child!=null)this.calcInclusionTreeDepths(g.child,a+1)},o.prototype.includesInvalidEdge=function(){var n,a=[],g=this.edges.length;for(var r=0;r<g;r++)if(n=this.edges[r],this.isOneAncestorOfOther(n.source,n.target))a.push(n);for(var r=0;r<a.length;r++)this.remove(a[r]);return!1},L.exports=o},function(L,R,A){var d=A(12);function h(){}h.calcSeparationAmount=function(o,n,a,g){if(!o.intersects(n))throw"assert failed";var r=[,,];if(this.decideDirectionsForOverlappingNodes(o,n,r),a[0]=Math.min(o.getRight(),n.getRight())-Math.max(o.x,n.x),a[1]=Math.min(o.getBottom(),n.getBottom())-Math.max(o.y,n.y),o.getX()<=n.getX()&&o.getRight()>=n.getRight())a[0]+=Math.min(n.getX()-o.getX(),o.getRight()-n.getRight());else if(n.getX()<=o.getX()&&n.getRight()>=o.getRight())a[0]+=Math.min(o.getX()-n.getX(),n.getRight()-o.getRight());if(o.getY()<=n.getY()&&o.getBottom()>=n.getBottom())a[1]+=Math.min(n.getY()-o.getY(),o.getBottom()-n.getBottom());else if(n.getY()<=o.getY()&&n.getBottom()>=o.getBottom())a[1]+=Math.min(o.getY()-n.getY(),n.getBottom()-o.getBottom());var v=Math.abs((n.getCenterY()-o.getCenterY())/(n.getCenterX()-o.getCenterX()));if(n.getCenterY()===o.getCenterY()&&n.getCenterX()===o.getCenterX())v=1;var i=v*a[0],e=a[1]/v;if(a[0]<e)e=a[0];else i=a[1];a[0]=-1*r[0]*(e/2+g),a[1]=-1*r[1]*(i/2+g)},h.decideDirectionsForOverlappingNodes=function(o,n,a){if(o.getCenterX()<n.getCenterX())a[0]=-1;else a[0]=1;if(o.getCenterY()<n.getCenterY())a[1]=-1;else a[1]=1},h.getIntersection2=function(o,n,a){var g=o.getCenterX(),r=o.getCenterY(),v=n.getCenterX(),i=n.getCenterY();if(o.intersects(n))return a[0]=g,a[1]=r,a[2]=v,a[3]=i,!0;var e=o.getX(),c=o.getY(),u=o.getRight(),f=o.getX(),x=o.getBottom(),E=o.getRight(),T=o.getWidthHalf(),D=o.getHeightHalf(),X=n.getX(),I=n.getY(),V=n.getRight(),_=n.getX(),Q=n.getBottom(),lt=n.getRight(),P=n.getWidthHalf(),tt=n.getHeightHalf(),s=!1,N=!1;if(g===v){if(r>i)return a[0]=g,a[1]=c,a[2]=v,a[3]=Q,!1;else if(r<i)return a[0]=g,a[1]=x,a[2]=v,a[3]=I,!1}else if(r===i){if(g>v)return a[0]=e,a[1]=r,a[2]=V,a[3]=i,!1;else if(g<v)return a[0]=u,a[1]=r,a[2]=X,a[3]=i,!1}else{var y=o.height/o.width,w=n.height/n.width,p=(i-r)/(v-g),U=void 0,F=void 0,k=void 0,B=void 0,W=void 0,st=void 0;if(-y===p)if(g>v)a[0]=f,a[1]=x,s=!0;else a[0]=u,a[1]=c,s=!0;else if(y===p)if(g>v)a[0]=e,a[1]=c,s=!0;else a[0]=E,a[1]=x,s=!0;if(-w===p)if(v>g)a[2]=_,a[3]=Q,N=!0;else a[2]=V,a[3]=I,N=!0;else if(w===p)if(v>g)a[2]=X,a[3]=I,N=!0;else a[2]=lt,a[3]=Q,N=!0;if(s&&N)return!1;if(g>v)if(r>i)U=this.getCardinalDirection(y,p,4),F=this.getCardinalDirection(w,p,2);else U=this.getCardinalDirection(-y,p,3),F=this.getCardinalDirection(-w,p,1);else if(r>i)U=this.getCardinalDirection(-y,p,1),F=this.getCardinalDirection(-w,p,3);else U=this.getCardinalDirection(y,p,2),F=this.getCardinalDirection(w,p,4);if(!s)switch(U){case 1:B=c,k=g+-D/p,a[0]=k,a[1]=B;break;case 2:k=E,B=r+T*p,a[0]=k,a[1]=B;break;case 3:B=x,k=g+D/p,a[0]=k,a[1]=B;break;case 4:k=f,B=r+-T*p,a[0]=k,a[1]=B;break}if(!N)switch(F){case 1:st=I,W=v+-tt/p,a[2]=W,a[3]=st;break;case 2:W=lt,st=i+P*p,a[2]=W,a[3]=st;break;case 3:st=Q,W=v+tt/p,a[2]=W,a[3]=st;break;case 4:W=_,st=i+-P*p,a[2]=W,a[3]=st;break}}return!1},h.getCardinalDirection=function(o,n,a){if(o>n)return a;else return 1+a%4},h.getIntersection=function(o,n,a,g){if(g==null)return this.getIntersection2(o,n,a);var{x:r,y:v}=o,{x:i,y:e}=n,{x:c,y:u}=a,{x:f,y:x}=g,E=void 0,T=void 0,D=void 0,X=void 0,I=void 0,V=void 0,_=void 0,Q=void 0,lt=void 0;if(D=e-v,I=r-i,_=i*v-r*e,X=x-u,V=c-f,Q=f*u-c*x,lt=D*V-X*I,lt===0)return null;return E=(I*Q-V*_)/lt,T=(X*_-D*Q)/lt,new d(E,T)},h.angleOfVector=function(o,n,a,g){var r=void 0;if(o!==a){if(r=Math.atan((g-n)/(a-o)),a<o)r+=Math.PI;else if(g<n)r+=this.TWO_PI}else if(g<n)r=this.ONE_AND_HALF_PI;else r=this.HALF_PI;return r},h.doIntersect=function(o,n,a,g){var{x:r,y:v}=o,{x:i,y:e}=n,{x:c,y:u}=a,{x:f,y:x}=g,E=(i-r)*(x-u)-(f-c)*(e-v);if(E===0)return!1;else{var T=((x-u)*(f-r)+(c-f)*(x-v))/E,D=((v-e)*(f-r)+(i-r)*(x-v))/E;return 0<T&&T<1&&0<D&&D<1}},h.findCircleLineIntersections=function(o,n,a,g,r,v,i){var e=(a-o)*(a-o)+(g-n)*(g-n),c=2*((o-r)*(a-o)+(n-v)*(g-n)),u=(o-r)*(o-r)+(n-v)*(n-v)-i*i,f=c*c-4*e*u;if(f>=0){var x=(-c+Math.sqrt(c*c-4*e*u))/(2*e),E=(-c-Math.sqrt(c*c-4*e*u))/(2*e),T=null;if(x>=0&&x<=1)return[x];if(E>=0&&E<=1)return[E];return T}else return null},h.HALF_PI=0.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,L.exports=h},function(L,R,A){function d(){}d.sign=function(h){if(h>0)return 1;else if(h<0)return-1;else return 0},d.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},d.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},L.exports=d},function(L,R,A){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,L.exports=d},function(L,R,A){var d=function(){function r(v,i){for(var e=0;e<i.length;e++){var c=i[e];if(c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c)c.writable=!0;Object.defineProperty(v,c.key,c)}}return function(v,i,e){if(i)r(v.prototype,i);if(e)r(v,e);return v}}();function h(r,v){if(!(r instanceof v))throw TypeError("Cannot call a class as a function")}var o=function(v){return{value:v,next:null,prev:null}},n=function(v,i,e,c){if(v!==null)v.next=i;else c.head=i;if(e!==null)e.prev=i;else c.tail=i;return i.prev=v,i.next=e,c.length++,i},a=function(v,i){var{prev:e,next:c}=v;if(e!==null)e.next=c;else i.head=c;if(c!==null)c.prev=e;else i.tail=e;return v.prev=v.next=null,i.length--,v},g=function(){function r(v){var i=this;if(h(this,r),this.length=0,this.head=null,this.tail=null,v!=null)v.forEach(function(e){return i.push(e)})}return d(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,e){return n(e.prev,o(i),e,this)}},{key:"insertAfter",value:function(i,e){return n(e,o(i),e.next,this)}},{key:"insertNodeBefore",value:function(i,e){return n(e.prev,i,e,this)}},{key:"insertNodeAfter",value:function(i,e){return n(e,i,e.next,this)}},{key:"push",value:function(i){return n(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return n(null,o(i),this.head,this)}},{key:"remove",value:function(i){return a(i,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){var e=1,c=this.head;while(e<i)c=c.next,e++;return c.value}}},{key:"set_object_at",value:function(i,e){if(i<=this.length()){var c=1,u=this.head;while(c<i)u=u.next,c++;u.value=e}}}]),r}();L.exports=g},function(L,R,A){function d(h,o,n){if(this.x=null,this.y=null,h==null&&o==null&&n==null)this.x=0,this.y=0;else if(typeof h=="number"&&typeof o=="number"&&n==null)this.x=h,this.y=o;else if(h.constructor.name=="Point"&&o==null&&n==null)n=h,this.x=n.x,this.y=n.y}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(h,o,n){if(h.constructor.name=="Point"&&o==null&&n==null)n=h,this.setLocation(n.x,n.y);else if(typeof h=="number"&&typeof o=="number"&&n==null)if(parseInt(h)==h&&parseInt(o)==o)this.move(h,o);else this.x=Math.floor(h+0.5),this.y=Math.floor(o+0.5)},d.prototype.move=function(h,o){this.x=h,this.y=o},d.prototype.translate=function(h,o){this.x+=h,this.y+=o},d.prototype.equals=function(h){if(h.constructor.name=="Point"){var o=h;return this.x==o.x&&this.y==o.y}return this==h},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=d},function(L,R,A){function d(h,o,n,a){if(this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&o!=null&&n!=null&&a!=null)this.x=h,this.y=o,this.width=n,this.height=a}d.prototype.getX=function(){return this.x},d.prototype.setX=function(h){this.x=h},d.prototype.getY=function(){return this.y},d.prototype.setY=function(h){this.y=h},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(h){if(this.getRight()<h.x)return!1;if(this.getBottom()<h.y)return!1;if(h.getRight()<this.x)return!1;if(h.getBottom()<this.y)return!1;return!0},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},L.exports=d},function(L,R,A){var d=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol==="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function h(){}h.lastID=0,h.createID=function(o){if(h.isPrimitive(o))return o;if(o.uniqueID!=null)return o.uniqueID;return o.uniqueID=h.getString(),h.lastID++,o.uniqueID},h.getString=function(o){if(o==null)o=h.lastID;return"Object#"+o},h.isPrimitive=function(o){var n=typeof o>"u"?"undefined":d(o);return o==null||n!="object"&&n!="function"},L.exports=h},function(L,R,A){function d(c){if(Array.isArray(c)){for(var u=0,f=Array(c.length);u<c.length;u++)f[u]=c[u];return f}else return Array.from(c)}var h=A(0),o=A(7),n=A(3),a=A(1),g=A(6),r=A(5),v=A(17),i=A(29);function e(c){if(i.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null)this.isRemoteUse=c}e.RANDOM_SEED=1,e.prototype=Object.create(i.prototype),e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},e.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},e.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},e.prototype.newGraphManager=function(){var c=new o(this);return this.graphManager=c,c},e.prototype.newGraph=function(c){return new g(null,this.graphManager,c)},e.prototype.newNode=function(c){return new n(this.graphManager,c)},e.prototype.newEdge=function(c){return new a(null,null,c)},e.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},e.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var c;if(this.checkLayoutSuccess())c=!1;else c=this.layout();if(h.ANIMATE==="during")return!1;if(c){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,c},e.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},e.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var c,u=this.graphManager.getAllEdges();for(var f=0;f<u.length;f++)c=u[f];var x,E=this.graphManager.getRoot().getNodes();for(var f=0;f<E.length;f++)x=E[f];this.update(this.graphManager.getRoot())}},e.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof n){var u=c;if(u.getChild()!=null){var f=u.getChild().getNodes();for(var x=0;x<f.length;x++)update(f[x])}if(u.vGraphObject!=null){var E=u.vGraphObject;E.update(u)}}else if(c instanceof a){var T=c;if(T.vGraphObject!=null){var D=T.vGraphObject;D.update(T)}}else if(c instanceof g){var X=c;if(X.vGraphObject!=null){var I=X.vGraphObject;I.update(X)}}},e.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},e.prototype.transform=function(c){if(c==null)this.transform(new r(0,0));else{var u=new v,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){u.setWorldOrgX(c.x),u.setWorldOrgY(c.y),u.setDeviceOrgX(f.x),u.setDeviceOrgY(f.y);var x=this.getAllNodes(),E;for(var T=0;T<x.length;T++)E=x[T],E.transform(u)}}},e.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var u,f,x=c.getNodes();for(var E=0;E<x.length;E++)if(u=x[E],f=u.getChild(),f==null)u.scatter();else if(f.getNodes().length==0)u.scatter();else this.positionNodesRandomly(f),u.updateBounds()}},e.prototype.getFlatForest=function(){var c=[],u=!0,f=this.graphManager.getRoot().getNodes(),x=!0;for(var E=0;E<f.length;E++)if(f[E].getChild()!=null)x=!1;if(!x)return c;var T=new Set,D=[],X=new Map,I=[];I=I.concat(f);while(I.length>0&&u){D.push(I[0]);while(D.length>0&&u){var V=D[0];D.splice(0,1),T.add(V);var _=V.getEdges();for(var E=0;E<_.length;E++){var Q=_[E].getOtherEnd(V);if(X.get(V)!=Q)if(!T.has(Q))D.push(Q),X.set(Q,V);else{u=!1;break}}}if(!u)c=[];else{var lt=[].concat(d(T));c.push(lt);for(var E=0;E<lt.length;E++){var P=lt[E],tt=I.indexOf(P);if(tt>-1)I.splice(tt,1)}T=new Set,X=new Map}}return c},e.prototype.createDummyNodesForBendpoints=function(c){var u=[],f=c.source,x=this.graphManager.calcLowestCommonAncestor(c.source,c.target);for(var E=0;E<c.bendpoints.length;E++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),x.add(T);var D=this.newEdge(null);this.graphManager.add(D,f,T),u.add(T),f=T}var D=this.newEdge(null);if(this.graphManager.add(D,f,c.target),this.edgeToDummyNodes.set(c,u),c.isInterGraph())this.graphManager.remove(c);else x.remove(c);return u},e.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(d(this.edgeToDummyNodes.keys())).concat(c);for(var u=0;u<c.length;u++){var f=c[u];if(f.bendpoints.length>0){var x=this.edgeToDummyNodes.get(f);for(var E=0;E<x.length;E++){var T=x[E],D=new r(T.getCenterX(),T.getCenterY()),X=f.bendpoints.get(E);X.x=D.x,X.y=D.y,T.getOwner().remove(T)}this.graphManager.add(f,f.source,f.target)}}},e.transform=function(c,u,f,x){if(f!=null&&x!=null){var E=u;if(c<=50){var T=u/f;E-=(u-T)/50*(50-c)}else{var D=u*x;E+=(D-u)/50*(c-50)}return E}else{var X,I;if(c<=50)X=9*u/500,I=u/10;else X=9*u/50,I=-8*u;return X*c+I}},e.findCenterOfTree=function(c){var u=[];u=u.concat(c);var f=[],x=new Map,E=!1,T=null;if(u.length==1||u.length==2)E=!0,T=u[0];for(var D=0;D<u.length;D++){var X=u[D],I=X.getNeighborsList().size;if(x.set(X,X.getNeighborsList().size),I==1)f.push(X)}var V=[];V=V.concat(f);while(!E){var _=[];_=_.concat(V),V=[];for(var D=0;D<u.length;D++){var X=u[D],Q=u.indexOf(X);if(Q>=0)u.splice(Q,1);var lt=X.getNeighborsList();lt.forEach(function(s){if(f.indexOf(s)<0){var N=x.get(s),y=N-1;if(y==1)V.push(s);x.set(s,y)}})}if(f=f.concat(V),u.length==1||u.length==2)E=!0,T=u[0]}return T},e.prototype.setGraphManager=function(c){this.graphManager=c},L.exports=e},function(L,R,A){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},L.exports=d},function(L,R,A){var d=A(5);function h(o,n){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(o){this.lworldExtX=o},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(o){this.lworldExtY=o},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},h.prototype.transformX=function(o){var n=0,a=this.lworldExtX;if(a!=0)n=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/a;return n},h.prototype.transformY=function(o){var n=0,a=this.lworldExtY;if(a!=0)n=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/a;return n},h.prototype.inverseTransformX=function(o){var n=0,a=this.ldeviceExtX;if(a!=0)n=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/a;return n},h.prototype.inverseTransformY=function(o){var n=0,a=this.ldeviceExtY;if(a!=0)n=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/a;return n},h.prototype.inverseTransformPoint=function(o){var n=new d(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return n},L.exports=h},function(L,R,A){function d(i){if(Array.isArray(i)){for(var e=0,c=Array(i.length);e<i.length;e++)c[e]=i[e];return c}else return Array.from(i)}var h=A(15),o=A(4),n=A(0),a=A(8),g=A(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var v in h)r[v]=h[v];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){var i,e,c,u,f,x,E,T=this.getGraphManager().getAllEdges();for(var D=0;D<T.length;D++)if(i=T[D],e=i.idealLength,i.isInterGraph){if(u=i.getSource(),f=i.getTarget(),x=i.getSourceInLca().getEstimatedSize(),E=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)i.idealLength+=x+E-2*n.SIMPLE_NODE_SIZE;c=i.getLca().getInclusionTreeDepth(),i.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*c)}},r.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;if(this.incremental){if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(i-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){var i=this.getAllEdges(),e;for(var c=0;c<i.length;c++)e=i[c],this.calcSpringForce(e,e.idealLength)},r.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c,u,f,x,E=this.getAllNodes(),T;if(this.useFRGridVariant){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i)this.updateGrid();T=new Set;for(c=0;c<E.length;c++)f=E[c],this.calculateRepulsionForceOfANode(f,T,i,e),T.add(f)}else for(c=0;c<E.length;c++){f=E[c];for(u=c+1;u<E.length;u++){if(x=E[u],f.getOwner()!=x.getOwner())continue;this.calcRepulsionForce(f,x)}}},r.prototype.calcGravitationalForces=function(){var i,e=this.getAllNodesToApplyGravitation();for(var c=0;c<e.length;c++)i=e[c],this.calcGravitationalForce(i)},r.prototype.moveNodes=function(){var i=this.getAllNodes(),e;for(var c=0;c<i.length;c++)e=i[c],e.move()},r.prototype.calcSpringForce=function(i,e){var c=i.getSource(),u=i.getTarget(),f,x,E,T;if(this.uniformLeafNodeSizes&&c.getChild()==null&&u.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;if(f=i.getLength(),f==0)return;x=i.edgeElasticity*(f-e),E=x*(i.lengthX/f),T=x*(i.lengthY/f),c.springForceX+=E,c.springForceY+=T,u.springForceX-=E,u.springForceY-=T},r.prototype.calcRepulsionForce=function(i,e){var c=i.getRect(),u=e.getRect(),f=[,,],x=[,,,,],E,T,D,X,I,V,_;if(c.intersects(u)){a.calcSeparationAmount(c,u,f,o.DEFAULT_EDGE_LENGTH/2),V=2*f[0],_=2*f[1];var Q=i.noOfChildren*e.noOfChildren/(i.noOfChildren+e.noOfChildren);i.repulsionForceX-=Q*V,i.repulsionForceY-=Q*_,e.repulsionForceX+=Q*V,e.repulsionForceY+=Q*_}else{if(this.uniformLeafNodeSizes&&i.getChild()==null&&e.getChild()==null)E=u.getCenterX()-c.getCenterX(),T=u.getCenterY()-c.getCenterY();else a.getIntersection(c,u,x),E=x[2]-x[0],T=x[3]-x[1];if(Math.abs(E)<o.MIN_REPULSION_DIST)E=g.sign(E)*o.MIN_REPULSION_DIST;if(Math.abs(T)<o.MIN_REPULSION_DIST)T=g.sign(T)*o.MIN_REPULSION_DIST;D=E*E+T*T,X=Math.sqrt(D),I=(i.nodeRepulsion/2+e.nodeRepulsion/2)*i.noOfChildren*e.noOfChildren/D,V=I*E/X,_=I*T/X,i.repulsionForceX-=V,i.repulsionForceY-=_,e.repulsionForceX+=V,e.repulsionForceY+=_}},r.prototype.calcGravitationalForce=function(i){var e,c,u,f,x,E,T,D;if(e=i.getOwner(),c=(e.getRight()+e.getLeft())/2,u=(e.getTop()+e.getBottom())/2,f=i.getCenterX()-c,x=i.getCenterY()-u,E=Math.abs(f)+i.getWidth()/2,T=Math.abs(x)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()){if(D=e.getEstimatedSize()*this.gravityRangeFactor,E>D||T>D)i.gravitationForceX=-this.gravityConstant*f,i.gravitationForceY=-this.gravityConstant*x}else if(D=e.getEstimatedSize()*this.compoundGravityRangeFactor,E>D||T>D)i.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*x*this.compoundGravityConstant},r.prototype.isConverged=function(){var i,e=!1;if(this.totalIterations>this.maxIterations/3)e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||e},r.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},r.prototype.calcNoOfChildrenForAllNodes=function(){var i,e=this.graphManager.getAllNodes();for(var c=0;c<e.length;c++)i=e[c],i.noOfChildren=i.getNoOfChildren()},r.prototype.calcGrid=function(i){var e=0,c=0;e=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),c=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));var u=Array(e);for(var f=0;f<e;f++)u[f]=Array(c);for(var f=0;f<e;f++)for(var x=0;x<c;x++)u[f][x]=[];return u},r.prototype.addNodeToGrid=function(i,e,c){var u=0,f=0,x=0,E=0;u=parseInt(Math.floor((i.getRect().x-e)/this.repulsionRange)),f=parseInt(Math.floor((i.getRect().width+i.getRect().x-e)/this.repulsionRange)),x=parseInt(Math.floor((i.getRect().y-c)/this.repulsionRange)),E=parseInt(Math.floor((i.getRect().height+i.getRect().y-c)/this.repulsionRange));for(var T=u;T<=f;T++)for(var D=x;D<=E;D++)this.grid[T][D].push(i),i.setGridCoordinates(u,f,x,E)},r.prototype.updateGrid=function(){var i,e,c=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(i=0;i<c.length;i++)e=c[i],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(i,e,c,u){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&c||u){var f=new Set;i.surrounding=[];var x,E=this.grid;for(var T=i.startX-1;T<i.finishX+2;T++)for(var D=i.startY-1;D<i.finishY+2;D++)if(!(T<0||D<0||T>=E.length||D>=E[0].length))for(var X=0;X<E[T][D].length;X++){if(x=E[T][D][X],i.getOwner()!=x.getOwner()||i==x)continue;if(!e.has(x)&&!f.has(x)){var I=Math.abs(i.getCenterX()-x.getCenterX())-(i.getWidth()/2+x.getWidth()/2),V=Math.abs(i.getCenterY()-x.getCenterY())-(i.getHeight()/2+x.getHeight()/2);if(I<=this.repulsionRange&&V<=this.repulsionRange)f.add(x)}}i.surrounding=[].concat(d(f))}for(T=0;T<i.surrounding.length;T++)this.calcRepulsionForce(i,i.surrounding[T])},r.prototype.calcRepulsionRange=function(){return 0},L.exports=r},function(L,R,A){var d=A(1),h=A(4);function o(a,g,r){d.call(this,a,g,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(d.prototype);for(var n in d)o[n]=d[n];L.exports=o},function(L,R,A){var d=A(3),h=A(4);function o(a,g,r,v){d.call(this,a,g,r,v),this.nodeRepulsion=h.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=[]}o.prototype=Object.create(d.prototype);for(var n in d)o[n]=d[n];o.prototype.setGridCoordinates=function(a,g,r,v){this.startX=a,this.finishX=g,this.startY=r,this.finishY=v},L.exports=o},function(L,R,A){function d(h,o){if(this.width=0,this.height=0,h!==null&&o!==null)this.height=o,this.width=h}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},L.exports=d},function(L,R,A){var d=A(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(o,n){var a=d.createID(o);if(!this.contains(a))this.map[a]=n,this.keys.push(o)},h.prototype.contains=function(o){var n=d.createID(o);return this.map[o]!=null},h.prototype.get=function(o){var n=d.createID(o);return this.map[n]},h.prototype.keySet=function(){return this.keys},L.exports=h},function(L,R,A){var d=A(14);function h(){this.set={}}h.prototype.add=function(o){var n=d.createID(o);if(!this.contains(n))this.set[n]=o},h.prototype.remove=function(o){delete this.set[d.createID(o)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(o){return this.set[d.createID(o)]==o},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(o){var n=Object.keys(this.set),a=n.length;for(var g=0;g<a;g++)o.push(this.set[n[g]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(o){var n=o.length;for(var a=0;a<n;a++){var g=o[a];this.add(g)}},L.exports=h},function(L,R,A){function d(){}d.multMat=function(h,o){var n=[];for(var a=0;a<h.length;a++){n[a]=[];for(var g=0;g<o[0].length;g++){n[a][g]=0;for(var r=0;r<h[0].length;r++)n[a][g]+=h[a][r]*o[r][g]}}return n},d.transpose=function(h){var o=[];for(var n=0;n<h[0].length;n++){o[n]=[];for(var a=0;a<h.length;a++)o[n][a]=h[a][n]}return o},d.multCons=function(h,o){var n=[];for(var a=0;a<h.length;a++)n[a]=h[a]*o;return n},d.minusOp=function(h,o){var n=[];for(var a=0;a<h.length;a++)n[a]=h[a]-o[a];return n},d.dotProduct=function(h,o){var n=0;for(var a=0;a<h.length;a++)n+=h[a]*o[a];return n},d.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},d.normalize=function(h){var o=[],n=this.mag(h);for(var a=0;a<h.length;a++)o[a]=h[a]/n;return o},d.multGamma=function(h){var o=[],n=0;for(var a=0;a<h.length;a++)n+=h[a];n*=-1/h.length;for(var g=0;g<h.length;g++)o[g]=n+h[g];return o},d.multL=function(h,o,n){var a=[],g=[],r=[];for(var v=0;v<o[0].length;v++){var i=0;for(var e=0;e<o.length;e++)i+=-0.5*o[e][v]*h[e];g[v]=i}for(var c=0;c<n.length;c++){var u=0;for(var f=0;f<n.length;f++)u+=n[c][f]*g[f];r[c]=u}for(var x=0;x<o.length;x++){var E=0;for(var T=0;T<o[0].length;T++)E+=o[x][T]*r[T];a[x]=E}return a},L.exports=d},function(L,R,A){var d=function(){function a(g,r){for(var v=0;v<r.length;v++){var i=r[v];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(g,i.key,i)}}return function(g,r,v){if(r)a(g.prototype,r);if(v)a(g,v);return g}}();function h(a,g){if(!(a instanceof g))throw TypeError("Cannot call a class as a function")}var o=A(11),n=function(){function a(g,r){if(h(this,a),r!==null||r!==void 0)this.compareFunction=this._defaultCompareFunction;var v=void 0;if(g instanceof o)v=g.size();else v=g.length;this._quicksort(g,0,v-1)}return d(a,[{key:"_quicksort",value:function(r,v,i){if(v<i){var e=this._partition(r,v,i);this._quicksort(r,v,e),this._quicksort(r,e+1,i)}}},{key:"_partition",value:function(r,v,i){var e=this._get(r,v),c=v,u=i;while(!0){while(this.compareFunction(e,this._get(r,u)))u--;while(this.compareFunction(this._get(r,c),e))c++;if(c<u)this._swap(r,c,u),c++,u--;else return u}}},{key:"_get",value:function(r,v){if(r instanceof o)return r.get_object_at(v);else return r[v]}},{key:"_set",value:function(r,v,i){if(r instanceof o)r.set_object_at(v,i);else r[v]=i}},{key:"_swap",value:function(r,v,i){var e=this._get(r,v);this._set(r,v,this._get(r,i)),this._set(r,i,e)}},{key:"_defaultCompareFunction",value:function(r,v){return v>r}}]),a}();L.exports=n},function(L,R,A){function d(){}d.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var o=Math.min(this.m,this.n);this.s=function(Wt){var bt=[];while(Wt-- >0)bt.push(0);return bt}(Math.min(this.m+1,this.n)),this.U=function(Wt){var bt=function ae($t){if($t.length==0)return 0;else{var jt=[];for(var ie=0;ie<$t[0];ie++)jt.push(ae($t.slice(1)));return jt}};return bt(Wt)}([this.m,o]),this.V=function(Wt){var bt=function ae($t){if($t.length==0)return 0;else{var jt=[];for(var ie=0;ie<$t[0];ie++)jt.push(ae($t.slice(1)));return jt}};return bt(Wt)}([this.n,this.n]);var n=function(Wt){var bt=[];while(Wt-- >0)bt.push(0);return bt}(this.n),a=function(Wt){var bt=[];while(Wt-- >0)bt.push(0);return bt}(this.m),g=!0,r=!0,v=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m));for(var e=0;e<Math.max(v,i);e++){if(e<v){this.s[e]=0;for(var c=e;c<this.m;c++)this.s[e]=d.hypot(this.s[e],h[c][e]);if(this.s[e]!==0){if(h[e][e]<0)this.s[e]=-this.s[e];for(var u=e;u<this.m;u++)h[u][e]/=this.s[e];h[e][e]+=1}this.s[e]=-this.s[e]}for(var f=e+1;f<this.n;f++){if(function(Wt,bt){return Wt&&bt}(e<v,this.s[e]!==0)){var x=0;for(var E=e;E<this.m;E++)x+=h[E][e]*h[E][f];x=-x/h[e][e];for(var T=e;T<this.m;T++)h[T][f]+=x*h[T][e]}n[f]=h[e][f]}if(function(Wt,bt){return Wt&&bt}(g,e<v))for(var D=e;D<this.m;D++)this.U[D][e]=h[D][e];if(e<i){n[e]=0;for(var X=e+1;X<this.n;X++)n[e]=d.hypot(n[e],n[X]);if(n[e]!==0){if(n[e+1]<0)n[e]=-n[e];for(var I=e+1;I<this.n;I++)n[I]/=n[e];n[e+1]+=1}if(n[e]=-n[e],function(Wt,bt){return Wt&&bt}(e+1<this.m,n[e]!==0)){for(var V=e+1;V<this.m;V++)a[V]=0;for(var _=e+1;_<this.n;_++)for(var Q=e+1;Q<this.m;Q++)a[Q]+=n[_]*h[Q][_];for(var lt=e+1;lt<this.n;lt++){var P=-n[lt]/n[e+1];for(var tt=e+1;tt<this.m;tt++)h[tt][lt]+=P*a[tt]}}if(r)for(var s=e+1;s<this.n;s++)this.V[s][e]=n[s]}}var N=Math.min(this.n,this.m+1);if(v<this.n)this.s[v]=h[v][v];if(this.m<N)this.s[N-1]=0;if(i+1<N)n[i]=h[i][N-1];if(n[N-1]=0,g){for(var y=v;y<o;y++){for(var w=0;w<this.m;w++)this.U[w][y]=0;this.U[y][y]=1}for(var p=v-1;p>=0;p--)if(this.s[p]!==0){for(var U=p+1;U<o;U++){var F=0;for(var k=p;k<this.m;k++)F+=this.U[k][p]*this.U[k][U];F=-F/this.U[p][p];for(var B=p;B<this.m;B++)this.U[B][U]+=F*this.U[B][p]}for(var W=p;W<this.m;W++)this.U[W][p]=-this.U[W][p];this.U[p][p]=1+this.U[p][p];for(var st=0;st<p-1;st++)this.U[st][p]=0}else{for(var dt=0;dt<this.m;dt++)this.U[dt][p]=0;this.U[p][p]=1}}if(r)for(var Z=this.n-1;Z>=0;Z--){if(function(Wt,bt){return Wt&&bt}(Z<i,n[Z]!==0))for(var ut=Z+1;ut<o;ut++){var nt=0;for(var S=Z+1;S<this.n;S++)nt+=this.V[S][Z]*this.V[S][ut];nt=-nt/this.V[Z+1][Z];for(var K=Z+1;K<this.n;K++)this.V[K][ut]+=nt*this.V[K][Z]}for(var et=0;et<this.n;et++)this.V[et][Z]=0;this.V[Z][Z]=1}var ct=N-1,Nt=0,Pt=Math.pow(2,-52),Bt=Math.pow(2,-966);while(N>0){var ft=void 0,Jt=void 0;for(ft=N-2;ft>=-1;ft--){if(ft===-1)break;if(Math.abs(n[ft])<=Bt+Pt*(Math.abs(this.s[ft])+Math.abs(this.s[ft+1]))){n[ft]=0;break}}if(ft===N-2)Jt=4;else{var Xt=void 0;for(Xt=N-1;Xt>=ft;Xt--){if(Xt===ft)break;var Et=(Xt!==N?Math.abs(n[Xt]):0)+(Xt!==ft+1?Math.abs(n[Xt-1]):0);if(Math.abs(this.s[Xt])<=Bt+Pt*Et){this.s[Xt]=0;break}}if(Xt===ft)Jt=3;else if(Xt===N-1)Jt=1;else Jt=2,ft=Xt}switch(ft++,Jt){case 1:{var vt=n[N-2];n[N-2]=0;for(var xt=N-2;xt>=ft;xt--){var Rt=d.hypot(this.s[xt],vt),Gt=this.s[xt]/Rt,St=vt/Rt;if(this.s[xt]=Rt,xt!==ft)vt=-St*n[xt-1],n[xt-1]=Gt*n[xt-1];if(r)for(var Ft=0;Ft<this.n;Ft++)Rt=Gt*this.V[Ft][xt]+St*this.V[Ft][N-1],this.V[Ft][N-1]=-St*this.V[Ft][xt]+Gt*this.V[Ft][N-1],this.V[Ft][xt]=Rt}}break;case 2:{var Ht=n[ft-1];n[ft-1]=0;for(var zt=ft;zt<N;zt++){var ee=d.hypot(this.s[zt],Ht),qt=this.s[zt]/ee,Kt=Ht/ee;if(this.s[zt]=ee,Ht=-Kt*n[zt],n[zt]=qt*n[zt],g)for(var kt=0;kt<this.m;kt++)ee=qt*this.U[kt][zt]+Kt*this.U[kt][ft-1],this.U[kt][ft-1]=-Kt*this.U[kt][zt]+qt*this.U[kt][ft-1],this.U[kt][zt]=ee}}break;case 3:{var J=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[N-1]),Math.abs(this.s[N-2])),Math.abs(n[N-2])),Math.abs(this.s[ft])),Math.abs(n[ft])),rt=this.s[N-1]/J,it=this.s[N-2]/J,at=n[N-2]/J,ot=this.s[ft]/J,gt=n[ft]/J,At=((it+rt)*(it-rt)+at*at)/2,Mt=rt*at*(rt*at),ht=0;if(function(Wt,bt){return Wt||bt}(At!==0,Mt!==0)){if(ht=Math.sqrt(At*At+Mt),At<0)ht=-ht;ht=Mt/(At+ht)}var Lt=(ot+rt)*(ot-rt)+ht,Ct=ot*gt;for(var pt=ft;pt<N-1;pt++){var Ot=d.hypot(Lt,Ct),Ut=Lt/Ot,Tt=Ct/Ot;if(pt!==ft)n[pt-1]=Ot;if(Lt=Ut*this.s[pt]+Tt*n[pt],n[pt]=Ut*n[pt]-Tt*this.s[pt],Ct=Tt*this.s[pt+1],this.s[pt+1]=Ut*this.s[pt+1],r)for(var yt=0;yt<this.n;yt++)Ot=Ut*this.V[yt][pt]+Tt*this.V[yt][pt+1],this.V[yt][pt+1]=-Tt*this.V[yt][pt]+Ut*this.V[yt][pt+1],this.V[yt][pt]=Ot;if(Ot=d.hypot(Lt,Ct),Ut=Lt/Ot,Tt=Ct/Ot,this.s[pt]=Ot,Lt=Ut*n[pt]+Tt*this.s[pt+1],this.s[pt+1]=-Tt*n[pt]+Ut*this.s[pt+1],Ct=Tt*n[pt+1],n[pt+1]=Ut*n[pt+1],g&&pt<this.m-1)for(var Dt=0;Dt<this.m;Dt++)Ot=Ut*this.U[Dt][pt]+Tt*this.U[Dt][pt+1],this.U[Dt][pt+1]=-Tt*this.U[Dt][pt]+Ut*this.U[Dt][pt+1],this.U[Dt][pt]=Ot}n[N-2]=Lt,Nt=Nt+1}break;case 4:{if(this.s[ft]<=0){if(this.s[ft]=this.s[ft]<0?-this.s[ft]:0,r)for(var mt=0;mt<=ct;mt++)this.V[mt][ft]=-this.V[mt][ft]}while(ft<ct){if(this.s[ft]>=this.s[ft+1])break;var wt=this.s[ft];if(this.s[ft]=this.s[ft+1],this.s[ft+1]=wt,r&&ft<this.n-1)for(var Zt=0;Zt<this.n;Zt++)wt=this.V[Zt][ft+1],this.V[Zt][ft+1]=this.V[Zt][ft],this.V[Zt][ft]=wt;if(g&&ft<this.m-1)for(var Vt=0;Vt<this.m;Vt++)wt=this.U[Vt][ft+1],this.U[Vt][ft+1]=this.U[Vt][ft],this.U[Vt][ft]=wt;ft++}Nt=0,N--}break}}var re={U:this.U,V:this.V,S:this.s};return re},d.hypot=function(h,o){var n=void 0;if(Math.abs(h)>Math.abs(o))n=o/h,n=Math.abs(h)*Math.sqrt(1+n*n);else if(o!=0)n=h/o,n=Math.abs(o)*Math.sqrt(1+n*n);else n=0;return n},L.exports=d},function(L,R,A){var d=function(){function n(a,g){for(var r=0;r<g.length;r++){var v=g[r];if(v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v)v.writable=!0;Object.defineProperty(a,v.key,v)}}return function(a,g,r){if(g)n(a.prototype,g);if(r)n(a,r);return a}}();function h(n,a){if(!(n instanceof a))throw TypeError("Cannot call a class as a function")}var o=function(){function n(a,g){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,n),this.sequence1=a,this.sequence2=g,this.match_score=r,this.mismatch_penalty=v,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=g.length+1,this.grid=Array(this.iMax);for(var e=0;e<this.iMax;e++){this.grid[e]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[e][c]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var f=0;f<this.jMax;f++)this.tracebackGrid[u][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var i=1;i<this.jMax;i++){var e=void 0;if(this.sequence1[v-1]===this.sequence2[i-1])e=this.grid[v-1][i-1]+this.match_score;else e=this.grid[v-1][i-1]+this.mismatch_penalty;var c=this.grid[v-1][i]+this.gap_penalty,u=this.grid[v][i-1]+this.gap_penalty,f=[e,c,u],x=this.arrayAllMaxIndexes(f);this.grid[v][i]=f[x[0]],this.tracebackGrid[v][i]=[x.includes(0),x.includes(1),x.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(g[0]){var r=g[0],v=this.tracebackGrid[r.pos[0]][r.pos[1]];if(v[0])g.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(v[1])g.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2});if(v[2])g.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(r.pos[0]===0&&r.pos[1]===0)this.alignments.push({sequence1:r.seq1,sequence2:r.seq2});g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,r){var v=[],i=-1;while((i=g.indexOf(r,i+1))!==-1)v.push(i);return v}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),n}();L.exports=o},function(L,R,A){var d=function(){return};d.FDLayout=A(18),d.FDLayoutConstants=A(4),d.FDLayoutEdge=A(19),d.FDLayoutNode=A(20),d.DimensionD=A(21),d.HashMap=A(22),d.HashSet=A(23),d.IGeometry=A(8),d.IMath=A(9),d.Integer=A(10),d.Point=A(12),d.PointD=A(5),d.RandomSeed=A(16),d.RectangleD=A(13),d.Transform=A(17),d.UniqueIDGeneretor=A(14),d.Quicksort=A(25),d.LinkedList=A(11),d.LGraphObject=A(2),d.LGraph=A(6),d.LEdge=A(1),d.LGraphManager=A(7),d.LNode=A(3),d.Layout=A(15),d.LayoutConstants=A(0),d.NeedlemanWunsch=A(27),d.Matrix=A(24),d.SVD=A(26),L.exports=d},function(L,R,A){function d(){this.listeners=[]}var h=d.prototype;h.addListener=function(o,n){this.listeners.push({event:o,callback:n})},h.removeListener=function(o,n){for(var a=this.listeners.length;a>=0;a--){var g=this.listeners[a];if(g.event===o&&g.callback===n)this.listeners.splice(a,1)}},h.emit=function(o,n){for(var a=0;a<this.listeners.length;a++){var g=this.listeners[a];if(o===g.event)g.callback(n)}},L.exports=d}])})});var Fe=$n(function(me,Se){(function(R,A){if(typeof me==="object"&&typeof Se==="object")Se.exports=A(Re());else if(typeof define==="function"&&define.amd)define(["layout-base"],A);else if(typeof me==="object")me.coseBase=A(Re());else R.coseBase=A(R.layoutBase)})(me,function(L){return(()=>{var R={45:(o,n,a)=>{var g={};g.layoutBase=a(551),g.CoSEConstants=a(806),g.CoSEEdge=a(767),g.CoSEGraph=a(880),g.CoSEGraphManager=a(578),g.CoSELayout=a(765),g.CoSENode=a(991),g.ConstraintHandler=a(902),o.exports=g},806:(o,n,a)=>{var g=a(551).FDLayoutConstants;function r(){}for(var v in g)r[v]=g[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,o.exports=r},767:(o,n,a)=>{var g=a(551).FDLayoutEdge;function r(i,e,c){g.call(this,i,e,c)}r.prototype=Object.create(g.prototype);for(var v in g)r[v]=g[v];o.exports=r},880:(o,n,a)=>{var g=a(551).LGraph;function r(i,e,c){g.call(this,i,e,c)}r.prototype=Object.create(g.prototype);for(var v in g)r[v]=g[v];o.exports=r},578:(o,n,a)=>{var g=a(551).LGraphManager;function r(i){g.call(this,i)}r.prototype=Object.create(g.prototype);for(var v in g)r[v]=g[v];o.exports=r},765:(o,n,a)=>{var g=a(551).FDLayout,r=a(578),v=a(880),i=a(991),e=a(767),c=a(806),u=a(902),f=a(551).FDLayoutConstants,x=a(551).LayoutConstants,E=a(551).Point,T=a(551).PointD,D=a(551).DimensionD,X=a(551).Layout,I=a(551).Integer,V=a(551).IGeometry,_=a(551).LGraph,Q=a(551).Transform,lt=a(551).LinkedList;function P(){g.call(this),this.toBeTiled={},this.constraints={}}P.prototype=Object.create(g.prototype);for(var tt in g)P[tt]=g[tt];P.prototype.newGraphManager=function(){var s=new r(this);return this.graphManager=s,s},P.prototype.newGraph=function(s){return new v(null,this.graphManager,s)},P.prototype.newNode=function(s){return new i(this.graphManager,s)},P.prototype.newEdge=function(s){return new e(null,null,s)},P.prototype.initParameters=function(){if(g.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(c.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1}},P.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=0.04,this.coolingAdjuster=1},P.prototype.layout=function(){var s=x.DEFAULT_CREATE_BENDS_AS_NEEDED;if(s)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},P.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),y=this.nodesWithGravity.filter(function(w){return N.has(w)});this.graphManager.setAllNodesToApplyGravitation(y),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),y=this.nodesWithGravity.filter(function(U){return N.has(U)});this.graphManager.setAllNodesToApplyGravitation(y)}if(Object.keys(this.constraints).length>0)u.handleConstraints(this),this.initConstraintVariables();if(this.initSpringEmbedder(),c.APPLY_LAYOUT)this.runSpringEmbedder();return!0},P.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(this.layoutQuality==1)this.coolingAdjuster=this.coolingCycle/3;this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(p){return s.has(p)});if(this.graphManager.setAllNodesToApplyGravitation(N),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2;else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();if(c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100);else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var y=!this.isTreeGrowing&&!this.isGrowthFinished,w=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(y,w),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},P.prototype.getPositionsData=function(){var s=this.graphManager.getAllNodes(),N={};for(var y=0;y<s.length;y++){var w=s[y].rect,p=s[y].id;N[p]={id:p,x:w.getCenterX(),y:w.getCenterY(),w:w.width,h:w.height}}return N},P.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{while(!s)s=this.tick();this.graphManager.updateBounds()}},P.prototype.moveNodes=function(){var s=this.getAllNodes(),N;for(var y=0;y<s.length;y++)N=s[y],N.calculateDisplacement();if(Object.keys(this.constraints).length>0)this.updateDisplacements();for(var y=0;y<s.length;y++)N=s[y],N.move()},P.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;var N=this.graphManager.getAllNodes();for(var y=0;y<N.length;y++){var w=N[y];this.idToNodeMap.set(w.id,w)}var p=function S(K){var et=K.getChild().getNodes(),ct,Nt=0;for(var Pt=0;Pt<et.length;Pt++)if(ct=et[Pt],ct.getChild()==null){if(s.fixedNodeSet.has(ct.id))Nt+=100}else Nt+=S(ct);return Nt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(et){s.fixedNodeSet.add(et.nodeId)});var N=this.graphManager.getAllNodes(),w;for(var y=0;y<N.length;y++)if(w=N[y],w.getChild()!=null){var U=p(w);if(U>0)w.fixedNodeWeight=U}}if(this.constraints.relativePlacementConstraint){var F=new Map,k=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(S){s.fixedNodesOnHorizontal.add(S),s.fixedNodesOnVertical.add(S)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var B=this.constraints.alignmentConstraint.vertical;for(var y=0;y<B.length;y++)this.dummyToNodeForVerticalAlignment.set("dummy"+y,[]),B[y].forEach(function(K){if(F.set(K,"dummy"+y),s.dummyToNodeForVerticalAlignment.get("dummy"+y).push(K),s.fixedNodeSet.has(K))s.fixedNodesOnHorizontal.add("dummy"+y)})}if(this.constraints.alignmentConstraint.horizontal){var W=this.constraints.alignmentConstraint.horizontal;for(var y=0;y<W.length;y++)this.dummyToNodeForHorizontalAlignment.set("dummy"+y,[]),W[y].forEach(function(K){if(k.set(K,"dummy"+y),s.dummyToNodeForHorizontalAlignment.get("dummy"+y).push(K),s.fixedNodeSet.has(K))s.fixedNodesOnVertical.add("dummy"+y)})}}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(S){var K,et,ct;for(ct=S.length-1;ct>=2*S.length/3;ct--)K=Math.floor(Math.random()*(ct+1)),et=S[ct],S[ct]=S[K],S[K]=et;return S},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var K=F.has(S.left)?F.get(S.left):S.left,et=F.has(S.right)?F.get(S.right):S.right;if(!s.nodesInRelativeHorizontal.includes(K))if(s.nodesInRelativeHorizontal.push(K),s.nodeToRelativeConstraintMapHorizontal.set(K,[]),s.dummyToNodeForVerticalAlignment.has(K))s.nodeToTempPositionMapHorizontal.set(K,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(K)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(K,s.idToNodeMap.get(K).getCenterX());if(!s.nodesInRelativeHorizontal.includes(et))if(s.nodesInRelativeHorizontal.push(et),s.nodeToRelativeConstraintMapHorizontal.set(et,[]),s.dummyToNodeForVerticalAlignment.has(et))s.nodeToTempPositionMapHorizontal.set(et,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(et,s.idToNodeMap.get(et).getCenterX());s.nodeToRelativeConstraintMapHorizontal.get(K).push({right:et,gap:S.gap}),s.nodeToRelativeConstraintMapHorizontal.get(et).push({left:K,gap:S.gap})}else{var ct=k.has(S.top)?k.get(S.top):S.top,Nt=k.has(S.bottom)?k.get(S.bottom):S.bottom;if(!s.nodesInRelativeVertical.includes(ct))if(s.nodesInRelativeVertical.push(ct),s.nodeToRelativeConstraintMapVertical.set(ct,[]),s.dummyToNodeForHorizontalAlignment.has(ct))s.nodeToTempPositionMapVertical.set(ct,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(ct)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(ct,s.idToNodeMap.get(ct).getCenterY());if(!s.nodesInRelativeVertical.includes(Nt))if(s.nodesInRelativeVertical.push(Nt),s.nodeToRelativeConstraintMapVertical.set(Nt,[]),s.dummyToNodeForHorizontalAlignment.has(Nt))s.nodeToTempPositionMapVertical.set(Nt,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(Nt)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(Nt,s.idToNodeMap.get(Nt).getCenterY());s.nodeToRelativeConstraintMapVertical.get(ct).push({bottom:Nt,gap:S.gap}),s.nodeToRelativeConstraintMapVertical.get(Nt).push({top:ct,gap:S.gap})}});else{var st=new Map,dt=new Map;this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var K=F.has(S.left)?F.get(S.left):S.left,et=F.has(S.right)?F.get(S.right):S.right;if(st.has(K))st.get(K).push(et);else st.set(K,[et]);if(st.has(et))st.get(et).push(K);else st.set(et,[K])}else{var ct=k.has(S.top)?k.get(S.top):S.top,Nt=k.has(S.bottom)?k.get(S.bottom):S.bottom;if(dt.has(ct))dt.get(ct).push(Nt);else dt.set(ct,[Nt]);if(dt.has(Nt))dt.get(Nt).push(ct);else dt.set(Nt,[ct])}});var Z=function(K,et){var ct=[],Nt=[],Pt=new lt,Bt=new Set,ft=0;return K.forEach(function(Jt,Xt){if(!Bt.has(Xt)){ct[ft]=[],Nt[ft]=!1;var Et=Xt;Pt.push(Et),Bt.add(Et),ct[ft].push(Et);while(Pt.length!=0){if(Et=Pt.shift(),et.has(Et))Nt[ft]=!0;var vt=K.get(Et);vt.forEach(function(xt){if(!Bt.has(xt))Pt.push(xt),Bt.add(xt),ct[ft].push(xt)})}ft++}}),{components:ct,isFixed:Nt}},ut=Z(st,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=ut.components,this.fixedComponentsOnHorizontal=ut.isFixed;var nt=Z(dt,s.fixedNodesOnVertical);this.componentsOnVertical=nt.components,this.fixedComponentsOnVertical=nt.isFixed}}},P.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint)this.constraints.fixedNodeConstraint.forEach(function(nt){var S=s.idToNodeMap.get(nt.nodeId);S.displacementX=0,S.displacementY=0});if(this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var N=this.constraints.alignmentConstraint.vertical;for(var y=0;y<N.length;y++){var w=0;for(var p=0;p<N[y].length;p++){if(this.fixedNodeSet.has(N[y][p])){w=0;break}w+=this.idToNodeMap.get(N[y][p]).displacementX}var U=w/N[y].length;for(var p=0;p<N[y].length;p++)this.idToNodeMap.get(N[y][p]).displacementX=U}}if(this.constraints.alignmentConstraint.horizontal){var F=this.constraints.alignmentConstraint.horizontal;for(var y=0;y<F.length;y++){var k=0;for(var p=0;p<F[y].length;p++){if(this.fixedNodeSet.has(F[y][p])){k=0;break}k+=this.idToNodeMap.get(F[y][p]).displacementY}var B=k/F[y].length;for(var p=0;p<F[y].length;p++)this.idToNodeMap.get(F[y][p]).displacementY=B}}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS){if(this.totalIterations%10==0)this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical);this.nodesInRelativeHorizontal.forEach(function(nt){if(!s.fixedNodesOnHorizontal.has(nt)){var S=0;if(s.dummyToNodeForVerticalAlignment.has(nt))S=s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(nt)[0]).displacementX;else S=s.idToNodeMap.get(nt).displacementX;if(s.nodeToRelativeConstraintMapHorizontal.get(nt).forEach(function(K){if(K.right){var et=s.nodeToTempPositionMapHorizontal.get(K.right)-s.nodeToTempPositionMapHorizontal.get(nt)-S;if(et<K.gap)S-=K.gap-et}else{var et=s.nodeToTempPositionMapHorizontal.get(nt)-s.nodeToTempPositionMapHorizontal.get(K.left)+S;if(et<K.gap)S+=K.gap-et}}),s.nodeToTempPositionMapHorizontal.set(nt,s.nodeToTempPositionMapHorizontal.get(nt)+S),s.dummyToNodeForVerticalAlignment.has(nt))s.dummyToNodeForVerticalAlignment.get(nt).forEach(function(K){s.idToNodeMap.get(K).displacementX=S});else s.idToNodeMap.get(nt).displacementX=S}}),this.nodesInRelativeVertical.forEach(function(nt){if(!s.fixedNodesOnHorizontal.has(nt)){var S=0;if(s.dummyToNodeForHorizontalAlignment.has(nt))S=s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(nt)[0]).displacementY;else S=s.idToNodeMap.get(nt).displacementY;if(s.nodeToRelativeConstraintMapVertical.get(nt).forEach(function(K){if(K.bottom){var et=s.nodeToTempPositionMapVertical.get(K.bottom)-s.nodeToTempPositionMapVertical.get(nt)-S;if(et<K.gap)S-=K.gap-et}else{var et=s.nodeToTempPositionMapVertical.get(nt)-s.nodeToTempPositionMapVertical.get(K.top)+S;if(et<K.gap)S+=K.gap-et}}),s.nodeToTempPositionMapVertical.set(nt,s.nodeToTempPositionMapVertical.get(nt)+S),s.dummyToNodeForHorizontalAlignment.has(nt))s.dummyToNodeForHorizontalAlignment.get(nt).forEach(function(K){s.idToNodeMap.get(K).displacementY=S});else s.idToNodeMap.get(nt).displacementY=S}})}else{for(var y=0;y<this.componentsOnHorizontal.length;y++){var W=this.componentsOnHorizontal[y];if(this.fixedComponentsOnHorizontal[y])for(var p=0;p<W.length;p++)if(this.dummyToNodeForVerticalAlignment.has(W[p]))this.dummyToNodeForVerticalAlignment.get(W[p]).forEach(function(K){s.idToNodeMap.get(K).displacementX=0});else this.idToNodeMap.get(W[p]).displacementX=0;else{var st=0,dt=0;for(var p=0;p<W.length;p++)if(this.dummyToNodeForVerticalAlignment.has(W[p])){var Z=this.dummyToNodeForVerticalAlignment.get(W[p]);st+=Z.length*this.idToNodeMap.get(Z[0]).displacementX,dt+=Z.length}else st+=this.idToNodeMap.get(W[p]).displacementX,dt++;var ut=st/dt;for(var p=0;p<W.length;p++)if(this.dummyToNodeForVerticalAlignment.has(W[p]))this.dummyToNodeForVerticalAlignment.get(W[p]).forEach(function(K){s.idToNodeMap.get(K).displacementX=ut});else this.idToNodeMap.get(W[p]).displacementX=ut}}for(var y=0;y<this.componentsOnVertical.length;y++){var W=this.componentsOnVertical[y];if(this.fixedComponentsOnVertical[y])for(var p=0;p<W.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(W[p]))this.dummyToNodeForHorizontalAlignment.get(W[p]).forEach(function(et){s.idToNodeMap.get(et).displacementY=0});else this.idToNodeMap.get(W[p]).displacementY=0;else{var st=0,dt=0;for(var p=0;p<W.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(W[p])){var Z=this.dummyToNodeForHorizontalAlignment.get(W[p]);st+=Z.length*this.idToNodeMap.get(Z[0]).displacementY,dt+=Z.length}else st+=this.idToNodeMap.get(W[p]).displacementY,dt++;var ut=st/dt;for(var p=0;p<W.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(W[p]))this.dummyToNodeForHorizontalAlignment.get(W[p]).forEach(function(Pt){s.idToNodeMap.get(Pt).displacementY=ut});else this.idToNodeMap.get(W[p]).displacementY=ut}}}},P.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],N,y=this.graphManager.getGraphs(),w=y.length,p;for(p=0;p<w;p++)if(N=y[p],N.updateConnected(),!N.isConnected)s=s.concat(N.getNodes());return s},P.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var N=new Set,y;for(y=0;y<s.length;y++){var w=s[y];if(!N.has(w)){var p=w.getSource(),U=w.getTarget();if(p==U)w.getBendpoints().push(new T),w.getBendpoints().push(new T),this.createDummyNodesForBendpoints(w),N.add(w);else{var F=[];if(F=F.concat(p.getEdgeListToNode(U)),F=F.concat(U.getEdgeListToNode(p)),!N.has(F[0])){if(F.length>1){var k;for(k=0;k<F.length;k++){var B=F[k];B.getBendpoints().push(new T),this.createDummyNodesForBendpoints(B)}}F.forEach(function(W){N.add(W)})}}}if(N.size==s.length)break}},P.prototype.positionNodesRadially=function(s){var N=new E(0,0),y=Math.ceil(Math.sqrt(s.length)),w=0,p=0,U=0,F=new T(0,0);for(var k=0;k<s.length;k++){if(k%y==0){if(U=0,p=w,k!=0)p+=c.DEFAULT_COMPONENT_SEPERATION;w=0}var B=s[k],W=X.findCenterOfTree(B);if(N.x=U,N.y=p,F=P.radialLayout(B,W,N),F.y>w)w=Math.floor(F.y);U=Math.floor(F.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(x.WORLD_CENTER_X-F.x/2,x.WORLD_CENTER_Y-F.y/2))},P.radialLayout=function(s,N,y){var w=Math.max(this.maxDiagonalInTree(s),c.DEFAULT_RADIAL_SEPARATION);P.branchRadialLayout(N,null,0,359,0,w);var p=_.calculateBounds(s),U=new Q;U.setDeviceOrgX(p.getMinX()),U.setDeviceOrgY(p.getMinY()),U.setWorldOrgX(y.x),U.setWorldOrgY(y.y);for(var F=0;F<s.length;F++){var k=s[F];k.transform(U)}var B=new T(p.getMaxX(),p.getMaxY());return U.inverseTransformPoint(B)},P.branchRadialLayout=function(s,N,y,w,p,U){var F=(w-y+1)/2;if(F<0)F+=180;var k=(F+y)%360,B=k*V.TWO_PI/360,W=Math.cos(B),st=p*Math.cos(B),dt=p*Math.sin(B);s.setCenter(st,dt);var Z=[];Z=Z.concat(s.getEdges());var ut=Z.length;if(N!=null)ut--;var nt=0,S=Z.length,K,et=s.getEdgesBetween(N);while(et.length>1){var ct=et[0];et.splice(0,1);var Nt=Z.indexOf(ct);if(Nt>=0)Z.splice(Nt,1);S--,ut--}if(N!=null)K=(Z.indexOf(et[0])+1)%S;else K=0;var Pt=Math.abs(w-y)/ut;for(var Bt=K;nt!=ut;Bt=++Bt%S){var ft=Z[Bt].getOtherEnd(s);if(ft==N)continue;var Jt=(y+nt*Pt)%360,Xt=(Jt+Pt)%360;P.branchRadialLayout(ft,s,Jt,Xt,p+U,U),nt++}},P.maxDiagonalInTree=function(s){var N=I.MIN_VALUE;for(var y=0;y<s.length;y++){var w=s[y],p=w.getDiagonal();if(p>N)N=p}return N},P.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},P.prototype.groupZeroDegreeMembers=function(){var s=this,N={};this.memberGroups={},this.idToDummyNode={};var y=[],w=this.graphManager.getAllNodes();for(var p=0;p<w.length;p++){var U=w[p],F=U.getParent();if(this.getNodeDegreeWithChildren(U)===0&&(F.id==null||!this.getToBeTiled(F)))y.push(U)}for(var p=0;p<y.length;p++){var U=y[p],k=U.getParent().id;if(typeof N[k]>"u")N[k]=[];N[k]=N[k].concat(U)}Object.keys(N).forEach(function(B){if(N[B].length>1){var W="DummyCompound_"+B;s.memberGroups[W]=N[B];var st=N[B][0].getParent(),dt=new i(s.graphManager);dt.id=W,dt.paddingLeft=st.paddingLeft||0,dt.paddingRight=st.paddingRight||0,dt.paddingBottom=st.paddingBottom||0,dt.paddingTop=st.paddingTop||0,s.idToDummyNode[W]=dt;var Z=s.getGraphManager().add(s.newGraph(),dt),ut=st.getChild();ut.add(dt);for(var nt=0;nt<N[B].length;nt++){var S=N[B][nt];ut.remove(S),Z.add(S)}}})},P.prototype.clearCompounds=function(){var s={},N={};this.performDFSOnCompounds();for(var y=0;y<this.compoundOrder.length;y++)N[this.compoundOrder[y].id]=this.compoundOrder[y],s[this.compoundOrder[y].id]=[].concat(this.compoundOrder[y].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[y].getChild()),this.compoundOrder[y].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,N)},P.prototype.clearZeroDegreeMembers=function(){var s=this,N=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(y){var w=s.idToDummyNode[y];if(N[y]=s.tileNodes(s.memberGroups[y],w.paddingLeft+w.paddingRight),w.rect.width=N[y].width,w.rect.height=N[y].height,w.setCenter(N[y].centerX,N[y].centerY),w.labelMarginLeft=0,w.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var p=w.rect.width,U=w.rect.height;if(w.labelWidth){if(w.labelPosHorizontal=="left")w.rect.x-=w.labelWidth,w.setWidth(p+w.labelWidth),w.labelMarginLeft=w.labelWidth;else if(w.labelPosHorizontal=="center"&&w.labelWidth>p)w.rect.x-=(w.labelWidth-p)/2,w.setWidth(w.labelWidth),w.labelMarginLeft=(w.labelWidth-p)/2;else if(w.labelPosHorizontal=="right")w.setWidth(p+w.labelWidth)}if(w.labelHeight){if(w.labelPosVertical=="top")w.rect.y-=w.labelHeight,w.setHeight(U+w.labelHeight),w.labelMarginTop=w.labelHeight;else if(w.labelPosVertical=="center"&&w.labelHeight>U)w.rect.y-=(w.labelHeight-U)/2,w.setHeight(w.labelHeight),w.labelMarginTop=(w.labelHeight-U)/2;else if(w.labelPosVertical=="bottom")w.setHeight(U+w.labelHeight)}}})},P.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var N=this.compoundOrder[s],{id:y,paddingLeft:w,paddingTop:p,labelMarginLeft:U,labelMarginTop:F}=N;this.adjustLocations(this.tiledMemberPack[y],N.rect.x,N.rect.y,w,p,U,F)}},P.prototype.repopulateZeroDegreeMembers=function(){var s=this,N=this.tiledZeroDegreePack;Object.keys(N).forEach(function(y){var w=s.idToDummyNode[y],{paddingLeft:p,paddingTop:U,labelMarginLeft:F,labelMarginTop:k}=w;s.adjustLocations(N[y],w.rect.x,w.rect.y,p,U,F,k)})},P.prototype.getToBeTiled=function(s){var N=s.id;if(this.toBeTiled[N]!=null)return this.toBeTiled[N];var y=s.getChild();if(y==null)return this.toBeTiled[N]=!1,!1;var w=y.getNodes();for(var p=0;p<w.length;p++){var U=w[p];if(this.getNodeDegree(U)>0)return this.toBeTiled[N]=!1,!1;if(U.getChild()==null){this.toBeTiled[U.id]=!1;continue}if(!this.getToBeTiled(U))return this.toBeTiled[N]=!1,!1}return this.toBeTiled[N]=!0,!0},P.prototype.getNodeDegree=function(s){var N=s.id,y=s.getEdges(),w=0;for(var p=0;p<y.length;p++){var U=y[p];if(U.getSource().id!==U.getTarget().id)w=w+1}return w},P.prototype.getNodeDegreeWithChildren=function(s){var N=this.getNodeDegree(s);if(s.getChild()==null)return N;var y=s.getChild().getNodes();for(var w=0;w<y.length;w++){var p=y[w];N+=this.getNodeDegreeWithChildren(p)}return N},P.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},P.prototype.fillCompexOrderByDFS=function(s){for(var N=0;N<s.length;N++){var y=s[N];if(y.getChild()!=null)this.fillCompexOrderByDFS(y.getChild().getNodes());if(this.getToBeTiled(y))this.compoundOrder.push(y)}},P.prototype.adjustLocations=function(s,N,y,w,p,U,F){N+=w+U,y+=p+F;var k=N;for(var B=0;B<s.rows.length;B++){var W=s.rows[B];N=k;var st=0;for(var dt=0;dt<W.length;dt++){var Z=W[dt];if(Z.rect.x=N,Z.rect.y=y,N+=Z.rect.width+s.horizontalPadding,Z.rect.height>st)st=Z.rect.height}y+=st+s.verticalPadding}},P.prototype.tileCompoundMembers=function(s,N){var y=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(w){var p=N[w];if(y.tiledMemberPack[w]=y.tileNodes(s[w],p.paddingLeft+p.paddingRight),p.rect.width=y.tiledMemberPack[w].width,p.rect.height=y.tiledMemberPack[w].height,p.setCenter(y.tiledMemberPack[w].centerX,y.tiledMemberPack[w].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var U=p.rect.width,F=p.rect.height;if(p.labelWidth){if(p.labelPosHorizontal=="left")p.rect.x-=p.labelWidth,p.setWidth(U+p.labelWidth),p.labelMarginLeft=p.labelWidth;else if(p.labelPosHorizontal=="center"&&p.labelWidth>U)p.rect.x-=(p.labelWidth-U)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-U)/2;else if(p.labelPosHorizontal=="right")p.setWidth(U+p.labelWidth)}if(p.labelHeight){if(p.labelPosVertical=="top")p.rect.y-=p.labelHeight,p.setHeight(F+p.labelHeight),p.labelMarginTop=p.labelHeight;else if(p.labelPosVertical=="center"&&p.labelHeight>F)p.rect.y-=(p.labelHeight-F)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-F)/2;else if(p.labelPosVertical=="bottom")p.setHeight(F+p.labelHeight)}}})},P.prototype.tileNodes=function(s,N){var y=this.tileNodesByFavoringDim(s,N,!0),w=this.tileNodesByFavoringDim(s,N,!1),p=this.getOrgRatio(y),U=this.getOrgRatio(w),F;if(U<p)F=w;else F=y;return F},P.prototype.getOrgRatio=function(s){var{width:N,height:y}=s,w=N/y;if(w<1)w=1/w;return w},P.prototype.calcIdealRowWidth=function(s,N){var{TILING_PADDING_VERTICAL:y,TILING_PADDING_HORIZONTAL:w}=c,p=s.length,U=0,F=0,k=0;s.forEach(function(nt){if(U+=nt.getWidth(),F+=nt.getHeight(),nt.getWidth()>k)k=nt.getWidth()});var B=U/p,W=F/p,st=Math.pow(y-w,2)+4*(B+w)*(W+y)*p,dt=(w-y+Math.sqrt(st))/(2*(B+w)),Z;if(N){if(Z=Math.ceil(dt),Z==dt)Z++}else Z=Math.floor(dt);var ut=Z*(B+w)-w;if(k>ut)ut=k;return ut+=w*2,ut},P.prototype.tileNodesByFavoringDim=function(s,N,y){var{TILING_PADDING_VERTICAL:w,TILING_PADDING_HORIZONTAL:p,TILING_COMPARE_BY:U}=c,F={rows:[],rowWidth:[],rowHeight:[],width:0,height:N,verticalPadding:w,horizontalPadding:p,centerX:0,centerY:0};if(U)F.idealRowWidth=this.calcIdealRowWidth(s,y);var k=function(S){return S.rect.width*S.rect.height},B=function(S,K){return k(K)-k(S)};s.sort(function(nt,S){var K=B;if(F.idealRowWidth)return K=U,K(nt.id,S.id);return K(nt,S)});var W=0,st=0;for(var dt=0;dt<s.length;dt++){var Z=s[dt];W+=Z.getCenterX(),st+=Z.getCenterY()}F.centerX=W/s.length,F.centerY=st/s.length;for(var dt=0;dt<s.length;dt++){var Z=s[dt];if(F.rows.length==0)this.insertNodeToRow(F,Z,0,N);else if(this.canAddHorizontal(F,Z.rect.width,Z.rect.height)){var ut=F.rows.length-1;if(!F.idealRowWidth)ut=this.getShortestRowIndex(F);this.insertNodeToRow(F,Z,ut,N)}else this.insertNodeToRow(F,Z,F.rows.length,N);this.shiftToLastRow(F)}return F},P.prototype.insertNodeToRow=function(s,N,y,w){var p=w;if(y==s.rows.length){var U=[];s.rows.push(U),s.rowWidth.push(p),s.rowHeight.push(0)}var F=s.rowWidth[y]+N.rect.width;if(s.rows[y].length>0)F+=s.horizontalPadding;if(s.rowWidth[y]=F,s.width<F)s.width=F;var k=N.rect.height;if(y>0)k+=s.verticalPadding;var B=0;if(k>s.rowHeight[y])B=s.rowHeight[y],s.rowHeight[y]=k,B=s.rowHeight[y]-B;s.height+=B,s.rows[y].push(N)},P.prototype.getShortestRowIndex=function(s){var N=-1,y=Number.MAX_VALUE;for(var w=0;w<s.rows.length;w++)if(s.rowWidth[w]<y)N=w,y=s.rowWidth[w];return N},P.prototype.getLongestRowIndex=function(s){var N=-1,y=Number.MIN_VALUE;for(var w=0;w<s.rows.length;w++)if(s.rowWidth[w]>y)N=w,y=s.rowWidth[w];return N},P.prototype.canAddHorizontal=function(s,N,y){if(s.idealRowWidth){var w=s.rows.length-1,p=s.rowWidth[w];return p+N+s.horizontalPadding<=s.idealRowWidth}var U=this.getShortestRowIndex(s);if(U<0)return!0;var F=s.rowWidth[U];if(F+s.horizontalPadding+N<=s.width)return!0;var k=0;if(s.rowHeight[U]<y){if(U>0)k=y+s.verticalPadding-s.rowHeight[U]}var B;if(s.width-F>=N+s.horizontalPadding)B=(s.height+k)/(F+N+s.horizontalPadding);else B=(s.height+k)/s.width;k=y+s.verticalPadding;var W;if(s.width<N)W=(s.height+k)/N;else W=(s.height+k)/s.width;if(W<1)W=1/W;if(B<1)B=1/B;return B<W},P.prototype.shiftToLastRow=function(s){var N=this.getLongestRowIndex(s),y=s.rowWidth.length-1,w=s.rows[N],p=w[w.length-1],U=p.width+s.horizontalPadding;if(s.width-s.rowWidth[y]>U&&N!=y){w.splice(-1,1),s.rows[y].push(p),s.rowWidth[N]=s.rowWidth[N]-U,s.rowWidth[y]=s.rowWidth[y]+U,s.width=s.rowWidth[instance.getLongestRowIndex(s)];var F=Number.MIN_VALUE;for(var k=0;k<w.length;k++)if(w[k].height>F)F=w[k].height;if(N>0)F+=s.verticalPadding;var B=s.rowHeight[N]+s.rowHeight[y];if(s.rowHeight[N]=F,s.rowHeight[y]<p.height+s.verticalPadding)s.rowHeight[y]=p.height+s.verticalPadding;var W=s.rowHeight[N]+s.rowHeight[y];s.height+=W-B,this.shiftToLastRow(s)}},P.prototype.tilingPreLayout=function(){if(c.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},P.prototype.tilingPostLayout=function(){if(c.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},P.prototype.reduceTrees=function(){var s=[],N=!0,y;while(N){var w=this.graphManager.getAllNodes(),p=[];N=!1;for(var U=0;U<w.length;U++)if(y=w[U],y.getEdges().length==1&&!y.getEdges()[0].isInterGraph&&y.getChild()==null){if(c.PURE_INCREMENTAL){var F=y.getEdges()[0].getOtherEnd(y),k=new D(y.getCenterX()-F.getCenterX(),y.getCenterY()-F.getCenterY());p.push([y,y.getEdges()[0],y.getOwner(),k])}else p.push([y,y.getEdges()[0],y.getOwner()]);N=!0}if(N==!0){var B=[];for(var W=0;W<p.length;W++)if(p[W][0].getEdges().length==1)B.push(p[W]),p[W][0].getOwner().remove(p[W][0]);s.push(B),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},P.prototype.growTree=function(s){var N=s.length,y=s[N-1],w;for(var p=0;p<y.length;p++)w=y[p],this.findPlaceforPrunedNode(w),w[2].add(w[0]),w[2].add(w[1],w[1].source,w[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},P.prototype.findPlaceforPrunedNode=function(s){var N,y,w=s[0];if(w==s[1].source)y=s[1].target;else y=s[1].source;if(c.PURE_INCREMENTAL)w.setCenter(y.getCenterX()+s[3].getWidth(),y.getCenterY()+s[3].getHeight());else{var p=y.startX,U=y.finishX,F=y.startY,k=y.finishY,B=0,W=0,st=0,dt=0,Z=[B,st,W,dt];if(F>0)for(var ut=p;ut<=U;ut++)Z[0]+=this.grid[ut][F-1].length+this.grid[ut][F].length-1;if(U<this.grid.length-1)for(var ut=F;ut<=k;ut++)Z[1]+=this.grid[U+1][ut].length+this.grid[U][ut].length-1;if(k<this.grid[0].length-1)for(var ut=p;ut<=U;ut++)Z[2]+=this.grid[ut][k+1].length+this.grid[ut][k].length-1;if(p>0)for(var ut=F;ut<=k;ut++)Z[3]+=this.grid[p-1][ut].length+this.grid[p][ut].length-1;var nt=I.MAX_VALUE,S,K;for(var et=0;et<Z.length;et++)if(Z[et]<nt)nt=Z[et],S=1,K=et;else if(Z[et]==nt)S++;if(S==3&&nt==0){if(Z[0]==0&&Z[1]==0&&Z[2]==0)N=1;else if(Z[0]==0&&Z[1]==0&&Z[3]==0)N=0;else if(Z[0]==0&&Z[2]==0&&Z[3]==0)N=3;else if(Z[1]==0&&Z[2]==0&&Z[3]==0)N=2}else if(S==2&&nt==0){var ct=Math.floor(Math.random()*2);if(Z[0]==0&&Z[1]==0)if(ct==0)N=0;else N=1;else if(Z[0]==0&&Z[2]==0)if(ct==0)N=0;else N=2;else if(Z[0]==0&&Z[3]==0)if(ct==0)N=0;else N=3;else if(Z[1]==0&&Z[2]==0)if(ct==0)N=1;else N=2;else if(Z[1]==0&&Z[3]==0)if(ct==0)N=1;else N=3;else if(ct==0)N=2;else N=3}else if(S==4&&nt==0){var ct=Math.floor(Math.random()*4);N=ct}else N=K;if(N==0)w.setCenter(y.getCenterX(),y.getCenterY()-y.getHeight()/2-f.DEFAULT_EDGE_LENGTH-w.getHeight()/2);else if(N==1)w.setCenter(y.getCenterX()+y.getWidth()/2+f.DEFAULT_EDGE_LENGTH+w.getWidth()/2,y.getCenterY());else if(N==2)w.setCenter(y.getCenterX(),y.getCenterY()+y.getHeight()/2+f.DEFAULT_EDGE_LENGTH+w.getHeight()/2);else w.setCenter(y.getCenterX()-y.getWidth()/2-f.DEFAULT_EDGE_LENGTH-w.getWidth()/2,y.getCenterY())}},o.exports=P},991:(o,n,a)=>{var g=a(551).FDLayoutNode,r=a(551).IMath;function v(e,c,u,f){g.call(this,e,c,u,f)}v.prototype=Object.create(g.prototype);for(var i in g)v[i]=g[i];v.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();if(this.getChild()!=null&&this.fixedNodeWeight)this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight;else this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren;if(Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement)this.displacementX=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementX);if(Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement)this.displacementY=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementY);if(this.child&&this.child.getNodes().length>0)this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(e,c){var u=this.getChild().getNodes(),f;for(var x=0;x<u.length;x++)if(f=u[x],f.getChild()==null)f.displacementX+=e,f.displacementY+=c;else f.propogateDisplacementToChildren(e,c)},v.prototype.move=function(){var e=this.graphManager.getLayout();if(this.child==null||this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY),e.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},v.prototype.setPred1=function(e){this.pred1=e},v.prototype.getPred1=function(){return pred1},v.prototype.getPred2=function(){return pred2},v.prototype.setNext=function(e){this.next=e},v.prototype.getNext=function(){return next},v.prototype.setProcessed=function(e){this.processed=e},v.prototype.isProcessed=function(){return processed},o.exports=v},902:(o,n,a)=>{function g(u){if(Array.isArray(u)){for(var f=0,x=Array(u.length);f<u.length;f++)x[f]=u[f];return x}else return Array.from(u)}var r=a(806),v=a(551).LinkedList,i=a(551).Matrix,e=a(551).SVD;function c(){}c.handleConstraints=function(u){var f={};f.fixedNodeConstraint=u.constraints.fixedNodeConstraint,f.alignmentConstraint=u.constraints.alignmentConstraint,f.relativePlacementConstraint=u.constraints.relativePlacementConstraint;var x=new Map,E=new Map,T=[],D=[],X=u.getAllNodes(),I=0;for(var V=0;V<X.length;V++){var _=X[V];if(_.getChild()==null)E.set(_.id,I++),T.push(_.getCenterX()),D.push(_.getCenterY()),x.set(_.id,_)}if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(J){if(!J.gap&&J.gap!=0)if(J.left)J.gap=r.DEFAULT_EDGE_LENGTH+x.get(J.left).getWidth()/2+x.get(J.right).getWidth()/2;else J.gap=r.DEFAULT_EDGE_LENGTH+x.get(J.top).getHeight()/2+x.get(J.bottom).getHeight()/2});var Q=function(rt,it){return{x:rt.x-it.x,y:rt.y-it.y}},lt=function(rt){var it=0,at=0;return rt.forEach(function(ot){it+=T[E.get(ot)],at+=D[E.get(ot)]}),{x:it/rt.size,y:at/rt.size}},P=function(rt,it,at,ot,gt){function At(Tt,yt){var Dt=new Set(Tt),mt=!0,wt=!1,Zt=void 0;try{for(var Vt=yt[Symbol.iterator](),re;!(mt=(re=Vt.next()).done);mt=!0){var Wt=re.value;Dt.add(Wt)}}catch(bt){wt=!0,Zt=bt}finally{try{if(!mt&&Vt.return)Vt.return()}finally{if(wt)throw Zt}}return Dt}var Mt=new Map;rt.forEach(function(Tt,yt){Mt.set(yt,0)}),rt.forEach(function(Tt,yt){Tt.forEach(function(Dt){Mt.set(Dt.id,Mt.get(Dt.id)+1)})});var ht=new Map,Lt=new Map,Ct=new v;if(Mt.forEach(function(Tt,yt){if(Tt==0){if(Ct.push(yt),!at)if(it=="horizontal")ht.set(yt,E.has(yt)?T[E.get(yt)]:ot.get(yt));else ht.set(yt,E.has(yt)?D[E.get(yt)]:ot.get(yt))}else ht.set(yt,Number.NEGATIVE_INFINITY);if(at)Lt.set(yt,new Set([yt]))}),at)gt.forEach(function(Tt){var yt=[];if(Tt.forEach(function(wt){if(at.has(wt))yt.push(wt)}),yt.length>0){var Dt=0;yt.forEach(function(wt){if(it=="horizontal")ht.set(wt,E.has(wt)?T[E.get(wt)]:ot.get(wt)),Dt+=ht.get(wt);else ht.set(wt,E.has(wt)?D[E.get(wt)]:ot.get(wt)),Dt+=ht.get(wt)}),Dt=Dt/yt.length,Tt.forEach(function(wt){if(!at.has(wt))ht.set(wt,Dt)})}else{var mt=0;Tt.forEach(function(wt){if(it=="horizontal")mt+=E.has(wt)?T[E.get(wt)]:ot.get(wt);else mt+=E.has(wt)?D[E.get(wt)]:ot.get(wt)}),mt=mt/Tt.length,Tt.forEach(function(wt){ht.set(wt,mt)})}});var pt=function(){var yt=Ct.shift(),Dt=rt.get(yt);Dt.forEach(function(mt){if(ht.get(mt.id)<ht.get(yt)+mt.gap)if(at&&at.has(mt.id)){var wt=void 0;if(it=="horizontal")wt=E.has(mt.id)?T[E.get(mt.id)]:ot.get(mt.id);else wt=E.has(mt.id)?D[E.get(mt.id)]:ot.get(mt.id);if(ht.set(mt.id,wt),wt<ht.get(yt)+mt.gap){var Zt=ht.get(yt)+mt.gap-wt;Lt.get(yt).forEach(function(Vt){ht.set(Vt,ht.get(Vt)-Zt)})}}else ht.set(mt.id,ht.get(yt)+mt.gap);if(Mt.set(mt.id,Mt.get(mt.id)-1),Mt.get(mt.id)==0)Ct.push(mt.id);if(at)Lt.set(mt.id,At(Lt.get(yt),Lt.get(mt.id)))})};while(Ct.length!=0)pt();if(at){var Ot=new Set;rt.forEach(function(Tt,yt){if(Tt.length==0)Ot.add(yt)});var Ut=[];Lt.forEach(function(Tt,yt){if(Ot.has(yt)){var Dt=!1,mt=!0,wt=!1,Zt=void 0;try{for(var Vt=Tt[Symbol.iterator](),re;!(mt=(re=Vt.next()).done);mt=!0){var Wt=re.value;if(at.has(Wt))Dt=!0}}catch($t){wt=!0,Zt=$t}finally{try{if(!mt&&Vt.return)Vt.return()}finally{if(wt)throw Zt}}if(!Dt){var bt=!1,ae=void 0;if(Ut.forEach(function($t,jt){if($t.has([].concat(g(Tt))[0]))bt=!0,ae=jt}),!bt)Ut.push(new Set(Tt));else Tt.forEach(function($t){Ut[ae].add($t)})}}}),Ut.forEach(function(Tt,yt){var{POSITIVE_INFINITY:Dt,POSITIVE_INFINITY:mt,NEGATIVE_INFINITY:wt,NEGATIVE_INFINITY:Zt}=Number,Vt=!0,re=!1,Wt=void 0;try{for(var bt=Tt[Symbol.iterator](),ae;!(Vt=(ae=bt.next()).done);Vt=!0){var $t=ae.value,jt=void 0;if(it=="horizontal")jt=E.has($t)?T[E.get($t)]:ot.get($t);else jt=E.has($t)?D[E.get($t)]:ot.get($t);var ie=ht.get($t);if(jt<Dt)Dt=jt;if(jt>wt)wt=jt;if(ie<mt)mt=ie;if(ie>Zt)Zt=ie}}catch(de){re=!0,Wt=de}finally{try{if(!Vt&&bt.return)bt.return()}finally{if(re)throw Wt}}var we=(Dt+wt)/2-(mt+Zt)/2,he=!0,fe=!1,ge=void 0;try{for(var le=Tt[Symbol.iterator](),Ne;!(he=(Ne=le.next()).done);he=!0){var ue=Ne.value;ht.set(ue,ht.get(ue)+we)}}catch(de){fe=!0,ge=de}finally{try{if(!he&&le.return)le.return()}finally{if(fe)throw ge}}})}return ht},tt=function(rt){var it=0,at=0,ot=0,gt=0;if(rt.forEach(function(Lt){if(Lt.left)T[E.get(Lt.left)]-T[E.get(Lt.right)]>=0?it++:at++;else D[E.get(Lt.top)]-D[E.get(Lt.bottom)]>=0?ot++:gt++}),it>at&&ot>gt)for(var At=0;At<E.size;At++)T[At]=-1*T[At],D[At]=-1*D[At];else if(it>at)for(var Mt=0;Mt<E.size;Mt++)T[Mt]=-1*T[Mt];else if(ot>gt)for(var ht=0;ht<E.size;ht++)D[ht]=-1*D[ht]},s=function(rt){var it=[],at=new v,ot=new Set,gt=0;return rt.forEach(function(At,Mt){if(!ot.has(Mt)){it[gt]=[];var ht=Mt;at.push(ht),ot.add(ht),it[gt].push(ht);while(at.length!=0){ht=at.shift();var Lt=rt.get(ht);Lt.forEach(function(Ct){if(!ot.has(Ct.id))at.push(Ct.id),ot.add(Ct.id),it[gt].push(Ct.id)})}gt++}}),it},N=function(rt){var it=new Map;return rt.forEach(function(at,ot){it.set(ot,[])}),rt.forEach(function(at,ot){at.forEach(function(gt){it.get(ot).push(gt),it.get(gt.id).push({id:ot,gap:gt.gap,direction:gt.direction})})}),it},y=function(rt){var it=new Map;return rt.forEach(function(at,ot){it.set(ot,[])}),rt.forEach(function(at,ot){at.forEach(function(gt){it.get(gt.id).push({id:ot,gap:gt.gap,direction:gt.direction})})}),it},w=[],p=[],U=!1,F=!1,k=new Set,B=new Map,W=new Map,st=[];if(f.fixedNodeConstraint)f.fixedNodeConstraint.forEach(function(J){k.add(J.nodeId)});if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(J){if(J.left){if(B.has(J.left))B.get(J.left).push({id:J.right,gap:J.gap,direction:"horizontal"});else B.set(J.left,[{id:J.right,gap:J.gap,direction:"horizontal"}]);if(!B.has(J.right))B.set(J.right,[])}else{if(B.has(J.top))B.get(J.top).push({id:J.bottom,gap:J.gap,direction:"vertical"});else B.set(J.top,[{id:J.bottom,gap:J.gap,direction:"vertical"}]);if(!B.has(J.bottom))B.set(J.bottom,[])}}),W=N(B),st=s(W);if(r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(J,rt){w[rt]=[J.position.x,J.position.y],p[rt]=[T[E.get(J.nodeId)],D[E.get(J.nodeId)]]}),U=!0;else if(f.alignmentConstraint)(function(){var J=0;if(f.alignmentConstraint.vertical){var rt=f.alignmentConstraint.vertical,it=function(ht){var Lt=new Set;rt[ht].forEach(function(Ot){Lt.add(Ot)});var Ct=new Set([].concat(g(Lt)).filter(function(Ot){return k.has(Ot)})),pt=void 0;if(Ct.size>0)pt=T[E.get(Ct.values().next().value)];else pt=lt(Lt).x;rt[ht].forEach(function(Ot){w[J]=[pt,D[E.get(Ot)]],p[J]=[T[E.get(Ot)],D[E.get(Ot)]],J++})};for(var at=0;at<rt.length;at++)it(at);U=!0}if(f.alignmentConstraint.horizontal){var ot=f.alignmentConstraint.horizontal,gt=function(ht){var Lt=new Set;ot[ht].forEach(function(Ot){Lt.add(Ot)});var Ct=new Set([].concat(g(Lt)).filter(function(Ot){return k.has(Ot)})),pt=void 0;if(Ct.size>0)pt=T[E.get(Ct.values().next().value)];else pt=lt(Lt).y;ot[ht].forEach(function(Ot){w[J]=[T[E.get(Ot)],pt],p[J]=[T[E.get(Ot)],D[E.get(Ot)]],J++})};for(var At=0;At<ot.length;At++)gt(At);U=!0}if(f.relativePlacementConstraint)F=!0})();else if(f.relativePlacementConstraint){var dt=0,Z=0;for(var ut=0;ut<st.length;ut++)if(st[ut].length>dt)dt=st[ut].length,Z=ut;if(dt<W.size/2)tt(f.relativePlacementConstraint),U=!1,F=!1;else{var nt=new Map,S=new Map,K=[];st[Z].forEach(function(J){B.get(J).forEach(function(rt){if(rt.direction=="horizontal"){if(nt.has(J))nt.get(J).push(rt);else nt.set(J,[rt]);if(!nt.has(rt.id))nt.set(rt.id,[]);K.push({left:J,right:rt.id})}else{if(S.has(J))S.get(J).push(rt);else S.set(J,[rt]);if(!S.has(rt.id))S.set(rt.id,[]);K.push({top:J,bottom:rt.id})}})}),tt(K),F=!1;var et=P(nt,"horizontal"),ct=P(S,"vertical");st[Z].forEach(function(J,rt){if(p[rt]=[T[E.get(J)],D[E.get(J)]],w[rt]=[],et.has(J))w[rt][0]=et.get(J);else w[rt][0]=T[E.get(J)];if(ct.has(J))w[rt][1]=ct.get(J);else w[rt][1]=D[E.get(J)]}),U=!0}}if(U){var Nt=void 0,Pt=i.transpose(w),Bt=i.transpose(p);for(var ft=0;ft<Pt.length;ft++)Pt[ft]=i.multGamma(Pt[ft]),Bt[ft]=i.multGamma(Bt[ft]);var Jt=i.multMat(Pt,i.transpose(Bt)),Xt=e.svd(Jt);Nt=i.multMat(Xt.V,i.transpose(Xt.U));for(var Et=0;Et<E.size;Et++){var vt=[T[Et],D[Et]],xt=[Nt[0][0],Nt[1][0]],Rt=[Nt[0][1],Nt[1][1]];T[Et]=i.dotProduct(vt,xt),D[Et]=i.dotProduct(vt,Rt)}if(F)tt(f.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var Gt={x:0,y:0};f.fixedNodeConstraint.forEach(function(J,rt){var it={x:T[E.get(J.nodeId)],y:D[E.get(J.nodeId)]},at=J.position,ot=Q(at,it);Gt.x+=ot.x,Gt.y+=ot.y}),Gt.x/=f.fixedNodeConstraint.length,Gt.y/=f.fixedNodeConstraint.length,T.forEach(function(J,rt){T[rt]+=Gt.x}),D.forEach(function(J,rt){D[rt]+=Gt.y}),f.fixedNodeConstraint.forEach(function(J){T[E.get(J.nodeId)]=J.position.x,D[E.get(J.nodeId)]=J.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical){var St=f.alignmentConstraint.vertical,Ft=function(rt){var it=new Set;St[rt].forEach(function(gt){it.add(gt)});var at=new Set([].concat(g(it)).filter(function(gt){return k.has(gt)})),ot=void 0;if(at.size>0)ot=T[E.get(at.values().next().value)];else ot=lt(it).x;it.forEach(function(gt){if(!k.has(gt))T[E.get(gt)]=ot})};for(var Ht=0;Ht<St.length;Ht++)Ft(Ht)}if(f.alignmentConstraint.horizontal){var zt=f.alignmentConstraint.horizontal,ee=function(rt){var it=new Set;zt[rt].forEach(function(gt){it.add(gt)});var at=new Set([].concat(g(it)).filter(function(gt){return k.has(gt)})),ot=void 0;if(at.size>0)ot=D[E.get(at.values().next().value)];else ot=lt(it).y;it.forEach(function(gt){if(!k.has(gt))D[E.get(gt)]=ot})};for(var qt=0;qt<zt.length;qt++)ee(qt)}}if(f.relativePlacementConstraint)(function(){var J=new Map,rt=new Map,it=new Map,at=new Map,ot=new Map,gt=new Map,At=new Set,Mt=new Set;if(k.forEach(function(Qt){At.add(Qt),Mt.add(Qt)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical){var ht=f.alignmentConstraint.vertical,Lt=function(It){it.set("dummy"+It,[]),ht[It].forEach(function(Yt){if(J.set(Yt,"dummy"+It),it.get("dummy"+It).push(Yt),k.has(Yt))At.add("dummy"+It)}),ot.set("dummy"+It,T[E.get(ht[It][0])])};for(var Ct=0;Ct<ht.length;Ct++)Lt(Ct)}if(f.alignmentConstraint.horizontal){var pt=f.alignmentConstraint.horizontal,Ot=function(It){at.set("dummy"+It,[]),pt[It].forEach(function(Yt){if(rt.set(Yt,"dummy"+It),at.get("dummy"+It).push(Yt),k.has(Yt))Mt.add("dummy"+It)}),gt.set("dummy"+It,D[E.get(pt[It][0])])};for(var Ut=0;Ut<pt.length;Ut++)Ot(Ut)}}var Tt=new Map,yt=new Map,Dt=function(It){B.get(It).forEach(function(Yt){var oe=void 0,ne=void 0;if(Yt.direction=="horizontal"){if(oe=J.get(It)?J.get(It):It,J.get(Yt.id))ne={id:J.get(Yt.id),gap:Yt.gap,direction:Yt.direction};else ne=Yt;if(Tt.has(oe))Tt.get(oe).push(ne);else Tt.set(oe,[ne]);if(!Tt.has(ne.id))Tt.set(ne.id,[])}else{if(oe=rt.get(It)?rt.get(It):It,rt.get(Yt.id))ne={id:rt.get(Yt.id),gap:Yt.gap,direction:Yt.direction};else ne=Yt;if(yt.has(oe))yt.get(oe).push(ne);else yt.set(oe,[ne]);if(!yt.has(ne.id))yt.set(ne.id,[])}})},mt=!0,wt=!1,Zt=void 0;try{for(var Vt=B.keys()[Symbol.iterator](),re;!(mt=(re=Vt.next()).done);mt=!0){var Wt=re.value;Dt(Wt)}}catch(Qt){wt=!0,Zt=Qt}finally{try{if(!mt&&Vt.return)Vt.return()}finally{if(wt)throw Zt}}var bt=N(Tt),ae=N(yt),$t=s(bt),jt=s(ae),ie=y(Tt),we=y(yt),he=[],fe=[];$t.forEach(function(Qt,It){he[It]=[],Qt.forEach(function(Yt){if(ie.get(Yt).length==0)he[It].push(Yt)})}),jt.forEach(function(Qt,It){fe[It]=[],Qt.forEach(function(Yt){if(we.get(Yt).length==0)fe[It].push(Yt)})});var ge=P(Tt,"horizontal",At,ot,he),le=P(yt,"vertical",Mt,gt,fe),Ne=function(It){if(it.get(It))it.get(It).forEach(function(Yt){T[E.get(Yt)]=ge.get(It)});else T[E.get(It)]=ge.get(It)},ue=!0,de=!1,Ye=void 0;try{for(var Me=ge.keys()[Symbol.iterator](),Xe;!(ue=(Xe=Me.next()).done);ue=!0){var Ce=Xe.value;Ne(Ce)}}catch(Qt){de=!0,Ye=Qt}finally{try{if(!ue&&Me.return)Me.return()}finally{if(de)throw Ye}}var sr=function(It){if(at.get(It))at.get(It).forEach(function(Yt){D[E.get(Yt)]=le.get(It)});else D[E.get(It)]=le.get(It)},De=!0,He=!1,We=void 0;try{for(var Oe=le.keys()[Symbol.iterator](),Ve;!(De=(Ve=Oe.next()).done);De=!0){var Ce=Ve.value;sr(Ce)}}catch(Qt){He=!0,We=Qt}finally{try{if(!De&&Oe.return)Oe.return()}finally{if(He)throw We}}})()}for(var Kt=0;Kt<X.length;Kt++){var kt=X[Kt];if(kt.getChild()==null)kt.setCenter(T[E.get(kt.id)],D[E.get(kt.id)])}},o.exports=c},551:(o)=>{o.exports=L}},A={};function d(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return R[o](a,a.exports,d),a.exports}var h=d(45);return h})()})});var ze=$n(function(Ee,be){(function(R,A){if(typeof Ee==="object"&&typeof be==="object")be.exports=A(Fe());else if(typeof define==="function"&&define.amd)define(["cose-base"],A);else if(typeof Ee==="object")Ee.cytoscapeFcose=A(Fe());else R.cytoscapeFcose=A(R.coseBase)})(Ee,function(L){return(()=>{var R={658:(o)=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(n){for(var a=arguments.length,g=Array(a>1?a-1:0),r=1;r<a;r++)g[r-1]=arguments[r];return g.forEach(function(v){Object.keys(v).forEach(function(i){return n[i]=v[i]})}),n}},548:(o,n,a)=>{var g=function(){function i(e,c){var u=[],f=!0,x=!1,E=void 0;try{for(var T=e[Symbol.iterator](),D;!(f=(D=T.next()).done);f=!0)if(u.push(D.value),c&&u.length===c)break}catch(X){x=!0,E=X}finally{try{if(!f&&T.return)T.return()}finally{if(x)throw E}}return u}return function(e,c){if(Array.isArray(e))return e;else if(Symbol.iterator in Object(e))return i(e,c);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=a(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(i){var e={};for(var c=0;c<i.length;c++)e[i[c].id()]=!0;var u=i.filter(function(f,x){if(typeof f==="number")f=x;var E=f.parent()[0];while(E!=null){if(e[E.id()])return!1;E=E.parent()[0]}return!0});return u},v.connectComponents=function(i,e,c,u){var f=new r,x=new Set,E=[],T=void 0,D=void 0,X=void 0,I=!1,V=1,_=[],Q=[],lt=function(){var tt=i.collection();Q.push(tt);var s=c[0],N=i.collection();N.merge(s).merge(s.descendants().intersection(e)),E.push(s),N.forEach(function(p){f.push(p),x.add(p),tt.merge(p)});var y=function(){s=f.shift();var U=i.collection();s.neighborhood().nodes().forEach(function(W){if(e.intersection(s.edgesWith(W)).length>0)U.merge(W)});for(var F=0;F<U.length;F++){var k=U[F];if(T=c.intersection(k.union(k.ancestors())),T!=null&&!x.has(T[0])){var B=T.union(T.descendants());B.forEach(function(W){if(f.push(W),x.add(W),tt.merge(W),c.has(W))E.push(W)})}}};while(f.length!=0)y();if(tt.forEach(function(p){e.intersection(p.connectedEdges()).forEach(function(U){if(tt.has(U.source())&&tt.has(U.target()))tt.merge(U)})}),E.length==c.length)I=!0;if(!I||I&&V>1){D=E[0],X=D.connectedEdges().length,E.forEach(function(p){if(p.connectedEdges().length<X)X=p.connectedEdges().length,D=p}),_.push(D.id());var w=i.collection();w.merge(E[0]),E.forEach(function(p){w.merge(p)}),E=[],c=c.difference(w),V++}};do lt();while(!I);if(u){if(_.length>0)u.set("dummy"+(u.size+1),_)}return Q},v.relocateComponent=function(i,e,c){if(!c.fixedNodeConstraint){var{POSITIVE_INFINITY:u,NEGATIVE_INFINITY:f,POSITIVE_INFINITY:x,NEGATIVE_INFINITY:E}=Number;if(c.quality=="draft"){var T=!0,D=!1,X=void 0;try{for(var I=e.nodeIndexes[Symbol.iterator](),V;!(T=(V=I.next()).done);T=!0){var _=V.value,Q=g(_,2),lt=Q[0],P=Q[1],tt=c.cy.getElementById(lt);if(tt){var s=tt.boundingBox(),N=e.xCoords[P]-s.w/2,y=e.xCoords[P]+s.w/2,w=e.yCoords[P]-s.h/2,p=e.yCoords[P]+s.h/2;if(N<u)u=N;if(y>f)f=y;if(w<x)x=w;if(p>E)E=p}}}catch(W){D=!0,X=W}finally{try{if(!T&&I.return)I.return()}finally{if(D)throw X}}var U=i.x-(f+u)/2,F=i.y-(E+x)/2;e.xCoords=e.xCoords.map(function(W){return W+U}),e.yCoords=e.yCoords.map(function(W){return W+F})}else{Object.keys(e).forEach(function(W){var st=e[W],dt=st.getRect().x,Z=st.getRect().x+st.getRect().width,ut=st.getRect().y,nt=st.getRect().y+st.getRect().height;if(dt<u)u=dt;if(Z>f)f=Z;if(ut<x)x=ut;if(nt>E)E=nt});var k=i.x-(f+u)/2,B=i.y-(E+x)/2;Object.keys(e).forEach(function(W){var st=e[W];st.setCenter(st.getCenterX()+k,st.getCenterY()+B)})}}},v.calcBoundingBox=function(i,e,c,u){var{MAX_SAFE_INTEGER:f,MIN_SAFE_INTEGER:x,MAX_SAFE_INTEGER:E,MIN_SAFE_INTEGER:T}=Number,D=void 0,X=void 0,I=void 0,V=void 0,_=i.descendants().not(":parent"),Q=_.length;for(var lt=0;lt<Q;lt++){var P=_[lt];if(D=e[u.get(P.id())]-P.width()/2,X=e[u.get(P.id())]+P.width()/2,I=c[u.get(P.id())]-P.height()/2,V=c[u.get(P.id())]+P.height()/2,f>D)f=D;if(x<X)x=X;if(E>I)E=I;if(T<V)T=V}var tt={};return tt.topLeftX=f,tt.topLeftY=E,tt.width=x-f,tt.height=T-E,tt},v.calcParentsWithoutChildren=function(i,e){var c=i.collection();return e.nodes(":parent").forEach(function(u){var f=!1;if(u.children().forEach(function(x){if(x.css("display")!="none")f=!0}),!f)c.merge(u)}),c},o.exports=v},816:(o,n,a)=>{var g=a(548),r=a(140).CoSELayout,v=a(140).CoSENode,i=a(140).layoutBase.PointD,e=a(140).layoutBase.DimensionD,c=a(140).layoutBase.LayoutConstants,u=a(140).layoutBase.FDLayoutConstants,f=a(140).CoSEConstants,x=function(T,D){var{cy:X,eles:I}=T,V=I.nodes(),_=I.edges(),Q=void 0,lt=void 0,P=void 0,tt={};if(T.randomize)Q=D.nodeIndexes,lt=D.xCoords,P=D.yCoords;var s=function(W){return typeof W==="function"},N=function(W,st){if(s(W))return W(st);else return W},y=g.calcParentsWithoutChildren(X,I),w=function B(W,st,dt,Z){var ut=st.length;for(var nt=0;nt<ut;nt++){var S=st[nt],K=null;if(S.intersection(y).length==0)K=S.children();var et=void 0,ct=S.layoutDimensions({nodeDimensionsIncludeLabels:Z.nodeDimensionsIncludeLabels});if(S.outerWidth()!=null&&S.outerHeight()!=null)if(Z.randomize)if(!S.isParent())et=W.add(new v(dt.graphManager,new i(lt[Q.get(S.id())]-ct.w/2,P[Q.get(S.id())]-ct.h/2),new e(parseFloat(ct.w),parseFloat(ct.h))));else{var Nt=g.calcBoundingBox(S,lt,P,Q);if(S.intersection(y).length==0)et=W.add(new v(dt.graphManager,new i(Nt.topLeftX,Nt.topLeftY),new e(Nt.width,Nt.height)));else et=W.add(new v(dt.graphManager,new i(Nt.topLeftX,Nt.topLeftY),new e(parseFloat(ct.w),parseFloat(ct.h))))}else et=W.add(new v(dt.graphManager,new i(S.position("x")-ct.w/2,S.position("y")-ct.h/2),new e(parseFloat(ct.w),parseFloat(ct.h))));else et=W.add(new v(this.graphManager));if(et.id=S.data("id"),et.nodeRepulsion=N(Z.nodeRepulsion,S),et.paddingLeft=parseInt(S.css("padding")),et.paddingTop=parseInt(S.css("padding")),et.paddingRight=parseInt(S.css("padding")),et.paddingBottom=parseInt(S.css("padding")),Z.nodeDimensionsIncludeLabels)et.labelWidth=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,et.labelHeight=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,et.labelPosVertical=S.css("text-valign"),et.labelPosHorizontal=S.css("text-halign");if(tt[S.data("id")]=et,isNaN(et.rect.x))et.rect.x=0;if(isNaN(et.rect.y))et.rect.y=0;if(K!=null&&K.length>0){var Pt=void 0;Pt=dt.getGraphManager().add(dt.newGraph(),et),B(Pt,K,dt,Z)}}},p=function(W,st,dt){var Z=0,ut=0;for(var nt=0;nt<dt.length;nt++){var S=dt[nt],K=tt[S.data("source")],et=tt[S.data("target")];if(K&&et&&K!==et&&K.getEdgesBetween(et).length==0){var ct=st.add(W.newEdge(),K,et);ct.id=S.id(),ct.idealLength=N(T.idealEdgeLength,S),ct.edgeElasticity=N(T.edgeElasticity,S),Z+=ct.idealLength,ut++}}if(T.idealEdgeLength!=null){if(ut>0)f.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=Z/ut;else if(!s(T.idealEdgeLength))f.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=T.idealEdgeLength;else f.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50;f.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH}},U=function(W,st){if(st.fixedNodeConstraint)W.constraints.fixedNodeConstraint=st.fixedNodeConstraint;if(st.alignmentConstraint)W.constraints.alignmentConstraint=st.alignmentConstraint;if(st.relativePlacementConstraint)W.constraints.relativePlacementConstraint=st.relativePlacementConstraint};if(T.nestingFactor!=null)f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=T.nestingFactor;if(T.gravity!=null)f.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=T.gravity;if(T.numIter!=null)f.MAX_ITERATIONS=u.MAX_ITERATIONS=T.numIter;if(T.gravityRange!=null)f.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=T.gravityRange;if(T.gravityCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=T.gravityCompound;if(T.gravityRangeCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=T.gravityRangeCompound;if(T.initialEnergyOnIncremental!=null)f.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=T.initialEnergyOnIncremental;if(T.tilingCompareBy!=null)f.TILING_COMPARE_BY=T.tilingCompareBy;if(T.quality=="proof")c.QUALITY=2;else c.QUALITY=0;if(f.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=T.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!T.randomize,f.ANIMATE=u.ANIMATE=c.ANIMATE=T.animate,f.TILE=T.tile,f.TILING_PADDING_VERTICAL=typeof T.tilingPaddingVertical==="function"?T.tilingPaddingVertical.call():T.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof T.tilingPaddingHorizontal==="function"?T.tilingPaddingHorizontal.call():T.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!T.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=T.uniformNodeDimensions,T.step=="transformed")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1;if(T.step=="enforced")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1;if(T.step=="cose")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0;if(T.step=="all"){if(T.randomize)f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0}if(T.fixedNodeConstraint||T.alignmentConstraint||T.relativePlacementConstraint)f.TREE_REDUCTION_ON_INCREMENTAL=!1;else f.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new r,k=F.newGraphManager();return w(k.addRoot(),g.getTopMostNodes(V),F,T),p(F,k,_),U(F,T),F.runLayout(),tt};o.exports={coseLayout:x}},212:(o,n,a)=>{var g=function(){function T(D,X){for(var I=0;I<X.length;I++){var V=X[I];if(V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V)V.writable=!0;Object.defineProperty(D,V.key,V)}}return function(D,X,I){if(X)T(D.prototype,X);if(I)T(D,I);return D}}();function r(T,D){if(!(T instanceof D))throw TypeError("Cannot call a class as a function")}var v=a(658),i=a(548),e=a(657),c=e.spectralLayout,u=a(816),f=u.coseLayout,x=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),E=function(){function T(D){r(this,T),this.options=v({},x,D)}return g(T,[{key:"run",value:function(){var X=this,I=this.options,{cy:V,eles:_}=I,Q=[],lt=void 0,P=void 0,tt=[],s=void 0,N=[];if(I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0))I.fixedNodeConstraint=void 0;if(I.alignmentConstraint){if(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0))I.alignmentConstraint.vertical=void 0;if(I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0))I.alignmentConstraint.horizontal=void 0}if(I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0))I.relativePlacementConstraint=void 0;var y=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;if(y)I.tile=!1,I.packComponents=!1;var w=void 0,p=!1;if(V.layoutUtilities&&I.packComponents){if(w=V.layoutUtilities("get"),!w)w=V.layoutUtilities();p=!0}if(_.nodes().length>0)if(!p){var U=I.eles.boundingBox();if(N.push({x:U.x1+U.w/2,y:U.y1+U.h/2}),I.randomize){var F=c(I);Q.push(F)}if(I.quality=="default"||I.quality=="proof")tt.push(f(I,Q[0])),i.relocateComponent(N[0],tt[0],I);else i.relocateComponent(N[0],Q[0],I)}else{var k=i.getTopMostNodes(I.eles.nodes());if(s=i.connectComponents(V,I.eles,k),s.forEach(function(Et){var vt=Et.boundingBox();N.push({x:vt.x1+vt.w/2,y:vt.y1+vt.h/2})}),I.randomize)s.forEach(function(Et){I.eles=Et,Q.push(c(I))});if(I.quality=="default"||I.quality=="proof"){var B=V.collection();if(I.tile){var W=new Map,st=[],dt=[],Z=0,ut={nodeIndexes:W,xCoords:st,yCoords:dt},nt=[];if(s.forEach(function(Et,vt){if(Et.edges().length==0)Et.nodes().forEach(function(xt,Rt){if(B.merge(Et.nodes()[Rt]),!xt.isParent())ut.nodeIndexes.set(Et.nodes()[Rt].id(),Z++),ut.xCoords.push(Et.nodes()[0].position().x),ut.yCoords.push(Et.nodes()[0].position().y)}),nt.push(vt)}),B.length>1){var S=B.boundingBox();N.push({x:S.x1+S.w/2,y:S.y1+S.h/2}),s.push(B),Q.push(ut);for(var K=nt.length-1;K>=0;K--)s.splice(nt[K],1),Q.splice(nt[K],1),N.splice(nt[K],1)}}s.forEach(function(Et,vt){I.eles=Et,tt.push(f(I,Q[vt])),i.relocateComponent(N[vt],tt[vt],I)})}else s.forEach(function(Et,vt){i.relocateComponent(N[vt],Q[vt],I)});var et=new Set;if(s.length>1){var ct=[],Nt=_.filter(function(Et){return Et.css("display")=="none"});s.forEach(function(Et,vt){var xt=void 0;if(I.quality=="draft")xt=Q[vt].nodeIndexes;if(Et.nodes().not(Nt).length>0){var Rt={};Rt.edges=[],Rt.nodes=[];var Gt=void 0;if(Et.nodes().not(Nt).forEach(function(St){if(I.quality=="draft")if(!St.isParent())Gt=xt.get(St.id()),Rt.nodes.push({x:Q[vt].xCoords[Gt]-St.boundingbox().w/2,y:Q[vt].yCoords[Gt]-St.boundingbox().h/2,width:St.boundingbox().w,height:St.boundingbox().h});else{var Ft=i.calcBoundingBox(St,Q[vt].xCoords,Q[vt].yCoords,xt);Rt.nodes.push({x:Ft.topLeftX,y:Ft.topLeftY,width:Ft.width,height:Ft.height})}else if(tt[vt][St.id()])Rt.nodes.push({x:tt[vt][St.id()].getLeft(),y:tt[vt][St.id()].getTop(),width:tt[vt][St.id()].getWidth(),height:tt[vt][St.id()].getHeight()})}),Et.edges().forEach(function(St){var Ft=St.source(),Ht=St.target();if(Ft.css("display")!="none"&&Ht.css("display")!="none"){if(I.quality=="draft"){var zt=xt.get(Ft.id()),ee=xt.get(Ht.id()),qt=[],Kt=[];if(Ft.isParent()){var kt=i.calcBoundingBox(Ft,Q[vt].xCoords,Q[vt].yCoords,xt);qt.push(kt.topLeftX+kt.width/2),qt.push(kt.topLeftY+kt.height/2)}else qt.push(Q[vt].xCoords[zt]),qt.push(Q[vt].yCoords[zt]);if(Ht.isParent()){var J=i.calcBoundingBox(Ht,Q[vt].xCoords,Q[vt].yCoords,xt);Kt.push(J.topLeftX+J.width/2),Kt.push(J.topLeftY+J.height/2)}else Kt.push(Q[vt].xCoords[ee]),Kt.push(Q[vt].yCoords[ee]);Rt.edges.push({startX:qt[0],startY:qt[1],endX:Kt[0],endY:Kt[1]})}else if(tt[vt][Ft.id()]&&tt[vt][Ht.id()])Rt.edges.push({startX:tt[vt][Ft.id()].getCenterX(),startY:tt[vt][Ft.id()].getCenterY(),endX:tt[vt][Ht.id()].getCenterX(),endY:tt[vt][Ht.id()].getCenterY()})}}),Rt.nodes.length>0)ct.push(Rt),et.add(vt)}});var Pt=w.packComponents(ct,I.randomize).shifts;if(I.quality=="draft")Q.forEach(function(Et,vt){var xt=Et.xCoords.map(function(Gt){return Gt+Pt[vt].dx}),Rt=Et.yCoords.map(function(Gt){return Gt+Pt[vt].dy});Et.xCoords=xt,Et.yCoords=Rt});else{var Bt=0;et.forEach(function(Et){Object.keys(tt[Et]).forEach(function(vt){var xt=tt[Et][vt];xt.setCenter(xt.getCenterX()+Pt[Bt].dx,xt.getCenterY()+Pt[Bt].dy)}),Bt++})}}}var ft=function(vt,xt){if(I.quality=="default"||I.quality=="proof"){if(typeof vt==="number")vt=xt;var Rt=void 0,Gt=void 0,St=vt.data("id");if(tt.forEach(function(Ht){if(St in Ht)Rt={x:Ht[St].getRect().getCenterX(),y:Ht[St].getRect().getCenterY()},Gt=Ht[St]}),I.nodeDimensionsIncludeLabels){if(Gt.labelWidth){if(Gt.labelPosHorizontal=="left")Rt.x+=Gt.labelWidth/2;else if(Gt.labelPosHorizontal=="right")Rt.x-=Gt.labelWidth/2}if(Gt.labelHeight){if(Gt.labelPosVertical=="top")Rt.y+=Gt.labelHeight/2;else if(Gt.labelPosVertical=="bottom")Rt.y-=Gt.labelHeight/2}}if(Rt==null)Rt={x:vt.position("x"),y:vt.position("y")};return{x:Rt.x,y:Rt.y}}else{var Ft=void 0;if(Q.forEach(function(Ht){var zt=Ht.nodeIndexes.get(vt.id());if(zt!=null)Ft={x:Ht.xCoords[zt],y:Ht.yCoords[zt]}}),Ft==null)Ft={x:vt.position("x"),y:vt.position("y")};return{x:Ft.x,y:Ft.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var Jt=i.calcParentsWithoutChildren(V,_),Xt=_.filter(function(Et){return Et.css("display")=="none"});if(I.eles=_.not(Xt),_.nodes().not(":parent").not(Xt).layoutPositions(X,I,ft),Jt.length>0)Jt.forEach(function(Et){Et.position(ft(Et))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),T}();o.exports=E},657:(o,n,a)=>{var g=a(548),r=a(140).layoutBase.Matrix,v=a(140).layoutBase.SVD,i=function(c){var{cy:u,eles:f}=c,x=f.nodes(),E=f.nodes(":parent"),T=new Map,D=new Map,X=new Map,I=[],V=[],_=[],Q=[],lt=[],P=[],tt=[],s=[],N=void 0,y=void 0,w=1e8,p=0.000000001,{piTol:U,samplingType:F,nodeSeparation:k}=c,B=void 0,W=function(){var it=0,at=0,ot=!1;while(at<B){it=Math.floor(Math.random()*y),ot=!1;for(var gt=0;gt<at;gt++)if(Q[gt]==it){ot=!0;break}if(!ot)Q[at]=it,at++;else continue}},st=function(it,at,ot){var gt=[],At=0,Mt=0,ht=0,Lt=void 0,Ct=[],pt=0,Ot=1;for(var Ut=0;Ut<y;Ut++)Ct[Ut]=w;gt[Mt]=it,Ct[it]=0;while(Mt>=At){ht=gt[At++];var Tt=I[ht];for(var yt=0;yt<Tt.length;yt++)if(Lt=D.get(Tt[yt]),Ct[Lt]==w)Ct[Lt]=Ct[ht]+1,gt[++Mt]=Lt;P[ht][at]=Ct[ht]*k}if(ot){for(var Dt=0;Dt<y;Dt++)if(P[Dt][at]<lt[Dt])lt[Dt]=P[Dt][at];for(var mt=0;mt<y;mt++)if(lt[mt]>pt)pt=lt[mt],Ot=mt}return Ot},dt=function(it){var at=void 0;if(!it){W();for(var ot=0;ot<B;ot++)st(Q[ot],ot,it,!1)}else{at=Math.floor(Math.random()*y),N=at;for(var gt=0;gt<y;gt++)lt[gt]=w;for(var At=0;At<B;At++)Q[At]=at,at=st(at,At,it)}for(var Mt=0;Mt<y;Mt++)for(var ht=0;ht<B;ht++)P[Mt][ht]*=P[Mt][ht];for(var Lt=0;Lt<B;Lt++)tt[Lt]=[];for(var Ct=0;Ct<B;Ct++)for(var pt=0;pt<B;pt++)tt[Ct][pt]=P[Q[pt]][Ct]},Z=function(){var it=v.svd(tt),{S:at,U:ot,V:gt}=it,At=at[0]*at[0]*at[0],Mt=[];for(var ht=0;ht<B;ht++){Mt[ht]=[];for(var Lt=0;Lt<B;Lt++)if(Mt[ht][Lt]=0,ht==Lt)Mt[ht][Lt]=at[ht]/(at[ht]*at[ht]+At/(at[ht]*at[ht]))}s=r.multMat(r.multMat(gt,Mt),r.transpose(ot))},ut=function(){var it=void 0,at=void 0,ot=[],gt=[],At=[],Mt=[];for(var ht=0;ht<y;ht++)ot[ht]=Math.random(),gt[ht]=Math.random();ot=r.normalize(ot),gt=r.normalize(gt);var Lt=0,Ct=p,pt=p,Ot=void 0;while(!0){Lt++;for(var Ut=0;Ut<y;Ut++)At[Ut]=ot[Ut];if(ot=r.multGamma(r.multL(r.multGamma(At),P,s)),it=r.dotProduct(At,ot),ot=r.normalize(ot),Ct=r.dotProduct(At,ot),Ot=Math.abs(Ct/pt),Ot<=1+U&&Ot>=1)break;pt=Ct}for(var Tt=0;Tt<y;Tt++)At[Tt]=ot[Tt];Lt=0,pt=p;while(!0){Lt++;for(var yt=0;yt<y;yt++)Mt[yt]=gt[yt];if(Mt=r.minusOp(Mt,r.multCons(At,r.dotProduct(At,Mt))),gt=r.multGamma(r.multL(r.multGamma(Mt),P,s)),at=r.dotProduct(Mt,gt),gt=r.normalize(gt),Ct=r.dotProduct(Mt,gt),Ot=Math.abs(Ct/pt),Ot<=1+U&&Ot>=1)break;pt=Ct}for(var Dt=0;Dt<y;Dt++)Mt[Dt]=gt[Dt];V=r.multCons(At,Math.sqrt(Math.abs(it))),_=r.multCons(Mt,Math.sqrt(Math.abs(at)))};g.connectComponents(u,f,g.getTopMostNodes(x),T),E.forEach(function(rt){g.connectComponents(u,f,g.getTopMostNodes(rt.descendants().intersection(f)),T)});var nt=0;for(var S=0;S<x.length;S++)if(!x[S].isParent())D.set(x[S].id(),nt++);var K=!0,et=!1,ct=void 0;try{for(var Nt=T.keys()[Symbol.iterator](),Pt;!(K=(Pt=Nt.next()).done);K=!0){var Bt=Pt.value;D.set(Bt,nt++)}}catch(rt){et=!0,ct=rt}finally{try{if(!K&&Nt.return)Nt.return()}finally{if(et)throw ct}}for(var ft=0;ft<D.size;ft++)I[ft]=[];E.forEach(function(rt){var it=rt.children().intersection(f);while(it.nodes(":childless").length==0)it=it.nodes()[0].children().intersection(f);var at=0,ot=it.nodes(":childless")[0].connectedEdges().length;it.nodes(":childless").forEach(function(gt,At){if(gt.connectedEdges().length<ot)ot=gt.connectedEdges().length,at=At}),X.set(rt.id(),it.nodes(":childless")[at].id())}),x.forEach(function(rt){var it=void 0;if(rt.isParent())it=D.get(X.get(rt.id()));else it=D.get(rt.id());rt.neighborhood().nodes().forEach(function(at){if(f.intersection(rt.edgesWith(at)).length>0)if(at.isParent())I[it].push(X.get(at.id()));else I[it].push(at.id())})});var Jt=function(it){var at=D.get(it),ot=void 0;T.get(it).forEach(function(gt){if(u.getElementById(gt).isParent())ot=X.get(gt);else ot=gt;I[at].push(ot),I[D.get(ot)].push(it)})},Xt=!0,Et=!1,vt=void 0;try{for(var xt=T.keys()[Symbol.iterator](),Rt;!(Xt=(Rt=xt.next()).done);Xt=!0){var Gt=Rt.value;Jt(Gt)}}catch(rt){Et=!0,vt=rt}finally{try{if(!Xt&&xt.return)xt.return()}finally{if(Et)throw vt}}y=D.size;var St=void 0;if(y>2){B=y<c.sampleSize?y:c.sampleSize;for(var Ft=0;Ft<y;Ft++)P[Ft]=[];for(var Ht=0;Ht<B;Ht++)s[Ht]=[];if(c.quality=="draft"||c.step=="all")dt(F),Z(),ut(),St={nodeIndexes:D,xCoords:V,yCoords:_};else D.forEach(function(rt,it){V.push(u.getElementById(it).position("x")),_.push(u.getElementById(it).position("y"))}),St={nodeIndexes:D,xCoords:V,yCoords:_};return St}else{var zt=D.keys(),ee=u.getElementById(zt.next().value),qt=ee.position(),Kt=ee.outerWidth();if(V.push(qt.x),_.push(qt.y),y==2){var kt=u.getElementById(zt.next().value),J=kt.outerWidth();V.push(qt.x+Kt/2+J/2+c.idealEdgeLength),_.push(qt.y)}return St={nodeIndexes:D,xCoords:V,yCoords:_},St}};o.exports={spectralLayout:i}},579:(o,n,a)=>{var g=a(212),r=function(i){if(!i)return;i("layout","fcose",g)};if(typeof cytoscape<"u")r(cytoscape);o.exports=r},140:(o)=>{o.exports=L}},A={};function d(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return R[o](a,a.exports,d),a.exports}var h=d(579);return h})()})});var je=xn(ze(),1);var Be={L:"left",R:"right",T:"top",B:"bottom"},Ze={L:t((L)=>`${L},${L/2} 0,${L} 0,0`,"L"),R:t((L)=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:t((L)=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:t((L)=>`${L/2},0 ${L},${L} 0,${L}`,"B")},Le={L:t((L,R)=>L-R+2,"L"),R:t((L,R)=>L-2,"R"),T:t((L,R)=>L-R+2,"T"),B:t((L,R)=>L-2,"B")},hr=t(function(L){if(_t(L))return L==="L"?"R":"L";else return L==="T"?"B":"T"},"getOppositeArchitectureDirection"),ke=t(function(L){let R=L;return R==="L"||R==="R"||R==="T"||R==="B"},"isArchitectureDirection"),_t=t(function(L){let R=L;return R==="L"||R==="R"},"isArchitectureDirectionX"),se=t(function(L){let R=L;return R==="T"||R==="B"},"isArchitectureDirectionY"),Ue=t(function(L,R){let A=_t(L)&&se(R),d=se(L)&&_t(R);return A||d},"isArchitectureDirectionXY"),lr=t(function(L){let R=L[0],A=L[1],d=_t(R)&&se(A),h=se(R)&&_t(A);return d||h},"isArchitecturePairXY"),fr=t(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),Pe=t(function(L,R){let A=`${L}${R}`;return fr(A)?A:void 0},"getArchitectureDirectionPair"),cr=t(function([L,R],A){let d=A[0],h=A[1];if(_t(d))if(se(h))return[L+(d==="L"?-1:1),R+(h==="T"?1:-1)];else return[L+(d==="L"?-1:1),R];else if(_t(h))return[L+(h==="L"?1:-1),R+(d==="T"?1:-1)];else return[L,R+(d==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),gr=t(function(L){if(L==="LT"||L==="TL")return[1,1];else if(L==="BL"||L==="LB")return[1,-1];else if(L==="BR"||L==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),ur=t(function(L,R){if(Ue(L,R))return"bend";else if(_t(L))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),dr=t(function(L){return L.type==="service"},"isArchitectureService"),vr=t(function(L){return L.type==="junction"},"isArchitectureJunction"),qe=t((L,R)=>{let[A,d]=[L,R].sort();return`${JSON.stringify(A)}-${JSON.stringify(d)}`},"architectureGroupAlignmentKey"),Qe=t((L)=>L.data(),"edgeData"),pe=t((L)=>L.data(),"nodeData"),pr=Y.architecture,Je=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=O,this.getAccTitle=G,this.setDiagramTitle=q,this.getDiagramTitle=H,this.getAccDescription=j,this.setAccDescription=z,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",M()}addService({id:L,icon:R,in:A,title:d,iconText:h}){if(this.registeredIds.has(L))throw Error(`The service id [${L}] is already in use by another ${this.registeredIds.get(L)}`);if(A!==void 0){if(L===A)throw Error(`The service [${L}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(A)==="node")throw Error(`The service [${L}]'s parent is not a group`)}this.registeredIds.set(L,"node"),this.nodes.set(L,{id:L,type:"service",icon:R,iconText:h,title:d,edges:[],in:A})}getServices(){return[...this.nodes.values()].filter(dr)}addJunction({id:L,in:R}){if(this.registeredIds.has(L))throw Error(`The junction id [${L}] is already in use by another ${this.registeredIds.get(L)}`);if(R!==void 0){if(L===R)throw Error(`The junction [${L}] cannot be placed within itself`);if(!this.registeredIds.has(R))throw Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(R)==="node")throw Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds.set(L,"node"),this.nodes.set(L,{id:L,type:"junction",edges:[],in:R})}getJunctions(){return[...this.nodes.values()].filter(vr)}getNodes(){return[...this.nodes.values()]}getNode(L){return this.nodes.get(L)??null}addGroup({id:L,icon:R,in:A,title:d}){if(this.registeredIds.has(L))throw Error(`The group id [${L}] is already in use by another ${this.registeredIds.get(L)}`);if(A!==void 0){if(L===A)throw Error(`The group [${L}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(A)==="node")throw Error(`The group [${L}]'s parent is not a group`)}this.registeredIds.set(L,"group"),this.groups.set(L,{id:L,icon:R,title:d,in:A})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:L,rhsId:R,lhsDir:A,rhsDir:d,lhsInto:h,rhsInto:o,lhsGroup:n,rhsGroup:a,title:g}){if(!ke(A))throw Error(`Invalid direction given for left hand side of edge ${L}--${R}. Expected (L,R,T,B) got ${String(A)}`);if(!ke(d))throw Error(`Invalid direction given for right hand side of edge ${L}--${R}. Expected (L,R,T,B) got ${String(d)}`);if(!this.nodes.has(L)&&!this.groups.has(L))throw Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(R)&&!this.groups.has(R))throw Error(`The right-hand id [${R}] does not yet exist. Please create the service/group before declaring an edge to it.`);let r=this.nodes.get(L).in,v=this.nodes.get(R).in;if(n&&r&&v&&r==v)throw Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&r&&v&&r==v)throw Error(`The right-hand id [${R}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let i={lhsId:L,lhsDir:A,lhsInto:h,lhsGroup:n,rhsId:R,rhsDir:d,rhsInto:o,rhsGroup:a,title:g};this.edges.push(i);let e=this.nodes.get(L),c=this.nodes.get(R);if(e&&c)e.edges.push(this.edges[this.edges.length-1]),c.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw Error(`An align directive requires at least two members; got ${L.members.length}`);let R=new Set;L.members.forEach((A)=>{if(this.registeredIds.get(A)!=="node")throw Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(R.has(A))throw Error(`align ${L.direction} lists [${A}] more than once`);R.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let L=new Map,R=new Map;for(let[n,a]of this.nodes.entries()){let g=new Map;for(let r of a.edges){let v=this.getNode(r.lhsId)?.in,i=this.getNode(r.rhsId)?.in;if(v&&i&&v!==i){let e=ur(r.lhsDir,r.rhsDir);if(e!=="bend")L.set(qe(v,i),e)}if(r.lhsId===n){let e=Pe(r.lhsDir,r.rhsDir);if(e)g.set(e,r.rhsId)}else{let e=Pe(r.rhsDir,r.lhsDir);if(e)g.set(e,r.lhsId)}}R.set(n,g)}let A=new Set,d=new Set(R.keys()),h=t((n)=>{let a=new Map([[n,[0,0]]]),g=[n];while(g.length>0){let r=g.shift();if(r){A.add(r),d.delete(r);let v=R.get(r);if(!v)throw Error(`BFS error: adjacency list for id ${r} not found. Please report this as a bug.`);let i=a.get(r);if(!i)throw Error(`BFS error: position for id ${r} not found in spatial map. Please report this as a bug.`);let[e,c]=i;v.forEach((u,f)=>{if(!A.has(u))a.set(u,cr([e,c],f)),g.push(u)})}}return a},"BFS"),o=[];while(d.size>0){let n=d.values().next().value;o.push(h(n))}this.dataStructures={adjList:R,spatialMaps:o,groupAlignments:L}}return this.dataStructures}setElementForId(L,R){this.elements.set(L,R)}getElementById(L){return this.elements.get(L)}getConfig(){return ce({...pr,...C().architecture})}getConfigField(L){return this.getConfig()[L]}},yr=t((L,R)=>{xe(L,R),L.groups.map((A)=>R.addGroup(A)),L.services.map((A)=>R.addService({...A,type:"service"})),L.junctions.map((A)=>R.addJunction({...A,type:"junction"})),L.edges.map((A)=>R.addEdge(A)),L.alignments?.map((A)=>R.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ke={parser:{yy:void 0},parse:t(async(L)=>{let R=await $e("architecture",L);l.debug(R);let A=Ke.parser?.yy;if(!(A instanceof Je))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");yr(R,A)},"parse")},mr=t((L)=>`
1
+ import{xe}from"./index-bwwgtesb.js";import{t,l,Y,C,te,Xr,M,O,G,z,j,q,H,m,b,Ae,Fg,Xi,br,ce,Mn,bn}from"./index-kbaffwp1.js";import{$e}from"./index-cwwg7k5f.js";import{Jr}from"./index-9qf2h9jb.js";import{xn,$n}from"./index-8pqx5n2p.js";var Re=$n(function(ye,Ie){(function(R,A){if(typeof ye==="object"&&typeof Ie==="object")Ie.exports=A();else if(typeof define==="function"&&define.amd)define([],A);else if(typeof ye==="object")ye.layoutBase=A();else R.layoutBase=A()})(ye,function(){return function(L){var R={};function A(d){if(R[d])return R[d].exports;var h=R[d]={i:d,l:!1,exports:{}};return L[d].call(h.exports,h,h.exports,A),h.l=!0,h.exports}return A.m=L,A.c=R,A.i=function(d){return d},A.d=function(d,h,o){if(!A.o(d,h))Object.defineProperty(d,h,{configurable:!1,enumerable:!0,get:o})},A.n=function(d){var h=d&&d.__esModule?function(){return d.default}:function(){return d};return A.d(h,"a",h),h},A.o=function(d,h){return Object.prototype.hasOwnProperty.call(d,h)},A.p="",A(A.s=28)}([function(L,R,A){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1000,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,L.exports=d},function(L,R,A){var d=A(2),h=A(8),o=A(9);function n(g,r,v){d.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=r}n.prototype=Object.create(d.prototype);for(var a in d)n[a]=d[a];n.prototype.getSource=function(){return this.source},n.prototype.getTarget=function(){return this.target},n.prototype.isInterGraph=function(){return this.isInterGraph},n.prototype.getLength=function(){return this.length},n.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},n.prototype.getBendpoints=function(){return this.bendpoints},n.prototype.getLca=function(){return this.lca},n.prototype.getSourceInLca=function(){return this.sourceInLca},n.prototype.getTargetInLca=function(){return this.targetInLca},n.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;else if(this.target===g)return this.source;else throw"Node is not incident with this edge"},n.prototype.getOtherEndInGraph=function(g,r){var v=this.getOtherEnd(g),i=r.getGraphManager().getRoot();while(!0){if(v.getOwner()==r)return v;if(v.getOwner()==i)break;v=v.getOwner().getParent()}return null},n.prototype.updateLength=function(){var g=[,,,,];if(this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),g),!this.isOverlapingSourceAndTarget){if(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)}},n.prototype.updateLengthSimple=function(){if(this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1)this.lengthX=o.sign(this.lengthX);if(Math.abs(this.lengthY)<1)this.lengthY=o.sign(this.lengthY);this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},L.exports=n},function(L,R,A){function d(h){this.vGraphObject=h}L.exports=d},function(L,R,A){var d=A(2),h=A(10),o=A(13),n=A(0),a=A(16),g=A(5);function r(i,e,c,u){if(c==null&&u==null)u=e;if(d.call(this,u),i.graphManager!=null)i=i.graphManager;if(this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=u,this.edges=[],this.graphManager=i,c!=null&&e!=null)this.rect=new o(e.x,e.y,c.width,c.height);else this.rect=new o}r.prototype=Object.create(d.prototype);for(var v in d)r[v]=d[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(i){this.rect.width=i},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(i){this.rect.height=i},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.prototype.setRect=function(i,e){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=e.width,this.rect.height=e.height},r.prototype.setCenter=function(i,e){this.rect.x=i-this.rect.width/2,this.rect.y=e-this.rect.height/2},r.prototype.setLocation=function(i,e){this.rect.x=i,this.rect.y=e},r.prototype.moveBy=function(i,e){this.rect.x+=i,this.rect.y+=e},r.prototype.getEdgeListToNode=function(i){var e=[],c,u=this;return u.edges.forEach(function(f){if(f.target==i){if(f.source!=u)throw"Incorrect edge source!";e.push(f)}}),e},r.prototype.getEdgesBetween=function(i){var e=[],c,u=this;return u.edges.forEach(function(f){if(!(f.source==u||f.target==u))throw"Incorrect edge source and/or target";if(f.target==i||f.source==i)e.push(f)}),e},r.prototype.getNeighborsList=function(){var i=new Set,e=this;return e.edges.forEach(function(c){if(c.source==e)i.add(c.target);else{if(c.target!=e)throw"Incorrect incidency!";i.add(c.source)}}),i},r.prototype.withChildren=function(){var i=new Set,e,c;if(i.add(this),this.child!=null){var u=this.child.getNodes();for(var f=0;f<u.length;f++)e=u[f],c=e.withChildren(),c.forEach(function(x){i.add(x)})}return i},r.prototype.getNoOfChildren=function(){var i=0,e;if(this.child==null)i=1;else{var c=this.child.getNodes();for(var u=0;u<c.length;u++)e=c[u],i+=e.getNoOfChildren()}if(i==0)i=1;return i},r.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},r.prototype.calcEstimatedSize=function(){if(this.child==null)return this.estimatedSize=(this.rect.width+this.rect.height)/2;else return this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize},r.prototype.scatter=function(){var i,e,c=-n.INITIAL_WORLD_BOUNDARY,u=n.INITIAL_WORLD_BOUNDARY;i=n.WORLD_CENTER_X+a.nextDouble()*(u-c)+c;var f=-n.INITIAL_WORLD_BOUNDARY,x=n.INITIAL_WORLD_BOUNDARY;e=n.WORLD_CENTER_Y+a.nextDouble()*(x-f)+f,this.rect.x=i,this.rect.y=e},r.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var i=this.getChild();if(i.updateBounds(!0),this.rect.x=i.getLeft(),this.rect.y=i.getTop(),this.setWidth(i.getRight()-i.getLeft()),this.setHeight(i.getBottom()-i.getTop()),n.NODE_DIMENSIONS_INCLUDE_LABELS){var e=i.getRight()-i.getLeft(),c=i.getBottom()-i.getTop();if(this.labelWidth){if(this.labelPosHorizontal=="left")this.rect.x-=this.labelWidth,this.setWidth(e+this.labelWidth);else if(this.labelPosHorizontal=="center"&&this.labelWidth>e)this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth);else if(this.labelPosHorizontal=="right")this.setWidth(e+this.labelWidth)}if(this.labelHeight){if(this.labelPosVertical=="top")this.rect.y-=this.labelHeight,this.setHeight(c+this.labelHeight);else if(this.labelPosVertical=="center"&&this.labelHeight>c)this.rect.y-=(this.labelHeight-c)/2,this.setHeight(this.labelHeight);else if(this.labelPosVertical=="bottom")this.setHeight(c+this.labelHeight)}}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(i){var e=this.rect.x;if(e>n.WORLD_BOUNDARY)e=n.WORLD_BOUNDARY;else if(e<-n.WORLD_BOUNDARY)e=-n.WORLD_BOUNDARY;var c=this.rect.y;if(c>n.WORLD_BOUNDARY)c=n.WORLD_BOUNDARY;else if(c<-n.WORLD_BOUNDARY)c=-n.WORLD_BOUNDARY;var u=new g(e,c),f=i.inverseTransformPoint(u);this.setLocation(f.x,f.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){if(this.owner==null)return null;return this.owner.getParent()},L.exports=r},function(L,R,A){var d=A(0);function h(){}for(var o in d)h[o]=d[o];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=0.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=0.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=0.3,h.COOLING_ADAPTATION_FACTOR=0.33,h.ADAPTATION_LOWER_NODE_LIMIT=1000,h.ADAPTATION_UPPER_NODE_LIMIT=5000,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=0.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,L.exports=h},function(L,R,A){function d(h,o){if(h==null&&o==null)this.x=0,this.y=0;else this.x=h,this.y=o}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(h){this.x=h},d.prototype.setY=function(h){this.y=h},d.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},L.exports=d},function(L,R,A){var d=A(2),h=A(10),o=A(0),n=A(7),a=A(3),g=A(1),r=A(13),v=A(12),i=A(11);function e(u,f,x){if(d.call(this,x),this.estimatedSize=h.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=u,f!=null&&f instanceof n)this.graphManager=f;else if(f!=null&&f instanceof Layout)this.graphManager=f.graphManager}e.prototype=Object.create(d.prototype);for(var c in d)e[c]=d[c];e.prototype.getNodes=function(){return this.nodes},e.prototype.getEdges=function(){return this.edges},e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getParent=function(){return this.parent},e.prototype.getLeft=function(){return this.left},e.prototype.getRight=function(){return this.right},e.prototype.getTop=function(){return this.top},e.prototype.getBottom=function(){return this.bottom},e.prototype.isConnected=function(){return this.isConnected},e.prototype.add=function(u,f,x){if(f==null&&x==null){var E=u;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}else{var T=u;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(x)>-1))throw"Source or target not in graph!";if(!(f.owner==x.owner&&f.owner==this))throw"Both owners must be this graph!";if(f.owner!=x.owner)return null;if(T.source=f,T.target=x,T.isInterGraph=!1,this.getEdges().push(T),f.edges.push(T),x!=f)x.edges.push(T);return T}},e.prototype.remove=function(u){var f=u;if(u instanceof a){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";var x=f.edges.slice(),E,T=x.length;for(var D=0;D<T;D++)if(E=x[D],E.isInterGraph)this.graphManager.remove(E);else E.source.owner.remove(E);var X=this.nodes.indexOf(f);if(X==-1)throw"Node not in owner node list!";this.nodes.splice(X,1)}else if(u instanceof g){var E=u;if(E==null)throw"Edge is null!";if(!(E.source!=null&&E.target!=null))throw"Source and/or target is null!";if(!(E.source.owner!=null&&E.target.owner!=null&&E.source.owner==this&&E.target.owner==this))throw"Source and/or target owner is invalid!";var I=E.source.edges.indexOf(E),V=E.target.edges.indexOf(E);if(!(I>-1&&V>-1))throw"Source and/or target doesn't know this edge!";if(E.source.edges.splice(I,1),E.target!=E.source)E.target.edges.splice(V,1);var X=E.source.owner.getEdges().indexOf(E);if(X==-1)throw"Not in owner's edge list!";E.source.owner.getEdges().splice(X,1)}},e.prototype.updateLeftTop=function(){var{MAX_VALUE:u,MAX_VALUE:f}=h,x,E,T,D=this.getNodes(),X=D.length;for(var I=0;I<X;I++){var V=D[I];if(x=V.getTop(),E=V.getLeft(),u>x)u=x;if(f>E)f=E}if(u==h.MAX_VALUE)return null;if(D[0].getParent().paddingLeft!=null)T=D[0].getParent().paddingLeft;else T=this.margin;return this.left=f-T,this.top=u-T,new v(this.left,this.top)},e.prototype.updateBounds=function(u){var f=h.MAX_VALUE,x=-h.MAX_VALUE,E=h.MAX_VALUE,T=-h.MAX_VALUE,D,X,I,V,_,Q=this.nodes,lt=Q.length;for(var P=0;P<lt;P++){var tt=Q[P];if(u&&tt.child!=null)tt.updateBounds();if(D=tt.getLeft(),X=tt.getRight(),I=tt.getTop(),V=tt.getBottom(),f>D)f=D;if(x<X)x=X;if(E>I)E=I;if(T<V)T=V}var s=new r(f,E,x-f,T-E);if(f==h.MAX_VALUE)this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom();if(Q[0].getParent().paddingLeft!=null)_=Q[0].getParent().paddingLeft;else _=this.margin;this.left=s.x-_,this.right=s.x+s.width+_,this.top=s.y-_,this.bottom=s.y+s.height+_},e.calculateBounds=function(u){var f=h.MAX_VALUE,x=-h.MAX_VALUE,E=h.MAX_VALUE,T=-h.MAX_VALUE,D,X,I,V,_=u.length;for(var Q=0;Q<_;Q++){var lt=u[Q];if(D=lt.getLeft(),X=lt.getRight(),I=lt.getTop(),V=lt.getBottom(),f>D)f=D;if(x<X)x=X;if(E>I)E=I;if(T<V)T=V}var P=new r(f,E,x-f,T-E);return P},e.prototype.getInclusionTreeDepth=function(){if(this==this.graphManager.getRoot())return 1;else return this.parent.getInclusionTreeDepth()},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){var u=0,f=this.nodes,x=f.length;for(var E=0;E<x;E++){var T=f[E];u+=T.calcEstimatedSize()}if(u==0)this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE;else this.estimatedSize=u/Math.sqrt(this.nodes.length);return this.estimatedSize},e.prototype.updateConnected=function(){var u=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new i,x=new Set,E=this.nodes[0],T,D,X=E.withChildren();X.forEach(function(P){f.push(P),x.add(P)});while(f.length!==0){E=f.shift(),T=E.getEdges();var I=T.length;for(var V=0;V<I;V++){var _=T[V];if(D=_.getOtherEndInGraph(E,this),D!=null&&!x.has(D)){var Q=D.withChildren();Q.forEach(function(P){f.push(P),x.add(P)})}}}if(this.isConnected=!1,x.size>=this.nodes.length){var lt=0;if(x.forEach(function(P){if(P.owner==u)lt++}),lt==this.nodes.length)this.isConnected=!0}},L.exports=e},function(L,R,A){var d,h=A(1);function o(n){d=A(6),this.layout=n,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var n=this.layout.newGraph(),a=this.layout.newNode(null),g=this.add(n,a);return this.setRootGraph(g),this.rootGraph},o.prototype.add=function(n,a,g,r,v){if(g==null&&r==null&&v==null){if(n==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(n)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(n),n.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return n.parent=a,a.child=n,n}else{v=g,r=a,g=n;var i=r.getOwner(),e=v.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(e!=null&&e.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==e)return g.isInterGraph=!1,i.add(g,r,v);else{if(g.isInterGraph=!0,g.source=r,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}}},o.prototype.remove=function(n){if(n instanceof d){var a=n;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(a.getEdges());var r,v=g.length;for(var i=0;i<v;i++)r=g[i],a.remove(r);var e=[];e=e.concat(a.getNodes());var c;v=e.length;for(var i=0;i<v;i++)c=e[i],a.remove(c);if(a==this.rootGraph)this.setRootGraph(null);var u=this.graphs.indexOf(a);this.graphs.splice(u,1),a.parent=null}else if(n instanceof h){if(r=n,r==null)throw"Edge is null!";if(!r.isInterGraph)throw"Not an inter-graph edge!";if(!(r.source!=null&&r.target!=null))throw"Source and/or target is null!";if(!(r.source.edges.indexOf(r)!=-1&&r.target.edges.indexOf(r)!=-1))throw"Source and/or target doesn't know this edge!";var u=r.source.edges.indexOf(r);if(r.source.edges.splice(u,1),u=r.target.edges.indexOf(r),r.target.edges.splice(u,1),!(r.source.owner!=null&&r.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(r.source.owner.getGraphManager().edges.indexOf(r)==-1)throw"Not in owner graph manager's edge list!";var u=r.source.owner.getGraphManager().edges.indexOf(r);r.source.owner.getGraphManager().edges.splice(u,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){var n=[],a=this.getGraphs(),g=a.length;for(var r=0;r<g;r++)n=n.concat(a[r].getNodes());this.allNodes=n}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var n=[],a=this.getGraphs(),g=a.length;for(var r=0;r<a.length;r++)n=n.concat(a[r].getEdges());n=n.concat(this.edges),this.allEdges=n}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(n){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=n},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(n){if(n.getGraphManager()!=this)throw"Root not in this graph mgr!";if(this.rootGraph=n,n.parent==null)n.parent=this.layout.newNode("Root node")},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(n,a){if(!(n!=null&&a!=null))throw"assert failed";if(n==a)return!0;var g=n.getOwner(),r;do{if(r=g.getParent(),r==null)break;if(r==a)return!0;if(g=r.getOwner(),g==null)break}while(!0);g=a.getOwner();do{if(r=g.getParent(),r==null)break;if(r==n)return!0;if(g=r.getOwner(),g==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){var n,a,g,r,v,i=this.getAllEdges(),e=i.length;for(var c=0;c<e;c++){if(n=i[c],a=n.source,g=n.target,n.lca=null,n.sourceInLca=a,n.targetInLca=g,a==g){n.lca=a.getOwner();continue}r=a.getOwner();while(n.lca==null){n.targetInLca=g,v=g.getOwner();while(n.lca==null){if(v==r){n.lca=v;break}if(v==this.rootGraph)break;if(n.lca!=null)throw"assert failed";n.targetInLca=v.getParent(),v=n.targetInLca.getOwner()}if(r==this.rootGraph)break;if(n.lca==null)n.sourceInLca=r.getParent(),r=n.sourceInLca.getOwner()}if(n.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(n,a){if(n==a)return n.getOwner();var g=n.getOwner();do{if(g==null)break;var r=a.getOwner();do{if(r==null)break;if(r==g)return r;r=r.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},o.prototype.calcInclusionTreeDepths=function(n,a){if(n==null&&a==null)n=this.rootGraph,a=1;var g,r=n.getNodes(),v=r.length;for(var i=0;i<v;i++)if(g=r[i],g.inclusionTreeDepth=a,g.child!=null)this.calcInclusionTreeDepths(g.child,a+1)},o.prototype.includesInvalidEdge=function(){var n,a=[],g=this.edges.length;for(var r=0;r<g;r++)if(n=this.edges[r],this.isOneAncestorOfOther(n.source,n.target))a.push(n);for(var r=0;r<a.length;r++)this.remove(a[r]);return!1},L.exports=o},function(L,R,A){var d=A(12);function h(){}h.calcSeparationAmount=function(o,n,a,g){if(!o.intersects(n))throw"assert failed";var r=[,,];if(this.decideDirectionsForOverlappingNodes(o,n,r),a[0]=Math.min(o.getRight(),n.getRight())-Math.max(o.x,n.x),a[1]=Math.min(o.getBottom(),n.getBottom())-Math.max(o.y,n.y),o.getX()<=n.getX()&&o.getRight()>=n.getRight())a[0]+=Math.min(n.getX()-o.getX(),o.getRight()-n.getRight());else if(n.getX()<=o.getX()&&n.getRight()>=o.getRight())a[0]+=Math.min(o.getX()-n.getX(),n.getRight()-o.getRight());if(o.getY()<=n.getY()&&o.getBottom()>=n.getBottom())a[1]+=Math.min(n.getY()-o.getY(),o.getBottom()-n.getBottom());else if(n.getY()<=o.getY()&&n.getBottom()>=o.getBottom())a[1]+=Math.min(o.getY()-n.getY(),n.getBottom()-o.getBottom());var v=Math.abs((n.getCenterY()-o.getCenterY())/(n.getCenterX()-o.getCenterX()));if(n.getCenterY()===o.getCenterY()&&n.getCenterX()===o.getCenterX())v=1;var i=v*a[0],e=a[1]/v;if(a[0]<e)e=a[0];else i=a[1];a[0]=-1*r[0]*(e/2+g),a[1]=-1*r[1]*(i/2+g)},h.decideDirectionsForOverlappingNodes=function(o,n,a){if(o.getCenterX()<n.getCenterX())a[0]=-1;else a[0]=1;if(o.getCenterY()<n.getCenterY())a[1]=-1;else a[1]=1},h.getIntersection2=function(o,n,a){var g=o.getCenterX(),r=o.getCenterY(),v=n.getCenterX(),i=n.getCenterY();if(o.intersects(n))return a[0]=g,a[1]=r,a[2]=v,a[3]=i,!0;var e=o.getX(),c=o.getY(),u=o.getRight(),f=o.getX(),x=o.getBottom(),E=o.getRight(),T=o.getWidthHalf(),D=o.getHeightHalf(),X=n.getX(),I=n.getY(),V=n.getRight(),_=n.getX(),Q=n.getBottom(),lt=n.getRight(),P=n.getWidthHalf(),tt=n.getHeightHalf(),s=!1,N=!1;if(g===v){if(r>i)return a[0]=g,a[1]=c,a[2]=v,a[3]=Q,!1;else if(r<i)return a[0]=g,a[1]=x,a[2]=v,a[3]=I,!1}else if(r===i){if(g>v)return a[0]=e,a[1]=r,a[2]=V,a[3]=i,!1;else if(g<v)return a[0]=u,a[1]=r,a[2]=X,a[3]=i,!1}else{var y=o.height/o.width,w=n.height/n.width,p=(i-r)/(v-g),U=void 0,F=void 0,k=void 0,B=void 0,W=void 0,st=void 0;if(-y===p)if(g>v)a[0]=f,a[1]=x,s=!0;else a[0]=u,a[1]=c,s=!0;else if(y===p)if(g>v)a[0]=e,a[1]=c,s=!0;else a[0]=E,a[1]=x,s=!0;if(-w===p)if(v>g)a[2]=_,a[3]=Q,N=!0;else a[2]=V,a[3]=I,N=!0;else if(w===p)if(v>g)a[2]=X,a[3]=I,N=!0;else a[2]=lt,a[3]=Q,N=!0;if(s&&N)return!1;if(g>v)if(r>i)U=this.getCardinalDirection(y,p,4),F=this.getCardinalDirection(w,p,2);else U=this.getCardinalDirection(-y,p,3),F=this.getCardinalDirection(-w,p,1);else if(r>i)U=this.getCardinalDirection(-y,p,1),F=this.getCardinalDirection(-w,p,3);else U=this.getCardinalDirection(y,p,2),F=this.getCardinalDirection(w,p,4);if(!s)switch(U){case 1:B=c,k=g+-D/p,a[0]=k,a[1]=B;break;case 2:k=E,B=r+T*p,a[0]=k,a[1]=B;break;case 3:B=x,k=g+D/p,a[0]=k,a[1]=B;break;case 4:k=f,B=r+-T*p,a[0]=k,a[1]=B;break}if(!N)switch(F){case 1:st=I,W=v+-tt/p,a[2]=W,a[3]=st;break;case 2:W=lt,st=i+P*p,a[2]=W,a[3]=st;break;case 3:st=Q,W=v+tt/p,a[2]=W,a[3]=st;break;case 4:W=_,st=i+-P*p,a[2]=W,a[3]=st;break}}return!1},h.getCardinalDirection=function(o,n,a){if(o>n)return a;else return 1+a%4},h.getIntersection=function(o,n,a,g){if(g==null)return this.getIntersection2(o,n,a);var{x:r,y:v}=o,{x:i,y:e}=n,{x:c,y:u}=a,{x:f,y:x}=g,E=void 0,T=void 0,D=void 0,X=void 0,I=void 0,V=void 0,_=void 0,Q=void 0,lt=void 0;if(D=e-v,I=r-i,_=i*v-r*e,X=x-u,V=c-f,Q=f*u-c*x,lt=D*V-X*I,lt===0)return null;return E=(I*Q-V*_)/lt,T=(X*_-D*Q)/lt,new d(E,T)},h.angleOfVector=function(o,n,a,g){var r=void 0;if(o!==a){if(r=Math.atan((g-n)/(a-o)),a<o)r+=Math.PI;else if(g<n)r+=this.TWO_PI}else if(g<n)r=this.ONE_AND_HALF_PI;else r=this.HALF_PI;return r},h.doIntersect=function(o,n,a,g){var{x:r,y:v}=o,{x:i,y:e}=n,{x:c,y:u}=a,{x:f,y:x}=g,E=(i-r)*(x-u)-(f-c)*(e-v);if(E===0)return!1;else{var T=((x-u)*(f-r)+(c-f)*(x-v))/E,D=((v-e)*(f-r)+(i-r)*(x-v))/E;return 0<T&&T<1&&0<D&&D<1}},h.findCircleLineIntersections=function(o,n,a,g,r,v,i){var e=(a-o)*(a-o)+(g-n)*(g-n),c=2*((o-r)*(a-o)+(n-v)*(g-n)),u=(o-r)*(o-r)+(n-v)*(n-v)-i*i,f=c*c-4*e*u;if(f>=0){var x=(-c+Math.sqrt(c*c-4*e*u))/(2*e),E=(-c-Math.sqrt(c*c-4*e*u))/(2*e),T=null;if(x>=0&&x<=1)return[x];if(E>=0&&E<=1)return[E];return T}else return null},h.HALF_PI=0.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,L.exports=h},function(L,R,A){function d(){}d.sign=function(h){if(h>0)return 1;else if(h<0)return-1;else return 0},d.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},d.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},L.exports=d},function(L,R,A){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,L.exports=d},function(L,R,A){var d=function(){function r(v,i){for(var e=0;e<i.length;e++){var c=i[e];if(c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c)c.writable=!0;Object.defineProperty(v,c.key,c)}}return function(v,i,e){if(i)r(v.prototype,i);if(e)r(v,e);return v}}();function h(r,v){if(!(r instanceof v))throw TypeError("Cannot call a class as a function")}var o=function(v){return{value:v,next:null,prev:null}},n=function(v,i,e,c){if(v!==null)v.next=i;else c.head=i;if(e!==null)e.prev=i;else c.tail=i;return i.prev=v,i.next=e,c.length++,i},a=function(v,i){var{prev:e,next:c}=v;if(e!==null)e.next=c;else i.head=c;if(c!==null)c.prev=e;else i.tail=e;return v.prev=v.next=null,i.length--,v},g=function(){function r(v){var i=this;if(h(this,r),this.length=0,this.head=null,this.tail=null,v!=null)v.forEach(function(e){return i.push(e)})}return d(r,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,e){return n(e.prev,o(i),e,this)}},{key:"insertAfter",value:function(i,e){return n(e,o(i),e.next,this)}},{key:"insertNodeBefore",value:function(i,e){return n(e.prev,i,e,this)}},{key:"insertNodeAfter",value:function(i,e){return n(e,i,e.next,this)}},{key:"push",value:function(i){return n(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return n(null,o(i),this.head,this)}},{key:"remove",value:function(i){return a(i,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){var e=1,c=this.head;while(e<i)c=c.next,e++;return c.value}}},{key:"set_object_at",value:function(i,e){if(i<=this.length()){var c=1,u=this.head;while(c<i)u=u.next,c++;u.value=e}}}]),r}();L.exports=g},function(L,R,A){function d(h,o,n){if(this.x=null,this.y=null,h==null&&o==null&&n==null)this.x=0,this.y=0;else if(typeof h=="number"&&typeof o=="number"&&n==null)this.x=h,this.y=o;else if(h.constructor.name=="Point"&&o==null&&n==null)n=h,this.x=n.x,this.y=n.y}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(h,o,n){if(h.constructor.name=="Point"&&o==null&&n==null)n=h,this.setLocation(n.x,n.y);else if(typeof h=="number"&&typeof o=="number"&&n==null)if(parseInt(h)==h&&parseInt(o)==o)this.move(h,o);else this.x=Math.floor(h+0.5),this.y=Math.floor(o+0.5)},d.prototype.move=function(h,o){this.x=h,this.y=o},d.prototype.translate=function(h,o){this.x+=h,this.y+=o},d.prototype.equals=function(h){if(h.constructor.name=="Point"){var o=h;return this.x==o.x&&this.y==o.y}return this==h},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},L.exports=d},function(L,R,A){function d(h,o,n,a){if(this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&o!=null&&n!=null&&a!=null)this.x=h,this.y=o,this.width=n,this.height=a}d.prototype.getX=function(){return this.x},d.prototype.setX=function(h){this.x=h},d.prototype.getY=function(){return this.y},d.prototype.setY=function(h){this.y=h},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(h){if(this.getRight()<h.x)return!1;if(this.getBottom()<h.y)return!1;if(h.getRight()<this.x)return!1;if(h.getBottom()<this.y)return!1;return!0},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},L.exports=d},function(L,R,A){var d=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol==="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function h(){}h.lastID=0,h.createID=function(o){if(h.isPrimitive(o))return o;if(o.uniqueID!=null)return o.uniqueID;return o.uniqueID=h.getString(),h.lastID++,o.uniqueID},h.getString=function(o){if(o==null)o=h.lastID;return"Object#"+o},h.isPrimitive=function(o){var n=typeof o>"u"?"undefined":d(o);return o==null||n!="object"&&n!="function"},L.exports=h},function(L,R,A){function d(c){if(Array.isArray(c)){for(var u=0,f=Array(c.length);u<c.length;u++)f[u]=c[u];return f}else return Array.from(c)}var h=A(0),o=A(7),n=A(3),a=A(1),g=A(6),r=A(5),v=A(17),i=A(29);function e(c){if(i.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,c!=null)this.isRemoteUse=c}e.RANDOM_SEED=1,e.prototype=Object.create(i.prototype),e.prototype.getGraphManager=function(){return this.graphManager},e.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},e.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},e.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},e.prototype.newGraphManager=function(){var c=new o(this);return this.graphManager=c,c},e.prototype.newGraph=function(c){return new g(null,this.graphManager,c)},e.prototype.newNode=function(c){return new n(this.graphManager,c)},e.prototype.newEdge=function(c){return new a(null,null,c)},e.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},e.prototype.runLayout=function(){if(this.isLayoutFinished=!1,this.tilingPreLayout)this.tilingPreLayout();this.initParameters();var c;if(this.checkLayoutSuccess())c=!1;else c=this.layout();if(h.ANIMATE==="during")return!1;if(c){if(!this.isSubLayout)this.doPostLayout()}if(this.tilingPostLayout)this.tilingPostLayout();return this.isLayoutFinished=!0,c},e.prototype.doPostLayout=function(){if(!this.incremental)this.transform();this.update()},e.prototype.update2=function(){if(this.createBendsAsNeeded)this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges();if(!this.isRemoteUse){var c,u=this.graphManager.getAllEdges();for(var f=0;f<u.length;f++)c=u[f];var x,E=this.graphManager.getRoot().getNodes();for(var f=0;f<E.length;f++)x=E[f];this.update(this.graphManager.getRoot())}},e.prototype.update=function(c){if(c==null)this.update2();else if(c instanceof n){var u=c;if(u.getChild()!=null){var f=u.getChild().getNodes();for(var x=0;x<f.length;x++)update(f[x])}if(u.vGraphObject!=null){var E=u.vGraphObject;E.update(u)}}else if(c instanceof a){var T=c;if(T.vGraphObject!=null){var D=T.vGraphObject;D.update(T)}}else if(c instanceof g){var X=c;if(X.vGraphObject!=null){var I=X.vGraphObject;I.update(X)}}},e.prototype.initParameters=function(){if(!this.isSubLayout)this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES;if(this.animationDuringLayout)this.animationOnLayout=!1},e.prototype.transform=function(c){if(c==null)this.transform(new r(0,0));else{var u=new v,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){u.setWorldOrgX(c.x),u.setWorldOrgY(c.y),u.setDeviceOrgX(f.x),u.setDeviceOrgY(f.y);var x=this.getAllNodes(),E;for(var T=0;T<x.length;T++)E=x[T],E.transform(u)}}},e.prototype.positionNodesRandomly=function(c){if(c==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else{var u,f,x=c.getNodes();for(var E=0;E<x.length;E++)if(u=x[E],f=u.getChild(),f==null)u.scatter();else if(f.getNodes().length==0)u.scatter();else this.positionNodesRandomly(f),u.updateBounds()}},e.prototype.getFlatForest=function(){var c=[],u=!0,f=this.graphManager.getRoot().getNodes(),x=!0;for(var E=0;E<f.length;E++)if(f[E].getChild()!=null)x=!1;if(!x)return c;var T=new Set,D=[],X=new Map,I=[];I=I.concat(f);while(I.length>0&&u){D.push(I[0]);while(D.length>0&&u){var V=D[0];D.splice(0,1),T.add(V);var _=V.getEdges();for(var E=0;E<_.length;E++){var Q=_[E].getOtherEnd(V);if(X.get(V)!=Q)if(!T.has(Q))D.push(Q),X.set(Q,V);else{u=!1;break}}}if(!u)c=[];else{var lt=[].concat(d(T));c.push(lt);for(var E=0;E<lt.length;E++){var P=lt[E],tt=I.indexOf(P);if(tt>-1)I.splice(tt,1)}T=new Set,X=new Map}}return c},e.prototype.createDummyNodesForBendpoints=function(c){var u=[],f=c.source,x=this.graphManager.calcLowestCommonAncestor(c.source,c.target);for(var E=0;E<c.bendpoints.length;E++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),x.add(T);var D=this.newEdge(null);this.graphManager.add(D,f,T),u.add(T),f=T}var D=this.newEdge(null);if(this.graphManager.add(D,f,c.target),this.edgeToDummyNodes.set(c,u),c.isInterGraph())this.graphManager.remove(c);else x.remove(c);return u},e.prototype.createBendpointsFromDummyNodes=function(){var c=[];c=c.concat(this.graphManager.getAllEdges()),c=[].concat(d(this.edgeToDummyNodes.keys())).concat(c);for(var u=0;u<c.length;u++){var f=c[u];if(f.bendpoints.length>0){var x=this.edgeToDummyNodes.get(f);for(var E=0;E<x.length;E++){var T=x[E],D=new r(T.getCenterX(),T.getCenterY()),X=f.bendpoints.get(E);X.x=D.x,X.y=D.y,T.getOwner().remove(T)}this.graphManager.add(f,f.source,f.target)}}},e.transform=function(c,u,f,x){if(f!=null&&x!=null){var E=u;if(c<=50){var T=u/f;E-=(u-T)/50*(50-c)}else{var D=u*x;E+=(D-u)/50*(c-50)}return E}else{var X,I;if(c<=50)X=9*u/500,I=u/10;else X=9*u/50,I=-8*u;return X*c+I}},e.findCenterOfTree=function(c){var u=[];u=u.concat(c);var f=[],x=new Map,E=!1,T=null;if(u.length==1||u.length==2)E=!0,T=u[0];for(var D=0;D<u.length;D++){var X=u[D],I=X.getNeighborsList().size;if(x.set(X,X.getNeighborsList().size),I==1)f.push(X)}var V=[];V=V.concat(f);while(!E){var _=[];_=_.concat(V),V=[];for(var D=0;D<u.length;D++){var X=u[D],Q=u.indexOf(X);if(Q>=0)u.splice(Q,1);var lt=X.getNeighborsList();lt.forEach(function(s){if(f.indexOf(s)<0){var N=x.get(s),y=N-1;if(y==1)V.push(s);x.set(s,y)}})}if(f=f.concat(V),u.length==1||u.length==2)E=!0,T=u[0]}return T},e.prototype.setGraphManager=function(c){this.graphManager=c},L.exports=e},function(L,R,A){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},L.exports=d},function(L,R,A){var d=A(5);function h(o,n){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(o){this.lworldExtX=o},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(o){this.lworldExtY=o},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},h.prototype.transformX=function(o){var n=0,a=this.lworldExtX;if(a!=0)n=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/a;return n},h.prototype.transformY=function(o){var n=0,a=this.lworldExtY;if(a!=0)n=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/a;return n},h.prototype.inverseTransformX=function(o){var n=0,a=this.ldeviceExtX;if(a!=0)n=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/a;return n},h.prototype.inverseTransformY=function(o){var n=0,a=this.ldeviceExtY;if(a!=0)n=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/a;return n},h.prototype.inverseTransformPoint=function(o){var n=new d(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return n},L.exports=h},function(L,R,A){function d(i){if(Array.isArray(i)){for(var e=0,c=Array(i.length);e<i.length;e++)c[e]=i[e];return c}else return Array.from(i)}var h=A(15),o=A(4),n=A(0),a=A(8),g=A(9);function r(){h.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}r.prototype=Object.create(h.prototype);for(var v in h)r[v]=h[v];r.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},r.prototype.calcIdealEdgeLengths=function(){var i,e,c,u,f,x,E,T=this.getGraphManager().getAllEdges();for(var D=0;D<T.length;D++)if(i=T[D],e=i.idealLength,i.isInterGraph){if(u=i.getSource(),f=i.getTarget(),x=i.getSourceInLca().getEstimatedSize(),E=i.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation)i.idealLength+=x+E-2*n.SIMPLE_NODE_SIZE;c=i.getLca().getInclusionTreeDepth(),i.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(u.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*c)}},r.prototype.initSpringEmbedder=function(){var i=this.getAllNodes().length;if(this.incremental){if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR));this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL}else{if(i>o.ADAPTATION_LOWER_NODE_LIMIT)this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(i-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR));else this.coolingFactor=1;this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT}this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.prototype.calcSpringForces=function(){var i=this.getAllEdges(),e;for(var c=0;c<i.length;c++)e=i[c],this.calcSpringForce(e,e.idealLength)},r.prototype.calcRepulsionForces=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c,u,f,x,E=this.getAllNodes(),T;if(this.useFRGridVariant){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i)this.updateGrid();T=new Set;for(c=0;c<E.length;c++)f=E[c],this.calculateRepulsionForceOfANode(f,T,i,e),T.add(f)}else for(c=0;c<E.length;c++){f=E[c];for(u=c+1;u<E.length;u++){if(x=E[u],f.getOwner()!=x.getOwner())continue;this.calcRepulsionForce(f,x)}}},r.prototype.calcGravitationalForces=function(){var i,e=this.getAllNodesToApplyGravitation();for(var c=0;c<e.length;c++)i=e[c],this.calcGravitationalForce(i)},r.prototype.moveNodes=function(){var i=this.getAllNodes(),e;for(var c=0;c<i.length;c++)e=i[c],e.move()},r.prototype.calcSpringForce=function(i,e){var c=i.getSource(),u=i.getTarget(),f,x,E,T;if(this.uniformLeafNodeSizes&&c.getChild()==null&&u.getChild()==null)i.updateLengthSimple();else if(i.updateLength(),i.isOverlapingSourceAndTarget)return;if(f=i.getLength(),f==0)return;x=i.edgeElasticity*(f-e),E=x*(i.lengthX/f),T=x*(i.lengthY/f),c.springForceX+=E,c.springForceY+=T,u.springForceX-=E,u.springForceY-=T},r.prototype.calcRepulsionForce=function(i,e){var c=i.getRect(),u=e.getRect(),f=[,,],x=[,,,,],E,T,D,X,I,V,_;if(c.intersects(u)){a.calcSeparationAmount(c,u,f,o.DEFAULT_EDGE_LENGTH/2),V=2*f[0],_=2*f[1];var Q=i.noOfChildren*e.noOfChildren/(i.noOfChildren+e.noOfChildren);i.repulsionForceX-=Q*V,i.repulsionForceY-=Q*_,e.repulsionForceX+=Q*V,e.repulsionForceY+=Q*_}else{if(this.uniformLeafNodeSizes&&i.getChild()==null&&e.getChild()==null)E=u.getCenterX()-c.getCenterX(),T=u.getCenterY()-c.getCenterY();else a.getIntersection(c,u,x),E=x[2]-x[0],T=x[3]-x[1];if(Math.abs(E)<o.MIN_REPULSION_DIST)E=g.sign(E)*o.MIN_REPULSION_DIST;if(Math.abs(T)<o.MIN_REPULSION_DIST)T=g.sign(T)*o.MIN_REPULSION_DIST;D=E*E+T*T,X=Math.sqrt(D),I=(i.nodeRepulsion/2+e.nodeRepulsion/2)*i.noOfChildren*e.noOfChildren/D,V=I*E/X,_=I*T/X,i.repulsionForceX-=V,i.repulsionForceY-=_,e.repulsionForceX+=V,e.repulsionForceY+=_}},r.prototype.calcGravitationalForce=function(i){var e,c,u,f,x,E,T,D;if(e=i.getOwner(),c=(e.getRight()+e.getLeft())/2,u=(e.getTop()+e.getBottom())/2,f=i.getCenterX()-c,x=i.getCenterY()-u,E=Math.abs(f)+i.getWidth()/2,T=Math.abs(x)+i.getHeight()/2,i.getOwner()==this.graphManager.getRoot()){if(D=e.getEstimatedSize()*this.gravityRangeFactor,E>D||T>D)i.gravitationForceX=-this.gravityConstant*f,i.gravitationForceY=-this.gravityConstant*x}else if(D=e.getEstimatedSize()*this.compoundGravityRangeFactor,E>D||T>D)i.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*x*this.compoundGravityConstant},r.prototype.isConverged=function(){var i,e=!1;if(this.totalIterations>this.maxIterations/3)e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2;return i=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,i||e},r.prototype.animate=function(){if(this.animationDuringLayout&&!this.isSubLayout)if(this.notAnimatedIterations==this.animationPeriod)this.update(),this.notAnimatedIterations=0;else this.notAnimatedIterations++},r.prototype.calcNoOfChildrenForAllNodes=function(){var i,e=this.graphManager.getAllNodes();for(var c=0;c<e.length;c++)i=e[c],i.noOfChildren=i.getNoOfChildren()},r.prototype.calcGrid=function(i){var e=0,c=0;e=parseInt(Math.ceil((i.getRight()-i.getLeft())/this.repulsionRange)),c=parseInt(Math.ceil((i.getBottom()-i.getTop())/this.repulsionRange));var u=Array(e);for(var f=0;f<e;f++)u[f]=Array(c);for(var f=0;f<e;f++)for(var x=0;x<c;x++)u[f][x]=[];return u},r.prototype.addNodeToGrid=function(i,e,c){var u=0,f=0,x=0,E=0;u=parseInt(Math.floor((i.getRect().x-e)/this.repulsionRange)),f=parseInt(Math.floor((i.getRect().width+i.getRect().x-e)/this.repulsionRange)),x=parseInt(Math.floor((i.getRect().y-c)/this.repulsionRange)),E=parseInt(Math.floor((i.getRect().height+i.getRect().y-c)/this.repulsionRange));for(var T=u;T<=f;T++)for(var D=x;D<=E;D++)this.grid[T][D].push(i),i.setGridCoordinates(u,f,x,E)},r.prototype.updateGrid=function(){var i,e,c=this.getAllNodes();this.grid=this.calcGrid(this.graphManager.getRoot());for(i=0;i<c.length;i++)e=c[i],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},r.prototype.calculateRepulsionForceOfANode=function(i,e,c,u){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&c||u){var f=new Set;i.surrounding=[];var x,E=this.grid;for(var T=i.startX-1;T<i.finishX+2;T++)for(var D=i.startY-1;D<i.finishY+2;D++)if(!(T<0||D<0||T>=E.length||D>=E[0].length))for(var X=0;X<E[T][D].length;X++){if(x=E[T][D][X],i.getOwner()!=x.getOwner()||i==x)continue;if(!e.has(x)&&!f.has(x)){var I=Math.abs(i.getCenterX()-x.getCenterX())-(i.getWidth()/2+x.getWidth()/2),V=Math.abs(i.getCenterY()-x.getCenterY())-(i.getHeight()/2+x.getHeight()/2);if(I<=this.repulsionRange&&V<=this.repulsionRange)f.add(x)}}i.surrounding=[].concat(d(f))}for(T=0;T<i.surrounding.length;T++)this.calcRepulsionForce(i,i.surrounding[T])},r.prototype.calcRepulsionRange=function(){return 0},L.exports=r},function(L,R,A){var d=A(1),h=A(4);function o(a,g,r){d.call(this,a,g,r),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}o.prototype=Object.create(d.prototype);for(var n in d)o[n]=d[n];L.exports=o},function(L,R,A){var d=A(3),h=A(4);function o(a,g,r,v){d.call(this,a,g,r,v),this.nodeRepulsion=h.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=[]}o.prototype=Object.create(d.prototype);for(var n in d)o[n]=d[n];o.prototype.setGridCoordinates=function(a,g,r,v){this.startX=a,this.finishX=g,this.startY=r,this.finishY=v},L.exports=o},function(L,R,A){function d(h,o){if(this.width=0,this.height=0,h!==null&&o!==null)this.height=o,this.width=h}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},L.exports=d},function(L,R,A){var d=A(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(o,n){var a=d.createID(o);if(!this.contains(a))this.map[a]=n,this.keys.push(o)},h.prototype.contains=function(o){var n=d.createID(o);return this.map[o]!=null},h.prototype.get=function(o){var n=d.createID(o);return this.map[n]},h.prototype.keySet=function(){return this.keys},L.exports=h},function(L,R,A){var d=A(14);function h(){this.set={}}h.prototype.add=function(o){var n=d.createID(o);if(!this.contains(n))this.set[n]=o},h.prototype.remove=function(o){delete this.set[d.createID(o)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(o){return this.set[d.createID(o)]==o},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(o){var n=Object.keys(this.set),a=n.length;for(var g=0;g<a;g++)o.push(this.set[n[g]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(o){var n=o.length;for(var a=0;a<n;a++){var g=o[a];this.add(g)}},L.exports=h},function(L,R,A){function d(){}d.multMat=function(h,o){var n=[];for(var a=0;a<h.length;a++){n[a]=[];for(var g=0;g<o[0].length;g++){n[a][g]=0;for(var r=0;r<h[0].length;r++)n[a][g]+=h[a][r]*o[r][g]}}return n},d.transpose=function(h){var o=[];for(var n=0;n<h[0].length;n++){o[n]=[];for(var a=0;a<h.length;a++)o[n][a]=h[a][n]}return o},d.multCons=function(h,o){var n=[];for(var a=0;a<h.length;a++)n[a]=h[a]*o;return n},d.minusOp=function(h,o){var n=[];for(var a=0;a<h.length;a++)n[a]=h[a]-o[a];return n},d.dotProduct=function(h,o){var n=0;for(var a=0;a<h.length;a++)n+=h[a]*o[a];return n},d.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},d.normalize=function(h){var o=[],n=this.mag(h);for(var a=0;a<h.length;a++)o[a]=h[a]/n;return o},d.multGamma=function(h){var o=[],n=0;for(var a=0;a<h.length;a++)n+=h[a];n*=-1/h.length;for(var g=0;g<h.length;g++)o[g]=n+h[g];return o},d.multL=function(h,o,n){var a=[],g=[],r=[];for(var v=0;v<o[0].length;v++){var i=0;for(var e=0;e<o.length;e++)i+=-0.5*o[e][v]*h[e];g[v]=i}for(var c=0;c<n.length;c++){var u=0;for(var f=0;f<n.length;f++)u+=n[c][f]*g[f];r[c]=u}for(var x=0;x<o.length;x++){var E=0;for(var T=0;T<o[0].length;T++)E+=o[x][T]*r[T];a[x]=E}return a},L.exports=d},function(L,R,A){var d=function(){function a(g,r){for(var v=0;v<r.length;v++){var i=r[v];if(i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i)i.writable=!0;Object.defineProperty(g,i.key,i)}}return function(g,r,v){if(r)a(g.prototype,r);if(v)a(g,v);return g}}();function h(a,g){if(!(a instanceof g))throw TypeError("Cannot call a class as a function")}var o=A(11),n=function(){function a(g,r){if(h(this,a),r!==null||r!==void 0)this.compareFunction=this._defaultCompareFunction;var v=void 0;if(g instanceof o)v=g.size();else v=g.length;this._quicksort(g,0,v-1)}return d(a,[{key:"_quicksort",value:function(r,v,i){if(v<i){var e=this._partition(r,v,i);this._quicksort(r,v,e),this._quicksort(r,e+1,i)}}},{key:"_partition",value:function(r,v,i){var e=this._get(r,v),c=v,u=i;while(!0){while(this.compareFunction(e,this._get(r,u)))u--;while(this.compareFunction(this._get(r,c),e))c++;if(c<u)this._swap(r,c,u),c++,u--;else return u}}},{key:"_get",value:function(r,v){if(r instanceof o)return r.get_object_at(v);else return r[v]}},{key:"_set",value:function(r,v,i){if(r instanceof o)r.set_object_at(v,i);else r[v]=i}},{key:"_swap",value:function(r,v,i){var e=this._get(r,v);this._set(r,v,this._get(r,i)),this._set(r,i,e)}},{key:"_defaultCompareFunction",value:function(r,v){return v>r}}]),a}();L.exports=n},function(L,R,A){function d(){}d.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var o=Math.min(this.m,this.n);this.s=function(Wt){var bt=[];while(Wt-- >0)bt.push(0);return bt}(Math.min(this.m+1,this.n)),this.U=function(Wt){var bt=function ae($t){if($t.length==0)return 0;else{var jt=[];for(var ie=0;ie<$t[0];ie++)jt.push(ae($t.slice(1)));return jt}};return bt(Wt)}([this.m,o]),this.V=function(Wt){var bt=function ae($t){if($t.length==0)return 0;else{var jt=[];for(var ie=0;ie<$t[0];ie++)jt.push(ae($t.slice(1)));return jt}};return bt(Wt)}([this.n,this.n]);var n=function(Wt){var bt=[];while(Wt-- >0)bt.push(0);return bt}(this.n),a=function(Wt){var bt=[];while(Wt-- >0)bt.push(0);return bt}(this.m),g=!0,r=!0,v=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m));for(var e=0;e<Math.max(v,i);e++){if(e<v){this.s[e]=0;for(var c=e;c<this.m;c++)this.s[e]=d.hypot(this.s[e],h[c][e]);if(this.s[e]!==0){if(h[e][e]<0)this.s[e]=-this.s[e];for(var u=e;u<this.m;u++)h[u][e]/=this.s[e];h[e][e]+=1}this.s[e]=-this.s[e]}for(var f=e+1;f<this.n;f++){if(function(Wt,bt){return Wt&&bt}(e<v,this.s[e]!==0)){var x=0;for(var E=e;E<this.m;E++)x+=h[E][e]*h[E][f];x=-x/h[e][e];for(var T=e;T<this.m;T++)h[T][f]+=x*h[T][e]}n[f]=h[e][f]}if(function(Wt,bt){return Wt&&bt}(g,e<v))for(var D=e;D<this.m;D++)this.U[D][e]=h[D][e];if(e<i){n[e]=0;for(var X=e+1;X<this.n;X++)n[e]=d.hypot(n[e],n[X]);if(n[e]!==0){if(n[e+1]<0)n[e]=-n[e];for(var I=e+1;I<this.n;I++)n[I]/=n[e];n[e+1]+=1}if(n[e]=-n[e],function(Wt,bt){return Wt&&bt}(e+1<this.m,n[e]!==0)){for(var V=e+1;V<this.m;V++)a[V]=0;for(var _=e+1;_<this.n;_++)for(var Q=e+1;Q<this.m;Q++)a[Q]+=n[_]*h[Q][_];for(var lt=e+1;lt<this.n;lt++){var P=-n[lt]/n[e+1];for(var tt=e+1;tt<this.m;tt++)h[tt][lt]+=P*a[tt]}}if(r)for(var s=e+1;s<this.n;s++)this.V[s][e]=n[s]}}var N=Math.min(this.n,this.m+1);if(v<this.n)this.s[v]=h[v][v];if(this.m<N)this.s[N-1]=0;if(i+1<N)n[i]=h[i][N-1];if(n[N-1]=0,g){for(var y=v;y<o;y++){for(var w=0;w<this.m;w++)this.U[w][y]=0;this.U[y][y]=1}for(var p=v-1;p>=0;p--)if(this.s[p]!==0){for(var U=p+1;U<o;U++){var F=0;for(var k=p;k<this.m;k++)F+=this.U[k][p]*this.U[k][U];F=-F/this.U[p][p];for(var B=p;B<this.m;B++)this.U[B][U]+=F*this.U[B][p]}for(var W=p;W<this.m;W++)this.U[W][p]=-this.U[W][p];this.U[p][p]=1+this.U[p][p];for(var st=0;st<p-1;st++)this.U[st][p]=0}else{for(var dt=0;dt<this.m;dt++)this.U[dt][p]=0;this.U[p][p]=1}}if(r)for(var Z=this.n-1;Z>=0;Z--){if(function(Wt,bt){return Wt&&bt}(Z<i,n[Z]!==0))for(var ut=Z+1;ut<o;ut++){var nt=0;for(var S=Z+1;S<this.n;S++)nt+=this.V[S][Z]*this.V[S][ut];nt=-nt/this.V[Z+1][Z];for(var K=Z+1;K<this.n;K++)this.V[K][ut]+=nt*this.V[K][Z]}for(var et=0;et<this.n;et++)this.V[et][Z]=0;this.V[Z][Z]=1}var ct=N-1,Nt=0,Pt=Math.pow(2,-52),Bt=Math.pow(2,-966);while(N>0){var ft=void 0,Jt=void 0;for(ft=N-2;ft>=-1;ft--){if(ft===-1)break;if(Math.abs(n[ft])<=Bt+Pt*(Math.abs(this.s[ft])+Math.abs(this.s[ft+1]))){n[ft]=0;break}}if(ft===N-2)Jt=4;else{var Xt=void 0;for(Xt=N-1;Xt>=ft;Xt--){if(Xt===ft)break;var Et=(Xt!==N?Math.abs(n[Xt]):0)+(Xt!==ft+1?Math.abs(n[Xt-1]):0);if(Math.abs(this.s[Xt])<=Bt+Pt*Et){this.s[Xt]=0;break}}if(Xt===ft)Jt=3;else if(Xt===N-1)Jt=1;else Jt=2,ft=Xt}switch(ft++,Jt){case 1:{var vt=n[N-2];n[N-2]=0;for(var xt=N-2;xt>=ft;xt--){var Rt=d.hypot(this.s[xt],vt),Gt=this.s[xt]/Rt,St=vt/Rt;if(this.s[xt]=Rt,xt!==ft)vt=-St*n[xt-1],n[xt-1]=Gt*n[xt-1];if(r)for(var Ft=0;Ft<this.n;Ft++)Rt=Gt*this.V[Ft][xt]+St*this.V[Ft][N-1],this.V[Ft][N-1]=-St*this.V[Ft][xt]+Gt*this.V[Ft][N-1],this.V[Ft][xt]=Rt}}break;case 2:{var Ht=n[ft-1];n[ft-1]=0;for(var zt=ft;zt<N;zt++){var ee=d.hypot(this.s[zt],Ht),qt=this.s[zt]/ee,Kt=Ht/ee;if(this.s[zt]=ee,Ht=-Kt*n[zt],n[zt]=qt*n[zt],g)for(var kt=0;kt<this.m;kt++)ee=qt*this.U[kt][zt]+Kt*this.U[kt][ft-1],this.U[kt][ft-1]=-Kt*this.U[kt][zt]+qt*this.U[kt][ft-1],this.U[kt][zt]=ee}}break;case 3:{var J=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[N-1]),Math.abs(this.s[N-2])),Math.abs(n[N-2])),Math.abs(this.s[ft])),Math.abs(n[ft])),rt=this.s[N-1]/J,it=this.s[N-2]/J,at=n[N-2]/J,ot=this.s[ft]/J,gt=n[ft]/J,At=((it+rt)*(it-rt)+at*at)/2,Mt=rt*at*(rt*at),ht=0;if(function(Wt,bt){return Wt||bt}(At!==0,Mt!==0)){if(ht=Math.sqrt(At*At+Mt),At<0)ht=-ht;ht=Mt/(At+ht)}var Lt=(ot+rt)*(ot-rt)+ht,Ct=ot*gt;for(var pt=ft;pt<N-1;pt++){var Ot=d.hypot(Lt,Ct),Ut=Lt/Ot,Tt=Ct/Ot;if(pt!==ft)n[pt-1]=Ot;if(Lt=Ut*this.s[pt]+Tt*n[pt],n[pt]=Ut*n[pt]-Tt*this.s[pt],Ct=Tt*this.s[pt+1],this.s[pt+1]=Ut*this.s[pt+1],r)for(var yt=0;yt<this.n;yt++)Ot=Ut*this.V[yt][pt]+Tt*this.V[yt][pt+1],this.V[yt][pt+1]=-Tt*this.V[yt][pt]+Ut*this.V[yt][pt+1],this.V[yt][pt]=Ot;if(Ot=d.hypot(Lt,Ct),Ut=Lt/Ot,Tt=Ct/Ot,this.s[pt]=Ot,Lt=Ut*n[pt]+Tt*this.s[pt+1],this.s[pt+1]=-Tt*n[pt]+Ut*this.s[pt+1],Ct=Tt*n[pt+1],n[pt+1]=Ut*n[pt+1],g&&pt<this.m-1)for(var Dt=0;Dt<this.m;Dt++)Ot=Ut*this.U[Dt][pt]+Tt*this.U[Dt][pt+1],this.U[Dt][pt+1]=-Tt*this.U[Dt][pt]+Ut*this.U[Dt][pt+1],this.U[Dt][pt]=Ot}n[N-2]=Lt,Nt=Nt+1}break;case 4:{if(this.s[ft]<=0){if(this.s[ft]=this.s[ft]<0?-this.s[ft]:0,r)for(var mt=0;mt<=ct;mt++)this.V[mt][ft]=-this.V[mt][ft]}while(ft<ct){if(this.s[ft]>=this.s[ft+1])break;var wt=this.s[ft];if(this.s[ft]=this.s[ft+1],this.s[ft+1]=wt,r&&ft<this.n-1)for(var Zt=0;Zt<this.n;Zt++)wt=this.V[Zt][ft+1],this.V[Zt][ft+1]=this.V[Zt][ft],this.V[Zt][ft]=wt;if(g&&ft<this.m-1)for(var Vt=0;Vt<this.m;Vt++)wt=this.U[Vt][ft+1],this.U[Vt][ft+1]=this.U[Vt][ft],this.U[Vt][ft]=wt;ft++}Nt=0,N--}break}}var re={U:this.U,V:this.V,S:this.s};return re},d.hypot=function(h,o){var n=void 0;if(Math.abs(h)>Math.abs(o))n=o/h,n=Math.abs(h)*Math.sqrt(1+n*n);else if(o!=0)n=h/o,n=Math.abs(o)*Math.sqrt(1+n*n);else n=0;return n},L.exports=d},function(L,R,A){var d=function(){function n(a,g){for(var r=0;r<g.length;r++){var v=g[r];if(v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v)v.writable=!0;Object.defineProperty(a,v.key,v)}}return function(a,g,r){if(g)n(a.prototype,g);if(r)n(a,r);return a}}();function h(n,a){if(!(n instanceof a))throw TypeError("Cannot call a class as a function")}var o=function(){function n(a,g){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,n),this.sequence1=a,this.sequence2=g,this.match_score=r,this.mismatch_penalty=v,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=g.length+1,this.grid=Array(this.iMax);for(var e=0;e<this.iMax;e++){this.grid[e]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[e][c]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var f=0;f<this.jMax;f++)this.tracebackGrid[u][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(n,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var v=1;v<this.iMax;v++)for(var i=1;i<this.jMax;i++){var e=void 0;if(this.sequence1[v-1]===this.sequence2[i-1])e=this.grid[v-1][i-1]+this.match_score;else e=this.grid[v-1][i-1]+this.mismatch_penalty;var c=this.grid[v-1][i]+this.gap_penalty,u=this.grid[v][i-1]+this.gap_penalty,f=[e,c,u],x=this.arrayAllMaxIndexes(f);this.grid[v][i]=f[x[0]],this.tracebackGrid[v][i]=[x.includes(0),x.includes(1),x.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});while(g[0]){var r=g[0],v=this.tracebackGrid[r.pos[0]][r.pos[1]];if(v[0])g.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(v[1])g.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2});if(v[2])g.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2});if(r.pos[0]===0&&r.pos[1]===0)this.alignments.push({sequence1:r.seq1,sequence2:r.seq2});g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,r){var v=[],i=-1;while((i=g.indexOf(r,i+1))!==-1)v.push(i);return v}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),n}();L.exports=o},function(L,R,A){var d=function(){return};d.FDLayout=A(18),d.FDLayoutConstants=A(4),d.FDLayoutEdge=A(19),d.FDLayoutNode=A(20),d.DimensionD=A(21),d.HashMap=A(22),d.HashSet=A(23),d.IGeometry=A(8),d.IMath=A(9),d.Integer=A(10),d.Point=A(12),d.PointD=A(5),d.RandomSeed=A(16),d.RectangleD=A(13),d.Transform=A(17),d.UniqueIDGeneretor=A(14),d.Quicksort=A(25),d.LinkedList=A(11),d.LGraphObject=A(2),d.LGraph=A(6),d.LEdge=A(1),d.LGraphManager=A(7),d.LNode=A(3),d.Layout=A(15),d.LayoutConstants=A(0),d.NeedlemanWunsch=A(27),d.Matrix=A(24),d.SVD=A(26),L.exports=d},function(L,R,A){function d(){this.listeners=[]}var h=d.prototype;h.addListener=function(o,n){this.listeners.push({event:o,callback:n})},h.removeListener=function(o,n){for(var a=this.listeners.length;a>=0;a--){var g=this.listeners[a];if(g.event===o&&g.callback===n)this.listeners.splice(a,1)}},h.emit=function(o,n){for(var a=0;a<this.listeners.length;a++){var g=this.listeners[a];if(o===g.event)g.callback(n)}},L.exports=d}])})});var Fe=$n(function(me,Se){(function(R,A){if(typeof me==="object"&&typeof Se==="object")Se.exports=A(Re());else if(typeof define==="function"&&define.amd)define(["layout-base"],A);else if(typeof me==="object")me.coseBase=A(Re());else R.coseBase=A(R.layoutBase)})(me,function(L){return(()=>{var R={45:(o,n,a)=>{var g={};g.layoutBase=a(551),g.CoSEConstants=a(806),g.CoSEEdge=a(767),g.CoSEGraph=a(880),g.CoSEGraphManager=a(578),g.CoSELayout=a(765),g.CoSENode=a(991),g.ConstraintHandler=a(902),o.exports=g},806:(o,n,a)=>{var g=a(551).FDLayoutConstants;function r(){}for(var v in g)r[v]=g[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,o.exports=r},767:(o,n,a)=>{var g=a(551).FDLayoutEdge;function r(i,e,c){g.call(this,i,e,c)}r.prototype=Object.create(g.prototype);for(var v in g)r[v]=g[v];o.exports=r},880:(o,n,a)=>{var g=a(551).LGraph;function r(i,e,c){g.call(this,i,e,c)}r.prototype=Object.create(g.prototype);for(var v in g)r[v]=g[v];o.exports=r},578:(o,n,a)=>{var g=a(551).LGraphManager;function r(i){g.call(this,i)}r.prototype=Object.create(g.prototype);for(var v in g)r[v]=g[v];o.exports=r},765:(o,n,a)=>{var g=a(551).FDLayout,r=a(578),v=a(880),i=a(991),e=a(767),c=a(806),u=a(902),f=a(551).FDLayoutConstants,x=a(551).LayoutConstants,E=a(551).Point,T=a(551).PointD,D=a(551).DimensionD,X=a(551).Layout,I=a(551).Integer,V=a(551).IGeometry,_=a(551).LGraph,Q=a(551).Transform,lt=a(551).LinkedList;function P(){g.call(this),this.toBeTiled={},this.constraints={}}P.prototype=Object.create(g.prototype);for(var tt in g)P[tt]=g[tt];P.prototype.newGraphManager=function(){var s=new r(this);return this.graphManager=s,s},P.prototype.newGraph=function(s){return new v(null,this.graphManager,s)},P.prototype.newNode=function(s){return new i(this.graphManager,s)},P.prototype.newEdge=function(s){return new e(null,null,s)},P.prototype.initParameters=function(){if(g.prototype.initParameters.call(this,arguments),!this.isSubLayout){if(c.DEFAULT_EDGE_LENGTH<10)this.idealEdgeLength=10;else this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH;this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1}},P.prototype.initSpringEmbedder=function(){g.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=0.04,this.coolingAdjuster=1},P.prototype.layout=function(){var s=x.DEFAULT_CREATE_BENDS_AS_NEEDED;if(s)this.createBendpoints(),this.graphManager.resetAllEdges();return this.level=0,this.classicLayout()},P.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),y=this.nodesWithGravity.filter(function(w){return N.has(w)});this.graphManager.setAllNodesToApplyGravitation(y),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),y=this.nodesWithGravity.filter(function(U){return N.has(U)});this.graphManager.setAllNodesToApplyGravitation(y)}if(Object.keys(this.constraints).length>0)u.handleConstraints(this),this.initConstraintVariables();if(this.initSpringEmbedder(),c.APPLY_LAYOUT)this.runSpringEmbedder();return!0},P.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.coolingCycle++,this.layoutQuality==0)this.coolingAdjuster=this.coolingCycle;else if(this.layoutQuality==1)this.coolingAdjuster=this.coolingCycle/3;this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(p){return s.has(p)});if(this.graphManager.setAllNodesToApplyGravitation(N),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2;else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;if(this.afterGrowthIterations%10==0)this.graphManager.updateBounds(),this.updateGrid();if(c.PURE_INCREMENTAL)this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100);else this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100);this.afterGrowthIterations++}var y=!this.isTreeGrowing&&!this.isGrowthFinished,w=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(y,w),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},P.prototype.getPositionsData=function(){var s=this.graphManager.getAllNodes(),N={};for(var y=0;y<s.length;y++){var w=s[y].rect,p=s[y].id;N[p]={id:p,x:w.getCenterX(),y:w.getCenterY(),w:w.width,h:w.height}}return N},P.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{while(!s)s=this.tick();this.graphManager.updateBounds()}},P.prototype.moveNodes=function(){var s=this.getAllNodes(),N;for(var y=0;y<s.length;y++)N=s[y],N.calculateDisplacement();if(Object.keys(this.constraints).length>0)this.updateDisplacements();for(var y=0;y<s.length;y++)N=s[y],N.move()},P.prototype.initConstraintVariables=function(){var s=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;var N=this.graphManager.getAllNodes();for(var y=0;y<N.length;y++){var w=N[y];this.idToNodeMap.set(w.id,w)}var p=function S(K){var et=K.getChild().getNodes(),ct,Nt=0;for(var Pt=0;Pt<et.length;Pt++)if(ct=et[Pt],ct.getChild()==null){if(s.fixedNodeSet.has(ct.id))Nt+=100}else Nt+=S(ct);return Nt};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(et){s.fixedNodeSet.add(et.nodeId)});var N=this.graphManager.getAllNodes(),w;for(var y=0;y<N.length;y++)if(w=N[y],w.getChild()!=null){var U=p(w);if(U>0)w.fixedNodeWeight=U}}if(this.constraints.relativePlacementConstraint){var F=new Map,k=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(S){s.fixedNodesOnHorizontal.add(S),s.fixedNodesOnVertical.add(S)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var B=this.constraints.alignmentConstraint.vertical;for(var y=0;y<B.length;y++)this.dummyToNodeForVerticalAlignment.set("dummy"+y,[]),B[y].forEach(function(K){if(F.set(K,"dummy"+y),s.dummyToNodeForVerticalAlignment.get("dummy"+y).push(K),s.fixedNodeSet.has(K))s.fixedNodesOnHorizontal.add("dummy"+y)})}if(this.constraints.alignmentConstraint.horizontal){var W=this.constraints.alignmentConstraint.horizontal;for(var y=0;y<W.length;y++)this.dummyToNodeForHorizontalAlignment.set("dummy"+y,[]),W[y].forEach(function(K){if(k.set(K,"dummy"+y),s.dummyToNodeForHorizontalAlignment.get("dummy"+y).push(K),s.fixedNodeSet.has(K))s.fixedNodesOnVertical.add("dummy"+y)})}}if(c.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(S){var K,et,ct;for(ct=S.length-1;ct>=2*S.length/3;ct--)K=Math.floor(Math.random()*(ct+1)),et=S[ct],S[ct]=S[K],S[K]=et;return S},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var K=F.has(S.left)?F.get(S.left):S.left,et=F.has(S.right)?F.get(S.right):S.right;if(!s.nodesInRelativeHorizontal.includes(K))if(s.nodesInRelativeHorizontal.push(K),s.nodeToRelativeConstraintMapHorizontal.set(K,[]),s.dummyToNodeForVerticalAlignment.has(K))s.nodeToTempPositionMapHorizontal.set(K,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(K)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(K,s.idToNodeMap.get(K).getCenterX());if(!s.nodesInRelativeHorizontal.includes(et))if(s.nodesInRelativeHorizontal.push(et),s.nodeToRelativeConstraintMapHorizontal.set(et,[]),s.dummyToNodeForVerticalAlignment.has(et))s.nodeToTempPositionMapHorizontal.set(et,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(et)[0]).getCenterX());else s.nodeToTempPositionMapHorizontal.set(et,s.idToNodeMap.get(et).getCenterX());s.nodeToRelativeConstraintMapHorizontal.get(K).push({right:et,gap:S.gap}),s.nodeToRelativeConstraintMapHorizontal.get(et).push({left:K,gap:S.gap})}else{var ct=k.has(S.top)?k.get(S.top):S.top,Nt=k.has(S.bottom)?k.get(S.bottom):S.bottom;if(!s.nodesInRelativeVertical.includes(ct))if(s.nodesInRelativeVertical.push(ct),s.nodeToRelativeConstraintMapVertical.set(ct,[]),s.dummyToNodeForHorizontalAlignment.has(ct))s.nodeToTempPositionMapVertical.set(ct,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(ct)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(ct,s.idToNodeMap.get(ct).getCenterY());if(!s.nodesInRelativeVertical.includes(Nt))if(s.nodesInRelativeVertical.push(Nt),s.nodeToRelativeConstraintMapVertical.set(Nt,[]),s.dummyToNodeForHorizontalAlignment.has(Nt))s.nodeToTempPositionMapVertical.set(Nt,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(Nt)[0]).getCenterY());else s.nodeToTempPositionMapVertical.set(Nt,s.idToNodeMap.get(Nt).getCenterY());s.nodeToRelativeConstraintMapVertical.get(ct).push({bottom:Nt,gap:S.gap}),s.nodeToRelativeConstraintMapVertical.get(Nt).push({top:ct,gap:S.gap})}});else{var st=new Map,dt=new Map;this.constraints.relativePlacementConstraint.forEach(function(S){if(S.left){var K=F.has(S.left)?F.get(S.left):S.left,et=F.has(S.right)?F.get(S.right):S.right;if(st.has(K))st.get(K).push(et);else st.set(K,[et]);if(st.has(et))st.get(et).push(K);else st.set(et,[K])}else{var ct=k.has(S.top)?k.get(S.top):S.top,Nt=k.has(S.bottom)?k.get(S.bottom):S.bottom;if(dt.has(ct))dt.get(ct).push(Nt);else dt.set(ct,[Nt]);if(dt.has(Nt))dt.get(Nt).push(ct);else dt.set(Nt,[ct])}});var Z=function(K,et){var ct=[],Nt=[],Pt=new lt,Bt=new Set,ft=0;return K.forEach(function(Jt,Xt){if(!Bt.has(Xt)){ct[ft]=[],Nt[ft]=!1;var Et=Xt;Pt.push(Et),Bt.add(Et),ct[ft].push(Et);while(Pt.length!=0){if(Et=Pt.shift(),et.has(Et))Nt[ft]=!0;var vt=K.get(Et);vt.forEach(function(xt){if(!Bt.has(xt))Pt.push(xt),Bt.add(xt),ct[ft].push(xt)})}ft++}}),{components:ct,isFixed:Nt}},ut=Z(st,s.fixedNodesOnHorizontal);this.componentsOnHorizontal=ut.components,this.fixedComponentsOnHorizontal=ut.isFixed;var nt=Z(dt,s.fixedNodesOnVertical);this.componentsOnVertical=nt.components,this.fixedComponentsOnVertical=nt.isFixed}}},P.prototype.updateDisplacements=function(){var s=this;if(this.constraints.fixedNodeConstraint)this.constraints.fixedNodeConstraint.forEach(function(nt){var S=s.idToNodeMap.get(nt.nodeId);S.displacementX=0,S.displacementY=0});if(this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var N=this.constraints.alignmentConstraint.vertical;for(var y=0;y<N.length;y++){var w=0;for(var p=0;p<N[y].length;p++){if(this.fixedNodeSet.has(N[y][p])){w=0;break}w+=this.idToNodeMap.get(N[y][p]).displacementX}var U=w/N[y].length;for(var p=0;p<N[y].length;p++)this.idToNodeMap.get(N[y][p]).displacementX=U}}if(this.constraints.alignmentConstraint.horizontal){var F=this.constraints.alignmentConstraint.horizontal;for(var y=0;y<F.length;y++){var k=0;for(var p=0;p<F[y].length;p++){if(this.fixedNodeSet.has(F[y][p])){k=0;break}k+=this.idToNodeMap.get(F[y][p]).displacementY}var B=k/F[y].length;for(var p=0;p<F[y].length;p++)this.idToNodeMap.get(F[y][p]).displacementY=B}}}if(this.constraints.relativePlacementConstraint)if(c.RELAX_MOVEMENT_ON_CONSTRAINTS){if(this.totalIterations%10==0)this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical);this.nodesInRelativeHorizontal.forEach(function(nt){if(!s.fixedNodesOnHorizontal.has(nt)){var S=0;if(s.dummyToNodeForVerticalAlignment.has(nt))S=s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(nt)[0]).displacementX;else S=s.idToNodeMap.get(nt).displacementX;if(s.nodeToRelativeConstraintMapHorizontal.get(nt).forEach(function(K){if(K.right){var et=s.nodeToTempPositionMapHorizontal.get(K.right)-s.nodeToTempPositionMapHorizontal.get(nt)-S;if(et<K.gap)S-=K.gap-et}else{var et=s.nodeToTempPositionMapHorizontal.get(nt)-s.nodeToTempPositionMapHorizontal.get(K.left)+S;if(et<K.gap)S+=K.gap-et}}),s.nodeToTempPositionMapHorizontal.set(nt,s.nodeToTempPositionMapHorizontal.get(nt)+S),s.dummyToNodeForVerticalAlignment.has(nt))s.dummyToNodeForVerticalAlignment.get(nt).forEach(function(K){s.idToNodeMap.get(K).displacementX=S});else s.idToNodeMap.get(nt).displacementX=S}}),this.nodesInRelativeVertical.forEach(function(nt){if(!s.fixedNodesOnHorizontal.has(nt)){var S=0;if(s.dummyToNodeForHorizontalAlignment.has(nt))S=s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(nt)[0]).displacementY;else S=s.idToNodeMap.get(nt).displacementY;if(s.nodeToRelativeConstraintMapVertical.get(nt).forEach(function(K){if(K.bottom){var et=s.nodeToTempPositionMapVertical.get(K.bottom)-s.nodeToTempPositionMapVertical.get(nt)-S;if(et<K.gap)S-=K.gap-et}else{var et=s.nodeToTempPositionMapVertical.get(nt)-s.nodeToTempPositionMapVertical.get(K.top)+S;if(et<K.gap)S+=K.gap-et}}),s.nodeToTempPositionMapVertical.set(nt,s.nodeToTempPositionMapVertical.get(nt)+S),s.dummyToNodeForHorizontalAlignment.has(nt))s.dummyToNodeForHorizontalAlignment.get(nt).forEach(function(K){s.idToNodeMap.get(K).displacementY=S});else s.idToNodeMap.get(nt).displacementY=S}})}else{for(var y=0;y<this.componentsOnHorizontal.length;y++){var W=this.componentsOnHorizontal[y];if(this.fixedComponentsOnHorizontal[y])for(var p=0;p<W.length;p++)if(this.dummyToNodeForVerticalAlignment.has(W[p]))this.dummyToNodeForVerticalAlignment.get(W[p]).forEach(function(K){s.idToNodeMap.get(K).displacementX=0});else this.idToNodeMap.get(W[p]).displacementX=0;else{var st=0,dt=0;for(var p=0;p<W.length;p++)if(this.dummyToNodeForVerticalAlignment.has(W[p])){var Z=this.dummyToNodeForVerticalAlignment.get(W[p]);st+=Z.length*this.idToNodeMap.get(Z[0]).displacementX,dt+=Z.length}else st+=this.idToNodeMap.get(W[p]).displacementX,dt++;var ut=st/dt;for(var p=0;p<W.length;p++)if(this.dummyToNodeForVerticalAlignment.has(W[p]))this.dummyToNodeForVerticalAlignment.get(W[p]).forEach(function(K){s.idToNodeMap.get(K).displacementX=ut});else this.idToNodeMap.get(W[p]).displacementX=ut}}for(var y=0;y<this.componentsOnVertical.length;y++){var W=this.componentsOnVertical[y];if(this.fixedComponentsOnVertical[y])for(var p=0;p<W.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(W[p]))this.dummyToNodeForHorizontalAlignment.get(W[p]).forEach(function(et){s.idToNodeMap.get(et).displacementY=0});else this.idToNodeMap.get(W[p]).displacementY=0;else{var st=0,dt=0;for(var p=0;p<W.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(W[p])){var Z=this.dummyToNodeForHorizontalAlignment.get(W[p]);st+=Z.length*this.idToNodeMap.get(Z[0]).displacementY,dt+=Z.length}else st+=this.idToNodeMap.get(W[p]).displacementY,dt++;var ut=st/dt;for(var p=0;p<W.length;p++)if(this.dummyToNodeForHorizontalAlignment.has(W[p]))this.dummyToNodeForHorizontalAlignment.get(W[p]).forEach(function(Pt){s.idToNodeMap.get(Pt).displacementY=ut});else this.idToNodeMap.get(W[p]).displacementY=ut}}}},P.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],N,y=this.graphManager.getGraphs(),w=y.length,p;for(p=0;p<w;p++)if(N=y[p],N.updateConnected(),!N.isConnected)s=s.concat(N.getNodes());return s},P.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var N=new Set,y;for(y=0;y<s.length;y++){var w=s[y];if(!N.has(w)){var p=w.getSource(),U=w.getTarget();if(p==U)w.getBendpoints().push(new T),w.getBendpoints().push(new T),this.createDummyNodesForBendpoints(w),N.add(w);else{var F=[];if(F=F.concat(p.getEdgeListToNode(U)),F=F.concat(U.getEdgeListToNode(p)),!N.has(F[0])){if(F.length>1){var k;for(k=0;k<F.length;k++){var B=F[k];B.getBendpoints().push(new T),this.createDummyNodesForBendpoints(B)}}F.forEach(function(W){N.add(W)})}}}if(N.size==s.length)break}},P.prototype.positionNodesRadially=function(s){var N=new E(0,0),y=Math.ceil(Math.sqrt(s.length)),w=0,p=0,U=0,F=new T(0,0);for(var k=0;k<s.length;k++){if(k%y==0){if(U=0,p=w,k!=0)p+=c.DEFAULT_COMPONENT_SEPERATION;w=0}var B=s[k],W=X.findCenterOfTree(B);if(N.x=U,N.y=p,F=P.radialLayout(B,W,N),F.y>w)w=Math.floor(F.y);U=Math.floor(F.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(x.WORLD_CENTER_X-F.x/2,x.WORLD_CENTER_Y-F.y/2))},P.radialLayout=function(s,N,y){var w=Math.max(this.maxDiagonalInTree(s),c.DEFAULT_RADIAL_SEPARATION);P.branchRadialLayout(N,null,0,359,0,w);var p=_.calculateBounds(s),U=new Q;U.setDeviceOrgX(p.getMinX()),U.setDeviceOrgY(p.getMinY()),U.setWorldOrgX(y.x),U.setWorldOrgY(y.y);for(var F=0;F<s.length;F++){var k=s[F];k.transform(U)}var B=new T(p.getMaxX(),p.getMaxY());return U.inverseTransformPoint(B)},P.branchRadialLayout=function(s,N,y,w,p,U){var F=(w-y+1)/2;if(F<0)F+=180;var k=(F+y)%360,B=k*V.TWO_PI/360,W=Math.cos(B),st=p*Math.cos(B),dt=p*Math.sin(B);s.setCenter(st,dt);var Z=[];Z=Z.concat(s.getEdges());var ut=Z.length;if(N!=null)ut--;var nt=0,S=Z.length,K,et=s.getEdgesBetween(N);while(et.length>1){var ct=et[0];et.splice(0,1);var Nt=Z.indexOf(ct);if(Nt>=0)Z.splice(Nt,1);S--,ut--}if(N!=null)K=(Z.indexOf(et[0])+1)%S;else K=0;var Pt=Math.abs(w-y)/ut;for(var Bt=K;nt!=ut;Bt=++Bt%S){var ft=Z[Bt].getOtherEnd(s);if(ft==N)continue;var Jt=(y+nt*Pt)%360,Xt=(Jt+Pt)%360;P.branchRadialLayout(ft,s,Jt,Xt,p+U,U),nt++}},P.maxDiagonalInTree=function(s){var N=I.MIN_VALUE;for(var y=0;y<s.length;y++){var w=s[y],p=w.getDiagonal();if(p>N)N=p}return N},P.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},P.prototype.groupZeroDegreeMembers=function(){var s=this,N={};this.memberGroups={},this.idToDummyNode={};var y=[],w=this.graphManager.getAllNodes();for(var p=0;p<w.length;p++){var U=w[p],F=U.getParent();if(this.getNodeDegreeWithChildren(U)===0&&(F.id==null||!this.getToBeTiled(F)))y.push(U)}for(var p=0;p<y.length;p++){var U=y[p],k=U.getParent().id;if(typeof N[k]>"u")N[k]=[];N[k]=N[k].concat(U)}Object.keys(N).forEach(function(B){if(N[B].length>1){var W="DummyCompound_"+B;s.memberGroups[W]=N[B];var st=N[B][0].getParent(),dt=new i(s.graphManager);dt.id=W,dt.paddingLeft=st.paddingLeft||0,dt.paddingRight=st.paddingRight||0,dt.paddingBottom=st.paddingBottom||0,dt.paddingTop=st.paddingTop||0,s.idToDummyNode[W]=dt;var Z=s.getGraphManager().add(s.newGraph(),dt),ut=st.getChild();ut.add(dt);for(var nt=0;nt<N[B].length;nt++){var S=N[B][nt];ut.remove(S),Z.add(S)}}})},P.prototype.clearCompounds=function(){var s={},N={};this.performDFSOnCompounds();for(var y=0;y<this.compoundOrder.length;y++)N[this.compoundOrder[y].id]=this.compoundOrder[y],s[this.compoundOrder[y].id]=[].concat(this.compoundOrder[y].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[y].getChild()),this.compoundOrder[y].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,N)},P.prototype.clearZeroDegreeMembers=function(){var s=this,N=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(y){var w=s.idToDummyNode[y];if(N[y]=s.tileNodes(s.memberGroups[y],w.paddingLeft+w.paddingRight),w.rect.width=N[y].width,w.rect.height=N[y].height,w.setCenter(N[y].centerX,N[y].centerY),w.labelMarginLeft=0,w.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var p=w.rect.width,U=w.rect.height;if(w.labelWidth){if(w.labelPosHorizontal=="left")w.rect.x-=w.labelWidth,w.setWidth(p+w.labelWidth),w.labelMarginLeft=w.labelWidth;else if(w.labelPosHorizontal=="center"&&w.labelWidth>p)w.rect.x-=(w.labelWidth-p)/2,w.setWidth(w.labelWidth),w.labelMarginLeft=(w.labelWidth-p)/2;else if(w.labelPosHorizontal=="right")w.setWidth(p+w.labelWidth)}if(w.labelHeight){if(w.labelPosVertical=="top")w.rect.y-=w.labelHeight,w.setHeight(U+w.labelHeight),w.labelMarginTop=w.labelHeight;else if(w.labelPosVertical=="center"&&w.labelHeight>U)w.rect.y-=(w.labelHeight-U)/2,w.setHeight(w.labelHeight),w.labelMarginTop=(w.labelHeight-U)/2;else if(w.labelPosVertical=="bottom")w.setHeight(U+w.labelHeight)}}})},P.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var N=this.compoundOrder[s],{id:y,paddingLeft:w,paddingTop:p,labelMarginLeft:U,labelMarginTop:F}=N;this.adjustLocations(this.tiledMemberPack[y],N.rect.x,N.rect.y,w,p,U,F)}},P.prototype.repopulateZeroDegreeMembers=function(){var s=this,N=this.tiledZeroDegreePack;Object.keys(N).forEach(function(y){var w=s.idToDummyNode[y],{paddingLeft:p,paddingTop:U,labelMarginLeft:F,labelMarginTop:k}=w;s.adjustLocations(N[y],w.rect.x,w.rect.y,p,U,F,k)})},P.prototype.getToBeTiled=function(s){var N=s.id;if(this.toBeTiled[N]!=null)return this.toBeTiled[N];var y=s.getChild();if(y==null)return this.toBeTiled[N]=!1,!1;var w=y.getNodes();for(var p=0;p<w.length;p++){var U=w[p];if(this.getNodeDegree(U)>0)return this.toBeTiled[N]=!1,!1;if(U.getChild()==null){this.toBeTiled[U.id]=!1;continue}if(!this.getToBeTiled(U))return this.toBeTiled[N]=!1,!1}return this.toBeTiled[N]=!0,!0},P.prototype.getNodeDegree=function(s){var N=s.id,y=s.getEdges(),w=0;for(var p=0;p<y.length;p++){var U=y[p];if(U.getSource().id!==U.getTarget().id)w=w+1}return w},P.prototype.getNodeDegreeWithChildren=function(s){var N=this.getNodeDegree(s);if(s.getChild()==null)return N;var y=s.getChild().getNodes();for(var w=0;w<y.length;w++){var p=y[w];N+=this.getNodeDegreeWithChildren(p)}return N},P.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},P.prototype.fillCompexOrderByDFS=function(s){for(var N=0;N<s.length;N++){var y=s[N];if(y.getChild()!=null)this.fillCompexOrderByDFS(y.getChild().getNodes());if(this.getToBeTiled(y))this.compoundOrder.push(y)}},P.prototype.adjustLocations=function(s,N,y,w,p,U,F){N+=w+U,y+=p+F;var k=N;for(var B=0;B<s.rows.length;B++){var W=s.rows[B];N=k;var st=0;for(var dt=0;dt<W.length;dt++){var Z=W[dt];if(Z.rect.x=N,Z.rect.y=y,N+=Z.rect.width+s.horizontalPadding,Z.rect.height>st)st=Z.rect.height}y+=st+s.verticalPadding}},P.prototype.tileCompoundMembers=function(s,N){var y=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(w){var p=N[w];if(y.tiledMemberPack[w]=y.tileNodes(s[w],p.paddingLeft+p.paddingRight),p.rect.width=y.tiledMemberPack[w].width,p.rect.height=y.tiledMemberPack[w].height,p.setCenter(y.tiledMemberPack[w].centerX,y.tiledMemberPack[w].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var U=p.rect.width,F=p.rect.height;if(p.labelWidth){if(p.labelPosHorizontal=="left")p.rect.x-=p.labelWidth,p.setWidth(U+p.labelWidth),p.labelMarginLeft=p.labelWidth;else if(p.labelPosHorizontal=="center"&&p.labelWidth>U)p.rect.x-=(p.labelWidth-U)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-U)/2;else if(p.labelPosHorizontal=="right")p.setWidth(U+p.labelWidth)}if(p.labelHeight){if(p.labelPosVertical=="top")p.rect.y-=p.labelHeight,p.setHeight(F+p.labelHeight),p.labelMarginTop=p.labelHeight;else if(p.labelPosVertical=="center"&&p.labelHeight>F)p.rect.y-=(p.labelHeight-F)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-F)/2;else if(p.labelPosVertical=="bottom")p.setHeight(F+p.labelHeight)}}})},P.prototype.tileNodes=function(s,N){var y=this.tileNodesByFavoringDim(s,N,!0),w=this.tileNodesByFavoringDim(s,N,!1),p=this.getOrgRatio(y),U=this.getOrgRatio(w),F;if(U<p)F=w;else F=y;return F},P.prototype.getOrgRatio=function(s){var{width:N,height:y}=s,w=N/y;if(w<1)w=1/w;return w},P.prototype.calcIdealRowWidth=function(s,N){var{TILING_PADDING_VERTICAL:y,TILING_PADDING_HORIZONTAL:w}=c,p=s.length,U=0,F=0,k=0;s.forEach(function(nt){if(U+=nt.getWidth(),F+=nt.getHeight(),nt.getWidth()>k)k=nt.getWidth()});var B=U/p,W=F/p,st=Math.pow(y-w,2)+4*(B+w)*(W+y)*p,dt=(w-y+Math.sqrt(st))/(2*(B+w)),Z;if(N){if(Z=Math.ceil(dt),Z==dt)Z++}else Z=Math.floor(dt);var ut=Z*(B+w)-w;if(k>ut)ut=k;return ut+=w*2,ut},P.prototype.tileNodesByFavoringDim=function(s,N,y){var{TILING_PADDING_VERTICAL:w,TILING_PADDING_HORIZONTAL:p,TILING_COMPARE_BY:U}=c,F={rows:[],rowWidth:[],rowHeight:[],width:0,height:N,verticalPadding:w,horizontalPadding:p,centerX:0,centerY:0};if(U)F.idealRowWidth=this.calcIdealRowWidth(s,y);var k=function(S){return S.rect.width*S.rect.height},B=function(S,K){return k(K)-k(S)};s.sort(function(nt,S){var K=B;if(F.idealRowWidth)return K=U,K(nt.id,S.id);return K(nt,S)});var W=0,st=0;for(var dt=0;dt<s.length;dt++){var Z=s[dt];W+=Z.getCenterX(),st+=Z.getCenterY()}F.centerX=W/s.length,F.centerY=st/s.length;for(var dt=0;dt<s.length;dt++){var Z=s[dt];if(F.rows.length==0)this.insertNodeToRow(F,Z,0,N);else if(this.canAddHorizontal(F,Z.rect.width,Z.rect.height)){var ut=F.rows.length-1;if(!F.idealRowWidth)ut=this.getShortestRowIndex(F);this.insertNodeToRow(F,Z,ut,N)}else this.insertNodeToRow(F,Z,F.rows.length,N);this.shiftToLastRow(F)}return F},P.prototype.insertNodeToRow=function(s,N,y,w){var p=w;if(y==s.rows.length){var U=[];s.rows.push(U),s.rowWidth.push(p),s.rowHeight.push(0)}var F=s.rowWidth[y]+N.rect.width;if(s.rows[y].length>0)F+=s.horizontalPadding;if(s.rowWidth[y]=F,s.width<F)s.width=F;var k=N.rect.height;if(y>0)k+=s.verticalPadding;var B=0;if(k>s.rowHeight[y])B=s.rowHeight[y],s.rowHeight[y]=k,B=s.rowHeight[y]-B;s.height+=B,s.rows[y].push(N)},P.prototype.getShortestRowIndex=function(s){var N=-1,y=Number.MAX_VALUE;for(var w=0;w<s.rows.length;w++)if(s.rowWidth[w]<y)N=w,y=s.rowWidth[w];return N},P.prototype.getLongestRowIndex=function(s){var N=-1,y=Number.MIN_VALUE;for(var w=0;w<s.rows.length;w++)if(s.rowWidth[w]>y)N=w,y=s.rowWidth[w];return N},P.prototype.canAddHorizontal=function(s,N,y){if(s.idealRowWidth){var w=s.rows.length-1,p=s.rowWidth[w];return p+N+s.horizontalPadding<=s.idealRowWidth}var U=this.getShortestRowIndex(s);if(U<0)return!0;var F=s.rowWidth[U];if(F+s.horizontalPadding+N<=s.width)return!0;var k=0;if(s.rowHeight[U]<y){if(U>0)k=y+s.verticalPadding-s.rowHeight[U]}var B;if(s.width-F>=N+s.horizontalPadding)B=(s.height+k)/(F+N+s.horizontalPadding);else B=(s.height+k)/s.width;k=y+s.verticalPadding;var W;if(s.width<N)W=(s.height+k)/N;else W=(s.height+k)/s.width;if(W<1)W=1/W;if(B<1)B=1/B;return B<W},P.prototype.shiftToLastRow=function(s){var N=this.getLongestRowIndex(s),y=s.rowWidth.length-1,w=s.rows[N],p=w[w.length-1],U=p.width+s.horizontalPadding;if(s.width-s.rowWidth[y]>U&&N!=y){w.splice(-1,1),s.rows[y].push(p),s.rowWidth[N]=s.rowWidth[N]-U,s.rowWidth[y]=s.rowWidth[y]+U,s.width=s.rowWidth[instance.getLongestRowIndex(s)];var F=Number.MIN_VALUE;for(var k=0;k<w.length;k++)if(w[k].height>F)F=w[k].height;if(N>0)F+=s.verticalPadding;var B=s.rowHeight[N]+s.rowHeight[y];if(s.rowHeight[N]=F,s.rowHeight[y]<p.height+s.verticalPadding)s.rowHeight[y]=p.height+s.verticalPadding;var W=s.rowHeight[N]+s.rowHeight[y];s.height+=W-B,this.shiftToLastRow(s)}},P.prototype.tilingPreLayout=function(){if(c.TILE)this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers()},P.prototype.tilingPostLayout=function(){if(c.TILE)this.repopulateZeroDegreeMembers(),this.repopulateCompounds()},P.prototype.reduceTrees=function(){var s=[],N=!0,y;while(N){var w=this.graphManager.getAllNodes(),p=[];N=!1;for(var U=0;U<w.length;U++)if(y=w[U],y.getEdges().length==1&&!y.getEdges()[0].isInterGraph&&y.getChild()==null){if(c.PURE_INCREMENTAL){var F=y.getEdges()[0].getOtherEnd(y),k=new D(y.getCenterX()-F.getCenterX(),y.getCenterY()-F.getCenterY());p.push([y,y.getEdges()[0],y.getOwner(),k])}else p.push([y,y.getEdges()[0],y.getOwner()]);N=!0}if(N==!0){var B=[];for(var W=0;W<p.length;W++)if(p[W][0].getEdges().length==1)B.push(p[W]),p[W][0].getOwner().remove(p[W][0]);s.push(B),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},P.prototype.growTree=function(s){var N=s.length,y=s[N-1],w;for(var p=0;p<y.length;p++)w=y[p],this.findPlaceforPrunedNode(w),w[2].add(w[0]),w[2].add(w[1],w[1].source,w[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},P.prototype.findPlaceforPrunedNode=function(s){var N,y,w=s[0];if(w==s[1].source)y=s[1].target;else y=s[1].source;if(c.PURE_INCREMENTAL)w.setCenter(y.getCenterX()+s[3].getWidth(),y.getCenterY()+s[3].getHeight());else{var p=y.startX,U=y.finishX,F=y.startY,k=y.finishY,B=0,W=0,st=0,dt=0,Z=[B,st,W,dt];if(F>0)for(var ut=p;ut<=U;ut++)Z[0]+=this.grid[ut][F-1].length+this.grid[ut][F].length-1;if(U<this.grid.length-1)for(var ut=F;ut<=k;ut++)Z[1]+=this.grid[U+1][ut].length+this.grid[U][ut].length-1;if(k<this.grid[0].length-1)for(var ut=p;ut<=U;ut++)Z[2]+=this.grid[ut][k+1].length+this.grid[ut][k].length-1;if(p>0)for(var ut=F;ut<=k;ut++)Z[3]+=this.grid[p-1][ut].length+this.grid[p][ut].length-1;var nt=I.MAX_VALUE,S,K;for(var et=0;et<Z.length;et++)if(Z[et]<nt)nt=Z[et],S=1,K=et;else if(Z[et]==nt)S++;if(S==3&&nt==0){if(Z[0]==0&&Z[1]==0&&Z[2]==0)N=1;else if(Z[0]==0&&Z[1]==0&&Z[3]==0)N=0;else if(Z[0]==0&&Z[2]==0&&Z[3]==0)N=3;else if(Z[1]==0&&Z[2]==0&&Z[3]==0)N=2}else if(S==2&&nt==0){var ct=Math.floor(Math.random()*2);if(Z[0]==0&&Z[1]==0)if(ct==0)N=0;else N=1;else if(Z[0]==0&&Z[2]==0)if(ct==0)N=0;else N=2;else if(Z[0]==0&&Z[3]==0)if(ct==0)N=0;else N=3;else if(Z[1]==0&&Z[2]==0)if(ct==0)N=1;else N=2;else if(Z[1]==0&&Z[3]==0)if(ct==0)N=1;else N=3;else if(ct==0)N=2;else N=3}else if(S==4&&nt==0){var ct=Math.floor(Math.random()*4);N=ct}else N=K;if(N==0)w.setCenter(y.getCenterX(),y.getCenterY()-y.getHeight()/2-f.DEFAULT_EDGE_LENGTH-w.getHeight()/2);else if(N==1)w.setCenter(y.getCenterX()+y.getWidth()/2+f.DEFAULT_EDGE_LENGTH+w.getWidth()/2,y.getCenterY());else if(N==2)w.setCenter(y.getCenterX(),y.getCenterY()+y.getHeight()/2+f.DEFAULT_EDGE_LENGTH+w.getHeight()/2);else w.setCenter(y.getCenterX()-y.getWidth()/2-f.DEFAULT_EDGE_LENGTH-w.getWidth()/2,y.getCenterY())}},o.exports=P},991:(o,n,a)=>{var g=a(551).FDLayoutNode,r=a(551).IMath;function v(e,c,u,f){g.call(this,e,c,u,f)}v.prototype=Object.create(g.prototype);for(var i in g)v[i]=g[i];v.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();if(this.getChild()!=null&&this.fixedNodeWeight)this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight;else this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren;if(Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement)this.displacementX=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementX);if(Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement)this.displacementY=e.coolingFactor*e.maxNodeDisplacement*r.sign(this.displacementY);if(this.child&&this.child.getNodes().length>0)this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(e,c){var u=this.getChild().getNodes(),f;for(var x=0;x<u.length;x++)if(f=u[x],f.getChild()==null)f.displacementX+=e,f.displacementY+=c;else f.propogateDisplacementToChildren(e,c)},v.prototype.move=function(){var e=this.graphManager.getLayout();if(this.child==null||this.child.getNodes().length==0)this.moveBy(this.displacementX,this.displacementY),e.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},v.prototype.setPred1=function(e){this.pred1=e},v.prototype.getPred1=function(){return pred1},v.prototype.getPred2=function(){return pred2},v.prototype.setNext=function(e){this.next=e},v.prototype.getNext=function(){return next},v.prototype.setProcessed=function(e){this.processed=e},v.prototype.isProcessed=function(){return processed},o.exports=v},902:(o,n,a)=>{function g(u){if(Array.isArray(u)){for(var f=0,x=Array(u.length);f<u.length;f++)x[f]=u[f];return x}else return Array.from(u)}var r=a(806),v=a(551).LinkedList,i=a(551).Matrix,e=a(551).SVD;function c(){}c.handleConstraints=function(u){var f={};f.fixedNodeConstraint=u.constraints.fixedNodeConstraint,f.alignmentConstraint=u.constraints.alignmentConstraint,f.relativePlacementConstraint=u.constraints.relativePlacementConstraint;var x=new Map,E=new Map,T=[],D=[],X=u.getAllNodes(),I=0;for(var V=0;V<X.length;V++){var _=X[V];if(_.getChild()==null)E.set(_.id,I++),T.push(_.getCenterX()),D.push(_.getCenterY()),x.set(_.id,_)}if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(J){if(!J.gap&&J.gap!=0)if(J.left)J.gap=r.DEFAULT_EDGE_LENGTH+x.get(J.left).getWidth()/2+x.get(J.right).getWidth()/2;else J.gap=r.DEFAULT_EDGE_LENGTH+x.get(J.top).getHeight()/2+x.get(J.bottom).getHeight()/2});var Q=function(rt,it){return{x:rt.x-it.x,y:rt.y-it.y}},lt=function(rt){var it=0,at=0;return rt.forEach(function(ot){it+=T[E.get(ot)],at+=D[E.get(ot)]}),{x:it/rt.size,y:at/rt.size}},P=function(rt,it,at,ot,gt){function At(Tt,yt){var Dt=new Set(Tt),mt=!0,wt=!1,Zt=void 0;try{for(var Vt=yt[Symbol.iterator](),re;!(mt=(re=Vt.next()).done);mt=!0){var Wt=re.value;Dt.add(Wt)}}catch(bt){wt=!0,Zt=bt}finally{try{if(!mt&&Vt.return)Vt.return()}finally{if(wt)throw Zt}}return Dt}var Mt=new Map;rt.forEach(function(Tt,yt){Mt.set(yt,0)}),rt.forEach(function(Tt,yt){Tt.forEach(function(Dt){Mt.set(Dt.id,Mt.get(Dt.id)+1)})});var ht=new Map,Lt=new Map,Ct=new v;if(Mt.forEach(function(Tt,yt){if(Tt==0){if(Ct.push(yt),!at)if(it=="horizontal")ht.set(yt,E.has(yt)?T[E.get(yt)]:ot.get(yt));else ht.set(yt,E.has(yt)?D[E.get(yt)]:ot.get(yt))}else ht.set(yt,Number.NEGATIVE_INFINITY);if(at)Lt.set(yt,new Set([yt]))}),at)gt.forEach(function(Tt){var yt=[];if(Tt.forEach(function(wt){if(at.has(wt))yt.push(wt)}),yt.length>0){var Dt=0;yt.forEach(function(wt){if(it=="horizontal")ht.set(wt,E.has(wt)?T[E.get(wt)]:ot.get(wt)),Dt+=ht.get(wt);else ht.set(wt,E.has(wt)?D[E.get(wt)]:ot.get(wt)),Dt+=ht.get(wt)}),Dt=Dt/yt.length,Tt.forEach(function(wt){if(!at.has(wt))ht.set(wt,Dt)})}else{var mt=0;Tt.forEach(function(wt){if(it=="horizontal")mt+=E.has(wt)?T[E.get(wt)]:ot.get(wt);else mt+=E.has(wt)?D[E.get(wt)]:ot.get(wt)}),mt=mt/Tt.length,Tt.forEach(function(wt){ht.set(wt,mt)})}});var pt=function(){var yt=Ct.shift(),Dt=rt.get(yt);Dt.forEach(function(mt){if(ht.get(mt.id)<ht.get(yt)+mt.gap)if(at&&at.has(mt.id)){var wt=void 0;if(it=="horizontal")wt=E.has(mt.id)?T[E.get(mt.id)]:ot.get(mt.id);else wt=E.has(mt.id)?D[E.get(mt.id)]:ot.get(mt.id);if(ht.set(mt.id,wt),wt<ht.get(yt)+mt.gap){var Zt=ht.get(yt)+mt.gap-wt;Lt.get(yt).forEach(function(Vt){ht.set(Vt,ht.get(Vt)-Zt)})}}else ht.set(mt.id,ht.get(yt)+mt.gap);if(Mt.set(mt.id,Mt.get(mt.id)-1),Mt.get(mt.id)==0)Ct.push(mt.id);if(at)Lt.set(mt.id,At(Lt.get(yt),Lt.get(mt.id)))})};while(Ct.length!=0)pt();if(at){var Ot=new Set;rt.forEach(function(Tt,yt){if(Tt.length==0)Ot.add(yt)});var Ut=[];Lt.forEach(function(Tt,yt){if(Ot.has(yt)){var Dt=!1,mt=!0,wt=!1,Zt=void 0;try{for(var Vt=Tt[Symbol.iterator](),re;!(mt=(re=Vt.next()).done);mt=!0){var Wt=re.value;if(at.has(Wt))Dt=!0}}catch($t){wt=!0,Zt=$t}finally{try{if(!mt&&Vt.return)Vt.return()}finally{if(wt)throw Zt}}if(!Dt){var bt=!1,ae=void 0;if(Ut.forEach(function($t,jt){if($t.has([].concat(g(Tt))[0]))bt=!0,ae=jt}),!bt)Ut.push(new Set(Tt));else Tt.forEach(function($t){Ut[ae].add($t)})}}}),Ut.forEach(function(Tt,yt){var{POSITIVE_INFINITY:Dt,POSITIVE_INFINITY:mt,NEGATIVE_INFINITY:wt,NEGATIVE_INFINITY:Zt}=Number,Vt=!0,re=!1,Wt=void 0;try{for(var bt=Tt[Symbol.iterator](),ae;!(Vt=(ae=bt.next()).done);Vt=!0){var $t=ae.value,jt=void 0;if(it=="horizontal")jt=E.has($t)?T[E.get($t)]:ot.get($t);else jt=E.has($t)?D[E.get($t)]:ot.get($t);var ie=ht.get($t);if(jt<Dt)Dt=jt;if(jt>wt)wt=jt;if(ie<mt)mt=ie;if(ie>Zt)Zt=ie}}catch(de){re=!0,Wt=de}finally{try{if(!Vt&&bt.return)bt.return()}finally{if(re)throw Wt}}var we=(Dt+wt)/2-(mt+Zt)/2,he=!0,fe=!1,ge=void 0;try{for(var le=Tt[Symbol.iterator](),Ne;!(he=(Ne=le.next()).done);he=!0){var ue=Ne.value;ht.set(ue,ht.get(ue)+we)}}catch(de){fe=!0,ge=de}finally{try{if(!he&&le.return)le.return()}finally{if(fe)throw ge}}})}return ht},tt=function(rt){var it=0,at=0,ot=0,gt=0;if(rt.forEach(function(Lt){if(Lt.left)T[E.get(Lt.left)]-T[E.get(Lt.right)]>=0?it++:at++;else D[E.get(Lt.top)]-D[E.get(Lt.bottom)]>=0?ot++:gt++}),it>at&&ot>gt)for(var At=0;At<E.size;At++)T[At]=-1*T[At],D[At]=-1*D[At];else if(it>at)for(var Mt=0;Mt<E.size;Mt++)T[Mt]=-1*T[Mt];else if(ot>gt)for(var ht=0;ht<E.size;ht++)D[ht]=-1*D[ht]},s=function(rt){var it=[],at=new v,ot=new Set,gt=0;return rt.forEach(function(At,Mt){if(!ot.has(Mt)){it[gt]=[];var ht=Mt;at.push(ht),ot.add(ht),it[gt].push(ht);while(at.length!=0){ht=at.shift();var Lt=rt.get(ht);Lt.forEach(function(Ct){if(!ot.has(Ct.id))at.push(Ct.id),ot.add(Ct.id),it[gt].push(Ct.id)})}gt++}}),it},N=function(rt){var it=new Map;return rt.forEach(function(at,ot){it.set(ot,[])}),rt.forEach(function(at,ot){at.forEach(function(gt){it.get(ot).push(gt),it.get(gt.id).push({id:ot,gap:gt.gap,direction:gt.direction})})}),it},y=function(rt){var it=new Map;return rt.forEach(function(at,ot){it.set(ot,[])}),rt.forEach(function(at,ot){at.forEach(function(gt){it.get(gt.id).push({id:ot,gap:gt.gap,direction:gt.direction})})}),it},w=[],p=[],U=!1,F=!1,k=new Set,B=new Map,W=new Map,st=[];if(f.fixedNodeConstraint)f.fixedNodeConstraint.forEach(function(J){k.add(J.nodeId)});if(f.relativePlacementConstraint)f.relativePlacementConstraint.forEach(function(J){if(J.left){if(B.has(J.left))B.get(J.left).push({id:J.right,gap:J.gap,direction:"horizontal"});else B.set(J.left,[{id:J.right,gap:J.gap,direction:"horizontal"}]);if(!B.has(J.right))B.set(J.right,[])}else{if(B.has(J.top))B.get(J.top).push({id:J.bottom,gap:J.gap,direction:"vertical"});else B.set(J.top,[{id:J.bottom,gap:J.gap,direction:"vertical"}]);if(!B.has(J.bottom))B.set(J.bottom,[])}}),W=N(B),st=s(W);if(r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(J,rt){w[rt]=[J.position.x,J.position.y],p[rt]=[T[E.get(J.nodeId)],D[E.get(J.nodeId)]]}),U=!0;else if(f.alignmentConstraint)(function(){var J=0;if(f.alignmentConstraint.vertical){var rt=f.alignmentConstraint.vertical,it=function(ht){var Lt=new Set;rt[ht].forEach(function(Ot){Lt.add(Ot)});var Ct=new Set([].concat(g(Lt)).filter(function(Ot){return k.has(Ot)})),pt=void 0;if(Ct.size>0)pt=T[E.get(Ct.values().next().value)];else pt=lt(Lt).x;rt[ht].forEach(function(Ot){w[J]=[pt,D[E.get(Ot)]],p[J]=[T[E.get(Ot)],D[E.get(Ot)]],J++})};for(var at=0;at<rt.length;at++)it(at);U=!0}if(f.alignmentConstraint.horizontal){var ot=f.alignmentConstraint.horizontal,gt=function(ht){var Lt=new Set;ot[ht].forEach(function(Ot){Lt.add(Ot)});var Ct=new Set([].concat(g(Lt)).filter(function(Ot){return k.has(Ot)})),pt=void 0;if(Ct.size>0)pt=T[E.get(Ct.values().next().value)];else pt=lt(Lt).y;ot[ht].forEach(function(Ot){w[J]=[T[E.get(Ot)],pt],p[J]=[T[E.get(Ot)],D[E.get(Ot)]],J++})};for(var At=0;At<ot.length;At++)gt(At);U=!0}if(f.relativePlacementConstraint)F=!0})();else if(f.relativePlacementConstraint){var dt=0,Z=0;for(var ut=0;ut<st.length;ut++)if(st[ut].length>dt)dt=st[ut].length,Z=ut;if(dt<W.size/2)tt(f.relativePlacementConstraint),U=!1,F=!1;else{var nt=new Map,S=new Map,K=[];st[Z].forEach(function(J){B.get(J).forEach(function(rt){if(rt.direction=="horizontal"){if(nt.has(J))nt.get(J).push(rt);else nt.set(J,[rt]);if(!nt.has(rt.id))nt.set(rt.id,[]);K.push({left:J,right:rt.id})}else{if(S.has(J))S.get(J).push(rt);else S.set(J,[rt]);if(!S.has(rt.id))S.set(rt.id,[]);K.push({top:J,bottom:rt.id})}})}),tt(K),F=!1;var et=P(nt,"horizontal"),ct=P(S,"vertical");st[Z].forEach(function(J,rt){if(p[rt]=[T[E.get(J)],D[E.get(J)]],w[rt]=[],et.has(J))w[rt][0]=et.get(J);else w[rt][0]=T[E.get(J)];if(ct.has(J))w[rt][1]=ct.get(J);else w[rt][1]=D[E.get(J)]}),U=!0}}if(U){var Nt=void 0,Pt=i.transpose(w),Bt=i.transpose(p);for(var ft=0;ft<Pt.length;ft++)Pt[ft]=i.multGamma(Pt[ft]),Bt[ft]=i.multGamma(Bt[ft]);var Jt=i.multMat(Pt,i.transpose(Bt)),Xt=e.svd(Jt);Nt=i.multMat(Xt.V,i.transpose(Xt.U));for(var Et=0;Et<E.size;Et++){var vt=[T[Et],D[Et]],xt=[Nt[0][0],Nt[1][0]],Rt=[Nt[0][1],Nt[1][1]];T[Et]=i.dotProduct(vt,xt),D[Et]=i.dotProduct(vt,Rt)}if(F)tt(f.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var Gt={x:0,y:0};f.fixedNodeConstraint.forEach(function(J,rt){var it={x:T[E.get(J.nodeId)],y:D[E.get(J.nodeId)]},at=J.position,ot=Q(at,it);Gt.x+=ot.x,Gt.y+=ot.y}),Gt.x/=f.fixedNodeConstraint.length,Gt.y/=f.fixedNodeConstraint.length,T.forEach(function(J,rt){T[rt]+=Gt.x}),D.forEach(function(J,rt){D[rt]+=Gt.y}),f.fixedNodeConstraint.forEach(function(J){T[E.get(J.nodeId)]=J.position.x,D[E.get(J.nodeId)]=J.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical){var St=f.alignmentConstraint.vertical,Ft=function(rt){var it=new Set;St[rt].forEach(function(gt){it.add(gt)});var at=new Set([].concat(g(it)).filter(function(gt){return k.has(gt)})),ot=void 0;if(at.size>0)ot=T[E.get(at.values().next().value)];else ot=lt(it).x;it.forEach(function(gt){if(!k.has(gt))T[E.get(gt)]=ot})};for(var Ht=0;Ht<St.length;Ht++)Ft(Ht)}if(f.alignmentConstraint.horizontal){var zt=f.alignmentConstraint.horizontal,ee=function(rt){var it=new Set;zt[rt].forEach(function(gt){it.add(gt)});var at=new Set([].concat(g(it)).filter(function(gt){return k.has(gt)})),ot=void 0;if(at.size>0)ot=D[E.get(at.values().next().value)];else ot=lt(it).y;it.forEach(function(gt){if(!k.has(gt))D[E.get(gt)]=ot})};for(var qt=0;qt<zt.length;qt++)ee(qt)}}if(f.relativePlacementConstraint)(function(){var J=new Map,rt=new Map,it=new Map,at=new Map,ot=new Map,gt=new Map,At=new Set,Mt=new Set;if(k.forEach(function(Qt){At.add(Qt),Mt.add(Qt)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical){var ht=f.alignmentConstraint.vertical,Lt=function(It){it.set("dummy"+It,[]),ht[It].forEach(function(Yt){if(J.set(Yt,"dummy"+It),it.get("dummy"+It).push(Yt),k.has(Yt))At.add("dummy"+It)}),ot.set("dummy"+It,T[E.get(ht[It][0])])};for(var Ct=0;Ct<ht.length;Ct++)Lt(Ct)}if(f.alignmentConstraint.horizontal){var pt=f.alignmentConstraint.horizontal,Ot=function(It){at.set("dummy"+It,[]),pt[It].forEach(function(Yt){if(rt.set(Yt,"dummy"+It),at.get("dummy"+It).push(Yt),k.has(Yt))Mt.add("dummy"+It)}),gt.set("dummy"+It,D[E.get(pt[It][0])])};for(var Ut=0;Ut<pt.length;Ut++)Ot(Ut)}}var Tt=new Map,yt=new Map,Dt=function(It){B.get(It).forEach(function(Yt){var oe=void 0,ne=void 0;if(Yt.direction=="horizontal"){if(oe=J.get(It)?J.get(It):It,J.get(Yt.id))ne={id:J.get(Yt.id),gap:Yt.gap,direction:Yt.direction};else ne=Yt;if(Tt.has(oe))Tt.get(oe).push(ne);else Tt.set(oe,[ne]);if(!Tt.has(ne.id))Tt.set(ne.id,[])}else{if(oe=rt.get(It)?rt.get(It):It,rt.get(Yt.id))ne={id:rt.get(Yt.id),gap:Yt.gap,direction:Yt.direction};else ne=Yt;if(yt.has(oe))yt.get(oe).push(ne);else yt.set(oe,[ne]);if(!yt.has(ne.id))yt.set(ne.id,[])}})},mt=!0,wt=!1,Zt=void 0;try{for(var Vt=B.keys()[Symbol.iterator](),re;!(mt=(re=Vt.next()).done);mt=!0){var Wt=re.value;Dt(Wt)}}catch(Qt){wt=!0,Zt=Qt}finally{try{if(!mt&&Vt.return)Vt.return()}finally{if(wt)throw Zt}}var bt=N(Tt),ae=N(yt),$t=s(bt),jt=s(ae),ie=y(Tt),we=y(yt),he=[],fe=[];$t.forEach(function(Qt,It){he[It]=[],Qt.forEach(function(Yt){if(ie.get(Yt).length==0)he[It].push(Yt)})}),jt.forEach(function(Qt,It){fe[It]=[],Qt.forEach(function(Yt){if(we.get(Yt).length==0)fe[It].push(Yt)})});var ge=P(Tt,"horizontal",At,ot,he),le=P(yt,"vertical",Mt,gt,fe),Ne=function(It){if(it.get(It))it.get(It).forEach(function(Yt){T[E.get(Yt)]=ge.get(It)});else T[E.get(It)]=ge.get(It)},ue=!0,de=!1,Ye=void 0;try{for(var Me=ge.keys()[Symbol.iterator](),Xe;!(ue=(Xe=Me.next()).done);ue=!0){var Ce=Xe.value;Ne(Ce)}}catch(Qt){de=!0,Ye=Qt}finally{try{if(!ue&&Me.return)Me.return()}finally{if(de)throw Ye}}var sr=function(It){if(at.get(It))at.get(It).forEach(function(Yt){D[E.get(Yt)]=le.get(It)});else D[E.get(It)]=le.get(It)},De=!0,He=!1,We=void 0;try{for(var Oe=le.keys()[Symbol.iterator](),Ve;!(De=(Ve=Oe.next()).done);De=!0){var Ce=Ve.value;sr(Ce)}}catch(Qt){He=!0,We=Qt}finally{try{if(!De&&Oe.return)Oe.return()}finally{if(He)throw We}}})()}for(var Kt=0;Kt<X.length;Kt++){var kt=X[Kt];if(kt.getChild()==null)kt.setCenter(T[E.get(kt.id)],D[E.get(kt.id)])}},o.exports=c},551:(o)=>{o.exports=L}},A={};function d(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return R[o](a,a.exports,d),a.exports}var h=d(45);return h})()})});var ze=$n(function(Ee,be){(function(R,A){if(typeof Ee==="object"&&typeof be==="object")be.exports=A(Fe());else if(typeof define==="function"&&define.amd)define(["cose-base"],A);else if(typeof Ee==="object")Ee.cytoscapeFcose=A(Fe());else R.cytoscapeFcose=A(R.coseBase)})(Ee,function(L){return(()=>{var R={658:(o)=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(n){for(var a=arguments.length,g=Array(a>1?a-1:0),r=1;r<a;r++)g[r-1]=arguments[r];return g.forEach(function(v){Object.keys(v).forEach(function(i){return n[i]=v[i]})}),n}},548:(o,n,a)=>{var g=function(){function i(e,c){var u=[],f=!0,x=!1,E=void 0;try{for(var T=e[Symbol.iterator](),D;!(f=(D=T.next()).done);f=!0)if(u.push(D.value),c&&u.length===c)break}catch(X){x=!0,E=X}finally{try{if(!f&&T.return)T.return()}finally{if(x)throw E}}return u}return function(e,c){if(Array.isArray(e))return e;else if(Symbol.iterator in Object(e))return i(e,c);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=a(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(i){var e={};for(var c=0;c<i.length;c++)e[i[c].id()]=!0;var u=i.filter(function(f,x){if(typeof f==="number")f=x;var E=f.parent()[0];while(E!=null){if(e[E.id()])return!1;E=E.parent()[0]}return!0});return u},v.connectComponents=function(i,e,c,u){var f=new r,x=new Set,E=[],T=void 0,D=void 0,X=void 0,I=!1,V=1,_=[],Q=[],lt=function(){var tt=i.collection();Q.push(tt);var s=c[0],N=i.collection();N.merge(s).merge(s.descendants().intersection(e)),E.push(s),N.forEach(function(p){f.push(p),x.add(p),tt.merge(p)});var y=function(){s=f.shift();var U=i.collection();s.neighborhood().nodes().forEach(function(W){if(e.intersection(s.edgesWith(W)).length>0)U.merge(W)});for(var F=0;F<U.length;F++){var k=U[F];if(T=c.intersection(k.union(k.ancestors())),T!=null&&!x.has(T[0])){var B=T.union(T.descendants());B.forEach(function(W){if(f.push(W),x.add(W),tt.merge(W),c.has(W))E.push(W)})}}};while(f.length!=0)y();if(tt.forEach(function(p){e.intersection(p.connectedEdges()).forEach(function(U){if(tt.has(U.source())&&tt.has(U.target()))tt.merge(U)})}),E.length==c.length)I=!0;if(!I||I&&V>1){D=E[0],X=D.connectedEdges().length,E.forEach(function(p){if(p.connectedEdges().length<X)X=p.connectedEdges().length,D=p}),_.push(D.id());var w=i.collection();w.merge(E[0]),E.forEach(function(p){w.merge(p)}),E=[],c=c.difference(w),V++}};do lt();while(!I);if(u){if(_.length>0)u.set("dummy"+(u.size+1),_)}return Q},v.relocateComponent=function(i,e,c){if(!c.fixedNodeConstraint){var{POSITIVE_INFINITY:u,NEGATIVE_INFINITY:f,POSITIVE_INFINITY:x,NEGATIVE_INFINITY:E}=Number;if(c.quality=="draft"){var T=!0,D=!1,X=void 0;try{for(var I=e.nodeIndexes[Symbol.iterator](),V;!(T=(V=I.next()).done);T=!0){var _=V.value,Q=g(_,2),lt=Q[0],P=Q[1],tt=c.cy.getElementById(lt);if(tt){var s=tt.boundingBox(),N=e.xCoords[P]-s.w/2,y=e.xCoords[P]+s.w/2,w=e.yCoords[P]-s.h/2,p=e.yCoords[P]+s.h/2;if(N<u)u=N;if(y>f)f=y;if(w<x)x=w;if(p>E)E=p}}}catch(W){D=!0,X=W}finally{try{if(!T&&I.return)I.return()}finally{if(D)throw X}}var U=i.x-(f+u)/2,F=i.y-(E+x)/2;e.xCoords=e.xCoords.map(function(W){return W+U}),e.yCoords=e.yCoords.map(function(W){return W+F})}else{Object.keys(e).forEach(function(W){var st=e[W],dt=st.getRect().x,Z=st.getRect().x+st.getRect().width,ut=st.getRect().y,nt=st.getRect().y+st.getRect().height;if(dt<u)u=dt;if(Z>f)f=Z;if(ut<x)x=ut;if(nt>E)E=nt});var k=i.x-(f+u)/2,B=i.y-(E+x)/2;Object.keys(e).forEach(function(W){var st=e[W];st.setCenter(st.getCenterX()+k,st.getCenterY()+B)})}}},v.calcBoundingBox=function(i,e,c,u){var{MAX_SAFE_INTEGER:f,MIN_SAFE_INTEGER:x,MAX_SAFE_INTEGER:E,MIN_SAFE_INTEGER:T}=Number,D=void 0,X=void 0,I=void 0,V=void 0,_=i.descendants().not(":parent"),Q=_.length;for(var lt=0;lt<Q;lt++){var P=_[lt];if(D=e[u.get(P.id())]-P.width()/2,X=e[u.get(P.id())]+P.width()/2,I=c[u.get(P.id())]-P.height()/2,V=c[u.get(P.id())]+P.height()/2,f>D)f=D;if(x<X)x=X;if(E>I)E=I;if(T<V)T=V}var tt={};return tt.topLeftX=f,tt.topLeftY=E,tt.width=x-f,tt.height=T-E,tt},v.calcParentsWithoutChildren=function(i,e){var c=i.collection();return e.nodes(":parent").forEach(function(u){var f=!1;if(u.children().forEach(function(x){if(x.css("display")!="none")f=!0}),!f)c.merge(u)}),c},o.exports=v},816:(o,n,a)=>{var g=a(548),r=a(140).CoSELayout,v=a(140).CoSENode,i=a(140).layoutBase.PointD,e=a(140).layoutBase.DimensionD,c=a(140).layoutBase.LayoutConstants,u=a(140).layoutBase.FDLayoutConstants,f=a(140).CoSEConstants,x=function(T,D){var{cy:X,eles:I}=T,V=I.nodes(),_=I.edges(),Q=void 0,lt=void 0,P=void 0,tt={};if(T.randomize)Q=D.nodeIndexes,lt=D.xCoords,P=D.yCoords;var s=function(W){return typeof W==="function"},N=function(W,st){if(s(W))return W(st);else return W},y=g.calcParentsWithoutChildren(X,I),w=function B(W,st,dt,Z){var ut=st.length;for(var nt=0;nt<ut;nt++){var S=st[nt],K=null;if(S.intersection(y).length==0)K=S.children();var et=void 0,ct=S.layoutDimensions({nodeDimensionsIncludeLabels:Z.nodeDimensionsIncludeLabels});if(S.outerWidth()!=null&&S.outerHeight()!=null)if(Z.randomize)if(!S.isParent())et=W.add(new v(dt.graphManager,new i(lt[Q.get(S.id())]-ct.w/2,P[Q.get(S.id())]-ct.h/2),new e(parseFloat(ct.w),parseFloat(ct.h))));else{var Nt=g.calcBoundingBox(S,lt,P,Q);if(S.intersection(y).length==0)et=W.add(new v(dt.graphManager,new i(Nt.topLeftX,Nt.topLeftY),new e(Nt.width,Nt.height)));else et=W.add(new v(dt.graphManager,new i(Nt.topLeftX,Nt.topLeftY),new e(parseFloat(ct.w),parseFloat(ct.h))))}else et=W.add(new v(dt.graphManager,new i(S.position("x")-ct.w/2,S.position("y")-ct.h/2),new e(parseFloat(ct.w),parseFloat(ct.h))));else et=W.add(new v(this.graphManager));if(et.id=S.data("id"),et.nodeRepulsion=N(Z.nodeRepulsion,S),et.paddingLeft=parseInt(S.css("padding")),et.paddingTop=parseInt(S.css("padding")),et.paddingRight=parseInt(S.css("padding")),et.paddingBottom=parseInt(S.css("padding")),Z.nodeDimensionsIncludeLabels)et.labelWidth=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,et.labelHeight=S.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,et.labelPosVertical=S.css("text-valign"),et.labelPosHorizontal=S.css("text-halign");if(tt[S.data("id")]=et,isNaN(et.rect.x))et.rect.x=0;if(isNaN(et.rect.y))et.rect.y=0;if(K!=null&&K.length>0){var Pt=void 0;Pt=dt.getGraphManager().add(dt.newGraph(),et),B(Pt,K,dt,Z)}}},p=function(W,st,dt){var Z=0,ut=0;for(var nt=0;nt<dt.length;nt++){var S=dt[nt],K=tt[S.data("source")],et=tt[S.data("target")];if(K&&et&&K!==et&&K.getEdgesBetween(et).length==0){var ct=st.add(W.newEdge(),K,et);ct.id=S.id(),ct.idealLength=N(T.idealEdgeLength,S),ct.edgeElasticity=N(T.edgeElasticity,S),Z+=ct.idealLength,ut++}}if(T.idealEdgeLength!=null){if(ut>0)f.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=Z/ut;else if(!s(T.idealEdgeLength))f.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=T.idealEdgeLength;else f.DEFAULT_EDGE_LENGTH=u.DEFAULT_EDGE_LENGTH=50;f.MIN_REPULSION_DIST=u.MIN_REPULSION_DIST=u.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH}},U=function(W,st){if(st.fixedNodeConstraint)W.constraints.fixedNodeConstraint=st.fixedNodeConstraint;if(st.alignmentConstraint)W.constraints.alignmentConstraint=st.alignmentConstraint;if(st.relativePlacementConstraint)W.constraints.relativePlacementConstraint=st.relativePlacementConstraint};if(T.nestingFactor!=null)f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=T.nestingFactor;if(T.gravity!=null)f.DEFAULT_GRAVITY_STRENGTH=u.DEFAULT_GRAVITY_STRENGTH=T.gravity;if(T.numIter!=null)f.MAX_ITERATIONS=u.MAX_ITERATIONS=T.numIter;if(T.gravityRange!=null)f.DEFAULT_GRAVITY_RANGE_FACTOR=u.DEFAULT_GRAVITY_RANGE_FACTOR=T.gravityRange;if(T.gravityCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=T.gravityCompound;if(T.gravityRangeCompound!=null)f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=T.gravityRangeCompound;if(T.initialEnergyOnIncremental!=null)f.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.DEFAULT_COOLING_FACTOR_INCREMENTAL=T.initialEnergyOnIncremental;if(T.tilingCompareBy!=null)f.TILING_COMPARE_BY=T.tilingCompareBy;if(T.quality=="proof")c.QUALITY=2;else c.QUALITY=0;if(f.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=T.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!T.randomize,f.ANIMATE=u.ANIMATE=c.ANIMATE=T.animate,f.TILE=T.tile,f.TILING_PADDING_VERTICAL=typeof T.tilingPaddingVertical==="function"?T.tilingPaddingVertical.call():T.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof T.tilingPaddingHorizontal==="function"?T.tilingPaddingHorizontal.call():T.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!T.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=T.uniformNodeDimensions,T.step=="transformed")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1;if(T.step=="enforced")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1;if(T.step=="cose")f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0;if(T.step=="all"){if(T.randomize)f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0}if(T.fixedNodeConstraint||T.alignmentConstraint||T.relativePlacementConstraint)f.TREE_REDUCTION_ON_INCREMENTAL=!1;else f.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new r,k=F.newGraphManager();return w(k.addRoot(),g.getTopMostNodes(V),F,T),p(F,k,_),U(F,T),F.runLayout(),tt};o.exports={coseLayout:x}},212:(o,n,a)=>{var g=function(){function T(D,X){for(var I=0;I<X.length;I++){var V=X[I];if(V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V)V.writable=!0;Object.defineProperty(D,V.key,V)}}return function(D,X,I){if(X)T(D.prototype,X);if(I)T(D,I);return D}}();function r(T,D){if(!(T instanceof D))throw TypeError("Cannot call a class as a function")}var v=a(658),i=a(548),e=a(657),c=e.spectralLayout,u=a(816),f=u.coseLayout,x=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(D){return 4500},idealEdgeLength:function(D){return 50},edgeElasticity:function(D){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),E=function(){function T(D){r(this,T),this.options=v({},x,D)}return g(T,[{key:"run",value:function(){var X=this,I=this.options,{cy:V,eles:_}=I,Q=[],lt=void 0,P=void 0,tt=[],s=void 0,N=[];if(I.fixedNodeConstraint&&(!Array.isArray(I.fixedNodeConstraint)||I.fixedNodeConstraint.length==0))I.fixedNodeConstraint=void 0;if(I.alignmentConstraint){if(I.alignmentConstraint.vertical&&(!Array.isArray(I.alignmentConstraint.vertical)||I.alignmentConstraint.vertical.length==0))I.alignmentConstraint.vertical=void 0;if(I.alignmentConstraint.horizontal&&(!Array.isArray(I.alignmentConstraint.horizontal)||I.alignmentConstraint.horizontal.length==0))I.alignmentConstraint.horizontal=void 0}if(I.relativePlacementConstraint&&(!Array.isArray(I.relativePlacementConstraint)||I.relativePlacementConstraint.length==0))I.relativePlacementConstraint=void 0;var y=I.fixedNodeConstraint||I.alignmentConstraint||I.relativePlacementConstraint;if(y)I.tile=!1,I.packComponents=!1;var w=void 0,p=!1;if(V.layoutUtilities&&I.packComponents){if(w=V.layoutUtilities("get"),!w)w=V.layoutUtilities();p=!0}if(_.nodes().length>0)if(!p){var U=I.eles.boundingBox();if(N.push({x:U.x1+U.w/2,y:U.y1+U.h/2}),I.randomize){var F=c(I);Q.push(F)}if(I.quality=="default"||I.quality=="proof")tt.push(f(I,Q[0])),i.relocateComponent(N[0],tt[0],I);else i.relocateComponent(N[0],Q[0],I)}else{var k=i.getTopMostNodes(I.eles.nodes());if(s=i.connectComponents(V,I.eles,k),s.forEach(function(Et){var vt=Et.boundingBox();N.push({x:vt.x1+vt.w/2,y:vt.y1+vt.h/2})}),I.randomize)s.forEach(function(Et){I.eles=Et,Q.push(c(I))});if(I.quality=="default"||I.quality=="proof"){var B=V.collection();if(I.tile){var W=new Map,st=[],dt=[],Z=0,ut={nodeIndexes:W,xCoords:st,yCoords:dt},nt=[];if(s.forEach(function(Et,vt){if(Et.edges().length==0)Et.nodes().forEach(function(xt,Rt){if(B.merge(Et.nodes()[Rt]),!xt.isParent())ut.nodeIndexes.set(Et.nodes()[Rt].id(),Z++),ut.xCoords.push(Et.nodes()[0].position().x),ut.yCoords.push(Et.nodes()[0].position().y)}),nt.push(vt)}),B.length>1){var S=B.boundingBox();N.push({x:S.x1+S.w/2,y:S.y1+S.h/2}),s.push(B),Q.push(ut);for(var K=nt.length-1;K>=0;K--)s.splice(nt[K],1),Q.splice(nt[K],1),N.splice(nt[K],1)}}s.forEach(function(Et,vt){I.eles=Et,tt.push(f(I,Q[vt])),i.relocateComponent(N[vt],tt[vt],I)})}else s.forEach(function(Et,vt){i.relocateComponent(N[vt],Q[vt],I)});var et=new Set;if(s.length>1){var ct=[],Nt=_.filter(function(Et){return Et.css("display")=="none"});s.forEach(function(Et,vt){var xt=void 0;if(I.quality=="draft")xt=Q[vt].nodeIndexes;if(Et.nodes().not(Nt).length>0){var Rt={};Rt.edges=[],Rt.nodes=[];var Gt=void 0;if(Et.nodes().not(Nt).forEach(function(St){if(I.quality=="draft")if(!St.isParent())Gt=xt.get(St.id()),Rt.nodes.push({x:Q[vt].xCoords[Gt]-St.boundingbox().w/2,y:Q[vt].yCoords[Gt]-St.boundingbox().h/2,width:St.boundingbox().w,height:St.boundingbox().h});else{var Ft=i.calcBoundingBox(St,Q[vt].xCoords,Q[vt].yCoords,xt);Rt.nodes.push({x:Ft.topLeftX,y:Ft.topLeftY,width:Ft.width,height:Ft.height})}else if(tt[vt][St.id()])Rt.nodes.push({x:tt[vt][St.id()].getLeft(),y:tt[vt][St.id()].getTop(),width:tt[vt][St.id()].getWidth(),height:tt[vt][St.id()].getHeight()})}),Et.edges().forEach(function(St){var Ft=St.source(),Ht=St.target();if(Ft.css("display")!="none"&&Ht.css("display")!="none"){if(I.quality=="draft"){var zt=xt.get(Ft.id()),ee=xt.get(Ht.id()),qt=[],Kt=[];if(Ft.isParent()){var kt=i.calcBoundingBox(Ft,Q[vt].xCoords,Q[vt].yCoords,xt);qt.push(kt.topLeftX+kt.width/2),qt.push(kt.topLeftY+kt.height/2)}else qt.push(Q[vt].xCoords[zt]),qt.push(Q[vt].yCoords[zt]);if(Ht.isParent()){var J=i.calcBoundingBox(Ht,Q[vt].xCoords,Q[vt].yCoords,xt);Kt.push(J.topLeftX+J.width/2),Kt.push(J.topLeftY+J.height/2)}else Kt.push(Q[vt].xCoords[ee]),Kt.push(Q[vt].yCoords[ee]);Rt.edges.push({startX:qt[0],startY:qt[1],endX:Kt[0],endY:Kt[1]})}else if(tt[vt][Ft.id()]&&tt[vt][Ht.id()])Rt.edges.push({startX:tt[vt][Ft.id()].getCenterX(),startY:tt[vt][Ft.id()].getCenterY(),endX:tt[vt][Ht.id()].getCenterX(),endY:tt[vt][Ht.id()].getCenterY()})}}),Rt.nodes.length>0)ct.push(Rt),et.add(vt)}});var Pt=w.packComponents(ct,I.randomize).shifts;if(I.quality=="draft")Q.forEach(function(Et,vt){var xt=Et.xCoords.map(function(Gt){return Gt+Pt[vt].dx}),Rt=Et.yCoords.map(function(Gt){return Gt+Pt[vt].dy});Et.xCoords=xt,Et.yCoords=Rt});else{var Bt=0;et.forEach(function(Et){Object.keys(tt[Et]).forEach(function(vt){var xt=tt[Et][vt];xt.setCenter(xt.getCenterX()+Pt[Bt].dx,xt.getCenterY()+Pt[Bt].dy)}),Bt++})}}}var ft=function(vt,xt){if(I.quality=="default"||I.quality=="proof"){if(typeof vt==="number")vt=xt;var Rt=void 0,Gt=void 0,St=vt.data("id");if(tt.forEach(function(Ht){if(St in Ht)Rt={x:Ht[St].getRect().getCenterX(),y:Ht[St].getRect().getCenterY()},Gt=Ht[St]}),I.nodeDimensionsIncludeLabels){if(Gt.labelWidth){if(Gt.labelPosHorizontal=="left")Rt.x+=Gt.labelWidth/2;else if(Gt.labelPosHorizontal=="right")Rt.x-=Gt.labelWidth/2}if(Gt.labelHeight){if(Gt.labelPosVertical=="top")Rt.y+=Gt.labelHeight/2;else if(Gt.labelPosVertical=="bottom")Rt.y-=Gt.labelHeight/2}}if(Rt==null)Rt={x:vt.position("x"),y:vt.position("y")};return{x:Rt.x,y:Rt.y}}else{var Ft=void 0;if(Q.forEach(function(Ht){var zt=Ht.nodeIndexes.get(vt.id());if(zt!=null)Ft={x:Ht.xCoords[zt],y:Ht.yCoords[zt]}}),Ft==null)Ft={x:vt.position("x"),y:vt.position("y")};return{x:Ft.x,y:Ft.y}}};if(I.quality=="default"||I.quality=="proof"||I.randomize){var Jt=i.calcParentsWithoutChildren(V,_),Xt=_.filter(function(Et){return Et.css("display")=="none"});if(I.eles=_.not(Xt),_.nodes().not(":parent").not(Xt).layoutPositions(X,I,ft),Jt.length>0)Jt.forEach(function(Et){Et.position(ft(Et))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),T}();o.exports=E},657:(o,n,a)=>{var g=a(548),r=a(140).layoutBase.Matrix,v=a(140).layoutBase.SVD,i=function(c){var{cy:u,eles:f}=c,x=f.nodes(),E=f.nodes(":parent"),T=new Map,D=new Map,X=new Map,I=[],V=[],_=[],Q=[],lt=[],P=[],tt=[],s=[],N=void 0,y=void 0,w=1e8,p=0.000000001,{piTol:U,samplingType:F,nodeSeparation:k}=c,B=void 0,W=function(){var it=0,at=0,ot=!1;while(at<B){it=Math.floor(Math.random()*y),ot=!1;for(var gt=0;gt<at;gt++)if(Q[gt]==it){ot=!0;break}if(!ot)Q[at]=it,at++;else continue}},st=function(it,at,ot){var gt=[],At=0,Mt=0,ht=0,Lt=void 0,Ct=[],pt=0,Ot=1;for(var Ut=0;Ut<y;Ut++)Ct[Ut]=w;gt[Mt]=it,Ct[it]=0;while(Mt>=At){ht=gt[At++];var Tt=I[ht];for(var yt=0;yt<Tt.length;yt++)if(Lt=D.get(Tt[yt]),Ct[Lt]==w)Ct[Lt]=Ct[ht]+1,gt[++Mt]=Lt;P[ht][at]=Ct[ht]*k}if(ot){for(var Dt=0;Dt<y;Dt++)if(P[Dt][at]<lt[Dt])lt[Dt]=P[Dt][at];for(var mt=0;mt<y;mt++)if(lt[mt]>pt)pt=lt[mt],Ot=mt}return Ot},dt=function(it){var at=void 0;if(!it){W();for(var ot=0;ot<B;ot++)st(Q[ot],ot,it,!1)}else{at=Math.floor(Math.random()*y),N=at;for(var gt=0;gt<y;gt++)lt[gt]=w;for(var At=0;At<B;At++)Q[At]=at,at=st(at,At,it)}for(var Mt=0;Mt<y;Mt++)for(var ht=0;ht<B;ht++)P[Mt][ht]*=P[Mt][ht];for(var Lt=0;Lt<B;Lt++)tt[Lt]=[];for(var Ct=0;Ct<B;Ct++)for(var pt=0;pt<B;pt++)tt[Ct][pt]=P[Q[pt]][Ct]},Z=function(){var it=v.svd(tt),{S:at,U:ot,V:gt}=it,At=at[0]*at[0]*at[0],Mt=[];for(var ht=0;ht<B;ht++){Mt[ht]=[];for(var Lt=0;Lt<B;Lt++)if(Mt[ht][Lt]=0,ht==Lt)Mt[ht][Lt]=at[ht]/(at[ht]*at[ht]+At/(at[ht]*at[ht]))}s=r.multMat(r.multMat(gt,Mt),r.transpose(ot))},ut=function(){var it=void 0,at=void 0,ot=[],gt=[],At=[],Mt=[];for(var ht=0;ht<y;ht++)ot[ht]=Math.random(),gt[ht]=Math.random();ot=r.normalize(ot),gt=r.normalize(gt);var Lt=0,Ct=p,pt=p,Ot=void 0;while(!0){Lt++;for(var Ut=0;Ut<y;Ut++)At[Ut]=ot[Ut];if(ot=r.multGamma(r.multL(r.multGamma(At),P,s)),it=r.dotProduct(At,ot),ot=r.normalize(ot),Ct=r.dotProduct(At,ot),Ot=Math.abs(Ct/pt),Ot<=1+U&&Ot>=1)break;pt=Ct}for(var Tt=0;Tt<y;Tt++)At[Tt]=ot[Tt];Lt=0,pt=p;while(!0){Lt++;for(var yt=0;yt<y;yt++)Mt[yt]=gt[yt];if(Mt=r.minusOp(Mt,r.multCons(At,r.dotProduct(At,Mt))),gt=r.multGamma(r.multL(r.multGamma(Mt),P,s)),at=r.dotProduct(Mt,gt),gt=r.normalize(gt),Ct=r.dotProduct(Mt,gt),Ot=Math.abs(Ct/pt),Ot<=1+U&&Ot>=1)break;pt=Ct}for(var Dt=0;Dt<y;Dt++)Mt[Dt]=gt[Dt];V=r.multCons(At,Math.sqrt(Math.abs(it))),_=r.multCons(Mt,Math.sqrt(Math.abs(at)))};g.connectComponents(u,f,g.getTopMostNodes(x),T),E.forEach(function(rt){g.connectComponents(u,f,g.getTopMostNodes(rt.descendants().intersection(f)),T)});var nt=0;for(var S=0;S<x.length;S++)if(!x[S].isParent())D.set(x[S].id(),nt++);var K=!0,et=!1,ct=void 0;try{for(var Nt=T.keys()[Symbol.iterator](),Pt;!(K=(Pt=Nt.next()).done);K=!0){var Bt=Pt.value;D.set(Bt,nt++)}}catch(rt){et=!0,ct=rt}finally{try{if(!K&&Nt.return)Nt.return()}finally{if(et)throw ct}}for(var ft=0;ft<D.size;ft++)I[ft]=[];E.forEach(function(rt){var it=rt.children().intersection(f);while(it.nodes(":childless").length==0)it=it.nodes()[0].children().intersection(f);var at=0,ot=it.nodes(":childless")[0].connectedEdges().length;it.nodes(":childless").forEach(function(gt,At){if(gt.connectedEdges().length<ot)ot=gt.connectedEdges().length,at=At}),X.set(rt.id(),it.nodes(":childless")[at].id())}),x.forEach(function(rt){var it=void 0;if(rt.isParent())it=D.get(X.get(rt.id()));else it=D.get(rt.id());rt.neighborhood().nodes().forEach(function(at){if(f.intersection(rt.edgesWith(at)).length>0)if(at.isParent())I[it].push(X.get(at.id()));else I[it].push(at.id())})});var Jt=function(it){var at=D.get(it),ot=void 0;T.get(it).forEach(function(gt){if(u.getElementById(gt).isParent())ot=X.get(gt);else ot=gt;I[at].push(ot),I[D.get(ot)].push(it)})},Xt=!0,Et=!1,vt=void 0;try{for(var xt=T.keys()[Symbol.iterator](),Rt;!(Xt=(Rt=xt.next()).done);Xt=!0){var Gt=Rt.value;Jt(Gt)}}catch(rt){Et=!0,vt=rt}finally{try{if(!Xt&&xt.return)xt.return()}finally{if(Et)throw vt}}y=D.size;var St=void 0;if(y>2){B=y<c.sampleSize?y:c.sampleSize;for(var Ft=0;Ft<y;Ft++)P[Ft]=[];for(var Ht=0;Ht<B;Ht++)s[Ht]=[];if(c.quality=="draft"||c.step=="all")dt(F),Z(),ut(),St={nodeIndexes:D,xCoords:V,yCoords:_};else D.forEach(function(rt,it){V.push(u.getElementById(it).position("x")),_.push(u.getElementById(it).position("y"))}),St={nodeIndexes:D,xCoords:V,yCoords:_};return St}else{var zt=D.keys(),ee=u.getElementById(zt.next().value),qt=ee.position(),Kt=ee.outerWidth();if(V.push(qt.x),_.push(qt.y),y==2){var kt=u.getElementById(zt.next().value),J=kt.outerWidth();V.push(qt.x+Kt/2+J/2+c.idealEdgeLength),_.push(qt.y)}return St={nodeIndexes:D,xCoords:V,yCoords:_},St}};o.exports={spectralLayout:i}},579:(o,n,a)=>{var g=a(212),r=function(i){if(!i)return;i("layout","fcose",g)};if(typeof cytoscape<"u")r(cytoscape);o.exports=r},140:(o)=>{o.exports=L}},A={};function d(o){var n=A[o];if(n!==void 0)return n.exports;var a=A[o]={exports:{}};return R[o](a,a.exports,d),a.exports}var h=d(579);return h})()})});var je=xn(ze(),1);var Be={L:"left",R:"right",T:"top",B:"bottom"},Ze={L:t((L)=>`${L},${L/2} 0,${L} 0,0`,"L"),R:t((L)=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:t((L)=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:t((L)=>`${L/2},0 ${L},${L} 0,${L}`,"B")},Le={L:t((L,R)=>L-R+2,"L"),R:t((L,R)=>L-2,"R"),T:t((L,R)=>L-R+2,"T"),B:t((L,R)=>L-2,"B")},hr=t(function(L){if(_t(L))return L==="L"?"R":"L";else return L==="T"?"B":"T"},"getOppositeArchitectureDirection"),ke=t(function(L){let R=L;return R==="L"||R==="R"||R==="T"||R==="B"},"isArchitectureDirection"),_t=t(function(L){let R=L;return R==="L"||R==="R"},"isArchitectureDirectionX"),se=t(function(L){let R=L;return R==="T"||R==="B"},"isArchitectureDirectionY"),Ue=t(function(L,R){let A=_t(L)&&se(R),d=se(L)&&_t(R);return A||d},"isArchitectureDirectionXY"),lr=t(function(L){let R=L[0],A=L[1],d=_t(R)&&se(A),h=se(R)&&_t(A);return d||h},"isArchitecturePairXY"),fr=t(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),Pe=t(function(L,R){let A=`${L}${R}`;return fr(A)?A:void 0},"getArchitectureDirectionPair"),cr=t(function([L,R],A){let d=A[0],h=A[1];if(_t(d))if(se(h))return[L+(d==="L"?-1:1),R+(h==="T"?1:-1)];else return[L+(d==="L"?-1:1),R];else if(_t(h))return[L+(h==="L"?1:-1),R+(d==="T"?1:-1)];else return[L,R+(d==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),gr=t(function(L){if(L==="LT"||L==="TL")return[1,1];else if(L==="BL"||L==="LB")return[1,-1];else if(L==="BR"||L==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),ur=t(function(L,R){if(Ue(L,R))return"bend";else if(_t(L))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),dr=t(function(L){return L.type==="service"},"isArchitectureService"),vr=t(function(L){return L.type==="junction"},"isArchitectureJunction"),qe=t((L,R)=>{let[A,d]=[L,R].sort();return`${JSON.stringify(A)}-${JSON.stringify(d)}`},"architectureGroupAlignmentKey"),Qe=t((L)=>L.data(),"edgeData"),pe=t((L)=>L.data(),"nodeData"),pr=Y.architecture,Je=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=O,this.getAccTitle=G,this.setDiagramTitle=q,this.getDiagramTitle=H,this.getAccDescription=j,this.setAccDescription=z,this.clear()}static{t(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",M()}addService({id:L,icon:R,in:A,title:d,iconText:h}){if(this.registeredIds.has(L))throw Error(`The service id [${L}] is already in use by another ${this.registeredIds.get(L)}`);if(A!==void 0){if(L===A)throw Error(`The service [${L}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(A)==="node")throw Error(`The service [${L}]'s parent is not a group`)}this.registeredIds.set(L,"node"),this.nodes.set(L,{id:L,type:"service",icon:R,iconText:h,title:d,edges:[],in:A})}getServices(){return[...this.nodes.values()].filter(dr)}addJunction({id:L,in:R}){if(this.registeredIds.has(L))throw Error(`The junction id [${L}] is already in use by another ${this.registeredIds.get(L)}`);if(R!==void 0){if(L===R)throw Error(`The junction [${L}] cannot be placed within itself`);if(!this.registeredIds.has(R))throw Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(R)==="node")throw Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds.set(L,"node"),this.nodes.set(L,{id:L,type:"junction",edges:[],in:R})}getJunctions(){return[...this.nodes.values()].filter(vr)}getNodes(){return[...this.nodes.values()]}getNode(L){return this.nodes.get(L)??null}addGroup({id:L,icon:R,in:A,title:d}){if(this.registeredIds.has(L))throw Error(`The group id [${L}] is already in use by another ${this.registeredIds.get(L)}`);if(A!==void 0){if(L===A)throw Error(`The group [${L}] cannot be placed within itself`);if(!this.registeredIds.has(A))throw Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(A)==="node")throw Error(`The group [${L}]'s parent is not a group`)}this.registeredIds.set(L,"group"),this.groups.set(L,{id:L,icon:R,title:d,in:A})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:L,rhsId:R,lhsDir:A,rhsDir:d,lhsInto:h,rhsInto:o,lhsGroup:n,rhsGroup:a,title:g}){if(!ke(A))throw Error(`Invalid direction given for left hand side of edge ${L}--${R}. Expected (L,R,T,B) got ${String(A)}`);if(!ke(d))throw Error(`Invalid direction given for right hand side of edge ${L}--${R}. Expected (L,R,T,B) got ${String(d)}`);if(!this.nodes.has(L)&&!this.groups.has(L))throw Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(R)&&!this.groups.has(R))throw Error(`The right-hand id [${R}] does not yet exist. Please create the service/group before declaring an edge to it.`);let r=this.nodes.get(L).in,v=this.nodes.get(R).in;if(n&&r&&v&&r==v)throw Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&r&&v&&r==v)throw Error(`The right-hand id [${R}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let i={lhsId:L,lhsDir:A,lhsInto:h,lhsGroup:n,rhsId:R,rhsDir:d,rhsInto:o,rhsGroup:a,title:g};this.edges.push(i);let e=this.nodes.get(L),c=this.nodes.get(R);if(e&&c)e.edges.push(this.edges[this.edges.length-1]),c.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw Error(`An align directive requires at least two members; got ${L.members.length}`);let R=new Set;L.members.forEach((A)=>{if(this.registeredIds.get(A)!=="node")throw Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(R.has(A))throw Error(`align ${L.direction} lists [${A}] more than once`);R.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let L=new Map,R=new Map;for(let[n,a]of this.nodes.entries()){let g=new Map;for(let r of a.edges){let v=this.getNode(r.lhsId)?.in,i=this.getNode(r.rhsId)?.in;if(v&&i&&v!==i){let e=ur(r.lhsDir,r.rhsDir);if(e!=="bend")L.set(qe(v,i),e)}if(r.lhsId===n){let e=Pe(r.lhsDir,r.rhsDir);if(e)g.set(e,r.rhsId)}else{let e=Pe(r.rhsDir,r.lhsDir);if(e)g.set(e,r.lhsId)}}R.set(n,g)}let A=new Set,d=new Set(R.keys()),h=t((n)=>{let a=new Map([[n,[0,0]]]),g=[n];while(g.length>0){let r=g.shift();if(r){A.add(r),d.delete(r);let v=R.get(r);if(!v)throw Error(`BFS error: adjacency list for id ${r} not found. Please report this as a bug.`);let i=a.get(r);if(!i)throw Error(`BFS error: position for id ${r} not found in spatial map. Please report this as a bug.`);let[e,c]=i;v.forEach((u,f)=>{if(!A.has(u))a.set(u,cr([e,c],f)),g.push(u)})}}return a},"BFS"),o=[];while(d.size>0){let n=d.values().next().value;o.push(h(n))}this.dataStructures={adjList:R,spatialMaps:o,groupAlignments:L}}return this.dataStructures}setElementForId(L,R){this.elements.set(L,R)}getElementById(L){return this.elements.get(L)}getConfig(){return ce({...pr,...C().architecture})}getConfigField(L){return this.getConfig()[L]}},yr=t((L,R)=>{xe(L,R),L.groups.map((A)=>R.addGroup(A)),L.services.map((A)=>R.addService({...A,type:"service"})),L.junctions.map((A)=>R.addJunction({...A,type:"junction"})),L.edges.map((A)=>R.addEdge(A)),L.alignments?.map((A)=>R.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ke={parser:{yy:void 0},parse:t(async(L)=>{let R=await $e("architecture",L);l.debug(R);let A=Ke.parser?.yy;if(!(A instanceof Je))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");yr(R,A)},"parse")},mr=t((L)=>`
2
2
  .edge {
3
3
  stroke-width: ${L.archEdgeWidth};
4
4
  stroke: ${L.archEdgeColor};