@sme.up/ketchup2 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (598) hide show
  1. package/dist/abnfDiagram-VCTEODGH-C9blQ78p.cjs +1 -0
  2. package/dist/abnfDiagram-VCTEODGH-DZIaCwNE.js +89 -0
  3. package/dist/{arc-yUAZoqJP.js → arc-7ZXqzxve.js} +1 -1
  4. package/dist/{arc-CYi2lpSd.cjs → arc-DBilzVYt.cjs} +1 -1
  5. package/dist/architecture-7GRP2DOG-DYFsLst2.js +3 -0
  6. package/dist/architecture-7GRP2DOG-DdhuGtEz.cjs +1 -0
  7. package/dist/architectureDiagram-5GKGNRK7-B080D0D_.cjs +36 -0
  8. package/dist/{architectureDiagram-3BPJPVTR-CMX2LiQK.js → architectureDiagram-5GKGNRK7-BJvIxhbL.js} +338 -252
  9. package/dist/assets/svg/functions.svg +1 -0
  10. package/dist/basic-components/autocomplete/autocomplete-types.d.ts +2 -1
  11. package/dist/basic-components/autocomplete/autocomplete-types.d.ts.map +1 -1
  12. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  13. package/dist/basic-components/button/button-utils.d.ts.map +1 -1
  14. package/dist/basic-components/button-list/button-list-types.d.ts +2 -1
  15. package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
  16. package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
  17. package/dist/basic-components/cell/cell-types.d.ts +5 -0
  18. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  19. package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
  20. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  21. package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -0
  22. package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
  23. package/dist/basic-components/chips/chips-types.d.ts +15 -1
  24. package/dist/basic-components/chips/chips-types.d.ts.map +1 -1
  25. package/dist/basic-components/chips/chips.d.ts.map +1 -1
  26. package/dist/basic-components/chips-input/chips-input-types.d.ts +5 -0
  27. package/dist/basic-components/chips-input/chips-input-types.d.ts.map +1 -1
  28. package/dist/basic-components/chips-input/chips-input.d.ts.map +1 -1
  29. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts +5 -0
  30. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
  31. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  32. package/dist/basic-components/multiple-select/multiple-select-types.d.ts +5 -0
  33. package/dist/basic-components/multiple-select/multiple-select-types.d.ts.map +1 -1
  34. package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
  35. package/dist/blockDiagram-I7D4REHJ-C5aW9ypR.js +1919 -0
  36. package/dist/blockDiagram-I7D4REHJ-fT7Of27R.cjs +129 -0
  37. package/dist/c4Diagram-7LVT6UL2-B1n5PnN5.cjs +38 -0
  38. package/dist/{c4Diagram-AAUBKEIU-BUOgTWLR.js → c4Diagram-7LVT6UL2-JxFfT5VH.js} +808 -789
  39. package/dist/channel-BvUly9jN.cjs +1 -0
  40. package/dist/{channel-CAhFwf6U.js → channel-D6agWknC.js} +1 -1
  41. package/dist/chunk-2E4U76K2-BiZwNOhf.cjs +1 -0
  42. package/dist/chunk-2E4U76K2-C8vehurw.js +346 -0
  43. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
  44. package/dist/{chunk-QZHKN3VN-cS9OamWo.js → chunk-2Q5K7J3B-kzxEEeTu.js} +2 -2
  45. package/dist/chunk-4HAMMTFA-Db_fcZEn.cjs +62 -0
  46. package/dist/{chunk-3OPIFGDE-BYuWDDGY.js → chunk-4HAMMTFA-MZIwowe1.js} +1665 -1143
  47. package/dist/{chunk-FMBD7UC4-Cia16Ryi.js → chunk-5VM5RSS4-Cr17nBXp.js} +2 -2
  48. package/dist/{chunk-FMBD7UC4-BLLpskYF.cjs → chunk-5VM5RSS4-CwDmQ9T_.cjs} +1 -1
  49. package/dist/{chunk-5ZQYHXKU-BvO58_5C.js → chunk-75Z2AOVW-BwUD389x.js} +56 -55
  50. package/dist/chunk-75Z2AOVW-RbCLc-XL.cjs +2 -0
  51. package/dist/chunk-CLGD4ZFX-DKRy6g5T.js +10 -0
  52. package/dist/chunk-CLGD4ZFX-Dvn-kRD7.cjs +1 -0
  53. package/dist/{chunk-CSCIHK7Q-Drr_NBLR.js → chunk-DU6HZSFF-CNSdkWoH.js} +1584 -621
  54. package/dist/chunk-DU6HZSFF-mznJTFyO.cjs +127 -0
  55. package/dist/chunk-F27PBJKO-C5NrgqMI.cjs +1 -0
  56. package/dist/{chunk-ND2GUHAM-CKQ1Jk8O.js → chunk-F27PBJKO-DKsmevT5.js} +18 -17
  57. package/dist/chunk-FOHPRMQF-BYsnEQU5.cjs +161 -0
  58. package/dist/{chunk-NNHCCRGN-BB1q5NkR.js → chunk-FOHPRMQF-C49KxWOg.js} +5156 -4419
  59. package/dist/chunk-GMAD6QVW-BVSRANO9.cjs +72 -0
  60. package/dist/{chunk-O5CBEL6O-BIU6TcWp.js → chunk-GMAD6QVW-DKxKOKLF.js} +459 -503
  61. package/dist/chunk-GVQU2GXP-BiuaO1L5.cjs +1 -0
  62. package/dist/chunk-GVQU2GXP-w4KY-she.js +37 -0
  63. package/dist/chunk-IMKFNOWR-CusIwu2H.cjs +231 -0
  64. package/dist/{chunk-AQP2D5EJ-Cp3ieoZF.js → chunk-IMKFNOWR-DHxMOe_C.js} +313 -291
  65. package/dist/{chunk-4BX2VUAB-B74FMcxr.js → chunk-JWPE2WC7-Ccb0QaC8.js} +2 -2
  66. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
  67. package/dist/chunk-L3NEJ4N5-B8UQMgqc.cjs +1 -0
  68. package/dist/chunk-L3NEJ4N5-CvNbHpcd.js +245 -0
  69. package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
  70. package/dist/chunk-LNGE3PJU-TgsSSByc.cjs +34 -0
  71. package/dist/{chunk-KSCS5N6A-pd39ksIM.js → chunk-OSK3NFVY-BmtDbEvT.js} +304 -195
  72. package/dist/chunk-OSK3NFVY-DE9_ERt9.cjs +10 -0
  73. package/dist/chunk-P2QGCYS3-DRvvOWJ2.js +67 -0
  74. package/dist/chunk-P2QGCYS3-DqT85Q-S.cjs +1 -0
  75. package/dist/chunk-POPQ4Y6H-CaEkosGL.js +26 -0
  76. package/dist/chunk-POPQ4Y6H-QqO5seyb.cjs +1 -0
  77. package/dist/chunk-PWAF6VOD-CbmhQpgH.js +277 -0
  78. package/dist/chunk-PWAF6VOD-CjrO-QHU.cjs +1 -0
  79. package/dist/{flowDiagram-I6XJVG4X-Dx5d6cgt.js → chunk-SHT3W25Y-DJgD-hyF.js} +581 -538
  80. package/dist/chunk-SHT3W25Y-DuMn9iH6.cjs +168 -0
  81. package/dist/chunk-SVP7TREG-BNwvtyzm.js +490 -0
  82. package/dist/chunk-SVP7TREG-CiwWyOxx.cjs +88 -0
  83. package/dist/chunk-TICWLB2K-1u0p_luB.cjs +206 -0
  84. package/dist/{chunk-727SXJPM-BDsxon3G.js → chunk-TICWLB2K-DqSHwYf9.js} +185 -180
  85. package/dist/chunk-TLUHSLCS-ZDzqyqeY.cjs +1 -0
  86. package/dist/{chunk-LZXEDZCA-oQMllZja.js → chunk-TLUHSLCS-opHh7fd-.js} +35 -25
  87. package/dist/chunk-XXDRQBXY-BF71LTT1.cjs +1 -0
  88. package/dist/chunk-XXDRQBXY-BZK6GgVm.js +9 -0
  89. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
  90. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  91. package/dist/classDiagram-ZZMXUADV-BTRkvFx4.js +30 -0
  92. package/dist/classDiagram-ZZMXUADV-CwAl_N60.cjs +1 -0
  93. package/dist/classDiagram-v2-VYDZK3BY-CFutvfy-.js +30 -0
  94. package/dist/classDiagram-v2-VYDZK3BY-CwAl_N60.cjs +1 -0
  95. package/dist/components/activity-timeline/activity-timeline-types.d.ts +46 -0
  96. package/dist/components/activity-timeline/activity-timeline-types.d.ts.map +1 -0
  97. package/dist/components/activity-timeline/activity-timeline.d.ts +4 -0
  98. package/dist/components/activity-timeline/activity-timeline.d.ts.map +1 -0
  99. package/dist/components/box-list/box-list.d.ts.map +1 -1
  100. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts +12 -0
  101. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts.map +1 -0
  102. package/dist/components/data-table/assets/data-table-row-actions.d.ts +11 -0
  103. package/dist/components/data-table/assets/data-table-row-actions.d.ts.map +1 -0
  104. package/dist/components/data-table/columns/useColumnWidths.d.ts +6 -1
  105. package/dist/components/data-table/columns/useColumnWidths.d.ts.map +1 -1
  106. package/dist/components/data-table/data-table-types.d.ts +108 -4
  107. package/dist/components/data-table/data-table-types.d.ts.map +1 -1
  108. package/dist/components/data-table/data-table.d.ts.map +1 -1
  109. package/dist/components/data-table/header/Header.d.ts.map +1 -1
  110. package/dist/components/data-table/header/header-types.d.ts +14 -4
  111. package/dist/components/data-table/header/header-types.d.ts.map +1 -1
  112. package/dist/components/data-table/sorting/parseDftSort.d.ts +14 -0
  113. package/dist/components/data-table/sorting/parseDftSort.d.ts.map +1 -0
  114. package/dist/components/data-table/sorting/parseDftSort.test.d.ts +2 -0
  115. package/dist/components/data-table/sorting/parseDftSort.test.d.ts.map +1 -0
  116. package/dist/components/data-table/sorting/sortTable-utils.d.ts +8 -9
  117. package/dist/components/data-table/sorting/sortTable-utils.d.ts.map +1 -1
  118. package/dist/components/data-table/sorting/useSortableTable.d.ts +3 -5
  119. package/dist/components/data-table/sorting/useSortableTable.d.ts.map +1 -1
  120. package/dist/components/data-table/state/datatable-state.d.ts +1 -0
  121. package/dist/components/data-table/state/datatable-state.d.ts.map +1 -1
  122. package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
  123. package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
  124. package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
  125. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts +14 -0
  126. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts.map +1 -0
  127. package/dist/components/workflow-designer/workflow-designer-types.d.ts +109 -0
  128. package/dist/components/workflow-designer/workflow-designer-types.d.ts.map +1 -0
  129. package/dist/components/workflow-designer/workflow-designer-utils.d.ts +86 -0
  130. package/dist/components/workflow-designer/workflow-designer-utils.d.ts.map +1 -0
  131. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts +2 -0
  132. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts.map +1 -0
  133. package/dist/components/workflow-designer/workflow-designer.d.ts +15 -0
  134. package/dist/components/workflow-designer/workflow-designer.d.ts.map +1 -0
  135. package/dist/{cose-bilkent-S5V4N54A-DZmA7Nat.js → cose-bilkent-JH36ORCC-CE0T5PqO.js} +23 -23
  136. package/dist/cose-bilkent-JH36ORCC-D6t9R42P.cjs +1 -0
  137. package/dist/cynefin-OW5HDTMX-CsZ3W32G.cjs +1 -0
  138. package/dist/cynefin-OW5HDTMX-DlKRHClQ.js +3 -0
  139. package/dist/cynefinDiagram-5FMLGOSQ-D5vkxB9p.js +349 -0
  140. package/dist/cynefinDiagram-5FMLGOSQ-D95Uad6U.cjs +62 -0
  141. package/dist/{cytoscape.esm-BU21wl3m.js → cytoscape.esm-BQqfb1oS.js} +2260 -2206
  142. package/dist/cytoscape.esm-TdwWzXkE.cjs +321 -0
  143. package/dist/dagre-GXQ25YYZ-CFXgAmuL.js +423 -0
  144. package/dist/dagre-GXQ25YYZ-NS5a_ezX.cjs +4 -0
  145. package/dist/{dagre-B2BBwKNb.cjs → dagre-nX1Mh32P.cjs} +1 -1
  146. package/dist/{dagre-3-RnF0EK.js → dagre-qXSFUdzO.js} +131 -131
  147. package/dist/diagram-S7CK7UJ4-CTj-4VAh.cjs +30 -0
  148. package/dist/diagram-S7CK7UJ4-DrGNegqs.js +301 -0
  149. package/dist/{diagram-2AECGRRQ-BITzWXbn.js → diagram-UQ7AKVKN-LU56O9S9.js} +82 -81
  150. package/dist/diagram-UQ7AKVKN-eskbTWOc.cjs +41 -0
  151. package/dist/{diagram-KO2AKTUF-DwTH3Hoo.js → diagram-VSXAHHWV-CaQnupEx.js} +66 -65
  152. package/dist/diagram-VSXAHHWV-DzHhzg5V.cjs +3 -0
  153. package/dist/diagram-VX7I27RA-D7Ibz__z.cjs +24 -0
  154. package/dist/{diagram-OG6HWLK6-CPzvG6Xi.js → diagram-VX7I27RA-DH-s9daK.js} +105 -104
  155. package/dist/diagram-Z3DM3KII-BpFP72Tr.cjs +24 -0
  156. package/dist/{diagram-LMA3HP47-nYPIM4Uq.js → diagram-Z3DM3KII-DWhRX2l9.js} +21 -20
  157. package/dist/{dist-BEmBi80K.js → dist-C7OpkiTz.js} +2 -3
  158. package/dist/dist-DrOEvFlx.cjs +1 -0
  159. package/dist/ebnfDiagram-PWID7BFC-CtT2erlt.js +100 -0
  160. package/dist/ebnfDiagram-PWID7BFC-DXCy8fra.cjs +1 -0
  161. package/dist/erDiagram-RLTQ6QDP-B-cUtqmN.cjs +99 -0
  162. package/dist/erDiagram-RLTQ6QDP-CxxAoCSs.js +1966 -0
  163. package/dist/eventmodeling-NTZA5JFV-5J5w1INt.js +3 -0
  164. package/dist/eventmodeling-NTZA5JFV-DcUTtbEf.cjs +1 -0
  165. package/dist/flowDiagram-HODETNUW-B6sXxv0S.cjs +1 -0
  166. package/dist/flowDiagram-HODETNUW-BUvMJJnE.js +17 -0
  167. package/dist/functional-components/action-list/action-list-types.d.ts +0 -7
  168. package/dist/functional-components/action-list/action-list-types.d.ts.map +1 -1
  169. package/dist/functional-components/action-list/action-list.d.ts.map +1 -1
  170. package/dist/functional-components/multiple-field/multiple-field-types.d.ts +2 -0
  171. package/dist/functional-components/multiple-field/multiple-field-types.d.ts.map +1 -1
  172. package/dist/functional-components/multiple-field/multiple-field.d.ts.map +1 -1
  173. package/dist/functional-components/row/row-types.d.ts +13 -0
  174. package/dist/functional-components/row/row-types.d.ts.map +1 -1
  175. package/dist/functional-components/row/row.d.ts.map +1 -1
  176. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +3 -1
  177. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
  178. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
  179. package/dist/functional-components/tree-picker/tree-picker-types.d.ts +42 -0
  180. package/dist/functional-components/tree-picker/tree-picker-types.d.ts.map +1 -0
  181. package/dist/functional-components/tree-picker/tree-picker.d.ts +3 -0
  182. package/dist/functional-components/tree-picker/tree-picker.d.ts.map +1 -0
  183. package/dist/ganttDiagram-EL5Y4UJY-Bee0Pd-N.cjs +292 -0
  184. package/dist/{ganttDiagram-6RSMTGT7-CFuwKLrB.js → ganttDiagram-EL5Y4UJY-C04RZW4s.js} +642 -639
  185. package/dist/gitGraph-4MIJSDKK-BCt5iiZ5.js +3 -0
  186. package/dist/gitGraph-4MIJSDKK-BeFVwcRC.cjs +1 -0
  187. package/dist/{gitGraphDiagram-PVQCEYII-B2CaQTP_.js → gitGraphDiagram-WWUBYQGX-BTcuEGsY.js} +146 -145
  188. package/dist/gitGraphDiagram-WWUBYQGX-DA026nbS.cjs +106 -0
  189. package/dist/index.d.ts +6 -6
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/info-A6RAGUB7-C0KA0jej.cjs +1 -0
  192. package/dist/info-A6RAGUB7-DYBvudiC.js +3 -0
  193. package/dist/infoDiagram-27XIBGKW-B5nTXQEj.cjs +2 -0
  194. package/dist/infoDiagram-27XIBGKW-BoUOV42E.js +20 -0
  195. package/dist/{ishikawaDiagram-YF4QCWOH-CfOvUIo-.js → ishikawaDiagram-5VMMS53U-D15Hi9wp.js} +134 -133
  196. package/dist/{ishikawaDiagram-YF4QCWOH-CSRSkgHx.cjs → ishikawaDiagram-5VMMS53U-ptk0d5z2.cjs} +6 -6
  197. package/dist/{journeyDiagram-JHISSGLW-BMECXtd1.js → journeyDiagram-3NMN7TZE-BUb4frTN.js} +181 -180
  198. package/dist/{journeyDiagram-JHISSGLW-P42eSNEh.cjs → journeyDiagram-3NMN7TZE-CxVpPKa-.cjs} +8 -8
  199. package/dist/kanban-definition-UXKFOSKX-Cd_nphr7.cjs +89 -0
  200. package/dist/{kanban-definition-UN3LZRKU-DCzfGTs4.js → kanban-definition-UXKFOSKX-DkgBC20j.js} +141 -138
  201. package/dist/katex-DUe6VLjC.cjs +257 -0
  202. package/dist/{katex-D-2KeLwt.js → katex-Dyoqg6Cv.js} +1562 -1600
  203. package/dist/ketchup2.cjs.js +405 -101
  204. package/dist/ketchup2.css +1 -1
  205. package/dist/ketchup2.es.js +151183 -119083
  206. package/dist/{line-0G6sJTVA.js → line-BEo8vh4N.js} +1 -1
  207. package/dist/{line-CLmmMPn2.cjs → line-wiGgVVGi.cjs} +1 -1
  208. package/dist/{linear-BNWgac81.js → linear-BNesvT28.js} +1 -1
  209. package/dist/{linear-yBssgUAc.cjs → linear-YA14Lx5Z.cjs} +1 -1
  210. package/dist/locale/en/translation.json.d.ts +23 -0
  211. package/dist/locale/it/translation.json.d.ts +24 -1
  212. package/dist/mermaid-parser.core-CqChDTj1.cjs +6 -0
  213. package/dist/mermaid-parser.core-oFB-qEU8.js +638 -0
  214. package/dist/{mindmap-definition-RKZ34NQL-DbK4qO1Z.cjs → mindmap-definition-YA3MSWOX-0PG4raFG.cjs} +11 -11
  215. package/dist/{mindmap-definition-RKZ34NQL-DpX8ksst.js → mindmap-definition-YA3MSWOX-Cjs12XgD.js} +156 -154
  216. package/dist/packet-AYTQ26CC-BEwXWBE0.js +3 -0
  217. package/dist/packet-AYTQ26CC-DfXUrk97.cjs +1 -0
  218. package/dist/pegDiagram-XKGWAZYB-BuyVzOiH.js +94 -0
  219. package/dist/pegDiagram-XKGWAZYB-J7VwZsJf.cjs +1 -0
  220. package/dist/pie-WAS4IAKB-4NfHFfJd.cjs +1 -0
  221. package/dist/pie-WAS4IAKB-BOR5Wwai.js +3 -0
  222. package/dist/pieDiagram-E7YTZNPT-B-rPB0ZO.cjs +39 -0
  223. package/dist/pieDiagram-E7YTZNPT-D4bB4TDP.js +205 -0
  224. package/dist/{quadrantDiagram-W4KKPZXB-Bgw66PrU.js → quadrantDiagram-AXDQQJYC-B6Q9biU9.js} +293 -293
  225. package/dist/quadrantDiagram-AXDQQJYC-C5sdY1DW.cjs +7 -0
  226. package/dist/radar-RG4KPBEZ-BwLQFFzF.js +3 -0
  227. package/dist/radar-RG4KPBEZ-_epvvHKu.cjs +1 -0
  228. package/dist/railroad-74A4TZTK-CaWzRQE0.js +3 -0
  229. package/dist/railroad-74A4TZTK-D2qbdjOh.cjs +1 -0
  230. package/dist/railroad-abnf-HS5TGJTU-D2tm1mra.js +3 -0
  231. package/dist/railroad-abnf-HS5TGJTU-_ThxftPt.cjs +1 -0
  232. package/dist/railroad-ebnf-LZEXJU2U-CKpMMgXK.cjs +1 -0
  233. package/dist/railroad-ebnf-LZEXJU2U-KAuGgmQe.js +3 -0
  234. package/dist/railroad-peg-WCYAUIDC-B8bfIIor.cjs +1 -0
  235. package/dist/railroad-peg-WCYAUIDC-XB38GivH.js +3 -0
  236. package/dist/railroadDiagram-O6MQD6OU-C7LfgSGm.cjs +1 -0
  237. package/dist/railroadDiagram-O6MQD6OU-DFR4_PxB.js +76 -0
  238. package/dist/{requirementDiagram-4Y6WPE33-BzNEhq-x.js → requirementDiagram-BXWQKSXE-BfWCCTu8.js} +169 -166
  239. package/dist/requirementDiagram-BXWQKSXE-y2O3wvFe.cjs +84 -0
  240. package/dist/{sankeyDiagram-5OEKKPKP-06MsaQmt.js → sankeyDiagram-P5KCCOFB-B_3NESVW.js} +109 -108
  241. package/dist/sankeyDiagram-P5KCCOFB-z8VLw23o.cjs +40 -0
  242. package/dist/sequenceDiagram-WJ2MYXX4-3cWo24Xv.cjs +162 -0
  243. package/dist/{sequenceDiagram-3UESZ5HK-QEaDF4MY.js → sequenceDiagram-WJ2MYXX4-B8W9PUBb.js} +692 -688
  244. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  245. package/dist/sizeCapture-INFHLROL-bJ2ZX4Du.cjs +1 -0
  246. package/dist/src-B16ML7oM.cjs +1 -0
  247. package/dist/{src-GDFuItmC.js → src-D-6ZfKf9.js} +587 -579
  248. package/dist/stateDiagram-D77RDMKH-DghYG1f5.cjs +1 -0
  249. package/dist/stateDiagram-D77RDMKH-IwptGFzp.js +220 -0
  250. package/dist/stateDiagram-v2-MP3YSRHH-0rNAzd4v.cjs +1 -0
  251. package/dist/stateDiagram-v2-MP3YSRHH-NATCGJSV.js +30 -0
  252. package/dist/swimlanes-42K2YHIH-jhIjSCsq.js +4976 -0
  253. package/dist/swimlanes-42K2YHIH-svHo0tVy.cjs +1 -0
  254. package/dist/swimlanesDiagram-VR7AAH4N-DKxpX9Hj.js +31 -0
  255. package/dist/swimlanesDiagram-VR7AAH4N-DcDLe-u-.cjs +8 -0
  256. package/dist/{timeline-definition-PNZ67QCA-DoD4D5kw.js → timeline-definition-24CTP7MA-C6u6A92C.js} +212 -211
  257. package/dist/timeline-definition-24CTP7MA-CA62jwSB.cjs +120 -0
  258. package/dist/treeView-Q6P3EWNA-CkgGYPwy.js +3 -0
  259. package/dist/treeView-Q6P3EWNA-zIJfTe51.cjs +1 -0
  260. package/dist/treemap-WGGIJYW6-CooEnQQp.cjs +1 -0
  261. package/dist/treemap-WGGIJYW6-D4tTzsvR.js +3 -0
  262. package/dist/types/data-structures.d.ts +0 -1
  263. package/dist/types/data-structures.d.ts.map +1 -1
  264. package/dist/types/global.d.ts +1 -1
  265. package/dist/types/global.d.ts.map +1 -1
  266. package/dist/types/translation.d.ts +24 -1
  267. package/dist/types/translation.d.ts.map +1 -1
  268. package/dist/utils/data-structures.d.ts +2 -1
  269. package/dist/utils/data-structures.d.ts.map +1 -1
  270. package/dist/{vennDiagram-CIIHVFJN-Du1h-z8K.js → vennDiagram-4TSXK5OY-Bt9cyeRX.js} +324 -302
  271. package/dist/vennDiagram-4TSXK5OY-YKU1Lb_h.cjs +34 -0
  272. package/dist/wardley-WFR3VGLG-Cp2KFpcw.cjs +1 -0
  273. package/dist/wardley-WFR3VGLG-D1o3hFSK.js +3 -0
  274. package/dist/wardleyDiagram-VM6X3IG4-BvyabMK8.cjs +78 -0
  275. package/dist/{wardleyDiagram-YWT4CUSO-CjOm3Xnp.js → wardleyDiagram-VM6X3IG4-QkNx10Ny.js} +144 -143
  276. package/dist/{xychartDiagram-2RQKCTM6-D0hXWFFN.js → xychartDiagram-S5SC5T6Z-BSwoR01A.js} +729 -559
  277. package/dist/xychartDiagram-S5SC5T6Z-BtNTzcXw.cjs +7 -0
  278. package/package.json +6 -2
  279. package/dist/architecture-7EHR7CIX-Bzeobe9Y.cjs +0 -1
  280. package/dist/architecture-7EHR7CIX-C8NPmR2w.js +0 -3
  281. package/dist/architectureDiagram-3BPJPVTR-C8DI7_Rn.cjs +0 -36
  282. package/dist/assets/shapeListAssets.d.ts +0 -22
  283. package/dist/assets/shapeListAssets.d.ts.map +0 -1
  284. package/dist/basic-components/card/card-slot-resolver.d.ts +0 -6
  285. package/dist/basic-components/card/card-slot-resolver.d.ts.map +0 -1
  286. package/dist/basic-components/card/card-types.d.ts +0 -43
  287. package/dist/basic-components/card/card-types.d.ts.map +0 -1
  288. package/dist/basic-components/card/card.d.ts +0 -5
  289. package/dist/basic-components/card/card.d.ts.map +0 -1
  290. package/dist/basic-components/card/flow/aside/index.d.ts +0 -2
  291. package/dist/basic-components/card/flow/aside/index.d.ts.map +0 -1
  292. package/dist/basic-components/card/flow/compact/index.d.ts +0 -2
  293. package/dist/basic-components/card/flow/compact/index.d.ts.map +0 -1
  294. package/dist/basic-components/card/flow/editorial/index.d.ts +0 -2
  295. package/dist/basic-components/card/flow/editorial/index.d.ts.map +0 -1
  296. package/dist/basic-components/card/flow/minimal/index.d.ts +0 -2
  297. package/dist/basic-components/card/flow/minimal/index.d.ts.map +0 -1
  298. package/dist/basic-components/card/flow/overlay/index.d.ts +0 -2
  299. package/dist/basic-components/card/flow/overlay/index.d.ts.map +0 -1
  300. package/dist/basic-components/card/flow/shared/flow-layout.d.ts +0 -4
  301. package/dist/basic-components/card/flow/shared/flow-layout.d.ts.map +0 -1
  302. package/dist/basic-components/card/flow/split/index.d.ts +0 -2
  303. package/dist/basic-components/card/flow/split/index.d.ts.map +0 -1
  304. package/dist/basic-components/card/flow/spotlight/index.d.ts +0 -2
  305. package/dist/basic-components/card/flow/spotlight/index.d.ts.map +0 -1
  306. package/dist/basic-components/card/flow/tiles/index.d.ts +0 -2
  307. package/dist/basic-components/card/flow/tiles/index.d.ts.map +0 -1
  308. package/dist/basic-components/card/layout-registry.d.ts +0 -4
  309. package/dist/basic-components/card/layout-registry.d.ts.map +0 -1
  310. package/dist/basic-components/card/positional/collaborator/index.d.ts +0 -4
  311. package/dist/basic-components/card/positional/collaborator/index.d.ts.map +0 -1
  312. package/dist/basic-components/card/positional/detailed-object/index.d.ts +0 -5
  313. package/dist/basic-components/card/positional/detailed-object/index.d.ts.map +0 -1
  314. package/dist/basic-components/card/positional/financial/index.d.ts +0 -4
  315. package/dist/basic-components/card/positional/financial/index.d.ts.map +0 -1
  316. package/dist/basic-components/card/positional/folder-grid/index.d.ts +0 -4
  317. package/dist/basic-components/card/positional/folder-grid/index.d.ts.map +0 -1
  318. package/dist/basic-components/card/positional/hero/index.d.ts +0 -4
  319. package/dist/basic-components/card/positional/hero/index.d.ts.map +0 -1
  320. package/dist/basic-components/card/positional/product/index.d.ts +0 -4
  321. package/dist/basic-components/card/positional/product/index.d.ts.map +0 -1
  322. package/dist/basic-components/card/positional/shared/object-card.d.ts +0 -24
  323. package/dist/basic-components/card/positional/shared/object-card.d.ts.map +0 -1
  324. package/dist/basic-components/card/positional/shared/utils.d.ts +0 -26
  325. package/dist/basic-components/card/positional/shared/utils.d.ts.map +0 -1
  326. package/dist/basic-components/card/positional/simple-object/index.d.ts +0 -5
  327. package/dist/basic-components/card/positional/simple-object/index.d.ts.map +0 -1
  328. package/dist/basic-components/card/positional/tooltip/index.d.ts +0 -4
  329. package/dist/basic-components/card/positional/tooltip/index.d.ts.map +0 -1
  330. package/dist/basic-components/card/positional/trend/index.d.ts +0 -4
  331. package/dist/basic-components/card/positional/trend/index.d.ts.map +0 -1
  332. package/dist/blockDiagram-GPEHLZMM-C7mogpj_.cjs +0 -132
  333. package/dist/blockDiagram-GPEHLZMM-fcAaH_Ka.js +0 -3157
  334. package/dist/c4Diagram-AAUBKEIU-BjsHAdap.cjs +0 -10
  335. package/dist/cell-NyD4Bcyq.js +0 -6457
  336. package/dist/cell-dpOG-xr_.cjs +0 -6
  337. package/dist/channel-BzP1tmYc.cjs +0 -1
  338. package/dist/chunk-2J33WTMH-BulZYTKs.js +0 -25
  339. package/dist/chunk-2J33WTMH-DIfvCbWZ.cjs +0 -1
  340. package/dist/chunk-3OPIFGDE-Ohf7vgmX.cjs +0 -62
  341. package/dist/chunk-4BX2VUAB-DdliHvKq.cjs +0 -1
  342. package/dist/chunk-55IACEB6-D5PlvtBC.js +0 -8
  343. package/dist/chunk-55IACEB6-DzCdT-ru.cjs +0 -1
  344. package/dist/chunk-5ZQYHXKU-35HHGVyc.cjs +0 -2
  345. package/dist/chunk-727SXJPM-BCv3AEZb.cjs +0 -206
  346. package/dist/chunk-AQP2D5EJ-CPbTYzEZ.cjs +0 -231
  347. package/dist/chunk-BSJP7CBP-BjkTjHJ6.js +0 -82
  348. package/dist/chunk-BSJP7CBP-DtjFXF0S.cjs +0 -1
  349. package/dist/chunk-CSCIHK7Q-WWTYrQLt.cjs +0 -122
  350. package/dist/chunk-Dqa2HsxW.js +0 -20
  351. package/dist/chunk-KSCS5N6A-DSWnBtbV.cjs +0 -10
  352. package/dist/chunk-L5ZTLDWV-DXk-PQPS.js +0 -32
  353. package/dist/chunk-L5ZTLDWV-sRcGREMv.cjs +0 -1
  354. package/dist/chunk-LZXEDZCA-4kbGESh2.cjs +0 -1
  355. package/dist/chunk-ND2GUHAM-See9KDdJ.cjs +0 -1
  356. package/dist/chunk-NNHCCRGN-qV8bfiMQ.cjs +0 -159
  357. package/dist/chunk-NZK2D7GU-CqugOMaJ.js +0 -67
  358. package/dist/chunk-NZK2D7GU-FNVK0iHI.cjs +0 -1
  359. package/dist/chunk-O5CBEL6O-BU_i0jbb.cjs +0 -70
  360. package/dist/chunk-QZHKN3VN-DPdobKra.cjs +0 -1
  361. package/dist/chunk-WU5MYG2G-BL6T82Hi.js +0 -9
  362. package/dist/chunk-WU5MYG2G-qi7ZaL3o.cjs +0 -1
  363. package/dist/chunk-XPW4576I-B9aC8EBY.js +0 -1146
  364. package/dist/chunk-XPW4576I-Dsm0jctf.cjs +0 -32
  365. package/dist/chunk-mLOUI7ql.cjs +0 -1
  366. package/dist/classDiagram-4FO5ZUOK-Dc-Jypl3.js +0 -29
  367. package/dist/classDiagram-4FO5ZUOK-Dqxk6PU-.cjs +0 -1
  368. package/dist/classDiagram-v2-Q7XG4LA2-DZ44tKmY.js +0 -29
  369. package/dist/classDiagram-v2-Q7XG4LA2-Dqxk6PU-.cjs +0 -1
  370. package/dist/components/shape-list/components/error-boundary.d.ts +0 -16
  371. package/dist/components/shape-list/components/error-boundary.d.ts.map +0 -1
  372. package/dist/components/shape-list/components/shape-list-drill-down.d.ts +0 -4
  373. package/dist/components/shape-list/components/shape-list-drill-down.d.ts.map +0 -1
  374. package/dist/components/shape-list/components/toolbar/command-panel.d.ts +0 -15
  375. package/dist/components/shape-list/components/toolbar/command-panel.d.ts.map +0 -1
  376. package/dist/components/shape-list/components/toolbar/command-trigger.d.ts +0 -16
  377. package/dist/components/shape-list/components/toolbar/command-trigger.d.ts.map +0 -1
  378. package/dist/components/shape-list/components/toolbar/filter-picker.d.ts +0 -14
  379. package/dist/components/shape-list/components/toolbar/filter-picker.d.ts.map +0 -1
  380. package/dist/components/shape-list/components/toolbar/json-viewer.d.ts +0 -11
  381. package/dist/components/shape-list/components/toolbar/json-viewer.d.ts.map +0 -1
  382. package/dist/components/shape-list/components/toolbar/navigation-picker.d.ts +0 -15
  383. package/dist/components/shape-list/components/toolbar/navigation-picker.d.ts.map +0 -1
  384. package/dist/components/shape-list/components/toolbar/sort-picker.d.ts +0 -14
  385. package/dist/components/shape-list/components/toolbar/sort-picker.d.ts.map +0 -1
  386. package/dist/components/shape-list/context/shape-list-context.d.ts +0 -31
  387. package/dist/components/shape-list/context/shape-list-context.d.ts.map +0 -1
  388. package/dist/components/shape-list/context/shape-list-filter-context.d.ts +0 -9
  389. package/dist/components/shape-list/context/shape-list-filter-context.d.ts.map +0 -1
  390. package/dist/components/shape-list/context/shape-list-sort-context.d.ts +0 -9
  391. package/dist/components/shape-list/context/shape-list-sort-context.d.ts.map +0 -1
  392. package/dist/components/shape-list/context/shape-list-state-context.d.ts +0 -5
  393. package/dist/components/shape-list/context/shape-list-state-context.d.ts.map +0 -1
  394. package/dist/components/shape-list/hooks/useCommandPickers.d.ts +0 -13
  395. package/dist/components/shape-list/hooks/useCommandPickers.d.ts.map +0 -1
  396. package/dist/components/shape-list/hooks/useLazyShapeData.d.ts +0 -35
  397. package/dist/components/shape-list/hooks/useLazyShapeData.d.ts.map +0 -1
  398. package/dist/components/shape-list/hooks/useLazyShapeData.test.d.ts +0 -2
  399. package/dist/components/shape-list/hooks/useLazyShapeData.test.d.ts.map +0 -1
  400. package/dist/components/shape-list/hooks/useNavigation.d.ts +0 -16
  401. package/dist/components/shape-list/hooks/useNavigation.d.ts.map +0 -1
  402. package/dist/components/shape-list/hooks/useSelection.d.ts +0 -34
  403. package/dist/components/shape-list/hooks/useSelection.d.ts.map +0 -1
  404. package/dist/components/shape-list/hooks/useStripOverflow.d.ts +0 -17
  405. package/dist/components/shape-list/hooks/useStripOverflow.d.ts.map +0 -1
  406. package/dist/components/shape-list/items/node-content.d.ts +0 -47
  407. package/dist/components/shape-list/items/node-content.d.ts.map +0 -1
  408. package/dist/components/shape-list/items/shape.d.ts +0 -20
  409. package/dist/components/shape-list/items/shape.d.ts.map +0 -1
  410. package/dist/components/shape-list/navigation-modes/_shared/navigation-orchestrator.d.ts +0 -13
  411. package/dist/components/shape-list/navigation-modes/_shared/navigation-orchestrator.d.ts.map +0 -1
  412. package/dist/components/shape-list/navigation-modes/_shared/panel/context-menu.d.ts +0 -4
  413. package/dist/components/shape-list/navigation-modes/_shared/panel/context-menu.d.ts.map +0 -1
  414. package/dist/components/shape-list/navigation-modes/_shared/panel/index.d.ts +0 -7
  415. package/dist/components/shape-list/navigation-modes/_shared/panel/index.d.ts.map +0 -1
  416. package/dist/components/shape-list/navigation-modes/_shared/panel/item-content.d.ts +0 -11
  417. package/dist/components/shape-list/navigation-modes/_shared/panel/item-content.d.ts.map +0 -1
  418. package/dist/components/shape-list/navigation-modes/_shared/panel/panel.d.ts +0 -18
  419. package/dist/components/shape-list/navigation-modes/_shared/panel/panel.d.ts.map +0 -1
  420. package/dist/components/shape-list/navigation-modes/_shared/panel/rail-item.d.ts +0 -8
  421. package/dist/components/shape-list/navigation-modes/_shared/panel/rail-item.d.ts.map +0 -1
  422. package/dist/components/shape-list/navigation-modes/_shared/panel/section-view.d.ts +0 -6
  423. package/dist/components/shape-list/navigation-modes/_shared/panel/section-view.d.ts.map +0 -1
  424. package/dist/components/shape-list/navigation-modes/_shared/panel/shell.d.ts +0 -13
  425. package/dist/components/shape-list/navigation-modes/_shared/panel/shell.d.ts.map +0 -1
  426. package/dist/components/shape-list/navigation-modes/_shared/panel/tree-item.d.ts +0 -9
  427. package/dist/components/shape-list/navigation-modes/_shared/panel/tree-item.d.ts.map +0 -1
  428. package/dist/components/shape-list/navigation-modes/_shared/strip/index.d.ts +0 -4
  429. package/dist/components/shape-list/navigation-modes/_shared/strip/index.d.ts.map +0 -1
  430. package/dist/components/shape-list/navigation-modes/_shared/strip/strip-child-popup.d.ts +0 -5
  431. package/dist/components/shape-list/navigation-modes/_shared/strip/strip-child-popup.d.ts.map +0 -1
  432. package/dist/components/shape-list/navigation-modes/_shared/strip/strip-item.d.ts +0 -5
  433. package/dist/components/shape-list/navigation-modes/_shared/strip/strip-item.d.ts.map +0 -1
  434. package/dist/components/shape-list/navigation-modes/_shared/strip/strip-overflow-button.d.ts +0 -5
  435. package/dist/components/shape-list/navigation-modes/_shared/strip/strip-overflow-button.d.ts.map +0 -1
  436. package/dist/components/shape-list/navigation-modes/catalog/index.d.ts +0 -3
  437. package/dist/components/shape-list/navigation-modes/catalog/index.d.ts.map +0 -1
  438. package/dist/components/shape-list/navigation-modes/catalog/shape-list-catalog.d.ts +0 -5
  439. package/dist/components/shape-list/navigation-modes/catalog/shape-list-catalog.d.ts.map +0 -1
  440. package/dist/components/shape-list/navigation-modes/compact/index.d.ts +0 -3
  441. package/dist/components/shape-list/navigation-modes/compact/index.d.ts.map +0 -1
  442. package/dist/components/shape-list/navigation-modes/compact/shape-list-compact.d.ts +0 -5
  443. package/dist/components/shape-list/navigation-modes/compact/shape-list-compact.d.ts.map +0 -1
  444. package/dist/components/shape-list/navigation-modes/explorer/index.d.ts +0 -4
  445. package/dist/components/shape-list/navigation-modes/explorer/index.d.ts.map +0 -1
  446. package/dist/components/shape-list/navigation-modes/explorer/shape-list-explorer.d.ts +0 -5
  447. package/dist/components/shape-list/navigation-modes/explorer/shape-list-explorer.d.ts.map +0 -1
  448. package/dist/components/shape-list/navigation-modes/explorer/shape-list-tree.d.ts +0 -5
  449. package/dist/components/shape-list/navigation-modes/explorer/shape-list-tree.d.ts.map +0 -1
  450. package/dist/components/shape-list/navigation-modes/h-strip/index.d.ts +0 -3
  451. package/dist/components/shape-list/navigation-modes/h-strip/index.d.ts.map +0 -1
  452. package/dist/components/shape-list/navigation-modes/h-strip/shape-list-h-strip.d.ts +0 -5
  453. package/dist/components/shape-list/navigation-modes/h-strip/shape-list-h-strip.d.ts.map +0 -1
  454. package/dist/components/shape-list/navigation-modes/modal/index.d.ts +0 -3
  455. package/dist/components/shape-list/navigation-modes/modal/index.d.ts.map +0 -1
  456. package/dist/components/shape-list/navigation-modes/modal/shape-list-modal.d.ts +0 -5
  457. package/dist/components/shape-list/navigation-modes/modal/shape-list-modal.d.ts.map +0 -1
  458. package/dist/components/shape-list/navigation-modes/rail/index.d.ts +0 -3
  459. package/dist/components/shape-list/navigation-modes/rail/index.d.ts.map +0 -1
  460. package/dist/components/shape-list/navigation-modes/rail/shape-list-rail.d.ts +0 -11
  461. package/dist/components/shape-list/navigation-modes/rail/shape-list-rail.d.ts.map +0 -1
  462. package/dist/components/shape-list/navigation-modes/sidebar/index.d.ts +0 -3
  463. package/dist/components/shape-list/navigation-modes/sidebar/index.d.ts.map +0 -1
  464. package/dist/components/shape-list/navigation-modes/sidebar/shape-list-sidebar.d.ts +0 -11
  465. package/dist/components/shape-list/navigation-modes/sidebar/shape-list-sidebar.d.ts.map +0 -1
  466. package/dist/components/shape-list/navigation-modes/slideshow/index.d.ts +0 -3
  467. package/dist/components/shape-list/navigation-modes/slideshow/index.d.ts.map +0 -1
  468. package/dist/components/shape-list/navigation-modes/slideshow/shape-list-slideshow.d.ts +0 -5
  469. package/dist/components/shape-list/navigation-modes/slideshow/shape-list-slideshow.d.ts.map +0 -1
  470. package/dist/components/shape-list/navigation-modes/v-strip/index.d.ts +0 -3
  471. package/dist/components/shape-list/navigation-modes/v-strip/index.d.ts.map +0 -1
  472. package/dist/components/shape-list/navigation-modes/v-strip/shape-list-v-strip.d.ts +0 -5
  473. package/dist/components/shape-list/navigation-modes/v-strip/shape-list-v-strip.d.ts.map +0 -1
  474. package/dist/components/shape-list/navigation-modes/workspace/index.d.ts +0 -3
  475. package/dist/components/shape-list/navigation-modes/workspace/index.d.ts.map +0 -1
  476. package/dist/components/shape-list/navigation-modes/workspace/shape-list-workspace.d.ts +0 -11
  477. package/dist/components/shape-list/navigation-modes/workspace/shape-list-workspace.d.ts.map +0 -1
  478. package/dist/components/shape-list/shape-list.d.ts +0 -5
  479. package/dist/components/shape-list/shape-list.d.ts.map +0 -1
  480. package/dist/components/shape-list/slots/renderers/brand.d.ts +0 -6
  481. package/dist/components/shape-list/slots/renderers/brand.d.ts.map +0 -1
  482. package/dist/components/shape-list/slots/renderers/cta.d.ts +0 -9
  483. package/dist/components/shape-list/slots/renderers/cta.d.ts.map +0 -1
  484. package/dist/components/shape-list/slots/renderers/icon.d.ts +0 -11
  485. package/dist/components/shape-list/slots/renderers/icon.d.ts.map +0 -1
  486. package/dist/components/shape-list/slots/renderers/section-header.d.ts +0 -7
  487. package/dist/components/shape-list/slots/renderers/section-header.d.ts.map +0 -1
  488. package/dist/components/shape-list/slots/renderers/shape-cell.d.ts +0 -9
  489. package/dist/components/shape-list/slots/renderers/shape-cell.d.ts.map +0 -1
  490. package/dist/components/shape-list/slots/slot-config.d.ts +0 -7
  491. package/dist/components/shape-list/slots/slot-config.d.ts.map +0 -1
  492. package/dist/components/shape-list/slots/slot-model.d.ts +0 -6
  493. package/dist/components/shape-list/slots/slot-model.d.ts.map +0 -1
  494. package/dist/components/shape-list/slots/slot-node.d.ts +0 -9
  495. package/dist/components/shape-list/slots/slot-node.d.ts.map +0 -1
  496. package/dist/components/shape-list/slots/slot-render-utils.d.ts +0 -11
  497. package/dist/components/shape-list/slots/slot-render-utils.d.ts.map +0 -1
  498. package/dist/components/shape-list/slots/slot-types.d.ts +0 -151
  499. package/dist/components/shape-list/slots/slot-types.d.ts.map +0 -1
  500. package/dist/components/shape-list/slots/test/slot-model.test.d.ts +0 -2
  501. package/dist/components/shape-list/slots/test/slot-model.test.d.ts.map +0 -1
  502. package/dist/components/shape-list/types/shape-list-types.d.ts +0 -181
  503. package/dist/components/shape-list/types/shape-list-types.d.ts.map +0 -1
  504. package/dist/components/shape-list/utils/column-utils.d.ts +0 -9
  505. package/dist/components/shape-list/utils/column-utils.d.ts.map +0 -1
  506. package/dist/components/shape-list/utils/debug-utils.d.ts +0 -13
  507. package/dist/components/shape-list/utils/debug-utils.d.ts.map +0 -1
  508. package/dist/components/shape-list/utils/filter-utils.d.ts +0 -12
  509. package/dist/components/shape-list/utils/filter-utils.d.ts.map +0 -1
  510. package/dist/components/shape-list/utils/keyboard-utils.d.ts +0 -12
  511. package/dist/components/shape-list/utils/keyboard-utils.d.ts.map +0 -1
  512. package/dist/components/shape-list/utils/navigation-options.d.ts +0 -30
  513. package/dist/components/shape-list/utils/navigation-options.d.ts.map +0 -1
  514. package/dist/components/shape-list/utils/node-utils.d.ts +0 -12
  515. package/dist/components/shape-list/utils/node-utils.d.ts.map +0 -1
  516. package/dist/components/shape-list/utils/sort-utils.d.ts +0 -13
  517. package/dist/components/shape-list/utils/sort-utils.d.ts.map +0 -1
  518. package/dist/components/shape-list/utils/typeahead-utils.d.ts +0 -28
  519. package/dist/components/shape-list/utils/typeahead-utils.d.ts.map +0 -1
  520. package/dist/cose-bilkent-S5V4N54A-BxQyjZqX.cjs +0 -1
  521. package/dist/cytoscape.esm-CElDUMAx.cjs +0 -321
  522. package/dist/dagre-BM42HDAG-DwRqEen8.js +0 -297
  523. package/dist/dagre-BM42HDAG-E2Jw6uLH.cjs +0 -4
  524. package/dist/diagram-2AECGRRQ-BkwGTiAT.cjs +0 -43
  525. package/dist/diagram-5GNKFQAL-CvMOQgoH.cjs +0 -10
  526. package/dist/diagram-5GNKFQAL-bsRwDc-2.js +0 -101
  527. package/dist/diagram-KO2AKTUF-DKGDs9Ax.cjs +0 -3
  528. package/dist/diagram-LMA3HP47-BojSLu6w.cjs +0 -24
  529. package/dist/diagram-OG6HWLK6-bHqMXqif.cjs +0 -24
  530. package/dist/dist-Dwq87x4R.cjs +0 -1
  531. package/dist/erDiagram-TEJ5UH35-BxeM1F9k.js +0 -1700
  532. package/dist/erDiagram-TEJ5UH35-CqUBZsAh.cjs +0 -85
  533. package/dist/eventmodeling-FCH6USID-Cued7Lz2.cjs +0 -1
  534. package/dist/eventmodeling-FCH6USID-mCB8hc7X.js +0 -3
  535. package/dist/flowDiagram-I6XJVG4X-DsjMn89E.cjs +0 -162
  536. package/dist/functional-components/shape/index.d.ts +0 -9
  537. package/dist/functional-components/shape/index.d.ts.map +0 -1
  538. package/dist/functional-components/shape/shape-map.d.ts +0 -3
  539. package/dist/functional-components/shape/shape-map.d.ts.map +0 -1
  540. package/dist/functional-components/shape/shape-registry.d.ts +0 -25
  541. package/dist/functional-components/shape/shape-registry.d.ts.map +0 -1
  542. package/dist/functional-components/shape/shape-resolver.d.ts +0 -61
  543. package/dist/functional-components/shape/shape-resolver.d.ts.map +0 -1
  544. package/dist/functional-components/shape/shape-types.d.ts +0 -55
  545. package/dist/functional-components/shape/shape-types.d.ts.map +0 -1
  546. package/dist/functional-components/shape/shape.d.ts +0 -5
  547. package/dist/functional-components/shape/shape.d.ts.map +0 -1
  548. package/dist/functional-components/shape/slot-resolver.d.ts +0 -24
  549. package/dist/functional-components/shape/slot-resolver.d.ts.map +0 -1
  550. package/dist/functional-components/shape/slot-types.d.ts +0 -27
  551. package/dist/functional-components/shape/slot-types.d.ts.map +0 -1
  552. package/dist/functional-components/shape/useSlotResolver.d.ts +0 -13
  553. package/dist/functional-components/shape/useSlotResolver.d.ts.map +0 -1
  554. package/dist/ganttDiagram-6RSMTGT7-CG_knKFc.cjs +0 -292
  555. package/dist/gitGraph-WXDBUCRP-B23gOjfP.js +0 -3
  556. package/dist/gitGraph-WXDBUCRP-Bi-Y5dA7.cjs +0 -1
  557. package/dist/gitGraphDiagram-PVQCEYII-B-VOfNjd.cjs +0 -106
  558. package/dist/info-J43DQDTF-DC3N8SoX.js +0 -3
  559. package/dist/info-J43DQDTF-jRjlWVKj.cjs +0 -1
  560. package/dist/infoDiagram-5YYISTIA-22jaR465.cjs +0 -2
  561. package/dist/infoDiagram-5YYISTIA-CM-al6Jc.js +0 -19
  562. package/dist/jsx-runtime-DCATrIRp.js +0 -183
  563. package/dist/jsx-runtime-DtVwqYNW.cjs +0 -6
  564. package/dist/kanban-definition-UN3LZRKU-DplPe2EX.cjs +0 -89
  565. package/dist/katex-CkiTumqg.cjs +0 -257
  566. package/dist/mermaid-parser.core-ADyJ_PY4.cjs +0 -3
  567. package/dist/mermaid-parser.core-D6xVjl2t.js +0 -373
  568. package/dist/packet-YPE3B663-CGZxZ1Z0.cjs +0 -1
  569. package/dist/packet-YPE3B663-D2JW2EUF.js +0 -3
  570. package/dist/pie-LRSECV5Y-BHyd33ZA.js +0 -3
  571. package/dist/pie-LRSECV5Y-Ca_qbHEv.cjs +0 -1
  572. package/dist/pieDiagram-4H26LBE5-CCgLxjTB.js +0 -165
  573. package/dist/pieDiagram-4H26LBE5-DAhjc9WT.cjs +0 -30
  574. package/dist/purify.es-9OKVhuci.js +0 -735
  575. package/dist/purify.es-hdXGOu6N.cjs +0 -3
  576. package/dist/quadrantDiagram-W4KKPZXB-BBEQhVJy.cjs +0 -7
  577. package/dist/radar-GUYGQ44K-BpJWFTCm.js +0 -3
  578. package/dist/radar-GUYGQ44K-CYqWSxO_.cjs +0 -1
  579. package/dist/requirementDiagram-4Y6WPE33-L_lL0BcB.cjs +0 -84
  580. package/dist/sankeyDiagram-5OEKKPKP-Dy9K3F81.cjs +0 -40
  581. package/dist/sequenceDiagram-3UESZ5HK-C69YSjBM.cjs +0 -162
  582. package/dist/src-CFBvxm_0.cjs +0 -1
  583. package/dist/stateDiagram-AJRCARHV-BTzCb_Q-.js +0 -217
  584. package/dist/stateDiagram-AJRCARHV-CBbDL4Ct.cjs +0 -1
  585. package/dist/stateDiagram-v2-BHNVJYJU-BrQR0oUL.cjs +0 -1
  586. package/dist/stateDiagram-v2-BHNVJYJU-C7E3JbTB.js +0 -27
  587. package/dist/timeline-definition-PNZ67QCA-DJ9VKw6h.cjs +0 -120
  588. package/dist/treeView-BLDUP644-C9tQMbiq.js +0 -3
  589. package/dist/treeView-BLDUP644-DKh9BcaT.cjs +0 -1
  590. package/dist/treemap-LRROVOQU-2aferAph.cjs +0 -1
  591. package/dist/treemap-LRROVOQU-CBv3oGC3.js +0 -3
  592. package/dist/useObjectProtocol-3BhpCUjG.cjs +0 -3
  593. package/dist/useObjectProtocol-DZdggHDN.js +0 -4333
  594. package/dist/vennDiagram-CIIHVFJN-DeRVKdRG.cjs +0 -34
  595. package/dist/wardley-L42UT6IY-CIM0_V5T.js +0 -3
  596. package/dist/wardley-L42UT6IY-DjjjOB8T.cjs +0 -1
  597. package/dist/wardleyDiagram-YWT4CUSO-CaaSvy6n.cjs +0 -78
  598. package/dist/xychartDiagram-2RQKCTM6-CWncieig.cjs +0 -7
@@ -0,0 +1,423 @@
1
+ import { m as e } from "./src-D-6ZfKf9.js";
2
+ import { x as t } from "./chunk-DU6HZSFF-CNSdkWoH.js";
3
+ import { n } from "./chunk-Y2CYZVJY-i11wjrBe.js";
4
+ import "./chunk-75Z2AOVW-BwUD389x.js";
5
+ import "./chunk-P2QGCYS3-DRvvOWJ2.js";
6
+ import "./chunk-PWAF6VOD-CbmhQpgH.js";
7
+ import "./chunk-GMAD6QVW-DKxKOKLF.js";
8
+ import { s as r } from "./chunk-4HAMMTFA-MZIwowe1.js";
9
+ import { a as i, i as a, n as o } from "./chunk-GVQU2GXP-w4KY-she.js";
10
+ import { n as s } from "./chunk-L3NEJ4N5-CvNbHpcd.js";
11
+ import { a as c, c as l, i as u } from "./chunk-OSK3NFVY-BmtDbEvT.js";
12
+ import { t as d } from "./graphlib-VMWSbyYi.js";
13
+ import { t as f } from "./dagre-qXSFUdzO.js";
14
+ import { a as p, i as m, n as h, o as g, r as _, s as v, t as y } from "./chunk-2E4U76K2-C8vehurw.js";
15
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/dagre-GXQ25YYZ.mjs
16
+ var b = /* @__PURE__ */ n((e, t, n) => Math.max(t, Math.min(n, e)), "clamp"), x = /* @__PURE__ */ n((e = "TB") => {
17
+ switch (e) {
18
+ case "BT": return "bottom";
19
+ case "LR": return "right";
20
+ case "RL": return "left";
21
+ default: return "top";
22
+ }
23
+ }, "getDefaultSelfLoopSide"), S = /* @__PURE__ */ n((e) => e === "flowchart" || e === "flowchart-v2" || e === "stateDiagram" || e === "er" || e === "classDiagram", "shouldMergeSelfLoopSegments"), C = [
24
+ "x",
25
+ "y",
26
+ "width",
27
+ "height",
28
+ "labelBBox",
29
+ "intersect",
30
+ "calcIntersect",
31
+ "diff",
32
+ "clusterNode"
33
+ ], w = /* @__PURE__ */ n((e, t, n, r, i) => {
34
+ let a = [], o = /* @__PURE__ */ new Set();
35
+ if (n.forEach(({ start: e, end: t }) => {
36
+ e !== r && o.add(e), t !== r && o.add(t);
37
+ }), o.forEach((t) => {
38
+ let n = e.node(t);
39
+ typeof n?.x == "number" && typeof n?.y == "number" && a.push(n);
40
+ }), a.length === 0 && n.forEach(({ edge: e }) => {
41
+ (e.points ?? []).forEach((e) => {
42
+ typeof e?.x == "number" && typeof e?.y == "number" && a.push(e);
43
+ });
44
+ }), a.length === 0) return x(i);
45
+ let s = a.reduce((e, t) => ({
46
+ x: e.x + t.x / a.length,
47
+ y: e.y + t.y / a.length
48
+ }), {
49
+ x: 0,
50
+ y: 0
51
+ }), c = s.x - t.x, l = s.y - t.y;
52
+ return Math.abs(c) > Math.abs(l) ? c > 0 ? "right" : "left" : Math.abs(l) > 0 ? l > 0 ? "bottom" : "top" : x(i);
53
+ }, "getSelfLoopSide"), T = /* @__PURE__ */ n((e, t = "top", n = 0, r = 0) => {
54
+ let i = e.x, a = e.y - n, o = e.width / 2, s = e.height / 2, c = Math.max(36, Math.min(100, e.width * .8)), l = b(Math.max(r, e.width * .35), 36, c), u = b(Math.min(e.width, e.height) * .45, 24, 48);
55
+ switch (t) {
56
+ case "bottom": {
57
+ let e = a + s;
58
+ return [
59
+ {
60
+ x: i - l / 2,
61
+ y: e
62
+ },
63
+ {
64
+ x: i - l / 2,
65
+ y: e + u
66
+ },
67
+ {
68
+ x: i + l / 2,
69
+ y: e + u
70
+ },
71
+ {
72
+ x: i + l / 2,
73
+ y: e
74
+ }
75
+ ];
76
+ }
77
+ case "right": {
78
+ let e = i + o;
79
+ return [
80
+ {
81
+ x: e,
82
+ y: a - l / 2
83
+ },
84
+ {
85
+ x: e + u,
86
+ y: a - l / 2
87
+ },
88
+ {
89
+ x: e + u,
90
+ y: a + l / 2
91
+ },
92
+ {
93
+ x: e,
94
+ y: a + l / 2
95
+ }
96
+ ];
97
+ }
98
+ case "left": {
99
+ let e = i - o;
100
+ return [
101
+ {
102
+ x: e,
103
+ y: a - l / 2
104
+ },
105
+ {
106
+ x: e - u,
107
+ y: a - l / 2
108
+ },
109
+ {
110
+ x: e - u,
111
+ y: a + l / 2
112
+ },
113
+ {
114
+ x: e,
115
+ y: a + l / 2
116
+ }
117
+ ];
118
+ }
119
+ default: {
120
+ let e = a - s;
121
+ return [
122
+ {
123
+ x: i - l / 2,
124
+ y: e
125
+ },
126
+ {
127
+ x: i - l / 2,
128
+ y: e - u
129
+ },
130
+ {
131
+ x: i + l / 2,
132
+ y: e - u
133
+ },
134
+ {
135
+ x: i + l / 2,
136
+ y: e
137
+ }
138
+ ];
139
+ }
140
+ }
141
+ }, "getSelfLoopPoints"), E = /* @__PURE__ */ n((e, t, n = "top", r = 0, i = {}) => {
142
+ let a = e.x, o = e.y - r, s = i.width ?? 0, c = i.height ?? 0;
143
+ switch (n) {
144
+ case "bottom": return {
145
+ x: a,
146
+ y: Math.max(...t.map((e) => e.y)) + c / 2 + 4
147
+ };
148
+ case "right": return {
149
+ x: Math.max(...t.map((e) => e.x)) + s / 2 + 4,
150
+ y: o
151
+ };
152
+ case "left": return {
153
+ x: Math.min(...t.map((e) => e.x)) - s / 2 - 4,
154
+ y: o
155
+ };
156
+ default: return {
157
+ x: a,
158
+ y: Math.min(...t.map((e) => e.y)) - c / 2 - 4
159
+ };
160
+ }
161
+ }, "getSelfLoopLabelPosition"), D = /* @__PURE__ */ n((e, t = 0, { mergeSelfLoops: n = !0 } = {}) => {
162
+ let r = /* @__PURE__ */ new Map(), i = [], a = e.graph()?.rankdir;
163
+ return e.edges().forEach((t) => {
164
+ let a = e.edge(t);
165
+ if (n && a.selfLoop) {
166
+ let e = a.selfLoop.id;
167
+ r.has(e) || r.set(e, []), r.get(e).push({
168
+ edge: a,
169
+ start: t.v,
170
+ end: t.w
171
+ });
172
+ } else i.push({
173
+ edge: a,
174
+ start: t.v,
175
+ end: t.w
176
+ });
177
+ }), r.forEach((n) => {
178
+ if (n.length !== 3) {
179
+ n.forEach((e) => i.push(e));
180
+ return;
181
+ }
182
+ n.sort((e, t) => e.edge.selfLoop.order - t.edge.selfLoop.order);
183
+ let [r, o, s] = n, c = r.edge.originalEdge ?? o.edge.originalEdge ?? s.edge.originalEdge ?? o.edge, l = e.node(c.start);
184
+ if (!l) {
185
+ n.forEach((e) => i.push(e));
186
+ return;
187
+ }
188
+ let u = {
189
+ width: o.edge.width,
190
+ height: o.edge.height
191
+ }, d = w(e, l, n, c.start, a), f = T(l, d, t, u.width ?? 0), p = E(l, f, d, t, u), m = {
192
+ ...o.edge,
193
+ ...c,
194
+ id: c.id,
195
+ points: f,
196
+ start: c.start,
197
+ end: c.end,
198
+ x: p.x,
199
+ y: p.y,
200
+ width: u.width,
201
+ height: u.height,
202
+ labelStyle: o.edge.labelStyle,
203
+ fromCluster: r.edge.fromCluster ?? o.edge.fromCluster ?? s.edge.fromCluster,
204
+ toCluster: r.edge.toCluster ?? o.edge.toCluster ?? s.edge.toCluster
205
+ };
206
+ delete m.selfLoop, delete m.originalEdge, i.push({
207
+ edge: m,
208
+ start: m.start,
209
+ end: m.end
210
+ });
211
+ }), i;
212
+ }, "getEdgesToRender"), O = /* @__PURE__ */ n(async ({ element: t, graph: a, diagramType: s, id: l, parentCluster: u, siteConfig: d }) => {
213
+ let f = a.graph().rankdir;
214
+ e.trace("Dir in recursive render - dir:", f);
215
+ let { clusters: _, edgePaths: v, edgeLabels: y, nodes: b, rootGroups: x } = m(t, { edgePathsClass: "edgePaths" });
216
+ a.nodes() ? e.info("Recursive render XXX", a.nodes()) : e.info("No nodes found for", a), a.edges().length > 0 && e.info("Recursive edges", a.edge(a.edges()[0]));
217
+ let C = S(s);
218
+ await Promise.all(a.nodes().map(async function(t) {
219
+ let n = a.node(t);
220
+ if (u !== void 0) {
221
+ let n = JSON.parse(JSON.stringify(u.clusterData));
222
+ e.trace("Setting data for parent cluster XXX\n Node.id = ", t, "\n data=", n.height, "\nParent cluster", u.height), a.setNode(u.id, n), a.parent(t) || (e.trace("Setting parent", t, u.id), a.setParent(t, u.id, n));
223
+ }
224
+ if (e.info("(Insert) Node XXX" + t + ": " + JSON.stringify(a.node(t))), n?.clusterNode) {
225
+ e.info("Cluster identified XBX", t, n.width, a.node(t));
226
+ let { ranksep: o, nodesep: c } = a.graph();
227
+ n.graph.setGraph({
228
+ ...n.graph.graph(),
229
+ ranksep: o + 25,
230
+ nodesep: c
231
+ });
232
+ let u = await F({
233
+ element: b,
234
+ graph: n.graph,
235
+ diagramType: s,
236
+ id: l,
237
+ parentCluster: a.node(t),
238
+ siteConfig: d
239
+ }), f = u.elem;
240
+ r(n, f), n.diff = u.diff || 0, e.info("New compound node after recursive render XAX", t, "width", n.width, "height", n.height), i(f, n);
241
+ } else a.children(t).length > 0 ? (e.trace("Cluster - the non recursive path XBX", t, n.id, n, n.width, "Graph:", a), e.trace(p(n.id, a)), h.set(n.id, {
242
+ id: p(n.id, a),
243
+ node: n
244
+ })) : (e.trace("Node - the non recursive path XAX", t, b, a.node(t), f), await g(b, a.node(t), {
245
+ config: d,
246
+ dir: f
247
+ }));
248
+ })), await (/* @__PURE__ */ n(async () => {
249
+ let t = a.edges().map(async function(t) {
250
+ let n = a.edge(t.v, t.w, t.name);
251
+ if (e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(t)), e.info("Edge " + t.v + " -> " + t.w + ": ", t, " ", JSON.stringify(a.edge(t))), e.info("Fix", h, "ids:", t.v, t.w, "Translating: ", h.get(t.v), h.get(t.w)), C && n.selfLoop) {
252
+ if (n.selfLoop.order !== 1) return;
253
+ let e = {
254
+ ...n.originalEdge,
255
+ ...n,
256
+ id: n.selfLoop.id,
257
+ startLabelLeft: n.originalEdge?.startLabelLeft ?? n.startLabelLeft,
258
+ startLabelRight: n.originalEdge?.startLabelRight ?? n.startLabelRight,
259
+ endLabelLeft: n.originalEdge?.endLabelLeft ?? n.endLabelLeft,
260
+ endLabelRight: n.originalEdge?.endLabelRight ?? n.endLabelRight
261
+ };
262
+ await c(y, e), n.width = e.width, n.height = e.height, n.labelStyle = e.labelStyle;
263
+ return;
264
+ }
265
+ await c(y, n);
266
+ });
267
+ await Promise.all(t);
268
+ }, "processEdges"))();
269
+ let { subGraphTitleTotalMargin: w } = o(d);
270
+ return {
271
+ elem: x,
272
+ graph: a,
273
+ groups: {
274
+ clusters: _,
275
+ edgePaths: v,
276
+ edgeLabels: y,
277
+ nodes: b,
278
+ rootGroups: x
279
+ },
280
+ diagramType: s,
281
+ id: l,
282
+ mergeSelfLoops: C,
283
+ subGraphTitleTotalMargin: w
284
+ };
285
+ }, "measureDagreGraph"), k = /* @__PURE__ */ n((t) => {
286
+ e.info("############################################# XXX"), e.info("### Layout ### XXX"), e.info("############################################# XXX"), f(t);
287
+ }, "runDagreGraphLayout"), A = /* @__PURE__ */ n((e, t, n) => {
288
+ let r = e.node(t);
289
+ if (!r) return;
290
+ let i = { ...r };
291
+ return r?.clusterNode ? i.y = (r.y ?? 0) + n : e.children(t).length > 0 ? i.height = (r.height ?? 0) + n : i.y = (r.y ?? 0) + n / 2, i;
292
+ }, "normalizeDagreNode"), j = /* @__PURE__ */ n((e, t) => {
293
+ C.forEach((n) => {
294
+ t[n] !== void 0 && (e[n] = t[n]);
295
+ });
296
+ }, "applyDagreNodeLayout"), M = /* @__PURE__ */ n((e, t, n, r) => ({
297
+ ...e,
298
+ start: e.start ?? t,
299
+ end: e.end ?? n,
300
+ points: (e.points ?? []).map((e) => ({
301
+ ...e,
302
+ y: typeof e.y == "number" ? e.y + r : e.y
303
+ }))
304
+ }), "normalizeDagreEdge"), N = /* @__PURE__ */ n((e, t) => {
305
+ let { graph: n, mergeSelfLoops: r, subGraphTitleTotalMargin: i = 0 } = t, a = new Map(e.nodes.map((e) => [e.id, e]));
306
+ v(n).forEach((e) => {
307
+ let t = A(n, e, i);
308
+ if (!t) return;
309
+ j(n.node(e), t);
310
+ let r = a.get(e);
311
+ r && j(r, t);
312
+ });
313
+ let o = i / 2;
314
+ return e.edges = D(n, o, { mergeSelfLoops: r }).map(({ edge: e, start: t, end: n }) => M(e, t, n, o)), e;
315
+ }, "applyDagreLayoutResult"), P = /* @__PURE__ */ n(async ({ elem: t, graph: n, groups: { clusters: r, edgePaths: i }, diagramType: o, id: c, mergeSelfLoops: d, subGraphTitleTotalMargin: f }) => {
316
+ let p = 0;
317
+ await Promise.all(v(n).map(async function(t) {
318
+ let i = n.node(t);
319
+ if (e.info("Position XBX => " + t + ": (" + i.x, "," + i.y, ") width: ", i.width, " height: ", i.height), i?.clusterNode) i.y += f, e.info("A tainted cluster node XBX1", t, i.id, i.width, i.height, i.x, i.y, n.parent(t)), h.get(i.id).node = i, a(i);
320
+ else if (n.children(t).length > 0) {
321
+ e.info("A pure cluster node XBX1", t, i.id, i.x, i.y, i.width, i.height, n.parent(t)), i.height += f, n.node(i.parentId);
322
+ let a = i?.padding / 2 || 0, o = i?.labelBBox?.height || 0, c = o - a || 0;
323
+ e.debug("OffsetY", c, "labelHeight", o, "halfPadding", a), await s(r, i), h.get(i.id).node = i;
324
+ } else {
325
+ let t = n.node(i.parentId);
326
+ i.y += f / 2, e.info("A regular node XBX1 - using the padding", i.id, "parent", i.parentId, i.width, i.height, i.x, i.y, "offsetY", i.offsetY, "parent", t, t?.offsetY, i), a(i);
327
+ }
328
+ }));
329
+ let m = f / 2;
330
+ return D(n, m, { mergeSelfLoops: d }).forEach(function({ edge: t, start: r, end: a }) {
331
+ e.info("Edge " + r + " -> " + a + ": " + JSON.stringify(t), t), t.points.forEach((e) => e.y += m), l(t, u(i, t, h, o, n.node(r), n.node(a), c));
332
+ }), n.nodes().forEach(function(t) {
333
+ let r = n.node(t);
334
+ e.info(t, r.type, r.diff), r.isGroup && (p = r.diff);
335
+ }), e.warn("Returning from recursive render XAX", t, p), {
336
+ elem: t,
337
+ diff: p
338
+ };
339
+ }, "paintDagreLayoutCore"), F = /* @__PURE__ */ n(async (e) => {
340
+ let t = await O(e);
341
+ return k(t.graph), await P(t);
342
+ }, "renderDagreSubgraph"), I = /* @__PURE__ */ n((t) => {
343
+ let n = new d({
344
+ multigraph: !0,
345
+ compound: !0
346
+ }).setGraph({
347
+ rankdir: t.direction,
348
+ nodesep: t.config?.nodeSpacing || t.nodeSpacing || t.config?.flowchart?.nodeSpacing,
349
+ ranksep: t.config?.rankSpacing || t.rankSpacing || t.config?.flowchart?.rankSpacing,
350
+ marginx: 8,
351
+ marginy: 8
352
+ }).setDefaultEdgeLabel(function() {
353
+ return {};
354
+ });
355
+ return t.nodes.forEach((e) => {
356
+ n.setNode(e.id, { ...e }), e.parentId && n.setParent(e.id, e.parentId);
357
+ }), e.debug("Edges:", t.edges), t.edges.forEach((e) => {
358
+ if (e.start === e.end) {
359
+ let t = e.start, r = t + "---" + t + "---1", i = t + "---" + t + "---2", a = n.node(t);
360
+ n.setNode(r, {
361
+ domId: r,
362
+ id: r,
363
+ parentId: a.parentId,
364
+ labelStyle: "",
365
+ label: "",
366
+ padding: 0,
367
+ shape: "labelRect",
368
+ style: "",
369
+ width: 10,
370
+ height: 10
371
+ }), n.setParent(r, a.parentId), n.setNode(i, {
372
+ domId: i,
373
+ id: i,
374
+ parentId: a.parentId,
375
+ labelStyle: "",
376
+ padding: 0,
377
+ shape: "labelRect",
378
+ label: "",
379
+ style: "",
380
+ width: 10,
381
+ height: 10
382
+ }), n.setParent(i, a.parentId);
383
+ let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e), l = structuredClone(e);
384
+ s.originalEdge = o, s.selfLoop = {
385
+ id: o.id,
386
+ order: 0
387
+ }, c.originalEdge = o, c.selfLoop = {
388
+ id: o.id,
389
+ order: 1
390
+ }, l.originalEdge = o, l.selfLoop = {
391
+ id: o.id,
392
+ order: 2
393
+ }, s.label = "", s.arrowTypeEnd = "none", s.endLabelLeft = "", s.endLabelRight = "", s.startLabelLeft = "", s.id = t + "-cyclic-special-1", c.startLabelRight = "", c.startLabelLeft = "", c.endLabelLeft = "", c.endLabelRight = "", c.arrowTypeStart = "none", c.arrowTypeEnd = "none", c.id = t + "-cyclic-special-mid", l.label = "", l.startLabelRight = "", l.startLabelLeft = "", l.arrowTypeStart = "none", a.isGroup && (s.fromCluster = t, l.toCluster = t), l.id = t + "-cyclic-special-2", l.arrowTypeStart = "none", n.setEdge(t, r, s, t + "-cyclic-special-0"), n.setEdge(r, i, c, t + "-cyclic-special-1"), n.setEdge(i, t, l, t + "-cyclic-special-2");
394
+ } else n.setEdge(e.start, e.end, { ...e }, e.id);
395
+ }), y(n), { graph: n };
396
+ }, "prepareLayoutForDagre"), L = /* @__PURE__ */ n(async (e, { element: n, preparedLayout: r }) => {
397
+ let i = r ?? I(e), a = t(), o = await O({
398
+ element: n,
399
+ graph: i.graph,
400
+ diagramType: e.type,
401
+ id: e.diagramId,
402
+ parentCluster: void 0,
403
+ siteConfig: a
404
+ });
405
+ return i.measuredLayout = o, o;
406
+ }, "measureDagreLayout"), R = /* @__PURE__ */ n((e, t) => {
407
+ let n = t.preparedLayout?.measuredLayout;
408
+ if (!n) throw Error("runDagreLayoutCore requires measureDagreLayout to run first");
409
+ return k(n.graph), N(e, n), n;
410
+ }, "runDagreLayoutCore"), z = _({
411
+ prepareLayout: I,
412
+ measureLayout: L,
413
+ runLayoutCore: R,
414
+ paintOptions: {
415
+ clusterDb: h,
416
+ getNodes: /* @__PURE__ */ n((e, { measure: t }) => v(t.graph).map((e) => t.graph.node(e)).filter(Boolean), "getDagrePaintNodes"),
417
+ getEdgeNode: /* @__PURE__ */ n((e, t, { measure: n }) => e ? n.graph.node(e) : void 0, "getDagreEdgeNode"),
418
+ skipNode: /* @__PURE__ */ n((e, { measure: t }) => !t.graph.hasNode(e.id), "skipNode"),
419
+ isCluster: /* @__PURE__ */ n((e, { measure: t }) => t.graph.hasNode(e.id) && (t.graph.children(e.id) ?? []).length > 0, "isCluster")
420
+ }
421
+ });
422
+ //#endregion
423
+ export { N as applyDagreLayoutResult, D as getEdgesToRender, L as measureDagreLayout, I as prepareLayoutForDagre, z as render, R as runDagreLayoutCore };
@@ -0,0 +1,4 @@
1
+ const e=require("./src-B16ML7oM.cjs"),t=require("./chunk-DU6HZSFF-mznJTFyO.cjs"),n=require("./chunk-Y2CYZVJY-CnmLqFtv.cjs");require("./chunk-75Z2AOVW-RbCLc-XL.cjs"),require("./chunk-P2QGCYS3-DqT85Q-S.cjs"),require("./chunk-PWAF6VOD-CjrO-QHU.cjs"),require("./chunk-GMAD6QVW-BVSRANO9.cjs");const r=require("./chunk-4HAMMTFA-Db_fcZEn.cjs"),i=require("./chunk-GVQU2GXP-BiuaO1L5.cjs"),a=require("./chunk-L3NEJ4N5-B8UQMgqc.cjs"),o=require("./chunk-OSK3NFVY-DE9_ERt9.cjs"),s=require("./graphlib-CkkG5MuS.cjs"),c=require("./dagre-nX1Mh32P.cjs"),l=require("./chunk-2E4U76K2-BiZwNOhf.cjs");var u=n.n((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),d=n.n((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),f=n.n(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),p=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],m=n.n((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return d(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:d(i)},`getSelfLoopSide`),h=n.n((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=u(Math.max(r,e.width*.35),36,c),d=u(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+d},{x:i+l/2,y:e+d},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+d,y:a-l/2},{x:e+d,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-d,y:a-l/2},{x:e-d,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-d},{x:i+l/2,y:e-d},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),g=n.n((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),_=n.n((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=m(e,l,n,c.start,a),f=h(l,d,t,u.width??0),p=g(l,f,d,t,u),_={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete _.selfLoop,delete _.originalEdge,i.push({edge:_,start:_.start,end:_.end})}),i},`getEdgesToRender`),v=n.n(async({element:t,graph:a,diagramType:s,id:c,parentCluster:u,siteConfig:d})=>{let p=a.graph().rankdir;e.m.trace(`Dir in recursive render - dir:`,p);let{clusters:m,edgePaths:h,edgeLabels:g,nodes:_,rootGroups:v}=l.i(t,{edgePathsClass:`edgePaths`});a.nodes()?e.m.info(`Recursive render XXX`,a.nodes()):e.m.info(`No nodes found for`,a),a.edges().length>0&&e.m.info(`Recursive edges`,a.edge(a.edges()[0]));let y=f(s);await Promise.all(a.nodes().map(async function(t){let n=a.node(t);if(u!==void 0){let n=JSON.parse(JSON.stringify(u.clusterData));e.m.trace(`Setting data for parent cluster XXX
2
+ Node.id = `,t,`
3
+ data=`,n.height,`
4
+ Parent cluster`,u.height),a.setNode(u.id,n),a.parent(t)||(e.m.trace(`Setting parent`,t,u.id),a.setParent(t,u.id,n))}if(e.m.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(a.node(t))),n?.clusterNode){e.m.info(`Cluster identified XBX`,t,n.width,a.node(t));let{ranksep:o,nodesep:l}=a.graph();n.graph.setGraph({...n.graph.graph(),ranksep:o+25,nodesep:l});let u=await T({element:_,graph:n.graph,diagramType:s,id:c,parentCluster:a.node(t),siteConfig:d}),f=u.elem;r.s(n,f),n.diff=u.diff||0,e.m.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),i.a(f,n)}else a.children(t).length>0?(e.m.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,a),e.m.trace(l.a(n.id,a)),l.n.set(n.id,{id:l.a(n.id,a),node:n})):(e.m.trace(`Node - the non recursive path XAX`,t,_,a.node(t),p),await l.o(_,a.node(t),{config:d,dir:p}))})),await n.n(async()=>{let t=a.edges().map(async function(t){let n=a.edge(t.v,t.w,t.name);if(e.m.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.m.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(a.edge(t))),e.m.info(`Fix`,l.n,`ids:`,t.v,t.w,`Translating: `,l.n.get(t.v),l.n.get(t.w)),y&&n.selfLoop){if(n.selfLoop.order!==1)return;let e={...n.originalEdge,...n,id:n.selfLoop.id,startLabelLeft:n.originalEdge?.startLabelLeft??n.startLabelLeft,startLabelRight:n.originalEdge?.startLabelRight??n.startLabelRight,endLabelLeft:n.originalEdge?.endLabelLeft??n.endLabelLeft,endLabelRight:n.originalEdge?.endLabelRight??n.endLabelRight};await o.a(g,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle;return}await o.a(g,n)});await Promise.all(t)},`processEdges`)();let{subGraphTitleTotalMargin:b}=i.n(d);return{elem:v,graph:a,groups:{clusters:m,edgePaths:h,edgeLabels:g,nodes:_,rootGroups:v},diagramType:s,id:c,mergeSelfLoops:y,subGraphTitleTotalMargin:b}},`measureDagreGraph`),y=n.n(t=>{e.m.info(`############################################# XXX`),e.m.info(`### Layout ### XXX`),e.m.info(`############################################# XXX`),c.t(t)},`runDagreGraphLayout`),b=n.n((e,t,n)=>{let r=e.node(t);if(!r)return;let i={...r};return r?.clusterNode?i.y=(r.y??0)+n:e.children(t).length>0?i.height=(r.height??0)+n:i.y=(r.y??0)+n/2,i},`normalizeDagreNode`),x=n.n((e,t)=>{p.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),S=n.n((e,t,n,r)=>({...e,start:e.start??t,end:e.end??n,points:(e.points??[]).map(e=>({...e,y:typeof e.y==`number`?e.y+r:e.y}))}),`normalizeDagreEdge`),C=n.n((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));l.s(n).forEach(e=>{let t=b(n,e,i);if(!t)return;x(n.node(e),t);let r=a.get(e);r&&x(r,t)});let o=i/2;return e.edges=_(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>S(e,t,n,o)),e},`applyDagreLayoutResult`),w=n.n(async({elem:t,graph:n,groups:{clusters:r,edgePaths:s},diagramType:c,id:u,mergeSelfLoops:d,subGraphTitleTotalMargin:f})=>{let p=0;await Promise.all(l.s(n).map(async function(t){let o=n.node(t);if(e.m.info(`Position XBX => `+t+`: (`+o.x,`,`+o.y,`) width: `,o.width,` height: `,o.height),o?.clusterNode)o.y+=f,e.m.info(`A tainted cluster node XBX1`,t,o.id,o.width,o.height,o.x,o.y,n.parent(t)),l.n.get(o.id).node=o,i.i(o);else if(n.children(t).length>0){e.m.info(`A pure cluster node XBX1`,t,o.id,o.x,o.y,o.width,o.height,n.parent(t)),o.height+=f,n.node(o.parentId);let i=o?.padding/2||0,s=o?.labelBBox?.height||0,c=s-i||0;e.m.debug(`OffsetY`,c,`labelHeight`,s,`halfPadding`,i),await a.n(r,o),l.n.get(o.id).node=o}else{let t=n.node(o.parentId);o.y+=f/2,e.m.info(`A regular node XBX1 - using the padding`,o.id,`parent`,o.parentId,o.width,o.height,o.x,o.y,`offsetY`,o.offsetY,`parent`,t,t?.offsetY,o),i.i(o)}}));let m=f/2;return _(n,m,{mergeSelfLoops:d}).forEach(function({edge:t,start:r,end:i}){e.m.info(`Edge `+r+` -> `+i+`: `+JSON.stringify(t),t),t.points.forEach(e=>e.y+=m),o.c(t,o.i(s,t,l.n,c,n.node(r),n.node(i),u))}),n.nodes().forEach(function(t){let r=n.node(t);e.m.info(t,r.type,r.diff),r.isGroup&&(p=r.diff)}),e.m.warn(`Returning from recursive render XAX`,t,p),{elem:t,diff:p}},`paintDagreLayoutCore`),T=n.n(async e=>{let t=await v(e);return y(t.graph),await w(t)},`renderDagreSubgraph`),E=n.n(t=>{let n=new s.t({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.nodeSpacing||t.config?.flowchart?.nodeSpacing,ranksep:t.config?.rankSpacing||t.rankSpacing||t.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return t.nodes.forEach(e=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),e.m.debug(`Edges:`,t.edges),t.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,n.setEdge(t,r,s,t+`-cyclic-special-0`),n.setEdge(r,i,c,t+`-cyclic-special-1`),n.setEdge(i,t,l,t+`-cyclic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),l.t(n),{graph:n}},`prepareLayoutForDagre`),D=n.n(async(e,{element:n,preparedLayout:r})=>{let i=r??E(e),a=t.x(),o=await v({element:n,graph:i.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:a});return i.measuredLayout=o,o},`measureDagreLayout`),O=n.n((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return y(n.graph),C(e,n),n},`runDagreLayoutCore`),k=l.r({prepareLayout:E,measureLayout:D,runLayoutCore:O,paintOptions:{clusterDb:l.n,getNodes:n.n((e,{measure:t})=>l.s(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:n.n((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:n.n((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:n.n((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}});exports.applyDagreLayoutResult=C,exports.getEdgesToRender=_,exports.measureDagreLayout=D,exports.prepareLayoutForDagre=E,exports.render=k,exports.runDagreLayoutCore=O;
@@ -1 +1 @@
1
- const e=require("./graphlib-CkkG5MuS.cjs");var t=/\s/;function n(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}var r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}var a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(t){if(typeof t==`number`)return t;if(e.et(t))return a;if(e.Z(t)){var n=typeof t.valueOf==`function`?t.valueOf():t;t=e.Z(n)?n+``:n}if(typeof t!=`string`)return t===0?t:+t;t=i(t);var r=s.test(t);return r||c.test(t)?l(t.slice(2),r?2:8):o.test(t)?a:+t}var d=1/0,f=17976931348623157e292;function p(e){return e?(e=u(e),e===d||e===-d?(e<0?-1:1)*f:e===e?e:0):e===0?e:0}function m(e){var t=p(e),n=t%1;return t===t?n?t-n:t:0}var h=Object.create,ee=function(){function t(){}return function(n){if(!e.Z(n))return{};if(h)return h(n);t.prototype=n;var r=new t;return t.prototype=void 0,r}}();function te(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function g(t,n,r){n==`__proto__`&&e.q?e.q(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}var ne=Object.prototype.hasOwnProperty;function _(t,n,r){var i=t[n];(!(ne.call(t,n)&&e.H(i,r))||r===void 0&&!(n in t))&&g(t,n,r)}function v(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?g(n,s,c):_(n,s,c)}return n}function y(t,n,r){if(!e.Z(r))return!1;var i=typeof n;return(i==`number`?e.z(r)&&e.U(n,r.length):i==`string`&&n in r)?e.H(r[n],t):!1}function re(t){return e.B(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&typeof a==`function`?(i--,a):void 0,o&&y(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e})}function ie(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ae=Object.prototype.hasOwnProperty;function oe(t){if(!e.Z(t))return ie(t);var n=e.R(t),r=[];for(var i in t)i==`constructor`&&(n||!ae.call(t,i))||r.push(i);return r}function b(t){return e.z(t)?e.M(t,!0):oe(t)}function x(t){return t!=null&&t.length?e.C(t,1):[]}function se(t){return e.K(e.V(t,void 0,x),t+``)}var S=e.j(Object.getPrototypeOf,Object),ce=`[object Object]`,le=Function.prototype,ue=Object.prototype,de=le.toString,fe=ue.hasOwnProperty,pe=de.call(Object);function me(t){if(!e.tt(t)||e.nt(t)!=ce)return!1;var n=S(t);if(n===null)return!0;var r=fe.call(n,`constructor`)&&n.constructor;return typeof r==`function`&&r instanceof r&&de.call(r)==pe}var he=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ge(e){return he.test(e)}function _e(t,n){return t&&v(n,e.k(n),t)}function ve(e,t){return e&&v(t,b(t),e)}var ye=typeof exports==`object`&&exports&&!exports.nodeType&&exports,be=ye&&typeof module==`object`&&module&&!module.nodeType&&module,xe=be&&be.exports===ye?e.it.Buffer:void 0,Se=xe?xe.allocUnsafe:void 0;function Ce(e,t){if(t)return e.slice();var n=e.length,r=Se?Se(n):new e.constructor(n);return e.copy(r),r}function we(t,n){return v(t,e.b(t),n)}var Te=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)e.w(n,e.b(t)),t=S(t);return n}:e.x;function Ee(e,t){return v(e,Te(e),t)}function De(t){return e.y(t,b,Te)}var Oe=Object.prototype.hasOwnProperty;function ke(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Oe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function C(t){var n=new t.constructor(t.byteLength);return new e.g(n).set(new e.g(t)),n}function Ae(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var je=/\w*$/;function Me(e){var t=new e.constructor(e.source,je.exec(e));return t.lastIndex=e.lastIndex,t}var Ne=e.rt?e.rt.prototype:void 0,Pe=Ne?Ne.valueOf:void 0;function Fe(e){return Pe?Object(Pe.call(e)):{}}function Ie(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Le=`[object Boolean]`,Re=`[object Date]`,ze=`[object Map]`,Be=`[object Number]`,Ve=`[object RegExp]`,He=`[object Set]`,Ue=`[object String]`,We=`[object Symbol]`,Ge=`[object ArrayBuffer]`,Ke=`[object DataView]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=`[object Int8Array]`,Xe=`[object Int16Array]`,Ze=`[object Int32Array]`,Qe=`[object Uint8Array]`,$e=`[object Uint8ClampedArray]`,et=`[object Uint16Array]`,tt=`[object Uint32Array]`;function nt(e,t,n){var r=e.constructor;switch(t){case Ge:return C(e);case Le:case Re:return new r(+e);case Ke:return Ae(e,n);case qe:case Je:case Ye:case Xe:case Ze:case Qe:case $e:case et:case tt:return Ie(e,n);case ze:return new r;case Be:case Ue:return new r(e);case Ve:return Me(e);case He:return new r;case We:return Fe(e)}}function rt(t){return typeof t.constructor==`function`&&!e.R(t)?ee(S(t)):{}}var it=`[object Map]`;function at(t){return e.tt(t)&&e._(t)==it}var ot=e.P&&e.P.isMap,st=ot?e.F(ot):at,ct=`[object Set]`;function lt(t){return e.tt(t)&&e._(t)==ct}var ut=e.P&&e.P.isSet,dt=ut?e.F(ut):lt,ft=1,pt=2,mt=4,ht=`[object Arguments]`,gt=`[object Array]`,_t=`[object Boolean]`,vt=`[object Date]`,yt=`[object Error]`,bt=`[object Function]`,xt=`[object GeneratorFunction]`,St=`[object Map]`,Ct=`[object Number]`,wt=`[object Object]`,Tt=`[object RegExp]`,Et=`[object Set]`,Dt=`[object String]`,Ot=`[object Symbol]`,kt=`[object WeakMap]`,At=`[object ArrayBuffer]`,jt=`[object DataView]`,Mt=`[object Float32Array]`,Nt=`[object Float64Array]`,Pt=`[object Int8Array]`,Ft=`[object Int16Array]`,It=`[object Int32Array]`,Lt=`[object Uint8Array]`,Rt=`[object Uint8ClampedArray]`,zt=`[object Uint16Array]`,Bt=`[object Uint32Array]`,w={};w[ht]=w[gt]=w[At]=w[jt]=w[_t]=w[vt]=w[Mt]=w[Nt]=w[Pt]=w[Ft]=w[It]=w[St]=w[Ct]=w[wt]=w[Tt]=w[Et]=w[Dt]=w[Ot]=w[Lt]=w[Rt]=w[zt]=w[Bt]=!0,w[yt]=w[bt]=w[kt]=!1;function T(t,n,r,i,a,o){var s,c=n&ft,l=n&pt,u=n&mt;if(r&&(s=a?r(t,i,a,o):r(t)),s!==void 0)return s;if(!e.Z(t))return t;var d=e.Q(t);if(d){if(s=ke(t),!c)return te(t,s)}else{var f=e._(t),p=f==bt||f==xt;if(e.I(t))return Ce(t,c);if(f==wt||f==ht||p&&!a){if(s=l||p?{}:rt(t),!c)return l?Ee(t,ve(s,t)):we(t,_e(s,t))}else{if(!w[f])return a?t:{};s=nt(t,f,c)}}o||=new e.S;var m=o.get(t);if(m)return m;o.set(t,s),dt(t)?t.forEach(function(e){s.add(T(e,n,r,e,t,o))}):st(t)&&t.forEach(function(e,i){s.set(i,T(e,n,r,i,t,o))});var h=d?void 0:(u?l?De:e.v:l?b:e.k)(t);return e.G(h||t,function(e,i){h&&(i=e,e=t[i]),_(s,i,T(e,n,r,i,t,o))}),s}var Vt=1,Ht=4;function Ut(e){return T(e,Vt|Ht)}var Wt=function(){return e.it.Date.now()},Gt=Object.prototype,Kt=Gt.hasOwnProperty,qt=e.B(function(t,n){t=Object(t);var r=-1,i=n.length,a=i>2?n[2]:void 0;for(a&&y(n[0],n[1],a)&&(i=1);++r<i;)for(var o=n[r],s=b(o),c=-1,l=s.length;++c<l;){var u=s[c],d=t[u];(d===void 0||e.H(d,Gt[u])&&!Kt.call(t,u))&&(t[u]=o[u])}return t});function E(t,n,r){(r!==void 0&&!e.H(t[n],r)||r===void 0&&!(n in t))&&g(t,n,r)}function D(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function Jt(e){return v(e,b(e))}function Yt(t,n,r,i,a,o,s){var c=D(t,r),l=D(n,r),u=s.get(l);if(u){E(t,r,u);return}var d=o?o(c,l,r+``,t,n,s):void 0,f=d===void 0;if(f){var p=e.Q(l),m=!p&&e.I(l),h=!p&&!m&&e.N(l);d=l,p||m||h?e.Q(c)?d=c:e.c(c)?d=te(c):m?(f=!1,d=Ce(l,!0)):h?(f=!1,d=Ie(l,!0)):d=[]:me(l)||e.L(l)?(d=c,e.L(c)?d=Jt(c):(!e.Z(c)||e.Y(c))&&(d=rt(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),E(t,r,d)}function Xt(t,n,r,i,a){t!==n&&e.d(n,function(o,s){if(a||=new e.S,e.Z(o))Yt(t,n,s,r,Xt,i,a);else{var c=i?i(D(t,s),o,s+``,t,n,a):void 0;c===void 0&&(c=o),E(t,s,c)}},b)}function O(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Zt(t){return function(n,r,i){var a=Object(n);if(!e.z(n)){var o=e.f(r,3);n=e.k(n),r=function(e){return o(a[e],e,a)}}var s=t(n,r,i);return s>-1?a[o?n[s]:s]:void 0}}var Qt=Math.max;function $t(t,n,r){var i=t==null?0:t.length;if(!i)return-1;var a=r==null?0:m(r);return a<0&&(a=Qt(i+a,0)),e.W(t,e.f(n,3),a)}var k=Zt($t);function en(t,n){var r=-1,i=e.z(t)?Array(t.length):[];return e.l(t,function(e,t,a){i[++r]=n(e,t,a)}),i}function A(t,n){return(e.Q(t)?e.$:en)(t,e.f(n,3))}function tn(t,n){return t==null?t:e.d(t,e.s(n),b)}function nn(t,n){return t&&e.u(t,e.s(n))}function rn(e,t){return e>t}var an=Object.prototype.hasOwnProperty;function on(e,t){return e!=null&&an.call(e,t)}function sn(t,n){return t!=null&&e.h(t,n,on)}var cn=`[object String]`;function ln(t){return typeof t==`string`||!e.Q(t)&&e.tt(t)&&e.nt(t)==cn}function un(e,t){return e<t}function j(t,n){var r={};return n=e.f(n,3),e.u(t,function(e,t,i){g(r,t,n(e,t,i))}),r}function dn(t,n,r){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=n(o);if(s!=null&&(c===void 0?s===s&&!e.et(s):r(s,c)))var c=s,l=o}return l}function M(t){return t&&t.length?dn(t,e.X,rn):void 0}var N=re(function(e,t,n){Xt(e,t,n)});function P(t){return t&&t.length?dn(t,e.X,un):void 0}function F(t,n){return t&&t.length?dn(t,e.f(n,2),un):void 0}function fn(t,n,r,i){if(!e.Z(t))return t;n=e.D(n,t);for(var a=-1,o=n.length,s=o-1,c=t;c!=null&&++a<o;){var l=e.E(n[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return t;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=e.Z(d)?d:e.U(n[a+1])?[]:{})}_(c,l,u),c=c[l]}return t}function pn(t,n,r){for(var i=-1,a=n.length,o={};++i<a;){var s=n[i],c=e.T(t,s);r(c,s)&&fn(o,e.D(s,t),c)}return o}function mn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function hn(t,n){if(t!==n){var r=t!==void 0,i=t===null,a=t===t,o=e.et(t),s=n!==void 0,c=n===null,l=n===n,u=e.et(n);if(!c&&!u&&!o&&t>n||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&t<n||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function gn(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=hn(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function _n(t,n,r){n=n.length?e.$(n,function(t){return e.Q(t)?function(n){return e.T(n,t.length===1?t[0]:t)}:t}):[e.X];var i=-1;return n=e.$(n,e.F(e.f)),mn(en(t,function(t,r,a){return{criteria:e.$(n,function(e){return e(t)}),index:++i,value:t}}),function(e,t){return gn(e,t,r)})}var vn=e.p(`length`),yn=`\\ud800-\\udfff`,bn=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,xn=`\\ufe0e\\ufe0f`,Sn=`[`+yn+`]`,I=`[`+bn+`]`,L=`\\ud83c[\\udffb-\\udfff]`,Cn=`(?:`+I+`|`+L+`)`,wn=`[^`+yn+`]`,Tn=`(?:\\ud83c[\\udde6-\\uddff]){2}`,En=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Dn=`\\u200d`,On=Cn+`?`,kn=`[`+xn+`]?`,An=`(?:`+Dn+`(?:`+[wn,Tn,En].join(`|`)+`)`+kn+On+`)*`,jn=kn+On+An,Mn=`(?:`+[wn+I+`?`,I,Tn,En,Sn].join(`|`)+`)`,Nn=RegExp(L+`(?=`+L+`)|`+Mn+jn,`g`);function Pn(e){for(var t=Nn.lastIndex=0;Nn.test(e);)++t;return t}function Fn(e){return ge(e)?Pn(e):vn(e)}function In(t,n){return pn(t,n,function(n,r){return e.m(t,r)})}var R=se(function(e,t){return e==null?{}:In(e,t)}),Ln=Math.ceil,Rn=Math.max;function zn(e,t,n,r){for(var i=-1,a=Rn(Ln((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function Bn(e){return function(t,n,r){return r&&typeof r!=`number`&&y(t,n,r)&&(n=r=void 0),t=p(t),n===void 0?(n=t,t=0):n=p(n),r=r===void 0?t<n?1:-1:p(r),zn(t,n,r,e)}}var z=Bn(),Vn=`[object Map]`,Hn=`[object Set]`;function Un(t){if(t==null)return 0;if(e.z(t))return ln(t)?Fn(t):t.length;var n=e._(t);return n==Vn||n==Hn?t.size:e.A(t).length}var B=e.B(function(t,n){if(t==null)return[];var r=n.length;return r>1&&y(t,n[0],n[1])?n=[]:r>2&&y(n[0],n[1],n[2])&&(n=[n[0]]),_n(t,e.C(n,1),[])}),Wn=0;function V(t){var n=++Wn;return e.O(t)+n}function Gn(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function Kn(e,t){return Gn(e||[],t||[],_)}var qn=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return Jn(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&Jn(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,Yn)),n=n._prev;return`[`+e.join(`, `)+`]`}};function Jn(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Yn(e,t){if(e!==`_next`&&e!==`_prev`)return t}var Xn=e.J(1);function Zn(e,t){if(e.nodeCount()<=1)return[];var n=$n(e,t||Xn);return x(A(Qn(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function Qn(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)H(e,t,n,o);for(;o=i.dequeue();)H(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(H(e,t,n,o,!0));break}}}return r}function H(t,n,r,i,a){var o=a?[]:void 0;return e.o(t.inEdges(i.v),function(e){var i=t.edge(e),s=t.node(e.v);a&&o.push({v:e.v,w:e.w}),s.out-=i,U(n,r,s)}),e.o(t.outEdges(i.v),function(e){var i=t.edge(e),a=e.w,o=t.node(a);o.in-=i,U(n,r,o)}),t.removeNode(i.v),o}function $n(t,n){var r=new e.t,i=0,a=0;e.o(t.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),e.o(t.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),s=t+o;r.setEdge(e.v,e.w,s),a=Math.max(a,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var o=z(a+i+3).map(function(){return new qn}),s=i+1;return e.o(r.nodes(),function(e){U(o,s,r.node(e))}),{graph:r,buckets:o,zeroIdx:s}}function U(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function er(t){var n=t.graph().acyclicer===`greedy`?Zn(t,r(t)):tr(t);e.o(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,V(`rev`))});function r(e){return function(t){return e.edge(t).weight}}}function tr(t){var n=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,e.o(t.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[o])}return e.o(t.nodes(),a),n}function nr(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}function W(e,t,n,r){var i;do i=V(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function rr(t){var n=new e.t().setGraph(t.graph());return e.o(t.nodes(),function(e){n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function ir(t){var n=new e.t({multigraph:t.isMultigraph()}).setGraph(t.graph());return e.o(t.nodes(),function(e){t.children(e).length||n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){n.setEdge(e,t.edge(e))}),n}function ar(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function G(t){var n=A(z(lr(t)+1),function(){return[]});return e.o(t.nodes(),function(r){var i=t.node(r),a=i.rank;e.r(a)||(n[a][i.order]=r)}),n}function or(t){var n=P(A(t.nodes(),function(e){return t.node(e).rank}));e.o(t.nodes(),function(e){var r=t.node(e);sn(r,`rank`)&&(r.rank-=n)})}function sr(t){var n=P(A(t.nodes(),function(e){return t.node(e).rank})),r=[];e.o(t.nodes(),function(e){var i=t.node(e).rank-n;r[i]||(r[i]=[]),r[i].push(e)});var i=0,a=t.graph().nodeRankFactor;e.o(r,function(n,r){e.r(n)&&r%a!==0?--i:i&&e.o(n,function(e){t.node(e).rank+=i})})}function cr(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),W(e,`border`,i,t)}function lr(t){return M(A(t.nodes(),function(n){var r=t.node(n).rank;if(!e.r(r))return r}))}function ur(t,n){var r={lhs:[],rhs:[]};return e.o(t,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}function dr(e,t){var n=Wt();try{return t()}finally{console.log(e+` time: `+(Wt()-n)+`ms`)}}function fr(e,t){return t()}function pr(t){function n(r){var i=t.children(r),a=t.node(r);if(i.length&&e.o(i,n),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)mr(t,`borderLeft`,`_bl`,r,a,o),mr(t,`borderRight`,`_br`,r,a,o)}}e.o(t.children(),n)}function mr(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=W(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function hr(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&_r(e)}function gr(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&yr(e),(t===`lr`||t===`rl`)&&(br(e),_r(e))}function _r(t){e.o(t.nodes(),function(e){vr(t.node(e))}),e.o(t.edges(),function(e){vr(t.edge(e))})}function vr(e){var t=e.width;e.width=e.height,e.height=t}function yr(t){e.o(t.nodes(),function(e){K(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,K),Object.prototype.hasOwnProperty.call(r,`y`)&&K(r)})}function K(e){e.y=-e.y}function br(t){e.o(t.nodes(),function(e){q(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,q),Object.prototype.hasOwnProperty.call(r,`x`)&&q(r)})}function q(e){var t=e.x;e.x=e.y,e.y=t}function xr(t){t.graph().dummyChains=[],e.o(t.edges(),function(e){Sr(t,e)})}function Sr(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=W(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Cr(t){e.o(t.graph().dummyChains,function(e){var n=t.node(e),r=n.edgeLabel,i;for(t.setEdge(n.edgeObj,r);n.dummy;)i=t.successors(e)[0],t.removeNode(e),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),e=i,n=t.node(e)})}function J(t){var n={};function r(e){var i=t.node(e);if(Object.prototype.hasOwnProperty.call(n,e))return i.rank;n[e]=!0;var a=P(A(t.outEdges(e),function(e){return r(e.w)-t.edge(e).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}e.o(t.sources(),r)}function Y(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function wr(t){var n=new e.t({directed:!1}),r=t.nodes()[0],i=t.nodeCount();n.setNode(r,{});for(var a,o;Tr(n,t)<i;)a=Er(n,t),o=n.hasNode(a.v)?Y(t,a):-Y(t,a),Dr(n,t,o);return n}function Tr(t,n){function r(i){e.o(n.nodeEdges(i),function(e){var a=e.v,o=i===a?e.w:a;!t.hasNode(o)&&!Y(n,e)&&(t.setNode(o,{}),t.setEdge(i,o,{}),r(o))})}return e.o(t.nodes(),r),t.nodeCount()}function Er(e,t){return F(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return Y(t,n)})}function Dr(t,n,r){e.o(t.nodes(),function(e){n.node(e).rank+=r})}e.J(1),e.J(1),Or.CycleException=X;function Or(t){var n={},r={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(r,o))throw new X;Object.prototype.hasOwnProperty.call(n,o)||(r[o]=!0,n[o]=!0,e.o(t.predecessors(o),a),delete r[o],i.push(o))}if(e.o(t.sinks(),a),Un(n)!==t.nodeCount())throw new X;return i}function X(){}X.prototype=Error();function kr(t,n,r){e.Q(n)||(n=[n]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return e.o(n,function(e){if(!t.hasNode(e))throw Error(`Graph does not have node: `+e);Ar(t,e,r===`post`,o,i,a)}),a}function Ar(t,n,r,i,a,o){Object.prototype.hasOwnProperty.call(i,n)||(i[n]=!0,r||o.push(n),e.o(a(n),function(e){Ar(t,e,r,i,a,o)}),r&&o.push(n))}function jr(e,t){return kr(e,t,`post`)}function Mr(e,t){return kr(e,t,`pre`)}Z.initLowLimValues=$,Z.initCutValues=Q,Z.calcCutValue=Pr,Z.leaveEdge=Ir,Z.enterEdge=Lr,Z.exchangeEdges=Rr;function Z(e){e=rr(e),J(e);var t=wr(e);$(t),Q(t,e);for(var n,r;n=Ir(t);)r=Lr(t,e,n),Rr(t,e,n,r)}function Q(t,n){var r=jr(t,t.nodes());r=r.slice(0,r.length-1),e.o(r,function(e){Nr(t,n,e)})}function Nr(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Pr(e,t,n)}function Pr(t,n,r){var i=t.node(r).parent,a=!0,o=n.edge(r,i),s=0;return o||=(a=!1,n.edge(i,r)),s=o.weight,e.o(n.nodeEdges(r),function(e){var o=e.v===r,c=o?e.w:e.v;if(c!==i){var l=o===a,u=n.edge(e).weight;if(s+=l?u:-u,Br(t,r,c)){var d=t.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function $(e,t){arguments.length<2&&(t=e.nodes()[0]),Fr(e,{},1,t)}function Fr(t,n,r,i,a){var o=r,s=t.node(i);return n[i]=!0,e.o(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(n,e)||(r=Fr(t,n,r,e,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function Ir(e){return k(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Lr(t,n,r){var i=r.v,a=r.w;n.hasEdge(i,a)||(i=r.w,a=r.v);var o=t.node(i),s=t.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),F(e.a(n.edges(),function(e){return l===Vr(t,t.node(e.v),c)&&l!==Vr(t,t.node(e.w),c)}),function(e){return Y(n,e)})}function Rr(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),$(e),Q(e,t),zr(e,t)}function zr(t,n){var r=Mr(t,k(t.nodes(),function(e){return!n.node(e).parent}));r=r.slice(1),e.o(r,function(e){var r=t.node(e).parent,i=n.edge(e,r),a=!1;i||(i=n.edge(r,e),a=!0),n.node(e).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function Br(e,t,n){return e.hasEdge(t,n)}function Vr(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function Hr(e){switch(e.graph().ranker){case`network-simplex`:Gr(e);break;case`tight-tree`:Wr(e);break;case`longest-path`:Ur(e);break;default:Gr(e)}}var Ur=J;function Wr(e){J(e),wr(e)}function Gr(e){Z(e)}function Kr(t){var n=W(t,`root`,{},`_root`),r=Jr(t),i=M(e.i(r))-1,a=2*i+1;t.graph().nestingRoot=n,e.o(t.edges(),function(e){t.edge(e).minlen*=a});var o=Yr(t)+1;e.o(t.children(),function(e){qr(t,n,a,o,i,r,e)}),t.graph().nodeRankFactor=a}function qr(t,n,r,i,a,o,s){var c=t.children(s);if(!c.length){s!==n&&t.setEdge(n,s,{weight:0,minlen:r});return}var l=cr(t,`_bt`),u=cr(t,`_bb`),d=t.node(s);t.setParent(l,s),d.borderTop=l,t.setParent(u,s),d.borderBottom=u,e.o(c,function(e){qr(t,n,r,i,a,o,e);var c=t.node(e),d=c.borderTop?c.borderTop:e,f=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;t.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),t.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),t.parent(s)||t.setEdge(n,l,{weight:0,minlen:a+o[s]})}function Jr(t){var n={};function r(i,a){var o=t.children(i);o&&o.length&&e.o(o,function(e){r(e,a+1)}),n[i]=a}return e.o(t.children(),function(e){r(e,1)}),n}function Yr(t){return e.n(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function Xr(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,e.o(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}function Zr(t,n,r){var i={},a;e.o(r,function(e){for(var r=t.parent(e),o,s;r;){if(o=t.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){n.setEdge(s,r);return}r=o}})}function Qr(t,n,r){var i=$r(t),a=new e.t({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return e.o(t.nodes(),function(o){var s=t.node(o),c=t.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),e.o(t[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=e.r(i)?0:i.weight;a.setEdge(r,o,{weight:t.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}function $r(e){for(var t;e.hasNode(t=V(`_root`)););return t}function ei(e,t){for(var n=0,r=1;r<t.length;++r)n+=ti(e,t[r-1],t[r]);return n}function ti(t,n,r){for(var i=Kn(r,A(r,function(e,t){return t})),a=x(A(n,function(e){return B(A(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),`pos`)})),o=1;o<r.length;)o<<=1;var s=2*o-1;--o;var c=A(Array(s),function(){return 0}),l=0;return e.o(a.forEach(function(e){var t=e.pos+o;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}function ni(t){var n={},r=e.a(t.nodes(),function(e){return!t.children(e).length}),i=A(z(M(A(r,function(e){return t.node(e).rank}))+1),function(){return[]});function a(r){sn(n,r)||(n[r]=!0,i[t.node(r).rank].push(r),e.o(t.successors(r),a))}var o=B(r,function(e){return t.node(e).rank});return e.o(o,a),i}function ri(t,n){return A(n,function(n){var r=t.inEdges(n);if(r.length){var i=e.n(r,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}function ii(t,n){var r={};return e.o(t,function(t,n){var i=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:n};e.r(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),e.o(n.edges(),function(t){var n=r[t.v],i=r[t.w];!e.r(n)&&!e.r(i)&&(i.indegree++,n.out.push(r[t.w]))}),ai(e.a(r,function(e){return!e.indegree}))}function ai(t){var n=[];function r(t){return function(n){n.merged||(e.r(n.barycenter)||e.r(t.barycenter)||n.barycenter>=t.barycenter)&&oi(t,n)}}function i(e){return function(n){n.in.push(e),--n.indegree===0&&t.push(n)}}for(;t.length;){var a=t.pop();n.push(a),e.o(a.in.reverse(),r(a)),e.o(a.out,i(a))}return A(e.a(n,function(e){return!e.merged}),function(e){return R(e,[`vs`,`i`,`barycenter`,`weight`])})}function oi(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function si(t,n){var r=ur(t,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=r.lhs,a=B(r.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(li(!!n)),l=ci(o,a,l),e.o(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=ci(o,a,l)});var u={vs:x(o)};return c&&(u.barycenter=s/c,u.weight=c),u}function ci(e,t,n){for(var r;t.length&&(r=O(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function li(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function ui(t,n,r,i){var a=t.children(n),o=t.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=e.a(a,function(e){return e!==s&&e!==c}));var u=ri(t,a);e.o(u,function(e){if(t.children(e.v).length){var n=ui(t,e.v,r,i);l[e.v]=n,Object.prototype.hasOwnProperty.call(n,`barycenter`)&&fi(e,n)}});var d=ii(u,r);di(d,l);var f=si(d,i);if(s&&(f.vs=x([s,f.vs,c]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function di(t,n){e.o(t,function(e){e.vs=x(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}function fi(t,n){e.r(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}function pi(e){var t=lr(e),n=mi(e,z(1,t+1),`inEdges`),r=mi(e,z(t-1,-1,-1),`outEdges`),i=ni(e);gi(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){hi(s%2?n:r,s%4>=2),i=G(e);var l=ei(e,i);l<a&&(c=0,o=Ut(i),a=l)}gi(e,o)}function mi(e,t,n){return A(t,function(t){return Qr(e,t,n)})}function hi(t,n){var r=new e.t;e.o(t,function(t){var i=t.graph().root,a=ui(t,i,r,n);e.o(a.vs,function(e,n){t.node(e).order=n}),Zr(t,r,a.vs)})}function gi(t,n){e.o(n,function(n){e.o(n,function(e,n){t.node(e).order=n})})}function _i(t){var n=yi(t);e.o(t.graph().dummyChains,function(e){for(var r=t.node(e),i=r.edgeObj,a=vi(t,n,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;e!==i.w;){if(r=t.node(e),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(e,l),e=t.successors(e)[0]}})}function vi(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function yi(t){var n={},r=0;function i(a){var o=r;e.o(t.children(a),i),n[a]={low:o,lim:r++}}return e.o(t.children(),i),n}function bi(t,n){var r={};function i(n,i){var a=0,o=0,s=n.length,c=O(i);return e.o(i,function(n,l){var u=Si(t,n),d=u?t.node(u).order:s;(u||n===c)&&(e.o(i.slice(o,l+1),function(n){e.o(t.predecessors(n),function(e){var i=t.node(e),o=i.order;(o<a||d<o)&&!(i.dummy&&t.node(n).dummy)&&Ci(r,e,n)})}),o=l+1,a=d)}),i}return e.n(n,i),r}function xi(t,n){var r={};function i(n,i,a,o,s){var c;e.o(z(i,a),function(i){c=n[i],t.node(c).dummy&&e.o(t.predecessors(c),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&Ci(r,e,c)})})}function a(n,r){var a=-1,o,s=0;return e.o(r,function(e,c){if(t.node(e).dummy===`border`){var l=t.predecessors(e);l.length&&(o=t.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,n.length)}),r}return e.n(n,a),r}function Si(e,t){if(e.node(t).dummy)return k(e.predecessors(t),function(t){return e.node(t).dummy})}function Ci(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function wi(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Ti(t,n,r,i){var a={},o={},s={};return e.o(n,function(t){e.o(t,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),e.o(n,function(t){var n=-1;e.o(t,function(e){var t=i(e);if(t.length){t=B(t,function(e){return s[e]});for(var c=(t.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=t[l];o[e]===e&&n<s[d]&&!wi(r,e,d)&&(o[d]=e,o[e]=a[e]=a[d],n=s[d])}}})}),{root:a,align:o}}function Ei(t,n,r,i,a){var o={},s=Di(t,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(e){var n=s.outEdges(e).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=t.node(e);n!==1/0&&r.borderType!==c&&(o[e]=Math.max(o[e],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),e.o(i,function(e){o[e]=o[r[e]]}),o}function Di(t,n,r,i){var a=new e.t,o=t.graph(),s=Mi(o.nodesep,o.edgesep,i);return e.o(n,function(n){var i;e.o(n,function(e){var n=r[e];if(a.setNode(n),i){var o=r[i],c=a.edge(o,n);a.setEdge(o,n,Math.max(s(t,e,i),c||0))}i=e})}),a}function Oi(t,n){return F(e.i(n),function(e){var n=-1/0,r=1/0;return tn(e,function(e,i){var a=Ni(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)}),n-r})}function ki(t,n){var r=e.i(n),i=P(r),a=M(r);e.o([`u`,`d`],function(r){e.o([`l`,`r`],function(o){var s=r+o,c=t[s],l;if(c!==n){var u=e.i(c);l=o===`l`?i-P(u):a-M(u),l&&(t[s]=j(c,function(e){return e+l}))}})})}function Ai(e,t){return j(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=B(A(e,r));return(i[1]+i[2])/2})}function ji(t){var n=G(t),r=N(bi(t,n),xi(t,n)),i={},a;return e.o([`u`,`d`],function(o){a=o===`u`?n:e.i(n).reverse(),e.o([`l`,`r`],function(n){n===`r`&&(a=A(a,function(t){return e.i(t).reverse()}));var s=(o===`u`?t.predecessors:t.successors).bind(t),c=Ti(t,a,r,s),l=Ei(t,a,c.root,c.align,n===`r`);n===`r`&&(l=j(l,function(e){return-e})),i[o+n]=l})}),ki(i,Oi(t,i)),Ai(i,t.graph().align)}function Mi(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function Ni(e,t){return e.node(t).width}function Pi(e){e=ir(e),Fi(e),nn(ji(e),function(t,n){e.node(n).x=t})}function Fi(t){var n=G(t),r=t.graph().ranksep,i=0;e.o(n,function(n){var a=M(A(n,function(e){return t.node(e).height}));e.o(n,function(e){t.node(e).y=i+a/2}),i+=a+r})}function Ii(e,t){var n=t&&t.debugTiming?dr:fr;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>qi(e));n(` runLayout`,()=>Li(t,n)),n(` updateInputGraph`,()=>Ri(e,t))})}function Li(e,t){t(` makeSpaceForEdgeLabels`,()=>Ji(e)),t(` removeSelfEdges`,()=>ra(e)),t(` acyclic`,()=>er(e)),t(` nestingGraph.run`,()=>Kr(e)),t(` rank`,()=>Hr(ir(e))),t(` injectEdgeLabelProxies`,()=>Yi(e)),t(` removeEmptyRanks`,()=>sr(e)),t(` nestingGraph.cleanup`,()=>Xr(e)),t(` normalizeRanks`,()=>or(e)),t(` assignRankMinMax`,()=>Xi(e)),t(` removeEdgeLabelProxies`,()=>Zi(e)),t(` normalize.run`,()=>xr(e)),t(` parentDummyChains`,()=>_i(e)),t(` addBorderSegments`,()=>pr(e)),t(` order`,()=>pi(e)),t(` insertSelfEdges`,()=>ia(e)),t(` adjustCoordinateSystem`,()=>hr(e)),t(` position`,()=>Pi(e)),t(` positionSelfEdges`,()=>aa(e)),t(` removeBorderNodes`,()=>na(e)),t(` normalize.undo`,()=>Cr(e)),t(` fixupEdgeLabelCoords`,()=>ea(e)),t(` undoCoordinateSystem`,()=>gr(e)),t(` translateGraph`,()=>Qi(e)),t(` assignNodeIntersects`,()=>$i(e)),t(` reversePoints`,()=>ta(e)),t(` acyclic.undo`,()=>nr(e))}function Ri(t,n){e.o(t.nodes(),function(e){var r=t.node(e),i=n.node(e);r&&(r.x=i.x,r.y=i.y,n.children(e).length&&(r.width=i.width,r.height=i.height))}),e.o(t.edges(),function(e){var r=t.edge(e),i=n.edge(e);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var zi=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Bi={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Vi=[`acyclicer`,`ranker`,`rankdir`,`align`],Hi=[`width`,`height`],Ui={width:0,height:0},Wi=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Gi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ki=[`labelpos`];function qi(t){var n=new e.t({multigraph:!0,compound:!0}),r=sa(t.graph());return n.setGraph(N({},Bi,oa(r,zi),R(r,Vi))),e.o(t.nodes(),function(e){var r=sa(t.node(e));n.setNode(e,qt(oa(r,Hi),Ui)),n.setParent(e,t.parent(e))}),e.o(t.edges(),function(e){var r=sa(t.edge(e));n.setEdge(e,N({},Gi,oa(r,Wi),R(r,Ki)))}),n}function Ji(t){var n=t.graph();n.ranksep/=2,e.o(t.edges(),function(e){var r=t.edge(e);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(n.rankdir===`TB`||n.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Yi(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v);W(t,`edge-proxy`,{rank:(t.node(e.w).rank-r.rank)/2+r.rank,e},`_ep`)}})}function Xi(t){var n=0;e.o(t.nodes(),function(e){var r=t.node(e);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,n=M(n,r.maxRank))}),t.graph().maxRank=n}function Zi(t){e.o(t.nodes(),function(e){var n=t.node(e);n.dummy===`edge-proxy`&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function Qi(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e.o(t.nodes(),function(e){l(t.node(e))}),e.o(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,e.o(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),e.o(t.edges(),function(r){var a=t.edge(r);e.o(a.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=r-n+s,o.height=a-i+c}function $i(t){e.o(t.edges(),function(e){var n=t.edge(e),r=t.node(e.v),i=t.node(e.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ar(r,a)),n.points.push(ar(i,o))})}function ea(t){e.o(t.edges(),function(e){var n=t.edge(e);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function ta(t){e.o(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function na(t){e.o(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(O(n.borderLeft)),o=t.node(O(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.o(t.nodes(),function(e){t.node(e).dummy===`border`&&t.removeNode(e)})}function ra(t){e.o(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||=[],n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function ia(t){var n=G(t);e.o(n,function(n){var r=0;e.o(n,function(n,i){var a=t.node(n);a.order=i+r,e.o(a.selfEdges,function(e){W(t,`selfedge`,{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},`_se`)}),delete a.selfEdges})})}function aa(t){e.o(t.nodes(),function(e){var n=t.node(e);if(n.dummy===`selfedge`){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function oa(e,t){return j(R(e,t),Number)}function sa(t){var n={};return e.o(t,function(e,t){n[t.toLowerCase()]=e}),n}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ii}});
1
+ const e=require("./graphlib-CkkG5MuS.cjs");var t=/\s/;function n(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}var r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}var a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(t){if(typeof t==`number`)return t;if(e.et(t))return a;if(e.Z(t)){var n=typeof t.valueOf==`function`?t.valueOf():t;t=e.Z(n)?n+``:n}if(typeof t!=`string`)return t===0?t:+t;t=i(t);var r=s.test(t);return r||c.test(t)?l(t.slice(2),r?2:8):o.test(t)?a:+t}var d=1/0,f=17976931348623157e292;function p(e){return e?(e=u(e),e===d||e===-d?(e<0?-1:1)*f:e===e?e:0):e===0?e:0}function m(e){var t=p(e),n=t%1;return t===t?n?t-n:t:0}var h=Object.create,ee=function(){function t(){}return function(n){if(!e.Z(n))return{};if(h)return h(n);t.prototype=n;var r=new t;return t.prototype=void 0,r}}();function te(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function g(t,n,r){n==`__proto__`&&e.q?e.q(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}var ne=Object.prototype.hasOwnProperty;function _(t,n,r){var i=t[n];(!(ne.call(t,n)&&e.H(i,r))||r===void 0&&!(n in t))&&g(t,n,r)}function v(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?g(n,s,c):_(n,s,c)}return n}function y(t,n,r){if(!e.Z(r))return!1;var i=typeof n;return(i==`number`?e.z(r)&&e.U(n,r.length):i==`string`&&n in r)?e.H(r[n],t):!1}function re(t){return e.B(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&typeof a==`function`?(i--,a):void 0,o&&y(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e})}function ie(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ae=Object.prototype.hasOwnProperty;function oe(t){if(!e.Z(t))return ie(t);var n=e.R(t),r=[];for(var i in t)i==`constructor`&&(n||!ae.call(t,i))||r.push(i);return r}function b(t){return e.z(t)?e.M(t,!0):oe(t)}function x(t){return t!=null&&t.length?e.C(t,1):[]}function se(t){return e.K(e.V(t,void 0,x),t+``)}var S=e.j(Object.getPrototypeOf,Object),ce=`[object Object]`,le=Function.prototype,ue=Object.prototype,de=le.toString,fe=ue.hasOwnProperty,pe=de.call(Object);function me(t){if(!e.tt(t)||e.nt(t)!=ce)return!1;var n=S(t);if(n===null)return!0;var r=fe.call(n,`constructor`)&&n.constructor;return typeof r==`function`&&r instanceof r&&de.call(r)==pe}var he=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ge(e){return he.test(e)}function _e(t,n){return t&&v(n,e.k(n),t)}function ve(e,t){return e&&v(t,b(t),e)}var ye=typeof exports==`object`&&exports&&!exports.nodeType&&exports,be=ye&&typeof module==`object`&&module&&!module.nodeType&&module,xe=be&&be.exports===ye?e.it.Buffer:void 0,Se=xe?xe.allocUnsafe:void 0;function Ce(e,t){if(t)return e.slice();var n=e.length,r=Se?Se(n):new e.constructor(n);return e.copy(r),r}function we(t,n){return v(t,e.b(t),n)}var Te=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)e.w(n,e.b(t)),t=S(t);return n}:e.x;function Ee(e,t){return v(e,Te(e),t)}function De(t){return e.y(t,b,Te)}var Oe=Object.prototype.hasOwnProperty;function ke(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Oe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function C(t){var n=new t.constructor(t.byteLength);return new e.g(n).set(new e.g(t)),n}function Ae(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var je=/\w*$/;function Me(e){var t=new e.constructor(e.source,je.exec(e));return t.lastIndex=e.lastIndex,t}var Ne=e.rt?e.rt.prototype:void 0,Pe=Ne?Ne.valueOf:void 0;function Fe(e){return Pe?Object(Pe.call(e)):{}}function Ie(e,t){var n=t?C(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Le=`[object Boolean]`,Re=`[object Date]`,ze=`[object Map]`,Be=`[object Number]`,Ve=`[object RegExp]`,He=`[object Set]`,Ue=`[object String]`,We=`[object Symbol]`,Ge=`[object ArrayBuffer]`,Ke=`[object DataView]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=`[object Int8Array]`,Xe=`[object Int16Array]`,Ze=`[object Int32Array]`,Qe=`[object Uint8Array]`,$e=`[object Uint8ClampedArray]`,et=`[object Uint16Array]`,tt=`[object Uint32Array]`;function nt(e,t,n){var r=e.constructor;switch(t){case Ge:return C(e);case Le:case Re:return new r(+e);case Ke:return Ae(e,n);case qe:case Je:case Ye:case Xe:case Ze:case Qe:case $e:case et:case tt:return Ie(e,n);case ze:return new r;case Be:case Ue:return new r(e);case Ve:return Me(e);case He:return new r;case We:return Fe(e)}}function rt(t){return typeof t.constructor==`function`&&!e.R(t)?ee(S(t)):{}}var it=`[object Map]`;function at(t){return e.tt(t)&&e._(t)==it}var ot=e.P&&e.P.isMap,st=ot?e.F(ot):at,ct=`[object Set]`;function lt(t){return e.tt(t)&&e._(t)==ct}var ut=e.P&&e.P.isSet,dt=ut?e.F(ut):lt,ft=1,pt=2,mt=4,ht=`[object Arguments]`,gt=`[object Array]`,_t=`[object Boolean]`,vt=`[object Date]`,yt=`[object Error]`,bt=`[object Function]`,xt=`[object GeneratorFunction]`,St=`[object Map]`,Ct=`[object Number]`,wt=`[object Object]`,Tt=`[object RegExp]`,Et=`[object Set]`,Dt=`[object String]`,Ot=`[object Symbol]`,kt=`[object WeakMap]`,At=`[object ArrayBuffer]`,jt=`[object DataView]`,Mt=`[object Float32Array]`,Nt=`[object Float64Array]`,Pt=`[object Int8Array]`,Ft=`[object Int16Array]`,It=`[object Int32Array]`,Lt=`[object Uint8Array]`,Rt=`[object Uint8ClampedArray]`,zt=`[object Uint16Array]`,Bt=`[object Uint32Array]`,w={};w[ht]=w[gt]=w[At]=w[jt]=w[_t]=w[vt]=w[Mt]=w[Nt]=w[Pt]=w[Ft]=w[It]=w[St]=w[Ct]=w[wt]=w[Tt]=w[Et]=w[Dt]=w[Ot]=w[Lt]=w[Rt]=w[zt]=w[Bt]=!0,w[yt]=w[bt]=w[kt]=!1;function T(t,n,r,i,a,o){var s,c=n&ft,l=n&pt,u=n&mt;if(r&&(s=a?r(t,i,a,o):r(t)),s!==void 0)return s;if(!e.Z(t))return t;var d=e.Q(t);if(d){if(s=ke(t),!c)return te(t,s)}else{var f=e._(t),p=f==bt||f==xt;if(e.I(t))return Ce(t,c);if(f==wt||f==ht||p&&!a){if(s=l||p?{}:rt(t),!c)return l?Ee(t,ve(s,t)):we(t,_e(s,t))}else{if(!w[f])return a?t:{};s=nt(t,f,c)}}o||=new e.S;var m=o.get(t);if(m)return m;o.set(t,s),dt(t)?t.forEach(function(e){s.add(T(e,n,r,e,t,o))}):st(t)&&t.forEach(function(e,i){s.set(i,T(e,n,r,i,t,o))});var h=d?void 0:(u?l?De:e.v:l?b:e.k)(t);return e.G(h||t,function(e,i){h&&(i=e,e=t[i]),_(s,i,T(e,n,r,i,t,o))}),s}var Vt=1,Ht=4;function Ut(e){return T(e,Vt|Ht)}var Wt=function(){return e.it.Date.now()},Gt=Object.prototype,Kt=Gt.hasOwnProperty,qt=e.B(function(t,n){t=Object(t);var r=-1,i=n.length,a=i>2?n[2]:void 0;for(a&&y(n[0],n[1],a)&&(i=1);++r<i;)for(var o=n[r],s=b(o),c=-1,l=s.length;++c<l;){var u=s[c],d=t[u];(d===void 0||e.H(d,Gt[u])&&!Kt.call(t,u))&&(t[u]=o[u])}return t});function E(t,n,r){(r!==void 0&&!e.H(t[n],r)||r===void 0&&!(n in t))&&g(t,n,r)}function D(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function Jt(e){return v(e,b(e))}function Yt(t,n,r,i,a,o,s){var c=D(t,r),l=D(n,r),u=s.get(l);if(u){E(t,r,u);return}var d=o?o(c,l,r+``,t,n,s):void 0,f=d===void 0;if(f){var p=e.Q(l),m=!p&&e.I(l),h=!p&&!m&&e.N(l);d=l,p||m||h?e.Q(c)?d=c:e.c(c)?d=te(c):m?(f=!1,d=Ce(l,!0)):h?(f=!1,d=Ie(l,!0)):d=[]:me(l)||e.L(l)?(d=c,e.L(c)?d=Jt(c):(!e.Z(c)||e.Y(c))&&(d=rt(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),E(t,r,d)}function Xt(t,n,r,i,a){t!==n&&e.d(n,function(o,s){if(a||=new e.S,e.Z(o))Yt(t,n,s,r,Xt,i,a);else{var c=i?i(D(t,s),o,s+``,t,n,a):void 0;c===void 0&&(c=o),E(t,s,c)}},b)}function O(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Zt(t){return function(n,r,i){var a=Object(n);if(!e.z(n)){var o=e.f(r,3);n=e.k(n),r=function(e){return o(a[e],e,a)}}var s=t(n,r,i);return s>-1?a[o?n[s]:s]:void 0}}var Qt=Math.max;function $t(t,n,r){var i=t==null?0:t.length;if(!i)return-1;var a=r==null?0:m(r);return a<0&&(a=Qt(i+a,0)),e.W(t,e.f(n,3),a)}var k=Zt($t);function en(t,n){var r=-1,i=e.z(t)?Array(t.length):[];return e.l(t,function(e,t,a){i[++r]=n(e,t,a)}),i}function A(t,n){return(e.Q(t)?e.$:en)(t,e.f(n,3))}function tn(t,n){return t==null?t:e.d(t,e.s(n),b)}function nn(t,n){return t&&e.u(t,e.s(n))}function rn(e,t){return e>t}var an=Object.prototype.hasOwnProperty;function on(e,t){return e!=null&&an.call(e,t)}function sn(t,n){return t!=null&&e.h(t,n,on)}var cn=`[object String]`;function ln(t){return typeof t==`string`||!e.Q(t)&&e.tt(t)&&e.nt(t)==cn}function un(e,t){return e<t}function j(t,n){var r={};return n=e.f(n,3),e.u(t,function(e,t,i){g(r,t,n(e,t,i))}),r}function M(t,n,r){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=n(o);if(s!=null&&(c===void 0?s===s&&!e.et(s):r(s,c)))var c=s,l=o}return l}function N(t){return t&&t.length?M(t,e.X,rn):void 0}var P=re(function(e,t,n){Xt(e,t,n)});function F(t){return t&&t.length?M(t,e.X,un):void 0}function I(t,n){return t&&t.length?M(t,e.f(n,2),un):void 0}function dn(t,n,r,i){if(!e.Z(t))return t;n=e.D(n,t);for(var a=-1,o=n.length,s=o-1,c=t;c!=null&&++a<o;){var l=e.E(n[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return t;if(a!=s){var d=c[l];u=i?i(d,l,c):void 0,u===void 0&&(u=e.Z(d)?d:e.U(n[a+1])?[]:{})}_(c,l,u),c=c[l]}return t}function fn(t,n,r){for(var i=-1,a=n.length,o={};++i<a;){var s=n[i],c=e.T(t,s);r(c,s)&&dn(o,e.D(s,t),c)}return o}function pn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function mn(t,n){if(t!==n){var r=t!==void 0,i=t===null,a=t===t,o=e.et(t),s=n!==void 0,c=n===null,l=n===n,u=e.et(n);if(!c&&!u&&!o&&t>n||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&t<n||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function hn(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=mn(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function gn(t,n,r){n=n.length?e.$(n,function(t){return e.Q(t)?function(n){return e.T(n,t.length===1?t[0]:t)}:t}):[e.X];var i=-1;return n=e.$(n,e.F(e.f)),pn(en(t,function(t,r,a){return{criteria:e.$(n,function(e){return e(t)}),index:++i,value:t}}),function(e,t){return hn(e,t,r)})}var _n=e.p(`length`),vn=`\\ud800-\\udfff`,yn=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,bn=`\\ufe0e\\ufe0f`,xn=`[`+vn+`]`,L=`[`+yn+`]`,R=`\\ud83c[\\udffb-\\udfff]`,Sn=`(?:`+L+`|`+R+`)`,Cn=`[^`+vn+`]`,wn=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Tn=`[\\ud800-\\udbff][\\udc00-\\udfff]`,En=`\\u200d`,Dn=Sn+`?`,On=`[`+bn+`]?`,kn=`(?:`+En+`(?:`+[Cn,wn,Tn].join(`|`)+`)`+On+Dn+`)*`,An=On+Dn+kn,jn=`(?:`+[Cn+L+`?`,L,wn,Tn,xn].join(`|`)+`)`,Mn=RegExp(R+`(?=`+R+`)|`+jn+An,`g`);function Nn(e){for(var t=Mn.lastIndex=0;Mn.test(e);)++t;return t}function Pn(e){return ge(e)?Nn(e):_n(e)}function Fn(t,n){return fn(t,n,function(n,r){return e.m(t,r)})}var z=se(function(e,t){return e==null?{}:Fn(e,t)}),In=Math.ceil,Ln=Math.max;function Rn(e,t,n,r){for(var i=-1,a=Ln(In((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function zn(e){return function(t,n,r){return r&&typeof r!=`number`&&y(t,n,r)&&(n=r=void 0),t=p(t),n===void 0?(n=t,t=0):n=p(n),r=r===void 0?t<n?1:-1:p(r),Rn(t,n,r,e)}}var B=zn(),Bn=`[object Map]`,Vn=`[object Set]`;function Hn(t){if(t==null)return 0;if(e.z(t))return ln(t)?Pn(t):t.length;var n=e._(t);return n==Bn||n==Vn?t.size:e.A(t).length}var V=e.B(function(t,n){if(t==null)return[];var r=n.length;return r>1&&y(t,n[0],n[1])?n=[]:r>2&&y(n[0],n[1],n[2])&&(n=[n[0]]),gn(t,e.C(n,1),[])}),Un=0;function H(t){var n=++Un;return e.O(t)+n}function Wn(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function Gn(e,t){return Wn(e||[],t||[],_)}var Kn=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return qn(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&qn(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,Jn)),n=n._prev;return`[`+e.join(`, `)+`]`}};function qn(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Jn(e,t){if(e!==`_next`&&e!==`_prev`)return t}var Yn=e.J(1);function Xn(e,t){if(e.nodeCount()<=1)return[];var n=Qn(e,t||Yn);return x(A(Zn(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function Zn(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)U(e,t,n,o);for(;o=i.dequeue();)U(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(U(e,t,n,o,!0));break}}}return r}function U(t,n,r,i,a){var o=a?[]:void 0;return e.o(t.inEdges(i.v),function(e){var i=t.edge(e),s=t.node(e.v);a&&o.push({v:e.v,w:e.w}),s.out-=i,W(n,r,s)}),e.o(t.outEdges(i.v),function(e){var i=t.edge(e),a=e.w,o=t.node(a);o.in-=i,W(n,r,o)}),t.removeNode(i.v),o}function Qn(t,n){var r=new e.t,i=0,a=0;e.o(t.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),e.o(t.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),s=t+o;r.setEdge(e.v,e.w,s),a=Math.max(a,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var o=B(a+i+3).map(function(){return new Kn}),s=i+1;return e.o(r.nodes(),function(e){W(o,s,r.node(e))}),{graph:r,buckets:o,zeroIdx:s}}function W(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function $n(t){var n=t.graph().acyclicer===`greedy`?Xn(t,r(t)):er(t);e.o(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,H(`rev`))});function r(e){return function(t){return e.edge(t).weight}}}function er(t){var n=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,e.o(t.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[o])}return e.o(t.nodes(),a),n}function tr(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}function G(e,t,n,r){var i;do i=H(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function nr(t){var n=new e.t().setGraph(t.graph());return e.o(t.nodes(),function(e){n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function rr(t){var n=new e.t({multigraph:t.isMultigraph()}).setGraph(t.graph());return e.o(t.nodes(),function(e){t.children(e).length||n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){n.setEdge(e,t.edge(e))}),n}function ir(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function K(t){var n=A(B(cr(t)+1),function(){return[]});return e.o(t.nodes(),function(r){var i=t.node(r),a=i.rank;e.r(a)||(n[a][i.order]=r)}),n}function ar(t){var n=F(A(t.nodes(),function(e){return t.node(e).rank}));e.o(t.nodes(),function(e){var r=t.node(e);sn(r,`rank`)&&(r.rank-=n)})}function or(t){var n=F(A(t.nodes(),function(e){return t.node(e).rank})),r=[];e.o(t.nodes(),function(e){var i=t.node(e).rank-n;r[i]||(r[i]=[]),r[i].push(e)});var i=0,a=t.graph().nodeRankFactor;e.o(r,function(n,r){e.r(n)&&r%a!==0?--i:i&&e.o(n,function(e){t.node(e).rank+=i})})}function sr(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),G(e,`border`,i,t)}function cr(t){return N(A(t.nodes(),function(n){var r=t.node(n).rank;if(!e.r(r))return r}))}function lr(t,n){var r={lhs:[],rhs:[]};return e.o(t,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}function ur(e,t){var n=Wt();try{return t()}finally{console.log(e+` time: `+(Wt()-n)+`ms`)}}function dr(e,t){return t()}function fr(t){function n(r){var i=t.children(r),a=t.node(r);if(i.length&&e.o(i,n),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)pr(t,`borderLeft`,`_bl`,r,a,o),pr(t,`borderRight`,`_br`,r,a,o)}}e.o(t.children(),n)}function pr(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=G(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function mr(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&gr(e)}function hr(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&vr(e),(t===`lr`||t===`rl`)&&(yr(e),gr(e))}function gr(t){e.o(t.nodes(),function(e){_r(t.node(e))}),e.o(t.edges(),function(e){_r(t.edge(e))})}function _r(e){var t=e.width;e.width=e.height,e.height=t}function vr(t){e.o(t.nodes(),function(e){q(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,q),Object.prototype.hasOwnProperty.call(r,`y`)&&q(r)})}function q(e){e.y=-e.y}function yr(t){e.o(t.nodes(),function(e){J(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,J),Object.prototype.hasOwnProperty.call(r,`x`)&&J(r)})}function J(e){var t=e.x;e.x=e.y,e.y=t}function br(t){t.graph().dummyChains=[],e.o(t.edges(),function(e){xr(t,e)})}function xr(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=G(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Sr(t){e.o(t.graph().dummyChains,function(e){var n=t.node(e),r=n.edgeLabel,i;for(t.setEdge(n.edgeObj,r);n.dummy;)i=t.successors(e)[0],t.removeNode(e),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),e=i,n=t.node(e)})}function Y(t){var n={};function r(e){var i=t.node(e);if(Object.prototype.hasOwnProperty.call(n,e))return i.rank;n[e]=!0;var a=F(A(t.outEdges(e),function(e){return r(e.w)-t.edge(e).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}e.o(t.sources(),r)}function X(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function Cr(t){var n=new e.t({directed:!1}),r=t.nodes()[0],i=t.nodeCount();n.setNode(r,{});for(var a,o;wr(n,t)<i;)a=Tr(n,t),o=n.hasNode(a.v)?X(t,a):-X(t,a),Er(n,t,o);return n}function wr(t,n){function r(i){e.o(n.nodeEdges(i),function(e){var a=e.v,o=i===a?e.w:a;!t.hasNode(o)&&!X(n,e)&&(t.setNode(o,{}),t.setEdge(i,o,{}),r(o))})}return e.o(t.nodes(),r),t.nodeCount()}function Tr(e,t){return I(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return X(t,n)})}function Er(t,n,r){e.o(t.nodes(),function(e){n.node(e).rank+=r})}e.J(1),e.J(1),Dr.CycleException=Z;function Dr(t){var n={},r={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(r,o))throw new Z;Object.prototype.hasOwnProperty.call(n,o)||(r[o]=!0,n[o]=!0,e.o(t.predecessors(o),a),delete r[o],i.push(o))}if(e.o(t.sinks(),a),Hn(n)!==t.nodeCount())throw new Z;return i}function Z(){}Z.prototype=Error();function Or(t,n,r){e.Q(n)||(n=[n]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return e.o(n,function(e){if(!t.hasNode(e))throw Error(`Graph does not have node: `+e);kr(t,e,r===`post`,o,i,a)}),a}function kr(t,n,r,i,a,o){Object.prototype.hasOwnProperty.call(i,n)||(i[n]=!0,r||o.push(n),e.o(a(n),function(e){kr(t,e,r,i,a,o)}),r&&o.push(n))}function Ar(e,t){return Or(e,t,`post`)}function jr(e,t){return Or(e,t,`pre`)}Q.initLowLimValues=Pr,Q.initCutValues=$,Q.calcCutValue=Nr,Q.leaveEdge=Ir,Q.enterEdge=Lr,Q.exchangeEdges=Rr;function Q(e){e=nr(e),Y(e);var t=Cr(e);Pr(t),$(t,e);for(var n,r;n=Ir(t);)r=Lr(t,e,n),Rr(t,e,n,r)}function $(t,n){var r=Ar(t,t.nodes());r=r.slice(0,r.length-1),e.o(r,function(e){Mr(t,n,e)})}function Mr(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Nr(e,t,n)}function Nr(t,n,r){var i=t.node(r).parent,a=!0,o=n.edge(r,i),s=0;return o||=(a=!1,n.edge(i,r)),s=o.weight,e.o(n.nodeEdges(r),function(e){var o=e.v===r,c=o?e.w:e.v;if(c!==i){var l=o===a,u=n.edge(e).weight;if(s+=l?u:-u,Br(t,r,c)){var d=t.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function Pr(e,t){arguments.length<2&&(t=e.nodes()[0]),Fr(e,{},1,t)}function Fr(t,n,r,i,a){var o=r,s=t.node(i);return n[i]=!0,e.o(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(n,e)||(r=Fr(t,n,r,e,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function Ir(e){return k(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Lr(t,n,r){var i=r.v,a=r.w;n.hasEdge(i,a)||(i=r.w,a=r.v);var o=t.node(i),s=t.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),I(e.a(n.edges(),function(e){return l===Vr(t,t.node(e.v),c)&&l!==Vr(t,t.node(e.w),c)}),function(e){return X(n,e)})}function Rr(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Pr(e),$(e,t),zr(e,t)}function zr(t,n){var r=jr(t,k(t.nodes(),function(e){return!n.node(e).parent}));r=r.slice(1),e.o(r,function(e){var r=t.node(e).parent,i=n.edge(e,r),a=!1;i||(i=n.edge(r,e),a=!0),n.node(e).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function Br(e,t,n){return e.hasEdge(t,n)}function Vr(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function Hr(e){switch(e.graph().ranker){case`network-simplex`:Gr(e);break;case`tight-tree`:Wr(e);break;case`longest-path`:Ur(e);break;default:Gr(e)}}var Ur=Y;function Wr(e){Y(e),Cr(e)}function Gr(e){Q(e)}function Kr(t){var n=G(t,`root`,{},`_root`),r=Jr(t),i=N(e.i(r))-1,a=2*i+1;t.graph().nestingRoot=n,e.o(t.edges(),function(e){t.edge(e).minlen*=a});var o=Yr(t)+1;e.o(t.children(),function(e){qr(t,n,a,o,i,r,e)}),t.graph().nodeRankFactor=a}function qr(t,n,r,i,a,o,s){var c=t.children(s);if(!c.length){s!==n&&t.setEdge(n,s,{weight:0,minlen:r});return}var l=sr(t,`_bt`),u=sr(t,`_bb`),d=t.node(s);t.setParent(l,s),d.borderTop=l,t.setParent(u,s),d.borderBottom=u,e.o(c,function(e){qr(t,n,r,i,a,o,e);var c=t.node(e),d=c.borderTop?c.borderTop:e,f=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;t.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),t.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),t.parent(s)||t.setEdge(n,l,{weight:0,minlen:a+o[s]})}function Jr(t){var n={};function r(i,a){var o=t.children(i);o&&o.length&&e.o(o,function(e){r(e,a+1)}),n[i]=a}return e.o(t.children(),function(e){r(e,1)}),n}function Yr(t){return e.n(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function Xr(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,e.o(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}function Zr(t,n,r){var i={},a;e.o(r,function(e){for(var r=t.parent(e),o,s;r;){if(o=t.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){n.setEdge(s,r);return}r=o}})}function Qr(t,n,r){var i=$r(t),a=new e.t({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return e.o(t.nodes(),function(o){var s=t.node(o),c=t.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),e.o(t[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=e.r(i)?0:i.weight;a.setEdge(r,o,{weight:t.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}function $r(e){for(var t;e.hasNode(t=H(`_root`)););return t}function ei(e,t){for(var n=0,r=1;r<t.length;++r)n+=ti(e,t[r-1],t[r]);return n}function ti(t,n,r){for(var i=Gn(r,A(r,function(e,t){return t})),a=x(A(n,function(e){return V(A(t.outEdges(e),function(e){return{pos:i[e.w],weight:t.edge(e).weight}}),`pos`)})),o=1;o<r.length;)o<<=1;var s=2*o-1;--o;var c=A(Array(s),function(){return 0}),l=0;return e.o(a.forEach(function(e){var t=e.pos+o;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}function ni(t){var n={},r=e.a(t.nodes(),function(e){return!t.children(e).length}),i=A(B(N(A(r,function(e){return t.node(e).rank}))+1),function(){return[]});function a(r){sn(n,r)||(n[r]=!0,i[t.node(r).rank].push(r),e.o(t.successors(r),a))}var o=V(r,function(e){return t.node(e).rank});return e.o(o,a),i}function ri(t,n){return A(n,function(n){var r=t.inEdges(n);if(r.length){var i=e.n(r,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}function ii(t,n){var r={};return e.o(t,function(t,n){var i=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:n};e.r(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),e.o(n.edges(),function(t){var n=r[t.v],i=r[t.w];!e.r(n)&&!e.r(i)&&(i.indegree++,n.out.push(r[t.w]))}),ai(e.a(r,function(e){return!e.indegree}))}function ai(t){var n=[];function r(t){return function(n){n.merged||(e.r(n.barycenter)||e.r(t.barycenter)||n.barycenter>=t.barycenter)&&oi(t,n)}}function i(e){return function(n){n.in.push(e),--n.indegree===0&&t.push(n)}}for(;t.length;){var a=t.pop();n.push(a),e.o(a.in.reverse(),r(a)),e.o(a.out,i(a))}return A(e.a(n,function(e){return!e.merged}),function(e){return z(e,[`vs`,`i`,`barycenter`,`weight`])})}function oi(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function si(t,n){var r=lr(t,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=r.lhs,a=V(r.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(li(!!n)),l=ci(o,a,l),e.o(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=ci(o,a,l)});var u={vs:x(o)};return c&&(u.barycenter=s/c,u.weight=c),u}function ci(e,t,n){for(var r;t.length&&(r=O(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function li(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function ui(t,n,r,i){var a=t.children(n),o=t.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=e.a(a,function(e){return e!==s&&e!==c}));var u=ri(t,a);e.o(u,function(e){if(t.children(e.v).length){var n=ui(t,e.v,r,i);l[e.v]=n,Object.prototype.hasOwnProperty.call(n,`barycenter`)&&fi(e,n)}});var d=ii(u,r);di(d,l);var f=si(d,i);if(s&&(f.vs=x([s,f.vs,c]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function di(t,n){e.o(t,function(e){e.vs=x(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}function fi(t,n){e.r(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}function pi(e){var t=cr(e),n=mi(e,B(1,t+1),`inEdges`),r=mi(e,B(t-1,-1,-1),`outEdges`),i=ni(e);gi(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){hi(s%2?n:r,s%4>=2),i=K(e);var l=ei(e,i);l<a&&(c=0,o=Ut(i),a=l)}gi(e,o)}function mi(e,t,n){return A(t,function(t){return Qr(e,t,n)})}function hi(t,n){var r=new e.t;e.o(t,function(t){var i=t.graph().root,a=ui(t,i,r,n);e.o(a.vs,function(e,n){t.node(e).order=n}),Zr(t,r,a.vs)})}function gi(t,n){e.o(n,function(n){e.o(n,function(e,n){t.node(e).order=n})})}function _i(t){var n=yi(t);e.o(t.graph().dummyChains,function(e){for(var r=t.node(e),i=r.edgeObj,a=vi(t,n,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;e!==i.w;){if(r=t.node(e),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(e,l),e=t.successors(e)[0]}})}function vi(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function yi(t){var n={},r=0;function i(a){var o=r;e.o(t.children(a),i),n[a]={low:o,lim:r++}}return e.o(t.children(),i),n}function bi(t,n){var r={};function i(n,i){var a=0,o=0,s=n.length,c=O(i);return e.o(i,function(n,l){var u=Si(t,n),d=u?t.node(u).order:s;(u||n===c)&&(e.o(i.slice(o,l+1),function(n){e.o(t.predecessors(n),function(e){var i=t.node(e),o=i.order;(o<a||d<o)&&!(i.dummy&&t.node(n).dummy)&&Ci(r,e,n)})}),o=l+1,a=d)}),i}return e.n(n,i),r}function xi(t,n){var r={};function i(n,i,a,o,s){var c;e.o(B(i,a),function(i){c=n[i],t.node(c).dummy&&e.o(t.predecessors(c),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&Ci(r,e,c)})})}function a(n,r){var a=-1,o,s=0;return e.o(r,function(e,c){if(t.node(e).dummy===`border`){var l=t.predecessors(e);l.length&&(o=t.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,n.length)}),r}return e.n(n,a),r}function Si(e,t){if(e.node(t).dummy)return k(e.predecessors(t),function(t){return e.node(t).dummy})}function Ci(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function wi(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Ti(t,n,r,i){var a={},o={},s={};return e.o(n,function(t){e.o(t,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),e.o(n,function(t){var n=-1;e.o(t,function(e){var t=i(e);if(t.length){t=V(t,function(e){return s[e]});for(var c=(t.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=t[l];o[e]===e&&n<s[d]&&!wi(r,e,d)&&(o[d]=e,o[e]=a[e]=a[d],n=s[d])}}})}),{root:a,align:o}}function Ei(t,n,r,i,a){var o={},s=Di(t,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(e){var n=s.outEdges(e).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=t.node(e);n!==1/0&&r.borderType!==c&&(o[e]=Math.max(o[e],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),e.o(i,function(e){o[e]=o[r[e]]}),o}function Di(t,n,r,i){var a=new e.t,o=t.graph(),s=Mi(o.nodesep,o.edgesep,i);return e.o(n,function(n){var i;e.o(n,function(e){var n=r[e];if(a.setNode(n),i){var o=r[i],c=a.edge(o,n);a.setEdge(o,n,Math.max(s(t,e,i),c||0))}i=e})}),a}function Oi(t,n){return I(e.i(n),function(e){var n=-1/0,r=1/0;return tn(e,function(e,i){var a=Ni(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)}),n-r})}function ki(t,n){var r=e.i(n),i=F(r),a=N(r);e.o([`u`,`d`],function(r){e.o([`l`,`r`],function(o){var s=r+o,c=t[s],l;if(c!==n){var u=e.i(c);l=o===`l`?i-F(u):a-N(u),l&&(t[s]=j(c,function(e){return e+l}))}})})}function Ai(e,t){return j(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=V(A(e,r));return(i[1]+i[2])/2})}function ji(t){var n=K(t),r=P(bi(t,n),xi(t,n)),i={},a;return e.o([`u`,`d`],function(o){a=o===`u`?n:e.i(n).reverse(),e.o([`l`,`r`],function(n){n===`r`&&(a=A(a,function(t){return e.i(t).reverse()}));var s=(o===`u`?t.predecessors:t.successors).bind(t),c=Ti(t,a,r,s),l=Ei(t,a,c.root,c.align,n===`r`);n===`r`&&(l=j(l,function(e){return-e})),i[o+n]=l})}),ki(i,Oi(t,i)),Ai(i,t.graph().align)}function Mi(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function Ni(e,t){return e.node(t).width}function Pi(e){e=rr(e),Fi(e),nn(ji(e),function(t,n){e.node(n).x=t})}function Fi(t){var n=K(t),r=t.graph().ranksep,i=0;e.o(n,function(n){var a=N(A(n,function(e){return t.node(e).height}));e.o(n,function(e){t.node(e).y=i+a/2}),i+=a+r})}function Ii(e,t){var n=t&&t.debugTiming?ur:dr;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>qi(e));n(` runLayout`,()=>Li(t,n)),n(` updateInputGraph`,()=>Ri(e,t))})}function Li(e,t){t(` makeSpaceForEdgeLabels`,()=>Ji(e)),t(` removeSelfEdges`,()=>ra(e)),t(` acyclic`,()=>$n(e)),t(` nestingGraph.run`,()=>Kr(e)),t(` rank`,()=>Hr(rr(e))),t(` injectEdgeLabelProxies`,()=>Yi(e)),t(` removeEmptyRanks`,()=>or(e)),t(` nestingGraph.cleanup`,()=>Xr(e)),t(` normalizeRanks`,()=>ar(e)),t(` assignRankMinMax`,()=>Xi(e)),t(` removeEdgeLabelProxies`,()=>Zi(e)),t(` normalize.run`,()=>br(e)),t(` parentDummyChains`,()=>_i(e)),t(` addBorderSegments`,()=>fr(e)),t(` order`,()=>pi(e)),t(` insertSelfEdges`,()=>ia(e)),t(` adjustCoordinateSystem`,()=>mr(e)),t(` position`,()=>Pi(e)),t(` positionSelfEdges`,()=>aa(e)),t(` removeBorderNodes`,()=>na(e)),t(` normalize.undo`,()=>Sr(e)),t(` fixupEdgeLabelCoords`,()=>ea(e)),t(` undoCoordinateSystem`,()=>hr(e)),t(` translateGraph`,()=>Qi(e)),t(` assignNodeIntersects`,()=>$i(e)),t(` reversePoints`,()=>ta(e)),t(` acyclic.undo`,()=>tr(e))}function Ri(t,n){e.o(t.nodes(),function(e){var r=t.node(e),i=n.node(e);r&&(r.x=i.x,r.y=i.y,n.children(e).length&&(r.width=i.width,r.height=i.height))}),e.o(t.edges(),function(e){var r=t.edge(e),i=n.edge(e);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var zi=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],Bi={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Vi=[`acyclicer`,`ranker`,`rankdir`,`align`],Hi=[`width`,`height`],Ui={width:0,height:0},Wi=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Gi={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ki=[`labelpos`];function qi(t){var n=new e.t({multigraph:!0,compound:!0}),r=sa(t.graph());return n.setGraph(P({},Bi,oa(r,zi),z(r,Vi))),e.o(t.nodes(),function(e){var r=sa(t.node(e));n.setNode(e,qt(oa(r,Hi),Ui)),n.setParent(e,t.parent(e))}),e.o(t.edges(),function(e){var r=sa(t.edge(e));n.setEdge(e,P({},Gi,oa(r,Wi),z(r,Ki)))}),n}function Ji(t){var n=t.graph();n.ranksep/=2,e.o(t.edges(),function(e){var r=t.edge(e);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(n.rankdir===`TB`||n.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Yi(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v);G(t,`edge-proxy`,{rank:(t.node(e.w).rank-r.rank)/2+r.rank,e},`_ep`)}})}function Xi(t){var n=0;e.o(t.nodes(),function(e){var r=t.node(e);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,n=N(n,r.maxRank))}),t.graph().maxRank=n}function Zi(t){e.o(t.nodes(),function(e){var n=t.node(e);n.dummy===`edge-proxy`&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function Qi(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e.o(t.nodes(),function(e){l(t.node(e))}),e.o(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,e.o(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),e.o(t.edges(),function(r){var a=t.edge(r);e.o(a.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=r-n+s,o.height=a-i+c}function $i(t){e.o(t.edges(),function(e){var n=t.edge(e),r=t.node(e.v),i=t.node(e.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ir(r,a)),n.points.push(ir(i,o))})}function ea(t){e.o(t.edges(),function(e){var n=t.edge(e);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function ta(t){e.o(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function na(t){e.o(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(O(n.borderLeft)),o=t.node(O(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.o(t.nodes(),function(e){t.node(e).dummy===`border`&&t.removeNode(e)})}function ra(t){e.o(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||=[],n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function ia(t){var n=K(t);e.o(n,function(n){var r=0;e.o(n,function(n,i){var a=t.node(n);a.order=i+r,e.o(a.selfEdges,function(e){G(t,`selfedge`,{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},`_se`)}),delete a.selfEdges})})}function aa(t){e.o(t.nodes(),function(e){var n=t.node(e);if(n.dummy===`selfedge`){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function oa(e,t){return j(z(e,t),Number)}function sa(t){var n={};return e.o(t,function(e,t){n[t.toLowerCase()]=e}),n}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ii}});