@wildo-ai/application-creation-workbench 1.1.10 → 1.1.11

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 (170) hide show
  1. package/dist/.vite/manifest.json +956 -404
  2. package/dist/assets/ChartEmptyState-C3M4S9b4.js +1 -0
  3. package/dist/assets/{ChartView-DKDZOjZJ.js → ChartView-1QK3FBtx.js} +19 -19
  4. package/dist/assets/{_basePickBy-BuyVDPfJ.js → _basePickBy-B6h3s-sF.js} +1 -1
  5. package/dist/assets/{_baseUniq-CVvDgwC4.js → _baseUniq-D-4MA4hd.js} +1 -1
  6. package/dist/assets/af-B21OzSmE.js +1 -0
  7. package/dist/assets/ar-ZLisgQnh.js +1 -0
  8. package/dist/assets/{arc-DE9sx_Jn.js → arc-CtbTPoNE.js} +1 -1
  9. package/dist/assets/architectureDiagram-VXUJARFQ-Vk4L8Lzc.js +36 -0
  10. package/dist/assets/bg-CBCYKVQ7.js +1 -0
  11. package/dist/assets/{blockDiagram-VD42YOAC-TQm1EY8a.js → blockDiagram-VD42YOAC-CJmwT1sH.js} +1 -1
  12. package/dist/assets/bn-BBAs6eqY.js +1 -0
  13. package/dist/assets/{c4Diagram-YG6GDRKO-DPVnrqS2.js → c4Diagram-YG6GDRKO-Cd2JXSKY.js} +1 -1
  14. package/dist/assets/ca-CHtdRZF8.js +1 -0
  15. package/dist/assets/channel-BczTlnHr.js +1 -0
  16. package/dist/assets/{chunk-4BX2VUAB-V_Lu-A8z.js → chunk-4BX2VUAB-B45XKmeh.js} +1 -1
  17. package/dist/assets/{chunk-55IACEB6-CrshiQUZ.js → chunk-55IACEB6-Dus25Vau.js} +1 -1
  18. package/dist/assets/{chunk-B4BG7PRW-B4fN1huZ.js → chunk-B4BG7PRW-7heZqqKJ.js} +1 -1
  19. package/dist/assets/{chunk-DI55MBZ5-gtIXZHBU.js → chunk-DI55MBZ5-tDIJ1980.js} +1 -1
  20. package/dist/assets/{chunk-FMBD7UC4-j8bev95J.js → chunk-FMBD7UC4-p2MT9Qgj.js} +1 -1
  21. package/dist/assets/{chunk-QN33PNHL-B-kGe_H0.js → chunk-QN33PNHL-C8irSNHD.js} +1 -1
  22. package/dist/assets/{chunk-QZHKN3VN-BLVfc9yR.js → chunk-QZHKN3VN-BnzUirvg.js} +1 -1
  23. package/dist/assets/{chunk-TZMSLE5B-CHEgF8Sz.js → chunk-TZMSLE5B-vN6WFHgE.js} +1 -1
  24. package/dist/assets/classDiagram-2ON5EDUG-COA7cz19.js +1 -0
  25. package/dist/assets/classDiagram-v2-WZHVMYZB-COA7cz19.js +1 -0
  26. package/dist/assets/clone-CgA-DYeg.js +1 -0
  27. package/dist/assets/{cm6-editor-ComXvSgE.js → cm6-editor-DjOHnDo5.js} +3 -3
  28. package/dist/assets/{code-block-IT6T5CEO-CL2mSW30.js → code-block-IT6T5CEO-DrggLL3z.js} +1 -1
  29. package/dist/assets/context-BsxPj3fo.js +1 -0
  30. package/dist/assets/cose-bilkent-S5V4N54A-DAVrPej8.js +1 -0
  31. package/dist/assets/cs-CeiaQwdU.js +1 -0
  32. package/dist/assets/cy-BSB-wEmv.js +1 -0
  33. package/dist/assets/da-ubM2m_tA.js +1 -0
  34. package/dist/assets/{dagre-6UL2VRFP-D-6HwSlh.js → dagre-6UL2VRFP-BC4b_XYs.js} +1 -1
  35. package/dist/assets/dagre.esm-DdGNJMRW.js +1 -0
  36. package/dist/assets/de-AT-BSzCeQWr.js +1 -0
  37. package/dist/assets/de-C1Jd6Jap.js +1 -0
  38. package/dist/assets/{diagram-PSM6KHXK-DVMAwfhR.js → diagram-PSM6KHXK-DNFChJ0f.js} +1 -1
  39. package/dist/assets/{diagram-QEK2KX5R-ztEXARNd.js → diagram-QEK2KX5R-BVhCBnwr.js} +1 -1
  40. package/dist/assets/{diagram-S2PKOQOG-aOEIHitS.js → diagram-S2PKOQOG-9lXj7QHC.js} +1 -1
  41. package/dist/assets/{dropbox-picker-Cgd6aaxu.js → dropbox-picker-Db0ZMzrx.js} +1 -1
  42. package/dist/assets/el-C45oMinb.js +1 -0
  43. package/dist/assets/en-AU-D8LSUJ_1.js +1 -0
  44. package/dist/assets/en-CA-SBS0AmfB.js +1 -0
  45. package/dist/assets/en-GB-Cov3Ml3U.js +1 -0
  46. package/dist/assets/{erDiagram-Q2GNP2WA-BeX2p48P.js → erDiagram-Q2GNP2WA-CbAO0LL2.js} +1 -1
  47. package/dist/assets/es-D-8DLZpn.js +1 -0
  48. package/dist/assets/et-X1jtpHsB.js +1 -0
  49. package/dist/assets/eu-CuGQ69e6.js +1 -0
  50. package/dist/assets/fa-IR-Ix96Bcel.js +1 -0
  51. package/dist/assets/fi-BV2qx6It.js +1 -0
  52. package/dist/assets/{flowDiagram-NV44I4VS-B5OF-K2x.js → flowDiagram-NV44I4VS-DhKFlSYT.js} +1 -1
  53. package/dist/assets/flows-actors-graph-runtime-DXWrUBOs.js +1 -0
  54. package/dist/assets/fr-BobMQp2m.js +1 -0
  55. package/dist/assets/fr-CA-D7f0MGFd.js +1 -0
  56. package/dist/assets/ganttDiagram-JELNMOA3-BSLWLuNm.js +267 -0
  57. package/dist/assets/{gitGraphDiagram-V2S2FVAM-DBYlH4FL.js → gitGraphDiagram-V2S2FVAM-BuY8ZQCy.js} +1 -1
  58. package/dist/assets/gl-DIxa7Uua.js +1 -0
  59. package/dist/assets/{google-drive-picker-BKyN80GQ.js → google-drive-picker-DAtYjlyJ.js} +1 -1
  60. package/dist/assets/{graph-AvBeoHop.js → graph-CZl0oLiw.js} +1 -1
  61. package/dist/assets/graph-runtime-s1VQXDD1.js +1 -0
  62. package/dist/assets/he-8B_S-IGJ.js +1 -0
  63. package/dist/assets/hi-DAveE-s0.js +1 -0
  64. package/dist/assets/hr-BiqatTpE.js +1 -0
  65. package/dist/assets/hu-CkmDYALv.js +1 -0
  66. package/dist/assets/id-CEIQaYFZ.js +1 -0
  67. package/dist/assets/{index-BHi5TkWc.js → index-5WbcaDHE.js} +1 -1
  68. package/dist/assets/{index-Cj0s-NJv.js → index-6mdg1_5r.js} +1 -1
  69. package/dist/assets/{index-Dv1hCn5N.js → index-Ab3QlNIl.js} +1 -1
  70. package/dist/assets/{index-BLyj7STg.js → index-BYLFSxol.js} +1 -1
  71. package/dist/assets/{index-CwdHV_FX.js → index-B_c7MY4O.js} +1 -1
  72. package/dist/assets/{index-9hIdGCE2.js → index-Ba5B32Fl.js} +1 -1
  73. package/dist/assets/index-BbsjKkIz.js +15 -0
  74. package/dist/assets/{index-BJGqq48m.js → index-BgCqk92w.js} +1 -1
  75. package/dist/assets/{index-BG-y5UcD.js → index-BlQ-dtmP.js} +1 -1
  76. package/dist/assets/{index-D3CAZMVF.js → index-C--TU0cT.js} +1 -1
  77. package/dist/assets/{index-6zr8R4dA.js → index-C7yjEhDq.js} +1 -1
  78. package/dist/assets/{index-Br7zFzuz.js → index-C9FemyBL.js} +1 -1
  79. package/dist/assets/{index-CK3Bi__8.js → index-CD0o7ijU.js} +1 -1
  80. package/dist/assets/{index-Db4UIXz-.js → index-CI0O31Cp.js} +1 -1
  81. package/dist/assets/{index-DikSr-5K.js → index-CIBxHZnA.js} +1 -1
  82. package/dist/assets/{index-C-hOTyb_.js → index-CMxaoNlJ.js} +1 -1
  83. package/dist/assets/{index-C8H6aj0j.js → index-CWE3FEZN.js} +1 -1
  84. package/dist/assets/{index-Bpku8s6k.js → index-C_NGDq2w.js} +1 -1
  85. package/dist/assets/index-Ccf8muta.js +1261 -0
  86. package/dist/assets/index-CzvHWEPS.js +1 -0
  87. package/dist/assets/{index-BZeyH3ke.js → index-DDd8ozYp.js} +1 -1
  88. package/dist/assets/{index-CMQis7aS.js → index-DLv9veAb.js} +1 -1
  89. package/dist/assets/index-DQ5p5-oO.css +1 -0
  90. package/dist/assets/{index-B5EaGcLw.js → index-KTNhvzNT.js} +1 -1
  91. package/dist/assets/{index-DYY9gnp9.js → index-_bSqFwX-.js} +1 -1
  92. package/dist/assets/{index-DyQa6Mm5.js → index-aDaNN3ga.js} +1 -1
  93. package/dist/assets/{index-DIo0Wrbb.js → index-bK1lB11U.js} +1 -1
  94. package/dist/assets/index-fTTODqFZ.js +372 -0
  95. package/dist/assets/{index-BFcDqzUt.js → index-l36QeemA.js} +1 -1
  96. package/dist/assets/{index.es-B9u8rJ1d.js → index.es-Dov84Q7L.js} +1 -1
  97. package/dist/assets/{infoDiagram-HS3SLOUP-Bt2AfSr_.js → infoDiagram-HS3SLOUP-BMxiOms9.js} +1 -1
  98. package/dist/assets/is-CFRfpcIV.js +1 -0
  99. package/dist/assets/isSameWeek-CVp5lUeg.js +1 -0
  100. package/dist/assets/it-wj2FxBeN.js +1 -0
  101. package/dist/assets/ja-C76INfXB.js +1 -0
  102. package/dist/assets/{journeyDiagram-XKPGCS4Q-B9RxAwyj.js → journeyDiagram-XKPGCS4Q-DCWsE8zZ.js} +1 -1
  103. package/dist/assets/{kanban-definition-3W4ZIXB7-KUyHlyqc.js → kanban-definition-3W4ZIXB7-CB2mRoXc.js} +1 -1
  104. package/dist/assets/ko-B8wQPQK9.js +1 -0
  105. package/dist/assets/{layout-Dq4vO6R-.js → layout-_08RBJmw.js} +1 -1
  106. package/dist/assets/linear-DgScXpWB.js +1 -0
  107. package/dist/assets/lt-BTz08iQZ.js +1 -0
  108. package/dist/assets/lv-CS3iPrpf.js +1 -0
  109. package/dist/assets/match-CMf6gi5c.js +1 -0
  110. package/dist/assets/match-rP2MYsHL.js +1 -0
  111. package/dist/assets/{maximize-2-Bl11RTvy.js → maximize-2-B0LqzzJD.js} +1 -1
  112. package/dist/assets/{mermaid-VLURNSYL-DPc-hyxN.js → mermaid-VLURNSYL-CFdBlgNU.js} +4 -4
  113. package/dist/assets/mermaid.core-Bm9ZP7gJ.js +198 -0
  114. package/dist/assets/{mindmap-definition-VGOIOE7T-ih3nvg2M.js → mindmap-definition-VGOIOE7T-CuBc5wmR.js} +1 -1
  115. package/dist/assets/ms-Cl9dOMs9.js +1 -0
  116. package/dist/assets/mt-SxIP5cQY.js +1 -0
  117. package/dist/assets/nb-Bx9pdwqt.js +1 -0
  118. package/dist/assets/nl-LA6duOkc.js +1 -0
  119. package/dist/assets/{onedrive-picker-9JhZVdja.js → onedrive-picker-C9HIxKdV.js} +1 -1
  120. package/dist/assets/{pdf-viewer-BU_zv2sb.js → pdf-viewer-Cm0cmjrF.js} +1 -1
  121. package/dist/assets/{pieDiagram-ADFJNKIX-2y6i9a-Q.js → pieDiagram-ADFJNKIX-BAEg106K.js} +1 -1
  122. package/dist/assets/pl-C9o65KdE.js +1 -0
  123. package/dist/assets/pt-BR-DzQ5E1HI.js +1 -0
  124. package/dist/assets/pt-DTUo2gXr.js +1 -0
  125. package/dist/assets/{quadrantDiagram-AYHSOK5B-Bpbt_ZL6.js → quadrantDiagram-AYHSOK5B-DnH9aNk6.js} +1 -1
  126. package/dist/assets/{requirementDiagram-UZGBJVZJ-DKhx22Et.js → requirementDiagram-UZGBJVZJ-BC08j3iJ.js} +1 -1
  127. package/dist/assets/ro-D0C5XwLr.js +1 -0
  128. package/dist/assets/ru-CdLptA_8.js +1 -0
  129. package/dist/assets/{sankeyDiagram-TZEHDZUN-DOz9tNgj.js → sankeyDiagram-TZEHDZUN-D2w97jyv.js} +1 -1
  130. package/dist/assets/{sequenceDiagram-WL72ISMW-aQQbVp6L.js → sequenceDiagram-WL72ISMW-Y_hpHzaj.js} +1 -1
  131. package/dist/assets/{shiki-highlighter-runtime-B9niRUB2.js → shiki-highlighter-runtime-Bl0H0KPz.js} +1 -1
  132. package/dist/assets/sk-CeQBmfzD.js +1 -0
  133. package/dist/assets/sl-BKgErU1D.js +1 -0
  134. package/dist/assets/{stateDiagram-FKZM4ZOC-vDZ9FAaz.js → stateDiagram-FKZM4ZOC-Cn_uBJn5.js} +1 -1
  135. package/dist/assets/stateDiagram-v2-4FDKWEC3-4ptWp8bn.js +1 -0
  136. package/dist/assets/sv-OWWvKBOh.js +1 -0
  137. package/dist/assets/ta-BO8Vz6nD.js +1 -0
  138. package/dist/assets/th-Cv66UIk0.js +1 -0
  139. package/dist/assets/{timeline-definition-IT6M3QCI-C1jpqiM9.js → timeline-definition-IT6M3QCI-Pm7JOk6q.js} +1 -1
  140. package/dist/assets/tr-DJBdUg4Y.js +1 -0
  141. package/dist/assets/{treemap-GDKQZRPO-Bskqcsjn.js → treemap-GDKQZRPO-CB8vQsyY.js} +1 -1
  142. package/dist/assets/useQuickActionButtonBehavior-EHioc1n0.js +1 -0
  143. package/dist/assets/vi-5cFVA26_.js +1 -0
  144. package/dist/assets/{xychartDiagram-PRI3JC2R-BD8d9TGv.js → xychartDiagram-PRI3JC2R-CQSQ6r3l.js} +1 -1
  145. package/dist/assets/zh-CN-CfAV3Hxo.js +1 -0
  146. package/dist/assets/zh-HK-DoEn5xH2.js +1 -0
  147. package/dist/assets/zh-TW-CUUKOLkj.js +1 -0
  148. package/dist/index.html +2 -2
  149. package/package.json +9 -8
  150. package/dist/assets/ChartEmptyState-BIIyFwDZ.js +0 -1
  151. package/dist/assets/architectureDiagram-VXUJARFQ-DY4uZXMe.js +0 -36
  152. package/dist/assets/channel-C4B85_Ht.js +0 -1
  153. package/dist/assets/classDiagram-2ON5EDUG-CejTSo9E.js +0 -1
  154. package/dist/assets/classDiagram-v2-WZHVMYZB-CejTSo9E.js +0 -1
  155. package/dist/assets/clone-eq-IW2p2.js +0 -1
  156. package/dist/assets/context-BB5qtAPe.js +0 -1
  157. package/dist/assets/cose-bilkent-S5V4N54A-DMODvaS_.js +0 -1
  158. package/dist/assets/flows-actors-graph-runtime-BN2k8R04.js +0 -1
  159. package/dist/assets/ganttDiagram-JELNMOA3-CMYOZD-b.js +0 -267
  160. package/dist/assets/graph-runtime-4LdwGgRA.js +0 -1
  161. package/dist/assets/index-BVKCM4BG.js +0 -1
  162. package/dist/assets/index-BjG3MUUI.js +0 -347
  163. package/dist/assets/index-CHO8NA6v.js +0 -1094
  164. package/dist/assets/index-D-THewyc.css +0 -1
  165. package/dist/assets/index-DPuqBa_G.js +0 -499
  166. package/dist/assets/linear-BIzHWTWZ.js +0 -1
  167. package/dist/assets/mermaid.core-DL97wpul.js +0 -197
  168. package/dist/assets/module-DUSXqJtA.js +0 -3
  169. package/dist/assets/stateDiagram-v2-4FDKWEC3-Cfb6lTuy.js +0 -1
  170. package/dist/assets/useQuickActionButtonBehavior-DK86ZrMU.js +0 -1
@@ -0,0 +1 @@
1
+ import{_ as V,l as $}from"./mermaid.core-Bm9ZP7gJ.js";import{c as J}from"./cytoscape.esm-YEldwGKK.js";import{a3 as Q,a2 as lt,a as gt}from"./index-Ccf8muta.js";import"./mermaid-VLURNSYL-CFdBlgNU.js";import"./index-e-4cSkrt.js";import"./maximize-2-B0LqzzJD.js";var tt={exports:{}},k={exports:{}},Z={exports:{}},q;function ut(){return q||(q=1,(function(G,b){(function(I,L){G.exports=L()})(Q,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var R=E[m];p&&R.child!=null&&R.updateBounds(),y=R.getLeft(),O=R.getRight(),s=R.getTop(),f=R.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var C=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=C.x-c,this.right=C.x+C.width+c,this.top=C.y-c,this.bottom=C.y+C.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,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}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),R=i.getHeightHalf(),C=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,C=!0):(l[0]=p,l[1]=a,C=!0):S===w&&(g>d?(l[0]=h,l[1]=a,C=!0):(l[0]=u,l[1]=D,C=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),C&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!C)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-R/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+R/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],R=s.indexOf(m);R>-1&&s.splice(R,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(C){if(v.indexOf(C)<0){var M=D.get(C),S=M-1;S==1&&f.push(C),D.set(C,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{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 n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Z)),Z.exports}var z;function ft(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ut())})(Q,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.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%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var R=[];if(R=R.concat(A.getEdgeListToNode(m)),R=R.concat(m.getEdgeListToNode(A)),!f.has(R[0])){if(R.length>1){var C;for(C=0;C<R.length;C++){var M=R[C];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}R.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,R=new a(0,0),C=0;C<s.length;C++){C%c==0&&(m=0,A=E,C!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[C],S=p.findCenterOfTree(M);f.x=m,f.y=A,R=y.radialLayout(M,S,f),R.y>E&&(E=Math.floor(R.y)),m=Math.floor(R.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-R.x/2,r.WORLD_CENTER_Y-R.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var R=0;R<s.length;R++){var C=s[R];C.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var R=(E-c+1)/2;R<0&&(R+=180);var C=(R+c)%360,M=C*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],R=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(R.id==null||!this.getToBeTiled(R))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],C=m.getParent().id;typeof f[C]>"u"&&(f[C]=[]),f[C]=f[C].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,R=0;R<s.rows.length;R++){var C=s.rows[R];f=m;for(var M=0,S=0;S<C.length;S++){var Y=C[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(C,M){return C.rect.width*C.rect.height>M.rect.width*M.rect.height?-1:C.rect.width*C.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var R=s[m];A.rows.length==0?this.insertNodeToRow(A,R,0,f):this.canAddHorizontal(A,R.rect.width,R.rect.height)?this.insertNodeToRow(A,R,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,R,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var R=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(R+=s.horizontalPadding),s.rowWidth[c]=R,s.width<R&&(s.width=R);var C=f.rect.height;c>0&&(C+=s.verticalPadding);var M=0;C>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=C,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var R;s.width-A>=f+s.horizontalPadding?R=(s.height+m)/(A+f+s.horizontalPadding):R=(s.height+m)/s.width,m=c+s.verticalPadding;var C;return s.width<f?C=(s.height+m)/f:C=(s.height+m)/s.width,C<1&&(C=1/C),R<1&&(R=1/R),R<C},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,C=0;C<E.length;C++)E[C].height>R&&(R=E[C].height);f>0&&(R+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=R,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var R=[],C=0;C<A.length;C++)A[C][0].getEdges().length==1&&(R.push(A[C]),A[C][0].getOwner().remove(A[C][0]));s.push(R),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,R=c.startY,C=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(R>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(m<this.grid.length-1)for(var F=R;F<=C;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(C<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][C+1].length+this.grid[F][C].length-1;if(A>0)for(var F=R;F<=C;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})(k)),k.exports}(function(G,b){(function(I,L){G.exports=L(ft())})(Q,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],R=this.idToLNode[A.data("target")];if(m!==R&&m.getEdgesBetween(R).length==0){var C=s.add(y.newEdge(),m,R);C.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,R=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=R}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var C;C=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(C,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(tt);var ct=tt.exports;const pt=lt(ct);J.use(pt);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=J({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var dt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),At=dt;export{At as render};
@@ -0,0 +1 @@
1
+ import{a5 as l,ab as u,aq as i,ar as c,aa as s}from"./index-Ccf8muta.js";const m={lessThanXSeconds:{one:{regular:"méně než 1 sekunda",past:"před méně než 1 sekundou",future:"za méně než 1 sekundu"},few:{regular:"méně než {{count}} sekundy",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekundy"},many:{regular:"méně než {{count}} sekund",past:"před méně než {{count}} sekundami",future:"za méně než {{count}} sekund"}},xSeconds:{one:{regular:"1 sekunda",past:"před 1 sekundou",future:"za 1 sekundu"},few:{regular:"{{count}} sekundy",past:"před {{count}} sekundami",future:"za {{count}} sekundy"},many:{regular:"{{count}} sekund",past:"před {{count}} sekundami",future:"za {{count}} sekund"}},halfAMinute:{type:"other",other:{regular:"půl minuty",past:"před půl minutou",future:"za půl minuty"}},lessThanXMinutes:{one:{regular:"méně než 1 minuta",past:"před méně než 1 minutou",future:"za méně než 1 minutu"},few:{regular:"méně než {{count}} minuty",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minuty"},many:{regular:"méně než {{count}} minut",past:"před méně než {{count}} minutami",future:"za méně než {{count}} minut"}},xMinutes:{one:{regular:"1 minuta",past:"před 1 minutou",future:"za 1 minutu"},few:{regular:"{{count}} minuty",past:"před {{count}} minutami",future:"za {{count}} minuty"},many:{regular:"{{count}} minut",past:"před {{count}} minutami",future:"za {{count}} minut"}},aboutXHours:{one:{regular:"přibližně 1 hodina",past:"přibližně před 1 hodinou",future:"přibližně za 1 hodinu"},few:{regular:"přibližně {{count}} hodiny",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodiny"},many:{regular:"přibližně {{count}} hodin",past:"přibližně před {{count}} hodinami",future:"přibližně za {{count}} hodin"}},xHours:{one:{regular:"1 hodina",past:"před 1 hodinou",future:"za 1 hodinu"},few:{regular:"{{count}} hodiny",past:"před {{count}} hodinami",future:"za {{count}} hodiny"},many:{regular:"{{count}} hodin",past:"před {{count}} hodinami",future:"za {{count}} hodin"}},xDays:{one:{regular:"1 den",past:"před 1 dnem",future:"za 1 den"},few:{regular:"{{count}} dny",past:"před {{count}} dny",future:"za {{count}} dny"},many:{regular:"{{count}} dní",past:"před {{count}} dny",future:"za {{count}} dní"}},aboutXWeeks:{one:{regular:"přibližně 1 týden",past:"přibližně před 1 týdnem",future:"přibližně za 1 týden"},few:{regular:"přibližně {{count}} týdny",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdny"},many:{regular:"přibližně {{count}} týdnů",past:"přibližně před {{count}} týdny",future:"přibližně za {{count}} týdnů"}},xWeeks:{one:{regular:"1 týden",past:"před 1 týdnem",future:"za 1 týden"},few:{regular:"{{count}} týdny",past:"před {{count}} týdny",future:"za {{count}} týdny"},many:{regular:"{{count}} týdnů",past:"před {{count}} týdny",future:"za {{count}} týdnů"}},aboutXMonths:{one:{regular:"přibližně 1 měsíc",past:"přibližně před 1 měsícem",future:"přibližně za 1 měsíc"},few:{regular:"přibližně {{count}} měsíce",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíce"},many:{regular:"přibližně {{count}} měsíců",past:"přibližně před {{count}} měsíci",future:"přibližně za {{count}} měsíců"}},xMonths:{one:{regular:"1 měsíc",past:"před 1 měsícem",future:"za 1 měsíc"},few:{regular:"{{count}} měsíce",past:"před {{count}} měsíci",future:"za {{count}} měsíce"},many:{regular:"{{count}} měsíců",past:"před {{count}} měsíci",future:"za {{count}} měsíců"}},aboutXYears:{one:{regular:"přibližně 1 rok",past:"přibližně před 1 rokem",future:"přibližně za 1 rok"},few:{regular:"přibližně {{count}} roky",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roky"},many:{regular:"přibližně {{count}} roků",past:"přibližně před {{count}} roky",future:"přibližně za {{count}} roků"}},xYears:{one:{regular:"1 rok",past:"před 1 rokem",future:"za 1 rok"},few:{regular:"{{count}} roky",past:"před {{count}} roky",future:"za {{count}} roky"},many:{regular:"{{count}} roků",past:"před {{count}} roky",future:"za {{count}} roků"}},overXYears:{one:{regular:"více než 1 rok",past:"před více než 1 rokem",future:"za více než 1 rok"},few:{regular:"více než {{count}} roky",past:"před více než {{count}} roky",future:"za více než {{count}} roky"},many:{regular:"více než {{count}} roků",past:"před více než {{count}} roky",future:"za více než {{count}} roků"}},almostXYears:{one:{regular:"skoro 1 rok",past:"skoro před 1 rokem",future:"skoro za 1 rok"},few:{regular:"skoro {{count}} roky",past:"skoro před {{count}} roky",future:"skoro za {{count}} roky"},many:{regular:"skoro {{count}} roků",past:"skoro před {{count}} roky",future:"skoro za {{count}} roků"}}},f=(e,n,t)=>{let o;const r=m[e];r.type==="other"?o=r.other:n===1?o=r.one:n>1&&n<5?o=r.few:o=r.many;const a=t?.addSuffix===!0,p=t?.comparison;let d;return a&&p===-1?d=o.past:a&&p===1?d=o.future:d=o.regular,d.replace("{{count}}",String(n))},b={full:"EEEE, d. MMMM yyyy",long:"d. MMMM yyyy",medium:"d. M. yyyy",short:"dd.MM.yyyy"},y={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},v={full:"{{date}} 'v' {{time}}",long:"{{date}} 'v' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},h={date:l({formats:b,defaultWidth:"full"}),time:l({formats:y,defaultWidth:"full"}),dateTime:l({formats:v,defaultWidth:"full"})},k=["neděli","pondělí","úterý","středu","čtvrtek","pátek","sobotu"],g={lastWeek:"'poslední' eeee 've' p",yesterday:"'včera v' p",today:"'dnes v' p",tomorrow:"'zítra v' p",nextWeek:e=>{const n=e.getDay();return"'v "+k[n]+" o' p"},other:"P"},z=(e,n)=>{const t=g[e];return typeof t=="function"?t(n):t},w={narrow:["př. n. l.","n. l."],abbreviated:["př. n. l.","n. l."],wide:["před naším letopočtem","našeho letopočtu"]},P={narrow:["1","2","3","4"],abbreviated:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"],wide:["1. čtvrtletí","2. čtvrtletí","3. čtvrtletí","4. čtvrtletí"]},W={narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"]},M={narrow:["L","Ú","B","D","K","Č","Č","S","Z","Ř","L","P"],abbreviated:["led","úno","bře","dub","kvě","čvn","čvc","srp","zář","říj","lis","pro"],wide:["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince"]},D={narrow:["ne","po","út","st","čt","pá","so"],short:["ne","po","út","st","čt","pá","so"],abbreviated:["ned","pon","úte","stř","čtv","pát","sob"],wide:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"]},x={narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},V={narrow:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},abbreviated:{am:"dop.",pm:"odp.",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"},wide:{am:"dopoledne",pm:"odpoledne",midnight:"půlnoc",noon:"poledne",morning:"ráno",afternoon:"odpoledne",evening:"večer",night:"noc"}},L=(e,n)=>Number(e)+".",j={ordinalNumber:L,era:u({values:w,defaultWidth:"wide"}),quarter:u({values:P,defaultWidth:"wide",argumentCallback:e=>e-1}),month:u({values:W,defaultWidth:"wide",formattingValues:M,defaultFormattingWidth:"wide"}),day:u({values:D,defaultWidth:"wide"}),dayPeriod:u({values:x,defaultWidth:"wide",formattingValues:V,defaultFormattingWidth:"wide"})},F=/^(\d+)\.?/i,N=/\d+/i,K={narrow:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,abbreviated:/^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,wide:/^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i},X={any:[/^p[řr]/i,/^(po|n)/i]},E={narrow:/^[1234]/i,abbreviated:/^[1234]\. [čc]tvrtlet[íi]/i,wide:/^[1234]\. [čc]tvrtlet[íi]/i},H={any:[/1/i,/2/i,/3/i,/4/i]},S={narrow:/^[lúubdkčcszřrlp]/i,abbreviated:/^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,wide:/^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i},Y={narrow:[/^l/i,/^[úu]/i,/^b/i,/^d/i,/^k/i,/^[čc]/i,/^[čc]/i,/^s/i,/^z/i,/^[řr]/i,/^l/i,/^p/i],any:[/^led/i,/^[úu]n/i,/^b[řr]e/i,/^dub/i,/^kv[ěe]/i,/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,/^[čc]vc|[čc]erven(ec|ce)/i,/^srp/i,/^z[áa][řr]/i,/^[řr][íi]j/i,/^lis/i,/^pro/i]},R={narrow:/^[npuúsčps]/i,short:/^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,abbreviated:/^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,wide:/^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i},T={narrow:[/^n/i,/^p/i,/^[úu]/i,/^s/i,/^[čc]/i,/^p/i,/^s/i],any:[/^ne/i,/^po/i,/^[úu]t/i,/^st/i,/^[čc]t/i,/^p[áa]/i,/^so/i]},$={any:/^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i},q={any:{am:/^dop/i,pm:/^odp/i,midnight:/^p[ůu]lnoc/i,noon:/^poledne/i,morning:/r[áa]no/i,afternoon:/odpoledne/i,evening:/ve[čc]er/i,night:/noc/i}},C={ordinalNumber:c({matchPattern:F,parsePattern:N,valueCallback:e=>parseInt(e,10)}),era:i({matchPatterns:K,defaultMatchWidth:"wide",parsePatterns:X,defaultParseWidth:"any"}),quarter:i({matchPatterns:E,defaultMatchWidth:"wide",parsePatterns:H,defaultParseWidth:"any",valueCallback:e=>e+1}),month:i({matchPatterns:S,defaultMatchWidth:"wide",parsePatterns:Y,defaultParseWidth:"any"}),day:i({matchPatterns:R,defaultMatchWidth:"wide",parsePatterns:T,defaultParseWidth:"any"}),dayPeriod:i({matchPatterns:$,defaultMatchWidth:"any",parsePatterns:q,defaultParseWidth:"any"})},B={code:"cs",formatDistance:f,formatLong:h,formatRelative:z,localize:j,match:C,options:{weekStartsOn:1,firstWeekContainsDate:4}},G={...B,labels:{labelDayButton:(e,n,t,o)=>{let a=(o??new s(t)).format(e,"PPPP");return n.today&&(a=`Dnes, ${a}`),n.selected&&(a=`${a}, vybráno`),a},labelMonthDropdown:"Vyberte měsíc",labelNext:"Přejít na další měsíc",labelPrevious:"Přejít na předchozí měsíc",labelWeekNumber:e=>`Týden ${e}`,labelYearDropdown:"Vyberte rok",labelGrid:(e,n,t)=>(t??new s(n)).formatMonthYear(e),labelGridcell:(e,n,t,o)=>{let a=(o??new s(t)).format(e,"PPPP");return n?.today&&(a=`Dnes, ${a}`),a},labelNav:"Navigační panel",labelWeekNumberHeader:"Číslo týdne",labelWeekday:(e,n,t)=>(t??new s(n)).format(e,"cccc")}};export{G as cs};
@@ -0,0 +1 @@
1
+ import{a5 as h,ab as d,aq as o,ar as l,aa as s}from"./index-Ccf8muta.js";const y={lessThanXSeconds:{one:"llai na eiliad",other:"llai na {{count}} eiliad"},xSeconds:{one:"1 eiliad",other:"{{count}} eiliad"},halfAMinute:"hanner munud",lessThanXMinutes:{one:"llai na munud",two:"llai na 2 funud",other:"llai na {{count}} munud"},xMinutes:{one:"1 munud",two:"2 funud",other:"{{count}} munud"},aboutXHours:{one:"tua 1 awr",other:"tua {{count}} awr"},xHours:{one:"1 awr",other:"{{count}} awr"},xDays:{one:"1 diwrnod",two:"2 ddiwrnod",other:"{{count}} diwrnod"},aboutXWeeks:{one:"tua 1 wythnos",two:"tua pythefnos",other:"tua {{count}} wythnos"},xWeeks:{one:"1 wythnos",two:"pythefnos",other:"{{count}} wythnos"},aboutXMonths:{one:"tua 1 mis",two:"tua 2 fis",other:"tua {{count}} mis"},xMonths:{one:"1 mis",two:"2 fis",other:"{{count}} mis"},aboutXYears:{one:"tua 1 flwyddyn",two:"tua 2 flynedd",other:"tua {{count}} mlynedd"},xYears:{one:"1 flwyddyn",two:"2 flynedd",other:"{{count}} mlynedd"},overXYears:{one:"dros 1 flwyddyn",two:"dros 2 flynedd",other:"dros {{count}} mlynedd"},almostXYears:{one:"bron 1 flwyddyn",two:"bron 2 flynedd",other:"bron {{count}} mlynedd"}},m=(a,n,e)=>{let t;const i=y[a];return typeof i=="string"?t=i:n===1?t=i.one:n===2&&i.two?t=i.two:t=i.other.replace("{{count}}",String(n)),e?.addSuffix?e.comparison&&e.comparison>0?"mewn "+t:t+" yn ôl":t},c={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},u={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},w={full:"{{date}} 'am' {{time}}",long:"{{date}} 'am' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},f={date:h({formats:c,defaultWidth:"full"}),time:h({formats:u,defaultWidth:"full"}),dateTime:h({formats:w,defaultWidth:"full"})},b={lastWeek:"eeee 'diwethaf am' p",yesterday:"'ddoe am' p",today:"'heddiw am' p",tomorrow:"'yfory am' p",nextWeek:"eeee 'am' p",other:"P"},g=(a,n,e,t)=>b[a],M={narrow:["C","O"],abbreviated:["CC","OC"],wide:["Cyn Crist","Ar ôl Crist"]},P={narrow:["1","2","3","4"],abbreviated:["Ch1","Ch2","Ch3","Ch4"],wide:["Chwarter 1af","2ail chwarter","3ydd chwarter","4ydd chwarter"]},p={narrow:["I","Ch","Ma","E","Mi","Me","G","A","Md","H","T","Rh"],abbreviated:["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag"],wide:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"]},v={narrow:["S","Ll","M","M","I","G","S"],short:["Su","Ll","Ma","Me","Ia","Gw","Sa"],abbreviated:["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],wide:["dydd Sul","dydd Llun","dydd Mawrth","dydd Mercher","dydd Iau","dydd Gwener","dydd Sadwrn"]},W={narrow:{am:"b",pm:"h",midnight:"hn",noon:"hd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"},abbreviated:{am:"yb",pm:"yh",midnight:"hanner nos",noon:"hanner dydd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"},wide:{am:"y.b.",pm:"y.h.",midnight:"hanner nos",noon:"hanner dydd",morning:"bore",afternoon:"prynhawn",evening:"gyda'r nos",night:"nos"}},C={narrow:{am:"b",pm:"h",midnight:"hn",noon:"hd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"},abbreviated:{am:"yb",pm:"yh",midnight:"hanner nos",noon:"hanner dydd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"},wide:{am:"y.b.",pm:"y.h.",midnight:"hanner nos",noon:"hanner dydd",morning:"yn y bore",afternoon:"yn y prynhawn",evening:"gyda'r nos",night:"yn y nos"}},D=(a,n)=>{const e=Number(a);if(e<20)switch(e){case 0:return e+"fed";case 1:return e+"af";case 2:return e+"ail";case 3:case 4:return e+"ydd";case 5:case 6:return e+"ed";case 7:case 8:case 9:case 10:case 12:case 15:case 18:return e+"fed";case 11:case 13:case 14:case 16:case 17:case 19:return e+"eg"}else if(e>=50&&e<=60||e===80||e>=100)return e+"fed";return e+"ain"},k={ordinalNumber:D,era:d({values:M,defaultWidth:"wide"}),quarter:d({values:P,defaultWidth:"wide",argumentCallback:a=>a-1}),month:d({values:p,defaultWidth:"wide"}),day:d({values:v,defaultWidth:"wide"}),dayPeriod:d({values:W,defaultWidth:"wide",formattingValues:C,defaultFormattingWidth:"wide"})},S=/^(\d+)(af|ail|ydd|ed|fed|eg|ain)?/i,x=/\d+/i,E={narrow:/^(c|o)/i,abbreviated:/^(c\.?\s?c\.?|o\.?\s?c\.?)/i,wide:/^(cyn christ|ar ôl crist|ar ol crist)/i},L={wide:[/^c/i,/^(ar ôl crist|ar ol crist)/i],any:[/^c/i,/^o/i]},F={narrow:/^[1234]/i,abbreviated:/^ch[1234]/i,wide:/^(chwarter 1af)|([234](ail|ydd)? chwarter)/i},G={any:[/1/i,/2/i,/3/i,/4/i]},N={narrow:/^(i|ch|m|e|g|a|h|t|rh)/i,abbreviated:/^(ion|chwe|maw|ebr|mai|meh|gor|aws|med|hyd|tach|rhag)/i,wide:/^(ionawr|chwefror|mawrth|ebrill|mai|mehefin|gorffennaf|awst|medi|hydref|tachwedd|rhagfyr)/i},z={narrow:[/^i/i,/^ch/i,/^m/i,/^e/i,/^m/i,/^m/i,/^g/i,/^a/i,/^m/i,/^h/i,/^t/i,/^rh/i],any:[/^io/i,/^ch/i,/^maw/i,/^e/i,/^mai/i,/^meh/i,/^g/i,/^a/i,/^med/i,/^h/i,/^t/i,/^rh/i]},H={narrow:/^(s|ll|m|i|g)/i,short:/^(su|ll|ma|me|ia|gw|sa)/i,abbreviated:/^(sul|llun|maw|mer|iau|gwe|sad)/i,wide:/^dydd (sul|llun|mawrth|mercher|iau|gwener|sadwrn)/i},I={narrow:[/^s/i,/^ll/i,/^m/i,/^m/i,/^i/i,/^g/i,/^s/i],wide:[/^dydd su/i,/^dydd ll/i,/^dydd ma/i,/^dydd me/i,/^dydd i/i,/^dydd g/i,/^dydd sa/i],any:[/^su/i,/^ll/i,/^ma/i,/^me/i,/^i/i,/^g/i,/^sa/i]},V={narrow:/^(b|h|hn|hd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i,any:/^(y\.?\s?[bh]\.?|hanner nos|hanner dydd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i},X={any:{am:/^b|(y\.?\s?b\.?)/i,pm:/^h|(y\.?\s?h\.?)|(yr hwyr)/i,midnight:/^hn|hanner nos/i,noon:/^hd|hanner dydd/i,morning:/bore/i,afternoon:/prynhawn/i,evening:/^gyda'r nos$/i,night:/blah/i}},R={ordinalNumber:l({matchPattern:S,parsePattern:x,valueCallback:a=>parseInt(a,10)}),era:o({matchPatterns:E,defaultMatchWidth:"wide",parsePatterns:L,defaultParseWidth:"any"}),quarter:o({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:G,defaultParseWidth:"any",valueCallback:a=>a+1}),month:o({matchPatterns:N,defaultMatchWidth:"wide",parsePatterns:z,defaultParseWidth:"any"}),day:o({matchPatterns:H,defaultMatchWidth:"wide",parsePatterns:I,defaultParseWidth:"any"}),dayPeriod:o({matchPatterns:V,defaultMatchWidth:"any",parsePatterns:X,defaultParseWidth:"any"})},T={code:"cy",formatDistance:m,formatLong:f,formatRelative:g,localize:k,match:R,options:{weekStartsOn:0,firstWeekContainsDate:1}},$={...T,labels:{labelDayButton:(a,n,e,t)=>{let r=(t??new s(e)).format(a,"PPPP");return n.today&&(r=`Heddiw, ${r}`),n.selected&&(r=`${r}, wedi'i ddewis`),r},labelMonthDropdown:"Dewiswch y mis",labelNext:"Ewch i'r mis nesaf",labelPrevious:"Ewch i'r mis blaenorol",labelWeekNumber:a=>`Wythnos ${a}`,labelYearDropdown:"Dewiswch y flwyddyn",labelGrid:(a,n,e)=>(e??new s(n)).formatMonthYear(a),labelGridcell:(a,n,e,t)=>{let r=(t??new s(e)).format(a,"PPPP");return n?.today&&(r=`Heddiw, ${r}`),r},labelNav:"Bar llywio",labelWeekNumberHeader:"Rhif yr wythnos",labelWeekday:(a,n,e)=>(e??new s(n)).format(a,"cccc")}};export{$ as cy};
@@ -0,0 +1 @@
1
+ import{a5 as s,ab as o,aq as d,ar as l,aa as m}from"./index-Ccf8muta.js";const u={lessThanXSeconds:{one:"mindre end ét sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"ét halvt minut",lessThanXMinutes:{one:"mindre end ét minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXWeeks:{one:"cirka 1 uge",other:"cirka {{count}} uger"},xWeeks:{one:"1 uge",other:"{{count}} uger"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}},g=(e,t,a)=>{let n;const i=u[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",String(t)),a?.addSuffix?a.comparison&&a.comparison>0?"om "+n:n+" siden":n},c={full:"EEEE 'den' d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd/MM/y"},f={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},h={full:"{{date}} 'kl'. {{time}}",long:"{{date}} 'kl'. {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},b={date:s({formats:c,defaultWidth:"full"}),time:s({formats:f,defaultWidth:"full"}),dateTime:s({formats:h,defaultWidth:"full"})},v={lastWeek:"'sidste' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"'på' eeee 'kl.' p",other:"P"},p=(e,t,a,n)=>v[e],k={narrow:["fvt","vt"],abbreviated:["f.v.t.","v.t."],wide:["før vesterlandsk tidsregning","vesterlandsk tidsregning"]},P={narrow:["1","2","3","4"],abbreviated:["1. kvt.","2. kvt.","3. kvt.","4. kvt."],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},w={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],wide:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]},y={narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn.","man.","tir.","ons.","tor.","fre.","lør."],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},M={narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"morgen",afternoon:"eftermiddag",evening:"aften",night:"nat"}},W={narrow:{am:"a",pm:"p",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},abbreviated:{am:"AM",pm:"PM",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnat",noon:"middag",morning:"om morgenen",afternoon:"om eftermiddagen",evening:"om aftenen",night:"om natten"}},j=(e,t)=>Number(e)+".",D={ordinalNumber:j,era:o({values:k,defaultWidth:"wide"}),quarter:o({values:P,defaultWidth:"wide",argumentCallback:e=>e-1}),month:o({values:w,defaultWidth:"wide"}),day:o({values:y,defaultWidth:"wide"}),dayPeriod:o({values:M,defaultWidth:"wide",formattingValues:W,defaultFormattingWidth:"wide"})},x=/^(\d+)(\.)?/i,F=/\d+/i,H={narrow:/^(fKr|fvt|eKr|vt)/i,abbreviated:/^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,wide:/^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i},N={any:[/^f/i,/^(v|e)/i]},V={narrow:/^[1234]/i,abbreviated:/^[1234]. kvt\./i,wide:/^[1234]\.? kvartal/i},z={any:[/1/i,/2/i,/3/i,/4/i]},L={narrow:/^[jfmasond]/i,abbreviated:/^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,wide:/^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i},X={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^maj/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},S={narrow:/^[smtofl]/i,short:/^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},E={narrow:[/^s/i,/^m/i,/^t/i,/^o/i,/^t/i,/^f/i,/^l/i],any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},K={narrow:/^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,any:/^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i},T={any:{am:/^a/i,pm:/^p/i,midnight:/midnat/i,noon:/middag/i,morning:/morgen/i,afternoon:/eftermiddag/i,evening:/aften/i,night:/nat/i}},Y={ordinalNumber:l({matchPattern:x,parsePattern:F,valueCallback:e=>parseInt(e,10)}),era:d({matchPatterns:H,defaultMatchWidth:"wide",parsePatterns:N,defaultParseWidth:"any"}),quarter:d({matchPatterns:V,defaultMatchWidth:"wide",parsePatterns:z,defaultParseWidth:"any",valueCallback:e=>e+1}),month:d({matchPatterns:L,defaultMatchWidth:"wide",parsePatterns:X,defaultParseWidth:"any"}),day:d({matchPatterns:S,defaultMatchWidth:"wide",parsePatterns:E,defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:K,defaultMatchWidth:"any",parsePatterns:T,defaultParseWidth:"any"})},A={code:"da",formatDistance:g,formatLong:b,formatRelative:p,localize:D,match:Y,options:{weekStartsOn:1,firstWeekContainsDate:4}},$={...A,labels:{labelDayButton:(e,t,a,n)=>{let r=(n??new m(a)).format(e,"PPPP");return t.today&&(r=`I dag, ${r}`),t.selected&&(r=`${r}, valgt`),r},labelMonthDropdown:"Vælg måned",labelNext:"Gå til næste måned",labelPrevious:"Gå til forrige måned",labelWeekNumber:e=>`Uge ${e}`,labelYearDropdown:"Vælg år",labelGrid:(e,t,a)=>(a??new m(t)).formatMonthYear(e),labelGridcell:(e,t,a,n)=>{let r=(n??new m(a)).format(e,"PPPP");return t?.today&&(r=`I dag, ${r}`),r},labelNav:"Navigationslinje",labelWeekNumberHeader:"Ugenummer",labelWeekday:(e,t,a)=>(a??new m(t)).format(e,"cccc")}};export{$ as da};
@@ -1,4 +1,4 @@
1
- import{_ as w,av as F,aw as Y,ax as _,ay as H,l as i,c as V,az as z,aA as U,ah as $,am as q,ai as P,ag as K,aB as Q,aC as W,aD as Z}from"./mermaid.core-DL97wpul.js";import{G as B}from"./graph-AvBeoHop.js";import{l as I}from"./layout-Dq4vO6R-.js";import{i as b}from"./_baseUniq-CVvDgwC4.js";import{c as L}from"./clone-eq-IW2p2.js";import{m as A}from"./_basePickBy-BuyVDPfJ.js";import"./index-CHO8NA6v.js";import"./mermaid-VLURNSYL-DPc-hyxN.js";import"./index-e-4cSkrt.js";import"./maximize-2-Bl11RTvy.js";function h(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return b(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),r={v:t};return b(n)||(r.value=n),b(a)||(r.parent=a),r})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return b(t.name)||(a.name=t.name),b(n)||(a.value=n),a})}var d=new Map,X=new Map,J=new Map,te=w(()=>{X.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=X.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=w((e,t)=>{const n=X.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{i.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const r=t.children(e)||[];e!==a&&r.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);i.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(i.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",a,"data",t.node(e),a),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);i.debug("Copying Edges",u),u.forEach(c=>{i.info("Edge",c);const m=t.edge(c.v,c.w,c.name);i.info("Edge data",m,a);try{se(c,a)?(i.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(v){i.error(v)}})}i.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const r of n)J.set(r,e),a=[...a,...R(r,t)];return a},"extractDescendants"),ie=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),r=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=r.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(i.trace("Searching children of id ",e,a),a.length<1)return e;let r;for(const o of a){const l=C(o,t,n),u=ie(t,n,l);if(l)if(u.length>0)r=l;else return l}return r},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),re=w((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),X.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),r=e.edges();a.length>0?(i.debug("Cluster identified",n,X),r.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",X.get(n)),d.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,X)});for(let n of d.keys()){const a=d.get(n).id,r=e.parent(a);r!==n&&d.has(r)&&!d.get(r).externalConnections&&(d.get(n).id=r)}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,o=n.w;if(i.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const l=e.parent(r);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",r,o,n.name),e.setEdge(r,o,a,n.name)}}),i.warn("Adjusted Graph",h(e)),T(e,0),i.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(i.warn("extractor - ",t,h(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),a=!1;for(const r of n){const o=e.children(r);a=a||o.length>0}if(!a){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,d,d.has(r)&&!d.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!d.has(r))i.debug("Not a cluster",r,t);else if(!d.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(r)?.clusterData?.dir&&(l=d.get(r).clusterData.dir,i.warn("Fixing dir",d.get(r).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",h(e)),G(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:d.get(r).clusterData,label:d.get(r).label,graph:u}),i.warn("New graph after copy node: (",r,")",h(u)),i.debug("Old graph after copy",h(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!d.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(d);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const o=e.node(r);i.warn(" Now next level",r,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const r=e.children(a),o=M(e,r);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,r,o)=>{i.warn("Graph in recursive render:XAX",h(t),r);const l=t.graph().rankdir;i.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),v=u.insert("g").attr("class","edgeLabels"),p=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(r!==void 0){const g=JSON.parse(JSON.stringify(r.clusterData));i.trace(`Setting data for parent cluster XXX
1
+ import{_ as w,av as F,aw as Y,ax as _,ay as H,l as i,c as V,az as z,aA as U,ah as $,am as q,ai as P,ag as K,aB as Q,aC as W,aD as Z}from"./mermaid.core-Bm9ZP7gJ.js";import{G as B}from"./graph-CZl0oLiw.js";import{l as I}from"./layout-_08RBJmw.js";import{i as b}from"./_baseUniq-D-4MA4hd.js";import{c as L}from"./clone-CgA-DYeg.js";import{m as A}from"./_basePickBy-B6h3s-sF.js";import"./index-Ccf8muta.js";import"./mermaid-VLURNSYL-CFdBlgNU.js";import"./index-e-4cSkrt.js";import"./maximize-2-B0LqzzJD.js";function h(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return b(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),r={v:t};return b(n)||(r.value=n),b(a)||(r.parent=a),r})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return b(t.name)||(a.name=t.name),b(n)||(a.value=n),a})}var d=new Map,X=new Map,J=new Map,te=w(()=>{X.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=X.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=w((e,t)=>{const n=X.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{i.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const r=t.children(e)||[];e!==a&&r.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);i.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(i.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",a,"data",t.node(e),a),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);i.debug("Copying Edges",u),u.forEach(c=>{i.info("Edge",c);const m=t.edge(c.v,c.w,c.name);i.info("Edge data",m,a);try{se(c,a)?(i.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(v){i.error(v)}})}i.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const r of n)J.set(r,e),a=[...a,...R(r,t)];return a},"extractDescendants"),ie=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),r=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=r.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(i.trace("Searching children of id ",e,a),a.length<1)return e;let r;for(const o of a){const l=C(o,t,n),u=ie(t,n,l);if(l)if(u.length>0)r=l;else return l}return r},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),re=w((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),X.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),r=e.edges();a.length>0?(i.debug("Cluster identified",n,X),r.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",X.get(n)),d.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,X)});for(let n of d.keys()){const a=d.get(n).id,r=e.parent(a);r!==n&&d.has(r)&&!d.get(r).externalConnections&&(d.get(n).id=r)}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,o=n.w;if(i.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const l=e.parent(r);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",r,o,n.name),e.setEdge(r,o,a,n.name)}}),i.warn("Adjusted Graph",h(e)),T(e,0),i.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(i.warn("extractor - ",t,h(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),a=!1;for(const r of n){const o=e.children(r);a=a||o.length>0}if(!a){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,d,d.has(r)&&!d.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!d.has(r))i.debug("Not a cluster",r,t);else if(!d.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(r)?.clusterData?.dir&&(l=d.get(r).clusterData.dir,i.warn("Fixing dir",d.get(r).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",h(e)),G(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:d.get(r).clusterData,label:d.get(r).label,graph:u}),i.warn("New graph after copy node: (",r,")",h(u)),i.debug("Old graph after copy",h(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!d.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(d);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const o=e.node(r);i.warn(" Now next level",r,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const r=e.children(a),o=M(e,r);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,r,o)=>{i.warn("Graph in recursive render:XAX",h(t),r);const l=t.graph().rankdir;i.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),v=u.insert("g").attr("class","edgeLabels"),p=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(r!==void 0){const g=JSON.parse(JSON.stringify(r.clusterData));i.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,f,`
3
3
  data=`,g.height,`
4
4
  Parent cluster`,r.height),t.setNode(r.id,g),t.parent(f)||(i.trace("Setting parent",f,r.id),t.setParent(f,r.id,g))}if(i.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),s?.clusterNode){i.info("Cluster identified XBX",f,s.width,t.node(f));const{ranksep:g,nodesep:E}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:g+25,nodesep:E});const N=await j(p,s.graph,n,a,t.node(f),o),x=N.elem;z(s,x),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",f,"width",s.width,"height",s.height),U(x,s)}else t.children(f).length>0?(i.trace("Cluster - the non recursive path XBX",f,s.id,s,s.width,"Graph:",t),i.trace(C(s.id,t)),d.set(s.id,{id:C(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",f,p,t.node(f),l),await $(p,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(s){const g=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",d,"ids:",s.v,s.w,"Translating: ",d.get(s.v),d.get(s.w)),await Z(v,g)});await Promise.all(f)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(h(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(h(t)));let O=0,{subGraphTitleTotalMargin:S}=q(o);return await Promise.all(oe(t).map(async function(f){const s=t.node(f);if(i.info("Position XBX => "+f+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s?.clusterNode)s.y+=S,i.info("A tainted cluster node XBX1",f,s.id,s.width,s.height,s.x,s.y,t.parent(f)),d.get(s.id).node=s,P(s);else if(t.children(f).length>0){i.info("A pure cluster node XBX1",f,s.id,s.x,s.y,s.width,s.height,t.parent(f)),s.height+=S,t.node(s.parentId);const g=s?.padding/2||0,E=s?.labelBBox?.height||0,N=E-g||0;i.debug("OffsetY",N,"labelHeight",E,"halfPadding",g),await K(c,s),d.get(s.id).node=s}else{const g=t.node(s.parentId);s.y+=S/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",g,g?.offsetY,s),P(s)}})),t.edges().forEach(function(f){const s=t.edge(f);i.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var E=t.node(f.w);const N=Q(m,s,d,n,g,E,a);W(s,N)}),t.nodes().forEach(function(f){const s=t.node(f);i.info(f,s.type,s.diff),s.isGroup&&(O=s.diff)}),i.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),ve=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");F(a,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const v=structuredClone(o),p=structuredClone(o),y=structuredClone(o);v.label="",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-1",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=l+"-cyclic-special-mid",y.label="",m.isGroup&&(v.fromCluster=l,y.toCluster=l),y.id=l+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(l,u,v,l+"-cyclic-special-0"),n.setEdge(u,c,p,l+"-cyclic-special-1"),n.setEdge(c,l,y,l+"-cyc<lic-special-2")}else n.setEdge(o.start,o.end,{...o},o.id)}),i.warn("Graph at first:",JSON.stringify(h(n))),re(n),i.warn("Graph after XAX:",JSON.stringify(h(n)));const r=V();await j(a,n,e.type,e.diagramId,void 0,r)},"render");export{ve as render};
@@ -0,0 +1 @@
1
+ var Ne=Object.defineProperty,Ke=(e,t,r)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qe=(e,t)=>{for(var r in t)Ne(e,r,{get:t[r],enumerable:!0})},Ue=(e,t,r)=>Ke(e,t+"",r),He={};Qe(He,{Graph:()=>P,alg:()=>te});var Ze=Object.defineProperty,xe=(e,t)=>{for(var r in t)Ze(e,r,{get:t[r],enumerable:!0})},ee=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(r=>{t!==void 0?this.setNode(r,t):this.setNode(r)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=r=>this.removeEdge(this._edgeObjs[r]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(r=>{this.setParent(r)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t="\0";else{t+="";for(let r=t;r!==void 0;r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!=="\0")return t}}children(e="\0"){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let r=new Set(t),n=this.successors(e);if(n)for(let i of n)r.add(i);return Array.from(r.values())}}isLeaf(e){var t;let r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),((t=r?.length)!=null?t:0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([i,o])=>{e(i)&&t.setNode(i,o)}),Object.values(this._edgeObjs).forEach(i=>{t.hasNode(i.v)&&t.hasNode(i.w)&&t.setEdge(i,this.edge(i))});let r={},n=i=>{let o=this.parent(i);return!o||t.hasNode(o)?(r[i]=o,o):o in r?r[o]:n(o)};return this._isCompound&&t.nodes().forEach(i=>t.setParent(i,n(i))),t}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((r,n)=>(t!==void 0?this.setEdge(r,n,t):this.setEdge(r,n),n)),this}setEdge(e,t,r,n){let i,o,s,l,a=!1;typeof e=="object"&&e!==null&&"v"in e?(i=e.v,o=e.w,s=e.name,arguments.length===2&&(l=t,a=!0)):(i=e,o=t,s=n,arguments.length>2&&(l=r,a=!0)),i=""+i,o=""+o,s!==void 0&&(s=""+s);let d=V(this._isDirected,i,o,s);if(d in this._edgeLabels)return a&&(this._edgeLabels[d]=l),this;if(s!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(o),this._edgeLabels[d]=a?l:this._defaultEdgeLabelFn(i,o,s);let u=et(this._isDirected,i,o,s);return i=u.v,o=u.w,Object.freeze(u),this._edgeObjs[d]=u,se(this._preds[o],i),se(this._sucs[i],o),this._in[o][d]=u,this._out[i][d]=u,this._edgeCount++,this}edge(e,t,r){let n=arguments.length===1?W(this._isDirected,e):V(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(e,t,r){let n=arguments.length===1?this.edge(e):this.edge(e,t,r);return typeof n!="object"||n===null?{label:n}:n}hasEdge(e,t,r){return(arguments.length===1?W(this._isDirected,e):V(this._isDirected,e,t,r))in this._edgeLabels}removeEdge(e,t,r){let n=arguments.length===1?W(this._isDirected,e):V(this._isDirected,e,t,r),i=this._edgeObjs[n];if(i){let o=i.v,s=i.w;delete this._edgeLabels[n],delete this._edgeObjs[n],le(this._preds[s],o),le(this._sucs[o],s),delete this._in[s][n],delete this._out[o][n],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,r){if(!e)return;let n=Object.values(e);return r?n.filter(i=>i.v===t&&i.w===r||i.v===r&&i.w===t):n}};function se(e,t){e[t]?e[t]++:e[t]=1}function le(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function V(e,t,r,n){let i=""+t,o=""+r;if(!e&&i>o){let s=i;i=o,o=s}return i+""+o+""+(n===void 0?"\0":n)}function et(e,t,r,n){let i=""+t,o=""+r;if(!e&&i>o){let l=i;i=o,o=l}let s={v:i,w:o};return n&&(s.name=n),s}function W(e,t){return V(e,t.v,t.w,t.name)}var tt={};xe(tt,{read:()=>ot,write:()=>rt});function rt(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:nt(e),edges:it(e)},r=e.graph();return r!==void 0&&(t.value=structuredClone(r)),t}function nt(e){return e.nodes().map(t=>{let r=e.node(t),n=e.parent(t),i={v:t};return r!==void 0&&(i.value=r),n!==void 0&&(i.parent=n),i})}function it(e){return e.edges().map(t=>{let r=e.edge(t),n={v:t.v,w:t.w};return t.name!==void 0&&(n.name=t.name),r!==void 0&&(n.value=r),n})}function ot(e){let t=new ee(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(r=>{t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),e.edges.forEach(r=>{t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}var te={};xe(te,{CycleException:()=>B,bellmanFord:()=>je,components:()=>dt,dijkstra:()=>G,dijkstraAll:()=>ht,findCycles:()=>ct,floydWarshall:()=>gt,isAcyclic:()=>vt,postorder:()=>wt,preorder:()=>Et,prim:()=>bt,shortestPaths:()=>yt,tarjan:()=>Me,topsort:()=>Ce});var st=()=>1;function je(e,t,r,n){return lt(e,String(t),r||st,n||function(i){var o;return(o=e.outEdges(i))!=null?o:[]})}function lt(e,t,r,n){let i={},o,s=0,l=e.nodes(),a=function(h){let c=i[h.v],f=i[h.w];if(!c||!f)return;let p=r(h);c.distance+p<f.distance&&(i[h.w]={distance:c.distance+p,predecessor:h.v},o=!0)},d=function(){l.forEach(function(h){n(h).forEach(function(c){let f=c.v===h?c.v:c.w,p=f===c.v?c.w:c.v;a({v:f,w:p})})})};l.forEach(function(h){let c=h===t?0:Number.POSITIVE_INFINITY;i[h]={distance:c,predecessor:""}});let u=l.length;for(let h=1;h<u&&(o=!1,s++,d(),!!o);h++);if(s===u-1&&(o=!1,d(),o))throw new Error("The graph contains a negative weight cycle");return i}function dt(e){let t={},r=[],n;function i(o){var s,l;o in t||(t[o]=!0,n.push(o),(s=e.successors(o))==null||s.forEach(i),(l=e.predecessors(o))==null||l.forEach(i))}return e.nodes().forEach(function(o){n=[],i(o),n.length&&r.push(n)}),r}var Ie=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let r=this._keyIndices,n=String(e);if(!(n in r)){let i=this._arr,o=i.length;return r[n]=o,i.push({key:n,priority:t}),this._decrease(o),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let r=this._keyIndices[e];if(r===void 0)throw new Error(`Key not found: ${e}`);let n=this._arr[r].priority;if(t>n)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${n} New: ${t}`);this._arr[r].priority=t,this._decrease(r)}_heapify(e){let t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,r=t[e].priority,n;for(;e!==0&&(n=e>>1,!(t[n].priority<r));)this._swap(e,n),e=n}_swap(e,t){let r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}},at=()=>1;function G(e,t,r,n){let i=function(o){var s;return(s=e.outEdges(o))!=null?s:[]};return ut(e,String(t),r||at,n||i)}function ut(e,t,r,n){let i={},o=new Ie,s,l,a=function(d){let u=d.v!==s?d.v:d.w,h=i[u];if(!h)return;let c=r(d),f=l.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+c);f<h.distance&&(h.distance=f,h.predecessor=s,o.decrease(u,f))};for(e.nodes().forEach(function(d){let u=d===t?0:Number.POSITIVE_INFINITY;i[d]={distance:u,predecessor:""},o.add(d,u)});o.size()>0;){s=o.removeMin();let d=i[s];if(!d||d.distance===Number.POSITIVE_INFINITY)break;l=d,n(s).forEach(a)}return i}function ht(e,t,r){return e.nodes().reduce(function(n,i){return n[i]=G(e,i,t,r),n},{})}function Me(e){let t=0,r=[],n={},i=[];function o(s){var l;let a=n[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),(l=e.successors(s))==null||l.forEach(function(d){if(d in n){let u=n[d];u!=null&&u.onStack&&(a.lowlink=Math.min(a.lowlink,u.index))}else{o(d);let u=n[d];u&&(a.lowlink=Math.min(a.lowlink,u.lowlink))}}),a.lowlink===a.index){let d=[],u;do{u=r.pop();let h=n[u];h&&(h.onStack=!1),d.push(u)}while(s!==u);i.push(d)}}return e.nodes().forEach(function(s){s in n||o(s)}),i}function ct(e){return Me(e).filter(function(t){var r;let n=t[0];return n?t.length>1||t.length===1&&((r=e.outEdges(n,n))!=null?r:[]).length>0:!1})}var ft=()=>1;function gt(e,t,r){return pt(e,t||ft,r||function(n){var i;return(i=e.outEdges(n))!=null?i:[]})}function pt(e,t,r){let n={},i=e.nodes();return i.forEach(function(o){let s={};n[o]=s,s[o]={distance:0,predecessor:""},i.forEach(function(l){o!==l&&(s[l]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),r(o).forEach(function(l){let a=l.v===o?l.w:l.v,d=t(l);s[a]={distance:d,predecessor:o}})}),i.forEach(function(o){let s=n[o];s&&i.forEach(function(l){let a=n[l];a&&i.forEach(function(d){let u=a[o],h=s[d],c=a[d];if(u&&h&&c){let f=u.distance+h.distance;f<c.distance&&(c.distance=f,c.predecessor=h.predecessor)}})})}),n}var B=class extends Error{constructor(e){super(e),this.name="CycleException"}};function Ce(e){let t={},r={},n=[];function i(o){var s;if(o in r)throw new B;o in t||(r[o]=!0,t[o]=!0,(s=e.predecessors(o))==null||s.forEach(i),delete r[o],n.push(o))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new B;return n}function vt(e){try{Ce(e)}catch(t){if(t instanceof B)return!1;throw t}return!0}function mt(e,t,r,n,i){Array.isArray(t)||(t=[t]);let o=(l=>{var a;return(a=e.isDirected()?e.successors(l):e.neighbors(l))!=null?a:[]}),s={};return t.forEach(function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);i=Le(e,l,r==="post",s,o,n,i)}),i}function Le(e,t,r,n,i,o,s){return t in n||(n[t]=!0,r||(s=o(s,t)),i(t).forEach(function(l){s=Le(e,l,r,n,i,o,s)}),r&&(s=o(s,t))),s}function Se(e,t,r){return mt(e,t,r,function(n,i){return n.push(i),n},[])}function wt(e,t){return Se(e,t,"post")}function Et(e,t){return Se(e,t,"pre")}function bt(e,t){var r;let n=new ee,i={},o=new Ie,s;function l(u){let h=u.v===s?u.w:u.v,c=o.priority(h);if(c!==void 0){let f=t(u);f<c&&(i[h]=s,o.decrease(h,f))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(u){o.add(u,Number.POSITIVE_INFINITY),n.setNode(u)});let a=e.nodes()[0];a!==void 0&&o.decrease(a,0);let d=!1;for(;o.size()>0;){if(s=o.removeMin(),s in i)n.setEdge(s,i[s]);else{if(d)throw new Error("Input graph is not connected: "+e);d=!0}(r=e.nodeEdges(s))==null||r.forEach(l)}return n}function yt(e,t,r,n){return _t(e,t,r,n??(i=>{var o;return(o=e.outEdges(i))!=null?o:[]}))}function _t(e,t,r,n){if(r===void 0)return G(e,t,r,n);let i=!1,o=e.nodes();for(let s=0;s<o.length;s++){let l=o[s];if(l===void 0)continue;let a=n(l);for(let d=0;d<a.length;d++){let u=a[d];if(!u)continue;let h=u.v===l?u.v:u.w,c=h===u.v?u.w:u.v;r({v:h,w:c})<0&&(i=!0)}if(i)return je(e,t,r,n)}return G(e,t,r,n)}var P=ee;function D(e,t,r,n){let i=n;for(;e.hasNode(i);)i=re(n);return r.dummy=t,e.setNode(i,r),i}function kt(e){let t=new P().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function Te(e){let t=new P({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t}function de(e,t){let r=e.x,n=e.y,i=t.x-r,o=t.y-n,s=e.width/2,l=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");let a,d;return Math.abs(o)*s>Math.abs(i)*l?(o<0&&(l=-l),a=l*i/o,d=l):(i<0&&(s=-s),a=s,d=s*o/i),{x:r+a,y:n+d}}function q(e){let t=A(Fe(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),i=n.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][n.order]=r)}),t}function Ot(e){let t=e.nodes().map(n=>{let i=e.node(n).rank;return i===void 0?Number.MAX_VALUE:i}),r=T(Math.min,t);e.nodes().forEach(n=>{let i=e.node(n);Object.hasOwn(i,"rank")&&(i.rank-=r)})}function Nt(e){let t=e.nodes().map(s=>e.node(s).rank).filter(s=>s!==void 0),r=T(Math.min,t),n=[];e.nodes().forEach(s=>{let l=e.node(s).rank-r;n[l]||(n[l]=[]),n[l].push(s)});let i=0,o=e.graph().nodeRankFactor;Array.from(n).forEach((s,l)=>{s===void 0&&l%o!==0?--i:s!==void 0&&i&&s.forEach(a=>e.node(a).rank+=i)})}function ae(e,t,r,n){let i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),D(e,"border",i,t)}function xt(e,t=Pe){let r=[];for(let n=0;n<e.length;n+=t){let i=e.slice(n,n+t);r.push(i)}return r}var Pe=65535;function T(e,t){if(t.length>Pe){let r=xt(t);return e(...r.map(n=>e(...n)))}else return e(...t)}function Fe(e){let t=e.nodes().map(r=>{let n=e.node(r).rank;return n===void 0?Number.MIN_VALUE:n});return T(Math.max,t)}function jt(e,t){let r={lhs:[],rhs:[]};return e.forEach(n=>{t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function It(e,t){return t()}var Mt=0;function re(e){let t=++Mt;return e+(""+t)}function A(e,t,r=1){t==null&&(t=e,e=0);let n=o=>o<t;r<0&&(n=o=>t<o);let i=[];for(let o=e;n(o);o+=r)i.push(o);return i}function z(e,t){let r={};for(let n of t)e[n]!==void 0&&(r[n]=e[n]);return r}function X(e,t){let r;return typeof t=="string"?r=n=>n[t]:r=t,Object.entries(e).reduce((n,[i,o])=>(n[i]=r(o,i),n),{})}function Ct(e,t){return e.reduce((r,n,i)=>(r[n]=t[i],r),{})}var $="\0";function Re(e,t,r){var n,i,o,s,l,a;if(!(e&&t&&r&&t.dummy==="edge"&&r.dummy==="edge"&&t.edgeObj&&r.edgeObj&&e[t.edgeObj.v]&&e[r.edgeObj.v]&&e[t.edgeObj.w]&&e[r.edgeObj.w]))return 0;let d=!0;t.edgeObj.w===r.edgeObj.w&&(d=!1);let u=d?(i=(n=e[t.edgeObj.v])==null?void 0:n.rank)!=null?i:NaN+1:(s=(o=e[t.edgeObj.w])==null?void 0:o.rank)!=null?s:NaN-1,h=Object.entries(e).find(b=>{var y,w;return((y=b[1].edgeObj)==null?void 0:y.v)===t.edgeObj.v&&((w=b[1].edgeObj)==null?void 0:w.w)===t.edgeObj.w&&b[1].rank===u}),c=Object.entries(e).find(b=>{var y,w;return((y=b[1].edgeObj)==null?void 0:y.v)===r.edgeObj.v&&((w=b[1].edgeObj)==null?void 0:w.w)===r.edgeObj.w&&b[1].rank===u});if(!h||!c)return 0;let f=(l=h[1].order)!=null?l:NaN,p=(a=c[1].order)!=null?a:NaN;return isNaN(f-p)?0:f-p}var Lt=class{constructor(){Ue(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return ue(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&ue(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,St)),r=r._prev;return"["+e.join(", ")+"]"}};function ue(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function St(e,t){if(e!=="_next"&&e!=="_prev")return t}var Tt=Lt,Pt=()=>1;function Ft(e,t){if(e.nodeCount()<=1)return[];let r=Yt(e,t||Pt);return Rt(r.graph,r.buckets,r.zeroIdx).flatMap(n=>e.outEdges(n.v,n.w)||[])}function Rt(e,t,r){var n;let i=[],o=t[t.length-1],s=t[0],l;for(;e.nodeCount();){for(;l=s.dequeue();)J(e,t,r,l);for(;l=o.dequeue();)J(e,t,r,l);if(e.nodeCount()){for(let a=t.length-2;a>0;--a)if(l=(n=t[a])==null?void 0:n.dequeue(),l){i=i.concat(J(e,t,r,l,!0)||[]);break}}}return i}function J(e,t,r,n,i){let o=[],s=i?o:void 0;return(e.inEdges(n.v)||[]).forEach(l=>{let a=e.edge(l),d=e.node(l.v);i&&o.push({v:l.v,w:l.w}),d.out-=a,Z(t,r,d)}),(e.outEdges(n.v)||[]).forEach(l=>{let a=e.edge(l),d=l.w,u=e.node(d);u.in-=a,Z(t,r,u)}),e.removeNode(n.v),s}function Yt(e,t){let r=new P,n=0,i=0;e.nodes().forEach(l=>{r.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let a=r.edge(l.v,l.w)||0,d=t(l),u=a+d;r.setEdge(l.v,l.w,u);let h=r.node(l.v),c=r.node(l.w);i=Math.max(i,h.out+=d),n=Math.max(n,c.in+=d)});let o=Dt(i+n+3).map(()=>new Tt),s=n+1;return r.nodes().forEach(l=>{Z(o,s,r.node(l))}),{graph:r,buckets:o,zeroIdx:s}}function Z(e,t,r){var n,i,o;r.out?r.in?(o=e[r.out-r.in+t])==null||o.enqueue(r):(i=e[e.length-1])==null||i.enqueue(r):(n=e[0])==null||n.enqueue(r)}function Dt(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t}function Vt(e,t){(e.graph().acyclicer==="greedy"?Ft(e,r(e)):At(e,t??null)).forEach(n=>{let i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,re("rev"))});function r(n){return i=>n.edge(i).weight}}function At(e,t){let r=[],n={},i={};function o(a){Object.hasOwn(i,a)||(i[a]=!0,n[a]=!0,e.outEdges(a).forEach(d=>{Object.hasOwn(n,d.w)?r.push(d):o(d.w)}),delete n[a])}function s(a){var d;Object.hasOwn(i,a)||(i[a]=!0,n[a]=!0,(d=e.outEdges(a))==null||d.forEach(u=>{var h,c;Object.hasOwn(n,u.w)||((h=t.node(a))==null?void 0:h.rank)>((c=t.node(u.w))==null?void 0:c.rank)&&Bt(e,u.w,u)?r.push(u):s(u.w)}),delete n[a])}let l=o;return t&&typeof t.node=="function"&&(l=s),e.sources().forEach(l),e.nodes().forEach(l),r}function Gt(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}function Bt(e,t,r){let n=new Set;function i(o){var s;if(e.sources().includes(o))return!0;n.add(o);for(let l of(s=e.inEdges(o))!=null?s:[])if(!(l.v===r.v&&l.w===r.w)&&!n.has(l.v)&&i(l.v))return!0;return!1}return i(t)}function zt(e){e.graph().dummyChains=[],e.edges().forEach(t=>qt(e,t))}function qt(e,t){let r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,s=t.name,l=e.edge(t),a=l.labelRank;if(o===n+1)return;e.removeEdge(t);let d,u,h;for(h=0,++n;n<o;++h,++n)l.points=[],u={width:0,height:0,edgeLabel:l,edgeObj:t,rank:n},d=D(e,"edge",u,"_d"),n===a&&(u.width=l.width,u.height=l.height,u.dummy="edge-label",u.labelpos=l.labelpos),e.setEdge(r,d,{weight:l.weight},s),h===0&&e.graph().dummyChains.push(d),r=d;e.setEdge(r,i,{weight:l.weight},s)}function Xt(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}function ne(e){let t={};function r(n){let i=e.node(n);if(Object.hasOwn(t,n))return i.rank;t[n]=!0;let o=e.outEdges(n),s=o?o.map(a=>a==null?Number.POSITIVE_INFINITY:r(a.w)-e.edge(a).minlen):[],l=T(Math.min,s);return l===Number.POSITIVE_INFINITY&&(l=0),i.rank=l}e.sources().forEach(r)}function Y(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Ye=$t;function $t(e){let t=new P({directed:!1}),r=e.nodes();if(r.length===0)throw new Error("Graph must have at least one node");let n=r[0],i=e.nodeCount();t.setNode(n,{});let o,s;for(;Wt(t,e)<i&&(o=Jt(t,e),!!o);)s=t.hasNode(o.v)?Y(e,o):-Y(e,o),Kt(t,e,s);return t}function Wt(e,t){function r(n){let i=t.nodeEdges(n);i&&i.forEach(o=>{let s=o.v,l=n===s?o.w:s;!e.hasNode(l)&&!Y(t,o)&&(e.setNode(l,{}),e.setEdge(n,l,{}),r(l))})}return e.nodes().forEach(r),e.nodeCount()}function Jt(e,t){return t.edges().reduce((r,n)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(n.v)!==e.hasNode(n.w)&&(i=Y(t,n)),i<r[0]?[i,n]:r},[Number.POSITIVE_INFINITY,null])[1]}function Kt(e,t,r){e.nodes().forEach(n=>t.node(n).rank+=r)}var{preorder:Qt,postorder:Ut}=te,Ht=F;F.initLowLimValues=oe;F.initCutValues=ie;F.calcCutValue=De;F.leaveEdge=Ae;F.enterEdge=Ge;F.exchangeEdges=Be;function F(e){e=kt(e),ne(e);let t=Ye(e);oe(t),ie(t,e);let r,n;for(;r=Ae(t);)n=Ge(t,e,r),Be(t,e,r,n)}function ie(e,t){let r=Ut(e,e.nodes());r=r.slice(0,r.length-1),r.forEach(n=>Zt(e,t,n))}function Zt(e,t,r){let n=e.node(r).parent,i=e.edge(r,n);i.cutvalue=De(e,t,r)}function De(e,t,r){let n=e.node(r).parent,i=!0,o=t.edge(r,n),s=0;o||(i=!1,o=t.edge(n,r)),s=o.weight;let l=t.nodeEdges(r);return l&&l.forEach(a=>{let d=a.v===r,u=d?a.w:a.v;if(u!==n){let h=d===i,c=t.edge(a).weight;if(s+=h?c:-c,tr(e,r,u)){let f=e.edge(r,u).cutvalue;s+=h?-f:f}}}),s}function oe(e,t){arguments.length<2&&(t=e.nodes()[0]),Ve(e,{},1,t)}function Ve(e,t,r,n,i){let o=r,s=e.node(n);t[n]=!0;let l=e.neighbors(n);return l&&l.forEach(a=>{Object.hasOwn(t,a)||(r=Ve(e,t,r,a,n))}),s.low=o,s.lim=r++,i?s.parent=i:delete s.parent,r}function Ae(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Ge(e,t,r){let n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);let o=e.node(n),s=e.node(i),l=o,a=!1;return o.lim>s.lim&&(l=s,a=!0),t.edges().filter(d=>a===he(e,e.node(d.v),l)&&a!==he(e,e.node(d.w),l)).reduce((d,u)=>Y(t,u)<Y(t,d)?u:d)}function Be(e,t,r,n){let i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),oe(e),ie(e,t),er(e,t)}function er(e,t){let r=e.nodes().find(i=>!e.node(i).parent);if(!r)return;let n=Qt(e,[r]);n=n.slice(1),n.forEach(i=>{let o=e.node(i).parent,s=t.edge(i,o),l=!1;s||(s=t.edge(o,i),l=!0),t.node(i).rank=t.node(o).rank+(l?s.minlen:-s.minlen)})}function tr(e,t,r){return e.hasEdge(t,r)}function he(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var rr=nr;function nr(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":ce(e);break;case"tight-tree":or(e);break;case"longest-path":ir(e);break;case"none":break;default:ce(e)}}var ir=ne;function or(e){ne(e),Ye(e)}function ce(e){Ht(e)}var sr=lr;function lr(e){let t=ar(e),r=e.graph();Array.isArray(r.dummyChains)&&r.dummyChains.forEach(n=>{let i=e.node(n),o=i.edgeObj,s=dr(e,t,o.v,o.w),l=s.path,a=s.lca,d=0,u=l[d],h=!0;for(;n!==o.w;){if(i=e.node(n),h){for(;(u=l[d])!==a&&e.node(u).maxRank<i.rank;)d++;u===a&&(h=!1)}if(!h){for(;d<l.length-1&&e.node(l[d+1]).minRank<=i.rank;)d++;u=l[d]}u!==void 0&&e.setParent(n,u),n=e.successors(n)[0]}})}function dr(e,t,r,n){let i=[],o=[],s=Math.min(t[r].low,t[n].low),l=Math.max(t[r].lim,t[n].lim),a;a=r;do a=e.parent(a),i.push(a);while(a&&(t[a].low>s||l>t[a].lim));let d=a,u=n;for(;(u=e.parent(u))!==d;)o.push(u);return{path:i.concat(o.reverse()),lca:d}}function ar(e){let t={},r=0;function n(i){let o=r;e.children(i).forEach(n),t[i]={low:o,lim:r++}}return e.children($).forEach(n),t}function ur(e){let t=D(e,"root",{},"_root"),r=hr(e),n=Object.values(r),i=T(Math.max,n)-1,o=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=o);let s=cr(e)+1;e.children($).forEach(l=>{ze(e,t,o,s,i,r,l)}),e.graph().nodeRankFactor=o}function ze(e,t,r,n,i,o,s){var l;let a=e.children(s);if(!a.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}let d=ae(e,"_bt"),u=ae(e,"_bb"),h=e.node(s);e.setParent(d,s),h.borderTop=d,e.setParent(u,s),h.borderBottom=u,a.forEach(c=>{var f;ze(e,t,r,n,i,o,c);let p=e.node(c),b=p.borderTop?p.borderTop:c,y=p.borderBottom?p.borderBottom:c,w=p.borderTop?n:2*n,g=b!==y?1:i-((f=o[s])!=null?f:0)+1;e.setEdge(d,b,{weight:w,minlen:g,nestingEdge:!0}),e.setEdge(y,u,{weight:w,minlen:g,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,d,{weight:0,minlen:i+((l=o[s])!=null?l:0)})}function hr(e){let t={};function r(n,i){let o=e.children(n);o&&o.length&&o.forEach(s=>r(s,i+1)),t[n]=i}return e.children($).forEach(n=>r(n,1)),t}function cr(e){return e.edges().reduce((t,r)=>t+e.edge(r).weight,0)}function fr(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(r=>{e.edge(r).nestingEdge&&e.removeEdge(r)})}var gr=pr;function pr(e){function t(r){let n=e.children(r),i=e.node(r);if(n.length&&n.forEach(t),i&&Object.hasOwn(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(let o=i.minRank,s=i.maxRank+1;o<s;++o)fe(e,"borderLeft","_bl",r,i,o),fe(e,"borderRight","_br",r,i,o)}}e.children($).forEach(t)}function fe(e,t,r,n,i,o){let s={width:0,height:0,rank:o,borderType:t},l=i[t][o-1],a=D(e,"border",s,r);i[t][o]=a,e.setParent(a,n),l&&e.setEdge(l,a,{weight:1})}function vr(e){var t;let r=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(r==="lr"||r==="rl")&&qe(e)}function mr(e){var t;let r=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(r==="bt"||r==="rl")&&wr(e),(r==="lr"||r==="rl")&&(Er(e),qe(e))}function qe(e){e.nodes().forEach(t=>ge(e.node(t))),e.edges().forEach(t=>ge(e.edge(t)))}function ge(e){let t=e.width;e.width=e.height,e.height=t}function wr(e){e.nodes().forEach(t=>K(e.node(t))),e.edges().forEach(t=>{var r;let n=e.edge(t);(r=n.points)==null||r.forEach(K),Object.hasOwn(n,"y")&&K(n)})}function K(e){e.y=-e.y}function Er(e){e.nodes().forEach(t=>Q(e.node(t))),e.edges().forEach(t=>{var r;let n=e.edge(t);(r=n.points)==null||r.forEach(Q),Object.hasOwn(n,"x")&&Q(n)})}function Q(e){let t=e.x;e.x=e.y,e.y=t}function br(e,t=null){let r={},n=e.nodes().filter(d=>!e.children(d).length),i=n.map(d=>e.node(d).rank),o=T(Math.max,i),s=A(o+1).map(()=>[]);function l(d){if(r[d])return;r[d]=!0;let u=e.node(d);s[u.rank].push(d);let h=e.successors(d);h&&[...h].sort((c,f)=>a(c,f)).forEach(l)}n.sort((d,u)=>e.node(d).rank-e.node(u).rank).forEach(l);function a(d,u){let h=e.node(d),c=e.node(u);return Re(t,h,c)}return s}function yr(e,t){let r=0;for(let n=1;n<t.length;++n)r+=_r(e,t[n-1],t[n]);return r}function _r(e,t,r){let n=Ct(r,r.map((d,u)=>u)),i=t.flatMap(d=>{let u=e.outEdges(d);return u?u.map(h=>({pos:n[h.w],weight:e.edge(h).weight})).sort((h,c)=>h.pos-c.pos):[]}),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;o-=1;let l=new Array(s).fill(0),a=0;return i.forEach(d=>{let u=d.pos+o;l[u]+=d.weight;let h=0;for(;u>0;)u%2&&(h+=l[u+1]),u=u-1>>1,l[u]+=d.weight;a+=d.weight*h}),a}function kr(e,t=[]){return t.map(r=>{let n=e.inEdges(r);if(!n||!n.length)return{v:r};{let i=n.reduce((o,s)=>{let l=e.edge(s),a=e.node(s.v);return{sum:o.sum+l.weight*a.order,weight:o.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}})}function Or(e,t){let r={};e.forEach((i,o)=>{let s={indegree:0,in:[],out:[],vs:[i.v],i:o};i.barycenter!==void 0&&(s.barycenter=i.barycenter,s.weight=i.weight),r[i.v]=s}),t.edges().forEach(i=>{let o=r[i.v],s=r[i.w];o!==void 0&&s!==void 0&&(s.indegree++,o.out.push(s))});let n=Object.values(r).filter(i=>!i.indegree);return Nr(n)}function Nr(e){let t=[];function r(i){return o=>{o.merged||(o.barycenter===void 0||i.barycenter===void 0||o.barycenter>=i.barycenter)&&xr(i,o)}}function n(i){return o=>{o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(r(i)),i.out.forEach(n(i))}return t.filter(i=>!i.merged).map(i=>z(i,["vs","i","barycenter","weight"]))}function xr(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}function jr(e,t,r,n,i){let o={},s=null,l=null,a=i;typeof t=="boolean"?(a=t,o={}):t&&(o=t,s=r??null,l=n??null);let d=jt(e,w=>Object.hasOwn(w,"barycenter")),u=d.lhs,h=d.rhs.sort((w,g)=>g.i-w.i),c=[],f=0,p=0,b=0;u.sort(Ir(l,s,!!a));for(let[w,g]of Object.entries(o)){let v=u.findIndex(m=>m.vs[0]===w);u.splice(v+1,0,g)}b=pe(c,h,b),u.forEach(w=>{b+=w.vs.length,c.push(w.vs),f+=w.barycenter*w.weight,p+=w.weight,b=pe(c,h,b)});let y={vs:c.flat(1)};return p&&(y.barycenter=f/p,y.weight=p),y}function pe(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Ir(e,t,r){return(n,i)=>{if(n.barycenter<i.barycenter)return-1;if(n.barycenter>i.barycenter)return 1;if(e&&(typeof n.vs[0]=="string"||typeof i.vs[0]=="string")){let o=e.node(n.vs[0]),s=e.node(i.vs[0]),l=Re(t,o,s);if(l!==0)return l}return r?i.i-n.i:n.i-i.i}}function Xe(e,t,r,n,i){var o,s,l,a,d,u,h,c,f,p,b;let y=null,w=i;typeof n=="boolean"?(w=n,y=null):n!==void 0&&(y=n);let g=e.children(t),v=e.node(t),m=v?v.borderLeft:void 0,E=v?v.borderRight:void 0,N={};m&&(g=g.filter(O=>O!==m&&O!==E));let L=kr(e,g);L.forEach(O=>{if(e.children(O.v).length){let{result:I}=Xe(e,O.v,r,y,w);N[O.v]=I,Object.hasOwn(I,"barycenter")&&Cr(O,I)}});let _=Or(L,r);Mr(_,N);let C={},S=!1;for(let O=0;O<_.length;O++)for(let I=O+1;I<_.length;I++)if(!(!_[O]||!_[I]||!((o=_[O])!=null&&o.barycenter)||!((s=_[I])!=null&&s.barycenter))&&((l=_[O])==null?void 0:l.barycenter)===_[I].barycenter){let x=(d=(a=_[O])==null?void 0:a.vs[0])!=null?d:"",k=(h=(u=_[I])==null?void 0:u.vs[0])!=null?h:"",M=e.node(x),R=e.node(k);if(M.dummy==="edge"&&R.dummy==="edge"&&((c=M.edgeObj)==null?void 0:c.v)===((f=R.edgeObj)==null?void 0:f.v)&&((p=M.edgeObj)==null?void 0:p.w)===((b=R.edgeObj)==null?void 0:b.w))if(M.edgeLabel.reversed){C[k]=_[O],_.splice(O,1),O--;break}else C[x]=_[I],_.splice(I,1),I--;else S=!0}let j=jr(_,C,y,e,w);if(m&&E){j.vs=[m,j.vs,E].flat(1);let O=e.predecessors(m);if(O&&O.length){let I=e.node(O[0]),x=e.predecessors(E),k=e.node(x[0]);Object.hasOwn(j,"barycenter")||(j.barycenter=0,j.weight=0),j.barycenter=(j.barycenter*j.weight+I.order+k.order)/(j.weight+2),j.weight+=2}}return Object.defineProperty(j,"result",{value:j,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(j,"usedBias",{value:S,enumerable:!1,configurable:!0,writable:!0}),j}function Mr(e,t){e.forEach(r=>{r.vs=r.vs.flatMap(n=>t[n]?t[n].vs:n)})}function Cr(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function Lr(e,t,r,n){n||(n=e.nodes());let i=Sr(e),o=new P({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(s=>e.node(s));return n.forEach(s=>{let l=e.node(s),a=e.parent(s);if(l.rank===t||l.minRank<=t&&t<=l.maxRank){o.setNode(s),o.setParent(s,a||i);let d=e[r](s);d&&d.forEach(u=>{let h=u.v===s?u.w:u.v,c=o.edge(h,s),f=c!==void 0?c.weight:0;o.setEdge(h,s,{weight:e.edge(u).weight+f})}),Object.hasOwn(l,"minRank")&&o.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]})}}),o}function Sr(e){let t;for(;e.hasNode(t=re("_root")););return t}function Tr(e,t,r){let n={},i;r.forEach(o=>{let s=e.parent(o),l,a;for(;s;){if(l=e.parent(s),l?(a=n[l],n[l]=s):(a=i,i=s),a&&a!==s){t.setEdge(a,s);return}s=l}})}function $e(e,t={},r=null){if(typeof t.customOrder=="function"){t.customOrder(e,$e);return}let n=Fe(e),i=ve(e,A(1,n+1),"inEdges"),o=ve(e,A(n-1,-1,-1),"outEdges"),s=br(e,r);if(me(e,s),t.disableOptimalOrderHeuristic)return;let l=Number.POSITIVE_INFINITY,a,d=t.constraints||[];for(let u=0,h=0;h<4;++u,++h){Pr(u%2?i:o,u%4>=2,d,r),s=q(e);let c=yr(e,s);c<l?(h=0,a=Object.assign({},s),l=c):c===l&&(a=structuredClone(s))}me(e,a)}function ve(e,t,r){let n=new Map,i=(o,s)=>{n.has(o)||n.set(o,[]),n.get(o).push(s)};for(let o of e.nodes()){let s=e.node(o);if(typeof s.rank=="number"&&i(s.rank,o),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&i(l,o)}return t.map(function(o){return Lr(e,o,r,n.get(o)||[])})}function Pr(e,t,r,n){let i=!0,o=new P;e.forEach(function(s){r.forEach(u=>o.setEdge(u.left,u.right));let l=s.graph().root,{result:a,usedBias:d}=Xe(s,l,o,n,i);t&&d&&(i=!i),a.vs.forEach((u,h)=>s.node(u).order=h),Tr(s,o,a.vs)})}function me(e,t){Object.values(t).forEach(r=>r.forEach((n,i)=>e.node(n).order=i))}function Fr(e,t){let r={};function n(i,o){let s=0,l=0,a=i.length,d=o[o.length-1];return o.forEach((u,h)=>{let c=Yr(e,u),f=c?e.node(c).order:a;(c||u===d)&&(o.slice(l,h+1).forEach(p=>{let b=e.predecessors(p);b&&b.forEach(y=>{let w=e.node(y),g=w.order;(g<s||f<g)&&!(w.dummy&&e.node(p).dummy)&&We(r,y,p)})}),l=h+1,s=f)}),o}return t.length&&t.reduce(n),r}function Rr(e,t){let r={};function n(o,s,l,a,d){A(s,l).forEach(u=>{let h=o[u];if(h!==void 0&&e.node(h).dummy){let c=e.predecessors(h);c&&c.forEach(f=>{if(f===void 0)return;let p=e.node(f);p.dummy&&(p.order<a||p.order>d)&&We(r,f,h)})}})}function i(o,s){let l=-1,a=-1,d=0;return s.forEach((u,h)=>{if(e.node(u).dummy==="border"){let c=e.predecessors(u);if(c&&c.length){let f=c[0];if(f===void 0)return;a=e.node(f).order,n(s,d,h,l,a),d=h,l=a}}n(s,d,s.length,a,o.length)}),s}return t.length&&t.reduce(i),r}function Yr(e,t){if(e.node(t).dummy){let r=e.predecessors(t);if(r)return r.find(n=>e.node(n).dummy)}}function We(e,t,r){if(t>r){let i=t;t=r,r=i}let n=e[t];n||(e[t]=n={}),n[r]=!0}function Dr(e,t,r){if(t>r){let i=t;t=r,r=i}let n=e[t];return n!==void 0&&Object.hasOwn(n,r)}function Vr(e,t,r,n,i){let o={},s={},l={};return t.forEach(a=>{a.forEach((d,u)=>{o[d]=d,s[d]=d,l[d]=u})}),t.forEach(a=>{let d=-1,u=-1,h=!1,c=a,f=a.findIndex(p=>i?.includes(p)||we(p,e,i));f>0&&(c=[a[f],...a.slice(0,f),...a.slice(f+1)],h=!0),c.forEach(p=>{var b;let y=n(p);if(y&&y.length){i!=null&&i.includes(p)&&(y=y.filter(v=>we(v,e,i)));let w=y.sort((v,m)=>{let E=l[v],N=l[m];return(E!==void 0?E:0)-(N!==void 0?N:0)}),g=(w.length-1)/2;for(let v=Math.floor(g),m=Math.ceil(g);v<=m;++v){let E=w[v];if(E===void 0)continue;let N=l[E];if(N!==void 0&&s[p]===p&&d<N&&l[E]!==u&&!Dr(r,p,E)){let L=o[E];L!==void 0&&(s[E]=p,s[p]=o[p]=L,d=N,h&&(d=-1,u=(b=l[E])!=null?b:-1,h=!1))}}}})}),{root:o,align:s}}function Ar(e,t,r,n,i=!1){let o={},s=Gr(e,t,r,i),l=i?"borderLeft":"borderRight";function a(f,p){let b=s.nodes().slice(),y={},w=b.pop();for(;w;){if(y[w])f(w);else{y[w]=!0,b.push(w);for(let g of p(w))b.push(g)}w=b.pop()}}function d(f){let p=s.inEdges(f);p?o[f]=p.reduce((b,y)=>{var w;let g=(w=o[y.v])!=null?w:0,v=s.edge(y);return Math.max(b,g+(v!==void 0?v:0))},0):o[f]=0}function u(f){let p=s.outEdges(f),b=Number.POSITIVE_INFINITY;p&&(b=p.reduce((w,g)=>{let v=o[g.w],m=s.edge(g);return Math.min(w,(v!==void 0?v:0)-(m!==void 0?m:0))},Number.POSITIVE_INFINITY));let y=e.node(f);b!==Number.POSITIVE_INFINITY&&y.borderType!==l&&(o[f]=Math.max(o[f]!==void 0?o[f]:0,b))}function h(f){return s.predecessors(f)||[]}function c(f){return s.successors(f)||[]}return a(d,h),a(u,c),Object.keys(n).forEach(f=>{var p;let b=r[f];b!==void 0&&(o[f]=(p=o[b])!=null?p:0)}),o}function Gr(e,t,r,n){let i=new P,o=e.graph(),s=$r(o.nodesep,o.edgesep,n);return t.forEach(l=>{let a;l.forEach(d=>{let u=r[d];if(u!==void 0){if(i.setNode(u),a!==void 0){let h=r[a];if(h!==void 0){let c=i.edge(h,u);i.setEdge(h,u,Math.max(s(e,d,a),c||0))}}a=d}})}),i}function Br(e,t){return Object.values(t).reduce((r,n)=>{let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach(([l,a])=>{let d=Wr(e,l)/2;i=Math.max(a+d,i),o=Math.min(a-d,o)});let s=i-o;return s<r[0]&&(r=[s,n]),r},[Number.POSITIVE_INFINITY,null])[1]}function zr(e,t){let r=Object.values(t),n=T(Math.min,r),i=T(Math.max,r);["u","d"].forEach(o=>{["l","r"].forEach(s=>{let l=o+s,a=e[l];if(!a||a===t)return;let d=Object.values(a),u=n-T(Math.min,d);s!=="l"&&(u=i-T(Math.max,d)),u&&(e[l]=X(a,h=>h+u))})})}function qr(e,t=void 0){let r=e.ul;return r?X(r,(n,i)=>{var o,s;if(t){let a=t.toLowerCase(),d=e[a];if(d&&d[i]!==void 0)return d[i]}let l=Object.values(e).map(a=>{let d=a[i];return d!==void 0?d:0}).sort((a,d)=>a-d);return(((o=l[1])!=null?o:0)+((s=l[2])!=null?s:0))/2}):{}}function Xr(e,t){let r=q(e),n=Object.assign(Fr(e,r),Rr(e,r)),i={},o;["u","d"].forEach(l=>{o=l==="u"?r:Object.values(r).reverse(),["l","r"].forEach(a=>{a==="r"&&(o=o.map(h=>Object.values(h).reverse()));let d=Vr(e,o,n,h=>(l==="u"?e.predecessors(h):e.successors(h))||[],t),u=Ar(e,o,d.root,d.align,a==="r");a==="r"&&(u=X(u,h=>-h)),i[l+a]=u})});let s=Br(e,i);return zr(i,s),qr(i,e.graph().align)}function $r(e,t,r){return(n,i,o)=>{let s=n.node(i),l=n.node(o),a=0,d;if(a+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":d=-s.width/2;break;case"r":d=s.width/2;break}if(d&&(a+=r?d:-d),d=void 0,a+=(s.dummy?t:e)/2,a+=(l.dummy?t:e)/2,a+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":d=l.width/2;break;case"r":d=-l.width/2;break}return d&&(a+=r?d:-d),a}}function Wr(e,t){return e.node(t).width}function we(e,t,r){var n;if(!r)return!1;let i=(n=t.node(e))==null?void 0:n.edgeObj;if(!i||t.node(e).edgeLabel.reversed)return!1;let o=r.indexOf(i?.v),s=r.indexOf(i?.w);return o!==-1&&s!==-1&&o===(s+1)%r.length||o===(s-1)%r.length}function Jr(e,t){e=Te(e),Kr(e),Object.entries(Xr(e,t)).forEach(([r,n])=>e.node(r).x=n)}function Kr(e){let t=q(e),r=e.graph(),n=r.ranksep,i=r.rankalign,o=0;t.forEach(s=>{let l=s.reduce((a,d)=>{var u;let h=(u=e.node(d).height)!=null?u:0;return a>h?a:h},0);s.forEach(a=>{let d=e.node(a);i==="top"?d.y=o+d.height/2:i==="bottom"?d.y=o+l-d.height/2:d.y=o+l/2}),o+=l+n})}var Ee=new WeakMap;function vn(e,t={}){return Je(e,It,t),e}function be(e,t,r){let n=t;for(;n!==void 0;){let i=e.parent(n);if(i===r)return n;n=i}}function Je(e,t,r){var n;let i=e.nodes().filter(g=>e.children(g).length),o={};i.forEach(g=>{let v=e.node(g);if(v&&v.rankdir){let m=new P({multigraph:!0,compound:!0});m.setGraph({rankdir:v.rankdir});let E=e.children(g);E.forEach(x=>{let k={...e.node(x)};m.setNode(x,k);let M=e.parent(x);M&&M!==g&&E.includes(M)&&m.setParent(x,M)});let N=new Set;e.edges().forEach(x=>{let k=be(e,x.v,g),M=be(e,x.w,g);if(k&&M&&k!==M){let R=`${k}\0${M}`;N.has(R)||(N.add(R),m.setEdge(k,M,{...e.edge(x)}))}}),Je(m,t,r);let L=Oe(m);ye(L,t,r,null),_e(m,L);let _=1/0,C=1/0,S=-1/0,j=-1/0;m.nodes().forEach(x=>{if(x===g)return;let k=m.node(x);k&&typeof k.x=="number"&&typeof k.y=="number"&&typeof k.width=="number"&&typeof k.height=="number"&&(_=Math.min(_,k.x-k.width/2),S=Math.max(S,k.x+k.width/2),C=Math.min(C,k.y-k.height/2),j=Math.max(j,k.y+k.height/2))}),(!isFinite(_)||!isFinite(C)||!isFinite(S)||!isFinite(j))&&(_=C=0,S=j=0);let O=S-_,I=j-C;o[g]={minX:_,minY:C,maxX:S,maxY:j,width:O,height:I,offsetX:_,offsetY:C},v._dagreClusterSubgraph=m}});let s=[],l=g=>{let v=[],m=(e.children(g)||[]).filter(E=>E!==g);for(;m.length>0;){let E=m.shift();v.push(E),(e.children(E)||[]).filter(N=>N!==E).forEach(N=>m.push(N))}return v},a=new Map;i.forEach(g=>{let v=e.node(g);v&&v.rankdir&&o[g]&&a.set(g,(e.children(g)||[]).filter(m=>m!==g))});let d=new Set([...a.values()].flat()),u=new Map;a.forEach((g,v)=>{d.has(v)||u.set(v,l(v))});let h=new Set([...u.values()].flat()),c=g=>{for(let[v,m]of u)if(m.includes(g))return v;return g},f=[];e.edges().forEach(g=>{(h.has(g.v)||h.has(g.w))&&f.push({edge:g,label:e.edge(g)})});let p=new Map;h.forEach(g=>{let v=e.parent(g);p.set(g,typeof v=="string"?v:void 0)}),u.forEach((g,v)=>{let m=e.node(v),E=[];g.forEach(_=>{let C=e.node(_);C&&(E.push({id:_,node:C,parent:p.get(_)}),e.removeNode(_))});let N=f.filter(({edge:_})=>g.includes(_.v)||g.includes(_.w)),L=o[v];m&&(s.push({clusterId:v,subgraph:m._dagreClusterSubgraph,bounds:L,children:g,removedNodes:E,removedEdges:N}),m.width=L.width,m.height=L.height)});let b=new Set;f.forEach(({edge:g,label:v})=>{let m=c(g.v),E=c(g.w);if(m!==E&&e.hasNode(m)&&e.hasNode(E)){let N=`${m}\0${E}`;b.has(N)||(b.add(N),e.setEdge(m,E,{...v,width:0,height:0}))}});let y=Oe(e),w=ye(y,t,r,(n=Ee.get(e))!=null?n:null);Ee.set(e,w),_e(e,y),b.forEach(g=>{let v=g.indexOf("\0"),m=g.slice(0,v),E=g.slice(v+1);e.hasEdge(m,E)&&e.removeEdge(m,E)}),s.forEach(({clusterId:g,subgraph:v,bounds:m,removedNodes:E,removedEdges:N})=>{var L,_;let C=e.node(g),S=(L=C?.x)!=null?L:0,j=(_=C?.y)!=null?_:0,O=(m.minX+m.maxX)/2,I=(m.minY+m.maxY)/2;E.forEach(({id:x,node:k,parent:M})=>{e.setNode(x,k),M!==void 0&&e.setParent(x,M)}),N.forEach(({edge:x,label:k})=>{e.setEdge(x,k)}),v.nodes().forEach(x=>{if(x===g)return;let k=v.node(x),M=e.node(x);M&&k&&typeof k.x=="number"&&typeof k.y=="number"&&(M.x=S+(k.x-O),M.y=j+(k.y-I))}),delete C._dagreClusterSubgraph}),i.forEach(g=>{var v,m;let E=e.node(g),N=o[g];if(E&&E.rankdir&&E._dagreClusterSubgraph&&N){let L=E._dagreClusterSubgraph,_=(v=E.x)!=null?v:0,C=(m=E.y)!=null?m:0,S=(N.minX+N.maxX)/2,j=(N.minY+N.maxY)/2;L.nodes().forEach(O=>{if(O===g)return;let I=L.node(O),x=e.node(O);if(x&&I&&typeof I.x=="number"&&typeof I.y=="number"){let k=I.x-S,M=I.y-j;x.x=_+k,x.y=C+M}}),delete E._dagreClusterSubgraph}})}function ye(e,t,r,n=null){var i,o;let s=r?.useDynamic!==!1,l=s&&(i=n?.graph)!=null?i:null,a=s&&(o=n?.rawNodes)!=null?o:null;t(" makeSpaceForEdgeLabels",()=>nn(e)),t(" removeSelfEdges",()=>fn(e)),t(" acyclic",()=>Vt(e,l)),t(" nestingGraph.run",()=>ur(e)),t(" rank",()=>rr(Te(e))),t(" injectEdgeLabelProxies",()=>on(e)),t(" removeEmptyRanks",()=>Nt(e)),t(" nestingGraph.cleanup",()=>fr(e)),t(" normalizeRanks",()=>Ot(e)),t(" assignRankMinMax",()=>sn(e)),t(" removeEdgeLabelProxies",()=>ln(e)),t(" normalize.run",()=>zt(e)),t(" parentDummyChains",()=>sr(e)),t(" addBorderSegments",()=>gr(e)),t(" order",()=>$e(e,r,a)),t(" insertSelfEdges",()=>gn(e)),t(" adjustCoordinateSystem",()=>vr(e)),t(" position",()=>Jr(e,r.corePath)),t(" positionSelfEdges",()=>pn(e));let d=JSON.parse(JSON.stringify(e._nodes));return t(" removeBorderNodes",()=>cn(e)),t(" normalize.undo",()=>Xt(e)),t(" fixupEdgeLabelCoords",()=>un(e)),t(" undoCoordinateSystem",()=>mr(e)),t(" translateGraph",()=>dn(e)),t(" assignNodeIntersects",()=>an(e)),t(" reversePoints",()=>hn(e)),t(" acyclic.undo",()=>Gt(e)),{graph:e,rawNodes:d}}function _e(e,t){e.nodes().forEach(r=>{let n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,n.order=i.order,n.rank=i.rank,t.children(r).length&&(n.width=i.width,n.height=i.height))}),e.edges().forEach(r=>{let n=e.edge(r),i=t.edge(r);n.points=i.points,Object.hasOwn(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Qr=["nodesep","edgesep","ranksep","marginx","marginy"],Ur={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},Hr=["acyclicer","ranker","rankdir","align","rankalign"],Zr=["width","height","rank"],ke={width:0,height:0},en=["minlen","weight","width","height","labeloffset"],tn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},rn=["labelpos"];function Oe(e){let t=new P({multigraph:!0,compound:!0}),r=H(e.graph());return t.setGraph(Object.assign({},Ur,U(r,Qr),z(r,Hr))),e.nodes().forEach(n=>{let i=H(e.node(n)),o=U(i,Zr);Object.keys(ke).forEach(l=>{o[l]===void 0&&(o[l]=ke[l])}),t.setNode(n,o);let s=e.parent(n);s!==void 0&&t.setParent(n,s)}),e.edges().forEach(n=>{let i=H(e.edge(n));t.setEdge(n,Object.assign({},tn,U(i,en),z(i,rn)))}),t}function nn(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(r=>{var n;let i=e.edge(r);i.minlen*=2,((n=i.labelpos)!=null?n:"r").toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function on(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.width&&r.height){let n=e.node(t.v),i={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};D(e,"edge-proxy",i,"_ep")}})}function sn(e){let t=0;e.nodes().forEach(r=>{let n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Math.max(t,n.maxRank))}),e.graph().maxRank=t}function ln(e){e.nodes().forEach(t=>{let r=e.node(t);if(r.dummy==="edge-proxy"){let n=r;e.edge(n.e).labelRank=r.rank,e.removeNode(t)}})}function dn(e){let t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),s=o.marginx||0,l=o.marginy||0;function a(d){let u=d.x,h=d.y,c=d.width,f=d.height;t=Math.min(t,u-c/2),r=Math.max(r,u+c/2),n=Math.min(n,h-f/2),i=Math.max(i,h+f/2)}e.nodes().forEach(d=>a(e.node(d))),e.edges().forEach(d=>{let u=e.edge(d);Object.hasOwn(u,"x")&&a(u)}),t-=s,n-=l,e.nodes().forEach(d=>{let u=e.node(d);u.x-=t,u.y-=n}),e.edges().forEach(d=>{let u=e.edge(d);u.points.forEach(h=>{h.x-=t,h.y-=n}),Object.hasOwn(u,"x")&&(u.x-=t),Object.hasOwn(u,"y")&&(u.y-=n)}),o.width=r-t+s,o.height=i-n+l}function an(e){e.edges().forEach(t=>{if(t.v===t.w)return;let r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,s;r.points?(o=r.points[0],s=r.points[r.points.length-1]):(r.points=[],o=i,s=n),r.points.unshift(de(n,o)),r.points.push(de(i,s))})}function un(e){e.edges().forEach(t=>{let r=e.edge(t);if(Object.hasOwn(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function hn(e){e.edges().forEach(t=>{let r=e.edge(t);r.reversed&&r.points.reverse()})}function cn(e){e.nodes().forEach(t=>{if(e.children(t).length){let r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(r.borderLeft[r.borderLeft.length-1]),s=e.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(s.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function fn(e){e.edges().forEach(t=>{if(t.v===t.w){let r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function gn(e){q(e).forEach(t=>{let r=0;t.forEach((n,i)=>{let o=e.node(n);typeof o.rank!="number"&&(o.rank=0),o.order=i+r,(o.selfEdges||[]).forEach(s=>{D(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:i+ ++r,e:s.e,edgeLabel:s.label},"_se"),(!Array.isArray(s.label.points)||s.label.points.length!==7)&&(s.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete o.selfEdges})})}function pn(e){e.nodes().forEach(t=>{let r=e.node(t),n=i=>typeof i=="number"&&isFinite(i);if(r.dummy==="selfedge"){let i=r,o=e.node(i.e.v),s=n(o?.x)?o.x:0,l=n(o?.y)?o.y:0,a=n(o?.width)?o.width:0,d=n(o?.height)?o.height:0,u=n(r.x)?r.x:s,h=n(r.y)?r.y:l,c=a/2,f=d/2;i.edgeLabel.points=[{x:u+c,y:h-f},{x:u+c,y:h-f},{x:u,y:h},{x:u-c,y:h+f},{x:u-c,y:h+f},{x:u,y:h},{x:u,y:h}],i.edgeLabel.x=u,i.edgeLabel.y=h,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else r&&Array.isArray(r.selfEdges)&&r.selfEdges.forEach(i=>{if(!Array.isArray(i.label.points)||i.label.points.length!==7){let o=n(r.x)?r.x:0,s=n(r.y)?r.y:0,l=n(r.width)?r.width:0,a=n(r.height)?r.height:0,d=l/2,u=a/2;i.label.points=[{x:o+d,y:s-u},{x:o+d,y:s-u},{x:o,y:s},{x:o-d,y:s+u},{x:o-d,y:s+u},{x:o,y:s},{x:o,y:s}]}})})}function U(e,t){return X(z(e,t),Number)}function H(e){let t={};return e&&Object.entries(e).forEach(([r,n])=>{typeof r=="string"&&(r=r.toLowerCase()),t[r]=n}),t}/*! For license information please see dagre.esm.js.LEGAL.txt */export{P as Graph,He as graphlib,vn as layout};
@@ -0,0 +1 @@
1
+ import{ab as r,aa as o}from"./index-Ccf8muta.js";import{m as s,f as d,a as g,b as h}from"./match-CMf6gi5c.js";const u={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},b={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},m={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},c={narrow:m.narrow,abbreviated:["Jän.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:m.wide},M={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},v={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},w={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},f=a=>Number(a)+".",D={ordinalNumber:f,era:r({values:u,defaultWidth:"wide"}),quarter:r({values:b,defaultWidth:"wide",argumentCallback:a=>a-1}),month:r({values:m,formattingValues:c,defaultWidth:"wide"}),day:r({values:M,defaultWidth:"wide"}),dayPeriod:r({values:v,defaultWidth:"wide",formattingValues:w,defaultFormattingWidth:"wide"})},p={code:"de-AT",formatDistance:h,formatLong:g,formatRelative:d,localize:D,match:s,options:{weekStartsOn:1,firstWeekContainsDate:4}},J={...p,labels:{labelDayButton:(a,e,n,i)=>{let t=(i??new o(n)).format(a,"PPPP");return e.today&&(t=`Heute, ${t}`),e.selected&&(t=`${t}, ausgewählt`),t},labelMonthDropdown:"Monat auswählen",labelNext:"Zum nächsten Monat",labelPrevious:"Zum vorherigen Monat",labelWeekNumber:a=>`Woche ${a}`,labelYearDropdown:"Jahr auswählen",labelGrid:(a,e,n)=>(n??new o(e)).formatMonthYear(a),labelGridcell:(a,e,n,i)=>{let t=(i??new o(n)).format(a,"PPPP");return e?.today&&(t=`Heute, ${t}`),t},labelNav:"Navigationsleiste",labelWeekNumberHeader:"Wochennummer",labelWeekday:(a,e,n)=>(n??new o(e)).format(a,"cccc")}};export{J as deAT};
@@ -0,0 +1 @@
1
+ import{ab as r,aa as o}from"./index-Ccf8muta.js";import{m as s,f as d,a as g,b as h}from"./match-CMf6gi5c.js";const u={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},b={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},m={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},c={narrow:m.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:m.wide},M={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},v={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},w={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},f=a=>Number(a)+".",D={ordinalNumber:f,era:r({values:u,defaultWidth:"wide"}),quarter:r({values:b,defaultWidth:"wide",argumentCallback:a=>a-1}),month:r({values:m,formattingValues:c,defaultWidth:"wide"}),day:r({values:M,defaultWidth:"wide"}),dayPeriod:r({values:v,defaultWidth:"wide",formattingValues:w,defaultFormattingWidth:"wide"})},p={code:"de",formatDistance:h,formatLong:g,formatRelative:d,localize:D,match:s,options:{weekStartsOn:1,firstWeekContainsDate:4}},S={...p,labels:{labelDayButton:(a,e,n,i)=>{let t=(i??new o(n)).format(a,"PPPP");return e.today&&(t=`Heute, ${t}`),e.selected&&(t=`${t}, ausgewählt`),t},labelMonthDropdown:"Monat auswählen",labelNext:"Zum nächsten Monat",labelPrevious:"Zum vorherigen Monat",labelWeekNumber:a=>`Woche ${a}`,labelYearDropdown:"Jahr auswählen",labelGrid:(a,e,n)=>(n??new o(e)).formatMonthYear(a),labelGridcell:(a,e,n,i)=>{let t=(i??new o(n)).format(a,"PPPP");return e?.today&&(t=`Heute, ${t}`),t},labelNav:"Navigationsleiste",labelWeekNumberHeader:"Wochennummer",labelWeekday:(a,e,n)=>(n??new o(e)).format(a,"cccc")}};export{S as de};
@@ -1,4 +1,4 @@
1
- import{_ as w,E as ee,G as te,I as de,d as he,l as J,aT as P,b as pe,a as ue,p as fe,q as me,g as ge,s as ye,F as Se,aU as ve,y as xe}from"./mermaid.core-DL97wpul.js";import{s as be}from"./chunk-QN33PNHL-B-kGe_H0.js";import{p as we}from"./chunk-4BX2VUAB-V_Lu-A8z.js";import{p as Ce}from"./treemap-GDKQZRPO-Bskqcsjn.js";import{s as j}from"./index-CHO8NA6v.js";import{b as H}from"./defaultLocale-DX6XiGOO.js";import{o as Z}from"./ordinal-Cboi1Yqb.js";import"./mermaid-VLURNSYL-DPc-hyxN.js";import"./index-e-4cSkrt.js";import"./maximize-2-Bl11RTvy.js";import"./_baseUniq-CVvDgwC4.js";import"./_basePickBy-BuyVDPfJ.js";import"./clone-eq-IW2p2.js";import"./init-Gi6I4Gst.js";function Te(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function Le(){return this.eachAfter(Te)}function $e(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function Ae(e,a){for(var n=this,l=[n],o,i,d=-1;n=l.pop();)if(e.call(a,n,++d,this),o=n.children)for(i=o.length-1;i>=0;--i)l.push(o[i]);return this}function Fe(e,a){for(var n=this,l=[n],o=[],i,d,h,m=-1;n=l.pop();)if(o.push(n),i=n.children)for(d=0,h=i.length;d<h;++d)l.push(i[d]);for(;n=o.pop();)e.call(a,n,++m,this);return this}function ke(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Ne(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,o=l&&l.length;--o>=0;)n+=l[o].value;a.value=n})}function Me(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function _e(e){for(var a=this,n=ze(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var o=l.length;e!==n;)l.splice(o,0,e),e=e.parent;return l}function ze(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),o=null;for(e=n.pop(),a=l.pop();e===a;)o=e,e=n.pop(),a=l.pop();return o}function Ve(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function De(){return Array.from(this)}function Pe(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Be(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ee(){var e=this,a,n=[e],l,o,i;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(o=0,i=l.length;o<i;++o)n.push(l[o]);while(n.length)}function K(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=Ie)):a===void 0&&(a=We);for(var n=new Y(e),l,o=[n],i,d,h,m;l=o.pop();)if((d=a(l.data))&&(m=(d=Array.from(d)).length))for(l.children=d,h=m-1;h>=0;--h)o.push(i=d[h]=new Y(d[h])),i.parent=l,i.depth=l.depth+1;return n.eachBefore(Oe)}function Re(){return K(this).eachBefore(He)}function We(e){return e.children}function Ie(e){return Array.isArray(e)?e[1]:null}function He(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Oe(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function Y(e){this.data=e,this.depth=this.height=0,this.parent=null}Y.prototype=K.prototype={constructor:Y,count:Le,each:$e,eachAfter:Fe,eachBefore:Ae,find:ke,sum:Ne,sort:Me,path:_e,ancestors:Ve,descendants:De,leaves:Pe,links:Be,copy:Re,[Symbol.iterator]:Ee};function Ge(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function qe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Xe(e,a,n,l,o){for(var i=e.children,d,h=-1,m=i.length,c=e.value&&(l-a)/e.value;++h<m;)d=i[h],d.y0=n,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function je(e,a,n,l,o){for(var i=e.children,d,h=-1,m=i.length,c=e.value&&(o-n)/e.value;++h<m;)d=i[h],d.x0=a,d.x1=l,d.y0=n,d.y1=n+=d.value*c}var Ye=(1+Math.sqrt(5))/2;function Ue(e,a,n,l,o,i){for(var d=[],h=a.children,m,c,p=0,b=0,r=h.length,x,S,v=a.value,u,g,N,k,V,E,M;p<r;){x=o-n,S=i-l;do u=h[b++].value;while(!u&&b<r);for(g=N=u,E=Math.max(S/x,x/S)/(v*e),M=u*u*E,V=Math.max(N/M,M/g);b<r;++b){if(u+=c=h[b].value,c<g&&(g=c),c>N&&(N=c),M=u*u*E,k=Math.max(N/M,M/g),k>V){u-=c;break}V=k}d.push(m={value:u,dice:x<S,children:h.slice(p,b)}),m.dice?Xe(m,n,l,o,v?l+=S*u/v:i):je(m,n,l,v?n+=x*u/v:o,i),v-=u,p=b}return d}const Ze=(function e(a){function n(l,o,i,d,h){Ue(a,l,o,i,d,h)}return n.ratio=function(l){return e((l=+l)>1?l:1)},n})(Ye);function Je(){var e=Ze,a=!1,n=1,l=1,o=[0],i=O,d=O,h=O,m=O,c=O;function p(r){return r.x0=r.y0=0,r.x1=n,r.y1=l,r.eachBefore(b),o=[0],a&&r.eachBefore(qe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,g=r.y1-x;u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=g,r.children&&(x=o[r.depth+1]=i(r)/2,S+=c(r)-x,v+=d(r)-x,u-=h(r)-x,g-=m(r)-x,u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),e(r,S,v,u,g))}return p.round=function(r){return arguments.length?(a=!!r,p):a},p.size=function(r){return arguments.length?(n=+r[0],l=+r[1],p):[n,l]},p.tile=function(r){return arguments.length?(e=Ge(r),p):e},p.padding=function(r){return arguments.length?p.paddingInner(r).paddingOuter(r):p.paddingInner()},p.paddingInner=function(r){return arguments.length?(i=typeof r=="function"?r:G(+r),p):i},p.paddingOuter=function(r){return arguments.length?p.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):p.paddingTop()},p.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),p):d},p.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:G(+r),p):h},p.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:G(+r),p):m},p.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),p):c},p}var ae=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=pe,this.getAccTitle=ue,this.setDiagramTitle=fe,this.getDiagramTitle=me,this.getAccDescription=ge,this.setAccDescription=ye}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Se,a=te();return ee({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(o=>{ve(o)&&(n?.textStyles?n.textStyles.push(o):n.textStyles=[o]),n?.styles?n.styles.push(o):n.styles=[o]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){xe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function ne(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const o={name:l.name,children:l.type==="Leaf"?void 0:[]};for(o.classSelector=l?.classSelector,l?.cssCompiledStyles&&(o.cssCompiledStyles=[l.cssCompiledStyles]),l.type==="Leaf"&&l.value!==void 0&&(o.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(o);else{const i=n[n.length-1].node;i.children?i.children.push(o):i.children=[o]}l.type!=="Leaf"&&n.push({node:o,level:l.level})}),a}w(ne,"buildHierarchy");var Ke=w((e,a)=>{we(e,a);const n=[];for(const i of e.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of e.TreemapRows??[]){const d=i.item;if(!d)continue;const h=i.indent?parseInt(i.indent):0,m=Qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};n.push(b)}const l=ne(n),o=w((i,d)=>{for(const h of i)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(l,0)},"populate"),Qe=w(e=>e.name?String(e.name):"","getItemName"),le={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ce("treemap",e);J.debug("Treemap AST:",n);const l=le.parser?.yy;if(!(l instanceof ae))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ke(n,l)}catch(a){throw J.error("Error parsing treemap:",a),a}},"parse")},et=10,B=10,q=25,tt=w((e,a,n,l)=>{const o=l.db,i=o.getConfig(),d=i.padding??et,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=te();if(!m)return;const p=h?30:0,b=de(a),r=i.nodeWidth?i.nodeWidth*B:960,x=i.nodeHeight?i.nodeHeight*B:500,S=r,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),he(b,v,S,i.useMaxWidth);let u;try{const t=i.valueFormat||",";if(t==="$0,0")u=w(s=>"$"+H(",")(s),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const s=/\.\d+/.exec(t),f=s?s[0]:"";u=w(C=>"$"+H(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const s=t.substring(1);u=w(f=>"$"+H(s||"")(f),"valueFormat")}else u=H(t)}catch(t){J.error("Error creating format function:",t),u=H(",")}const g=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=K(m).sum(t=>t.value??0).sort((t,s)=>(s.value??0)-(t.value??0)),Q=Je().size([r,x]).paddingTop(t=>t.children&&t.children.length>0?q+B:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?B:0).paddingRight(t=>t.children&&t.children.length>0?B:0).paddingBottom(t=>t.children&&t.children.length>0?B:0).round(!0)(E),re=Q.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,s)=>`clip-section-${a}-${s}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,s)=>`treemapSection section${s}`).attr("fill",t=>g(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const s=P({cssCompiledStyles:t.data.cssCompiledStyles});return s.nodeStyles+";"+s.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(t.depth===0)return"display: none;";const s="dominant-baseline: middle; font-size: 12px; fill:"+k(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const s=j(this),f=t.data.name;s.text(f);const C=t.x1-t.x0,L=6;let $;i.showValues!==!1&&t.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=s.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){s.text("..."),y.getComputedTextLength()>A&&s.text("");break}if(s.text(T+"..."),y.getComputedTextLength()<=A)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const s="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")});const se=Q.leaves(),X=V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(t,s)=>`treemapNode treemapLeafGroup leaf${s}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);X.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("style",t=>P({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(t,s)=>`clip-${a}-${s}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),X.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const s="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(t.data.name)+";",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,s)=>`url(#clip-${a}-${s})`).text(t=>t.data.name).each(function(t){const s=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=s.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){s.style("display","none");return}let y=parseInt(s.style("font-size"),10);const _=8,F=28,T=.6,z=6,W=2;for(;L.getComputedTextLength()>D&&y>_;)y--,s.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),U=y+W+I;for(;U>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)s.style("font-size",`${y}px`),U=y+W+I;s.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&s.style("display","none")}),i.showValues!==!1&&X.append("text").attr("class","treemapValue").attr("x",s=>(s.x1-s.x0)/2).attr("y",function(s){return(s.y1-s.y0)/2}).attr("style",s=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(s.data.name)+";",C=P({cssCompiledStyles:s.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(s,f)=>`url(#clip-${a}-${f})`).text(s=>s.value?u(s.value):"").each(function(s){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(s.y1-s.y0)/2+$/2+_;f.attr("y",z);const W=s.x1-s.x0,oe=s.y1-s.y0-4,ce=W-8;f.node().getComputedTextLength()>ce||z+F>oe||F<y?f.style("display","none"):f.style("display",null)});const ie=i.diagramPadding??8;be(b,ie,"flowchart",i?.useMaxWidth||!1)},"draw"),at=w(function(e,a){return a.db.getClasses()},"getClasses"),nt={draw:tt,getClasses:at},lt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},rt=w(({treemap:e}={})=>{const a=ee(lt,e);return`
1
+ import{_ as w,E as ee,G as te,I as de,d as he,l as J,aT as P,b as pe,a as ue,p as fe,q as me,g as ge,s as ye,F as Se,aU as ve,y as xe}from"./mermaid.core-Bm9ZP7gJ.js";import{s as be}from"./chunk-QN33PNHL-C8irSNHD.js";import{p as we}from"./chunk-4BX2VUAB-B45XKmeh.js";import{p as Ce}from"./treemap-GDKQZRPO-CB8vQsyY.js";import{a as j}from"./index-Ccf8muta.js";import{b as H}from"./defaultLocale-DX6XiGOO.js";import{o as Z}from"./ordinal-Cboi1Yqb.js";import"./mermaid-VLURNSYL-CFdBlgNU.js";import"./index-e-4cSkrt.js";import"./maximize-2-B0LqzzJD.js";import"./_baseUniq-D-4MA4hd.js";import"./_basePickBy-B6h3s-sF.js";import"./clone-CgA-DYeg.js";import"./init-Gi6I4Gst.js";function Te(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function Le(){return this.eachAfter(Te)}function $e(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function Ae(e,a){for(var n=this,l=[n],o,i,d=-1;n=l.pop();)if(e.call(a,n,++d,this),o=n.children)for(i=o.length-1;i>=0;--i)l.push(o[i]);return this}function Fe(e,a){for(var n=this,l=[n],o=[],i,d,h,m=-1;n=l.pop();)if(o.push(n),i=n.children)for(d=0,h=i.length;d<h;++d)l.push(i[d]);for(;n=o.pop();)e.call(a,n,++m,this);return this}function ke(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Ne(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,o=l&&l.length;--o>=0;)n+=l[o].value;a.value=n})}function Me(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function _e(e){for(var a=this,n=ze(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var o=l.length;e!==n;)l.splice(o,0,e),e=e.parent;return l}function ze(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),o=null;for(e=n.pop(),a=l.pop();e===a;)o=e,e=n.pop(),a=l.pop();return o}function Ve(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function De(){return Array.from(this)}function Pe(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Be(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ee(){var e=this,a,n=[e],l,o,i;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(o=0,i=l.length;o<i;++o)n.push(l[o]);while(n.length)}function K(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=Ie)):a===void 0&&(a=We);for(var n=new Y(e),l,o=[n],i,d,h,m;l=o.pop();)if((d=a(l.data))&&(m=(d=Array.from(d)).length))for(l.children=d,h=m-1;h>=0;--h)o.push(i=d[h]=new Y(d[h])),i.parent=l,i.depth=l.depth+1;return n.eachBefore(Oe)}function Re(){return K(this).eachBefore(He)}function We(e){return e.children}function Ie(e){return Array.isArray(e)?e[1]:null}function He(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Oe(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function Y(e){this.data=e,this.depth=this.height=0,this.parent=null}Y.prototype=K.prototype={constructor:Y,count:Le,each:$e,eachAfter:Fe,eachBefore:Ae,find:ke,sum:Ne,sort:Me,path:_e,ancestors:Ve,descendants:De,leaves:Pe,links:Be,copy:Re,[Symbol.iterator]:Ee};function Ge(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function G(e){return function(){return e}}function qe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Xe(e,a,n,l,o){for(var i=e.children,d,h=-1,m=i.length,c=e.value&&(l-a)/e.value;++h<m;)d=i[h],d.y0=n,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function je(e,a,n,l,o){for(var i=e.children,d,h=-1,m=i.length,c=e.value&&(o-n)/e.value;++h<m;)d=i[h],d.x0=a,d.x1=l,d.y0=n,d.y1=n+=d.value*c}var Ye=(1+Math.sqrt(5))/2;function Ue(e,a,n,l,o,i){for(var d=[],h=a.children,m,c,p=0,b=0,r=h.length,x,S,v=a.value,u,g,N,k,V,E,M;p<r;){x=o-n,S=i-l;do u=h[b++].value;while(!u&&b<r);for(g=N=u,E=Math.max(S/x,x/S)/(v*e),M=u*u*E,V=Math.max(N/M,M/g);b<r;++b){if(u+=c=h[b].value,c<g&&(g=c),c>N&&(N=c),M=u*u*E,k=Math.max(N/M,M/g),k>V){u-=c;break}V=k}d.push(m={value:u,dice:x<S,children:h.slice(p,b)}),m.dice?Xe(m,n,l,o,v?l+=S*u/v:i):je(m,n,l,v?n+=x*u/v:o,i),v-=u,p=b}return d}const Ze=(function e(a){function n(l,o,i,d,h){Ue(a,l,o,i,d,h)}return n.ratio=function(l){return e((l=+l)>1?l:1)},n})(Ye);function Je(){var e=Ze,a=!1,n=1,l=1,o=[0],i=O,d=O,h=O,m=O,c=O;function p(r){return r.x0=r.y0=0,r.x1=n,r.y1=l,r.eachBefore(b),o=[0],a&&r.eachBefore(qe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,u=r.x1-x,g=r.y1-x;u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=u,r.y1=g,r.children&&(x=o[r.depth+1]=i(r)/2,S+=c(r)-x,v+=d(r)-x,u-=h(r)-x,g-=m(r)-x,u<S&&(S=u=(S+u)/2),g<v&&(v=g=(v+g)/2),e(r,S,v,u,g))}return p.round=function(r){return arguments.length?(a=!!r,p):a},p.size=function(r){return arguments.length?(n=+r[0],l=+r[1],p):[n,l]},p.tile=function(r){return arguments.length?(e=Ge(r),p):e},p.padding=function(r){return arguments.length?p.paddingInner(r).paddingOuter(r):p.paddingInner()},p.paddingInner=function(r){return arguments.length?(i=typeof r=="function"?r:G(+r),p):i},p.paddingOuter=function(r){return arguments.length?p.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):p.paddingTop()},p.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),p):d},p.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:G(+r),p):h},p.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:G(+r),p):m},p.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),p):c},p}var ae=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=pe,this.getAccTitle=ue,this.setDiagramTitle=fe,this.getDiagramTitle=me,this.getAccDescription=ge,this.setAccDescription=ye}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Se,a=te();return ee({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(o=>{ve(o)&&(n?.textStyles?n.textStyles.push(o):n.textStyles=[o]),n?.styles?n.styles.push(o):n.styles=[o]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){xe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function ne(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const o={name:l.name,children:l.type==="Leaf"?void 0:[]};for(o.classSelector=l?.classSelector,l?.cssCompiledStyles&&(o.cssCompiledStyles=[l.cssCompiledStyles]),l.type==="Leaf"&&l.value!==void 0&&(o.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(o);else{const i=n[n.length-1].node;i.children?i.children.push(o):i.children=[o]}l.type!=="Leaf"&&n.push({node:o,level:l.level})}),a}w(ne,"buildHierarchy");var Ke=w((e,a)=>{we(e,a);const n=[];for(const i of e.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of e.TreemapRows??[]){const d=i.item;if(!d)continue;const h=i.indent?parseInt(i.indent):0,m=Qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};n.push(b)}const l=ne(n),o=w((i,d)=>{for(const h of i)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(l,0)},"populate"),Qe=w(e=>e.name?String(e.name):"","getItemName"),le={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ce("treemap",e);J.debug("Treemap AST:",n);const l=le.parser?.yy;if(!(l instanceof ae))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ke(n,l)}catch(a){throw J.error("Error parsing treemap:",a),a}},"parse")},et=10,B=10,q=25,tt=w((e,a,n,l)=>{const o=l.db,i=o.getConfig(),d=i.padding??et,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=te();if(!m)return;const p=h?30:0,b=de(a),r=i.nodeWidth?i.nodeWidth*B:960,x=i.nodeHeight?i.nodeHeight*B:500,S=r,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),he(b,v,S,i.useMaxWidth);let u;try{const t=i.valueFormat||",";if(t==="$0,0")u=w(s=>"$"+H(",")(s),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const s=/\.\d+/.exec(t),f=s?s[0]:"";u=w(C=>"$"+H(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const s=t.substring(1);u=w(f=>"$"+H(s||"")(f),"valueFormat")}else u=H(t)}catch(t){J.error("Error creating format function:",t),u=H(",")}const g=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=K(m).sum(t=>t.value??0).sort((t,s)=>(s.value??0)-(t.value??0)),Q=Je().size([r,x]).paddingTop(t=>t.children&&t.children.length>0?q+B:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?B:0).paddingRight(t=>t.children&&t.children.length>0?B:0).paddingBottom(t=>t.children&&t.children.length>0?B:0).round(!0)(E),re=Q.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,s)=>`clip-section-${a}-${s}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",q),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,s)=>`treemapSection section${s}`).attr("fill",t=>g(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const s=P({cssCompiledStyles:t.data.cssCompiledStyles});return s.nodeStyles+";"+s.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(t.depth===0)return"display: none;";const s="dominant-baseline: middle; font-size: 12px; fill:"+k(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const s=j(this),f=t.data.name;s.text(f);const C=t.x1-t.x0,L=6;let $;i.showValues!==!1&&t.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=s.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){s.text("..."),y.getComputedTextLength()>A&&s.text("");break}if(s.text(T+"..."),y.getComputedTextLength()<=A)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const s="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")});const se=Q.leaves(),X=V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(t,s)=>`treemapNode treemapLeafGroup leaf${s}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);X.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("style",t=>P({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(t,s)=>`clip-${a}-${s}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),X.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const s="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(t.data.name)+";",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,s)=>`url(#clip-${a}-${s})`).text(t=>t.data.name).each(function(t){const s=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=s.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){s.style("display","none");return}let y=parseInt(s.style("font-size"),10);const _=8,F=28,T=.6,z=6,W=2;for(;L.getComputedTextLength()>D&&y>_;)y--,s.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),U=y+W+I;for(;U>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)s.style("font-size",`${y}px`),U=y+W+I;s.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&s.style("display","none")}),i.showValues!==!1&&X.append("text").attr("class","treemapValue").attr("x",s=>(s.x1-s.x0)/2).attr("y",function(s){return(s.y1-s.y0)/2}).attr("style",s=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(s.data.name)+";",C=P({cssCompiledStyles:s.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(s,f)=>`url(#clip-${a}-${f})`).text(s=>s.value?u(s.value):"").each(function(s){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(s.y1-s.y0)/2+$/2+_;f.attr("y",z);const W=s.x1-s.x0,oe=s.y1-s.y0-4,ce=W-8;f.node().getComputedTextLength()>ce||z+F>oe||F<y?f.style("display","none"):f.style("display",null)});const ie=i.diagramPadding??8;be(b,ie,"flowchart",i?.useMaxWidth||!1)},"draw"),at=w(function(e,a){return a.db.getClasses()},"getClasses"),nt={draw:tt,getClasses:at},lt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},rt=w(({treemap:e}={})=>{const a=ee(lt,e);return`
2
2
  .treemapNode.section {
3
3
  stroke: ${a.sectionStrokeColor};
4
4
  stroke-width: ${a.sectionStrokeWidth};