@sme.up/ketchup2 2.7.0 → 2.8.1

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 (288) hide show
  1. package/dist/abnfDiagram-VCTEODGH-DwAVRNNu.js +89 -0
  2. package/dist/{arc-CVbkjF8U.js → arc-DXfwi1YX.js} +8 -6
  3. package/dist/architecture-7GRP2DOG-BsytjMto.js +3 -0
  4. package/dist/{architectureDiagram-3BPJPVTR-B6VZAtZU.js → architectureDiagram-5GKGNRK7-N1aPr2hw.js} +636 -540
  5. package/dist/assets/svg/functions.svg +1 -0
  6. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  7. package/dist/basic-components/button-list/button-list-types.d.ts +2 -1
  8. package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
  9. package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
  10. package/dist/basic-components/cell/cell-types.d.ts +5 -0
  11. package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
  12. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  13. package/dist/basic-components/checkbox/checkbox-types.d.ts +5 -0
  14. package/dist/basic-components/checkbox/checkbox-types.d.ts.map +1 -1
  15. package/dist/basic-components/chips/chips-types.d.ts +15 -1
  16. package/dist/basic-components/chips/chips-types.d.ts.map +1 -1
  17. package/dist/basic-components/chips/chips.d.ts.map +1 -1
  18. package/dist/basic-components/chips-input/chips-input-types.d.ts +5 -0
  19. package/dist/basic-components/chips-input/chips-input-types.d.ts.map +1 -1
  20. package/dist/basic-components/chips-input/chips-input.d.ts.map +1 -1
  21. package/dist/basic-components/file-upload/file-upload-hook.d.ts.map +1 -1
  22. package/dist/basic-components/list/list.d.ts.map +1 -1
  23. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts +5 -0
  24. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete-types.d.ts.map +1 -1
  25. package/dist/basic-components/multiple-autocomplete/multiple-autocomplete.d.ts.map +1 -1
  26. package/dist/basic-components/multiple-select/multiple-select-types.d.ts +5 -0
  27. package/dist/basic-components/multiple-select/multiple-select-types.d.ts.map +1 -1
  28. package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
  29. package/dist/basic-components/select/select.d.ts.map +1 -1
  30. package/dist/blockDiagram-I7D4REHJ-Cu18ws5-.js +1922 -0
  31. package/dist/{c4Diagram-AAUBKEIU-CdT8VCbo.js → c4Diagram-7LVT6UL2-B-uBy_NE.js} +899 -850
  32. package/dist/{channel-C-LAmObA.js → channel-CuEby436.js} +1 -1
  33. package/dist/chunk-2E4U76K2-ComA5SPA.js +348 -0
  34. package/dist/{chunk-QZHKN3VN-lYfzaOt9.js → chunk-2Q5K7J3B-kzxEEeTu.js} +2 -2
  35. package/dist/{chunk-3OPIFGDE-Bs2mXISw.js → chunk-4HAMMTFA-CZgIgrp_.js} +1667 -1145
  36. package/dist/{chunk-FMBD7UC4-BURT0llY.js → chunk-5VM5RSS4-Cr17nBXp.js} +2 -2
  37. package/dist/{chunk-5ZQYHXKU-B_nOC8-n.js → chunk-75Z2AOVW-Drsj7a97.js} +106 -136
  38. package/dist/chunk-CLGD4ZFX-CLGio9rD.js +14 -0
  39. package/dist/{chunk-CSCIHK7Q-BEk3YcEH.js → chunk-DU6HZSFF-waeanndy.js} +1005 -768
  40. package/dist/{chunk-ND2GUHAM-Ca12h-m9.js → chunk-F27PBJKO-jIrOJO87.js} +18 -17
  41. package/dist/{chunk-NNHCCRGN-BB1q5NkR.js → chunk-FOHPRMQF-LRqOLsSw.js} +5518 -4708
  42. package/dist/{chunk-O5CBEL6O-DbWeP4Au.js → chunk-GMAD6QVW-D80II4AD.js} +486 -520
  43. package/dist/chunk-GVQU2GXP-DP3t_9Rl.js +37 -0
  44. package/dist/{chunk-AQP2D5EJ-vJ_pitKp.js → chunk-IMKFNOWR-8ItzAAcf.js} +336 -318
  45. package/dist/{chunk-4BX2VUAB-zglw1T4d.js → chunk-JWPE2WC7-Ccb0QaC8.js} +2 -2
  46. package/dist/chunk-L3NEJ4N5-qPot4t6M.js +245 -0
  47. package/dist/chunk-LNGE3PJU-CtYcu9x8.js +1521 -0
  48. package/dist/{chunk-KSCS5N6A-BemQomLE.js → chunk-OSK3NFVY-CQhPF3Mc.js} +310 -198
  49. package/dist/chunk-P2QGCYS3-BUeNZ170.js +67 -0
  50. package/dist/chunk-POPQ4Y6H-CU9oz17Z.js +26 -0
  51. package/dist/chunk-PWAF6VOD-D37VoZ8H.js +275 -0
  52. package/dist/{flowDiagram-I6XJVG4X-DnsxKD0w.js → chunk-SHT3W25Y-Cri27Jke.js} +581 -543
  53. package/dist/chunk-SVP7TREG-CyJlOPau.js +490 -0
  54. package/dist/{chunk-727SXJPM-CDeV7mmg.js → chunk-TICWLB2K-Cw2iT_VD.js} +191 -185
  55. package/dist/{chunk-LZXEDZCA-J9irjuVP.js → chunk-TLUHSLCS-BdsLNXjt.js} +35 -25
  56. package/dist/chunk-XXDRQBXY-C1ZEFXGu.js +9 -0
  57. package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
  58. package/dist/classDiagram-ZZMXUADV-L32jCfMj.js +30 -0
  59. package/dist/classDiagram-v2-VYDZK3BY-BsnrDCgX.js +30 -0
  60. package/dist/components/activity-timeline/activity-timeline-types.d.ts +46 -0
  61. package/dist/components/activity-timeline/activity-timeline-types.d.ts.map +1 -0
  62. package/dist/components/activity-timeline/activity-timeline.d.ts +4 -0
  63. package/dist/components/activity-timeline/activity-timeline.d.ts.map +1 -0
  64. package/dist/components/app-bar/app-bar.d.ts.map +1 -1
  65. package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  66. package/dist/components/chat/chat.d.ts.map +1 -1
  67. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts +12 -0
  68. package/dist/components/data-table/assets/data-table-row-actions-collapsed.d.ts.map +1 -0
  69. package/dist/components/data-table/assets/data-table-row-actions.d.ts +11 -0
  70. package/dist/components/data-table/assets/data-table-row-actions.d.ts.map +1 -0
  71. package/dist/components/data-table/data-table-types.d.ts +52 -1
  72. package/dist/components/data-table/data-table-types.d.ts.map +1 -1
  73. package/dist/components/data-table/data-table.d.ts.map +1 -1
  74. package/dist/components/data-table/header/Header.d.ts.map +1 -1
  75. package/dist/components/data-table/header/header-types.d.ts +7 -1
  76. package/dist/components/data-table/header/header-types.d.ts.map +1 -1
  77. package/dist/components/echarts/echarts-graph.d.ts.map +1 -1
  78. package/dist/components/scaffold/context/scaffold-provider.d.ts.map +1 -1
  79. package/dist/components/tab-bar/tab-bar-assets.d.ts +1 -0
  80. package/dist/components/tab-bar/tab-bar-assets.d.ts.map +1 -1
  81. package/dist/components/tab-bar/tab-bar.d.ts.map +1 -1
  82. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  83. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts +14 -0
  84. package/dist/components/workflow-designer/workflow-designer-metadata-panel.d.ts.map +1 -0
  85. package/dist/components/workflow-designer/workflow-designer-types.d.ts +40 -7
  86. package/dist/components/workflow-designer/workflow-designer-types.d.ts.map +1 -1
  87. package/dist/components/workflow-designer/workflow-designer-utils.d.ts +80 -1
  88. package/dist/components/workflow-designer/workflow-designer-utils.d.ts.map +1 -1
  89. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts +2 -0
  90. package/dist/components/workflow-designer/workflow-designer-utils.test.d.ts.map +1 -0
  91. package/dist/components/workflow-designer/workflow-designer.d.ts +4 -3
  92. package/dist/components/workflow-designer/workflow-designer.d.ts.map +1 -1
  93. package/dist/{cose-bilkent-S5V4N54A-BhA3VnPW.js → cose-bilkent-JH36ORCC-Qs_Z6zBZ.js} +87 -83
  94. package/dist/cynefin-OW5HDTMX-BJXlKro0.js +3 -0
  95. package/dist/cynefinDiagram-5FMLGOSQ-3Ha1hdlV.js +355 -0
  96. package/dist/{cytoscape.esm-BU21wl3m.js → cytoscape.esm-C5TvPYYm.js} +2749 -2701
  97. package/dist/{dagre-3-RnF0EK.js → dagre-D5csT9sx.js} +144 -146
  98. package/dist/dagre-GXQ25YYZ-Bg7xf6xn.js +425 -0
  99. package/dist/{defaultLocale-DnzPsei5.js → defaultLocale-N-0uLSyg.js} +1 -4
  100. package/dist/diagram-S7CK7UJ4-BuDHTdHA.js +301 -0
  101. package/dist/{diagram-2AECGRRQ-23vM90dy.js → diagram-UQ7AKVKN-uvzJGj43.js} +82 -81
  102. package/dist/{diagram-KO2AKTUF-BEnEQF6b.js → diagram-VSXAHHWV-CrQQCs-B.js} +66 -65
  103. package/dist/{diagram-OG6HWLK6-Cfbv6mIH.js → diagram-VX7I27RA-BNmG1sig.js} +92 -89
  104. package/dist/{diagram-LMA3HP47-OWxAHrmz.js → diagram-Z3DM3KII-B6BrLhP0.js} +21 -20
  105. package/dist/{dist-Btd8EZyy.js → dist-CsrMlyO_.js} +2 -3
  106. package/dist/ebnfDiagram-PWID7BFC-DMx8xAFO.js +100 -0
  107. package/dist/erDiagram-RLTQ6QDP-bkJ9nzVK.js +1966 -0
  108. package/dist/eventmodeling-NTZA5JFV-Cj-VH7yh.js +3 -0
  109. package/dist/flowDiagram-HODETNUW-BIvD7-ts.js +17 -0
  110. package/dist/functional-components/multiple-field/multiple-field-types.d.ts +2 -0
  111. package/dist/functional-components/multiple-field/multiple-field-types.d.ts.map +1 -1
  112. package/dist/functional-components/multiple-field/multiple-field.d.ts.map +1 -1
  113. package/dist/functional-components/row/row-types.d.ts +5 -0
  114. package/dist/functional-components/row/row-types.d.ts.map +1 -1
  115. package/dist/functional-components/row/row.d.ts.map +1 -1
  116. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts +3 -1
  117. package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -1
  118. package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -1
  119. package/dist/functional-components/tree-picker/tree-picker-types.d.ts +42 -0
  120. package/dist/functional-components/tree-picker/tree-picker-types.d.ts.map +1 -0
  121. package/dist/functional-components/tree-picker/tree-picker.d.ts +3 -0
  122. package/dist/functional-components/tree-picker/tree-picker.d.ts.map +1 -0
  123. package/dist/{ganttDiagram-6RSMTGT7-CwbJqdwB.js → ganttDiagram-EL5Y4UJY-CL-ywzz_.js} +703 -710
  124. package/dist/gitGraph-4MIJSDKK-C9JGDovl.js +3 -0
  125. package/dist/{gitGraphDiagram-PVQCEYII-mL2WiT98.js → gitGraphDiagram-WWUBYQGX-aXhNDG6P.js} +156 -151
  126. package/dist/{graphlib-VMWSbyYi.js → graphlib-XW-Jr8pF.js} +5 -5
  127. package/dist/index.d.ts +4 -1
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/info-A6RAGUB7-CmZJKEaW.js +3 -0
  130. package/dist/infoDiagram-27XIBGKW-Je4heBlk.js +20 -0
  131. package/dist/{init-MwSGRDIl.js → init-CsQUQz36.js} +1 -3
  132. package/dist/{ishikawaDiagram-YF4QCWOH-DGOgWzve.js → ishikawaDiagram-5VMMS53U-DK7HlH95.js} +142 -141
  133. package/dist/{journeyDiagram-JHISSGLW-CHVTMdrq.js → journeyDiagram-3NMN7TZE-CpuYEKcB.js} +192 -191
  134. package/dist/{kanban-definition-UN3LZRKU-upKA3b5x.js → kanban-definition-UXKFOSKX-aK8uKmyY.js} +149 -146
  135. package/dist/{katex-D-2KeLwt.js → katex-CT2p8LXT.js} +1627 -1650
  136. package/dist/ketchup2.css +1 -1
  137. package/dist/ketchup2.es.js +34744 -32755
  138. package/dist/{line-DIhSUgmA.js → line-DTqYMLoX.js} +2 -2
  139. package/dist/{linear-DUAteVwl.js → linear-CXc5xaa6.js} +8 -9
  140. package/dist/locale/en/translation.json.d.ts +16 -0
  141. package/dist/locale/it/translation.json.d.ts +16 -0
  142. package/dist/mermaid-parser.core-BwVmI_Rq.js +638 -0
  143. package/dist/{mindmap-definition-RKZ34NQL-C3YkCJDi.js → mindmap-definition-YA3MSWOX-ZMYcmi9J.js} +170 -170
  144. package/dist/{ordinal-D_ZgubzR.js → ordinal-BubEveRk.js} +1 -1
  145. package/dist/packet-AYTQ26CC-B3tgRshR.js +3 -0
  146. package/dist/{path-DGNPZRdx.js → path-CnWkkRiY.js} +10 -11
  147. package/dist/pegDiagram-XKGWAZYB-DsfILwZN.js +94 -0
  148. package/dist/pie-WAS4IAKB-BRiI8kbI.js +3 -0
  149. package/dist/pieDiagram-E7YTZNPT-DcSLcLdd.js +203 -0
  150. package/dist/{quadrantDiagram-W4KKPZXB-C2oA-eGZ.js → quadrantDiagram-AXDQQJYC-DSx3teop.js} +300 -300
  151. package/dist/radar-RG4KPBEZ-ASOMQXFw.js +3 -0
  152. package/dist/railroad-74A4TZTK-oS840SLr.js +3 -0
  153. package/dist/railroad-abnf-HS5TGJTU-nnQAkZY2.js +3 -0
  154. package/dist/railroad-ebnf-LZEXJU2U-DBQIOba3.js +3 -0
  155. package/dist/railroad-peg-WCYAUIDC-fBPN2TVb.js +3 -0
  156. package/dist/railroadDiagram-O6MQD6OU-jOZRtNDi.js +76 -0
  157. package/dist/{requirementDiagram-4Y6WPE33-BEGryahw.js → requirementDiagram-BXWQKSXE-D14hkkez.js} +176 -173
  158. package/dist/{rough.esm-rcMoXTJj.js → rough.esm-DXYGHN3m.js} +60 -51
  159. package/dist/{sankeyDiagram-5OEKKPKP-VPzKV4zM.js → sankeyDiagram-P5KCCOFB-C0jmknYo.js} +123 -120
  160. package/dist/{sequenceDiagram-3UESZ5HK-Bc30_Cm2.js → sequenceDiagram-WJ2MYXX4-C00egnMz.js} +714 -722
  161. package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
  162. package/dist/{src-DjDATEq3.js → src-DQoflmwT.js} +499 -509
  163. package/dist/stateDiagram-D77RDMKH-YfzmviNY.js +220 -0
  164. package/dist/stateDiagram-v2-MP3YSRHH-B6Hzx8T0.js +30 -0
  165. package/dist/swimlanes-42K2YHIH-CJcMmxXf.js +4979 -0
  166. package/dist/swimlanesDiagram-VR7AAH4N-DirvhGBA.js +31 -0
  167. package/dist/{timeline-definition-PNZ67QCA-1z911Ume.js → timeline-definition-24CTP7MA-D2xfYuSV.js} +220 -219
  168. package/dist/treeView-Q6P3EWNA-BmvB2b-_.js +3 -0
  169. package/dist/treemap-WGGIJYW6-Cjjk75wA.js +3 -0
  170. package/dist/types/translation.d.ts +17 -1
  171. package/dist/types/translation.d.ts.map +1 -1
  172. package/dist/utils/data-structures.d.ts +2 -1
  173. package/dist/utils/data-structures.d.ts.map +1 -1
  174. package/dist/{v4-BK7K-jy_.js → v4-DIjJgmR0.js} +1 -1
  175. package/dist/{vennDiagram-CIIHVFJN-BiLcQ0SR.js → vennDiagram-4TSXK5OY-C4XLgus_.js} +332 -310
  176. package/dist/wardley-WFR3VGLG-BamDiE0x.js +3 -0
  177. package/dist/{wardleyDiagram-YWT4CUSO-Bq-BejOl.js → wardleyDiagram-VM6X3IG4-DFoKuS9s.js} +156 -155
  178. package/dist/{xychartDiagram-2RQKCTM6-B13zquXC.js → xychartDiagram-S5SC5T6Z-BzKKgVBe.js} +740 -574
  179. package/package.json +41 -38
  180. package/dist/arc-w3BipdfE.cjs +0 -1
  181. package/dist/architecture-7EHR7CIX-Bzeobe9Y.cjs +0 -1
  182. package/dist/architecture-7EHR7CIX-C8NPmR2w.js +0 -3
  183. package/dist/architectureDiagram-3BPJPVTR-DlnXl9d5.cjs +0 -36
  184. package/dist/array-DZSRzHA_.cjs +0 -1
  185. package/dist/blockDiagram-GPEHLZMM-BohmRoCC.js +0 -3157
  186. package/dist/blockDiagram-GPEHLZMM-rfyR2Ffl.cjs +0 -132
  187. package/dist/c4Diagram-AAUBKEIU-Du1vqJYZ.cjs +0 -10
  188. package/dist/channel-DJpMBAs-.cjs +0 -1
  189. package/dist/chunk-2J33WTMH-BMqA-riF.js +0 -25
  190. package/dist/chunk-2J33WTMH-BQs9SXq8.cjs +0 -1
  191. package/dist/chunk-3OPIFGDE-Bk_ByTBh.cjs +0 -62
  192. package/dist/chunk-4BX2VUAB-C8VW0QW0.cjs +0 -1
  193. package/dist/chunk-55IACEB6-CNxnI3nm.cjs +0 -1
  194. package/dist/chunk-55IACEB6-CmKDx-YO.js +0 -8
  195. package/dist/chunk-5ZQYHXKU-DMrStm4M.cjs +0 -2
  196. package/dist/chunk-727SXJPM-Dj8nsm0O.cjs +0 -206
  197. package/dist/chunk-AQP2D5EJ-CYuEYK6i.cjs +0 -231
  198. package/dist/chunk-BSJP7CBP-CSCICPww.cjs +0 -1
  199. package/dist/chunk-BSJP7CBP-YsQACkyC.js +0 -82
  200. package/dist/chunk-CSCIHK7Q-BAdl6GW-.cjs +0 -124
  201. package/dist/chunk-FMBD7UC4-BIKI8zae.cjs +0 -15
  202. package/dist/chunk-KSCS5N6A-DsN7gJEf.cjs +0 -10
  203. package/dist/chunk-L5ZTLDWV-BQCNoMVG.js +0 -32
  204. package/dist/chunk-L5ZTLDWV-BbLRyKcx.cjs +0 -1
  205. package/dist/chunk-LZXEDZCA-rjLYyX5U.cjs +0 -1
  206. package/dist/chunk-ND2GUHAM-1o9Sjy2_.cjs +0 -1
  207. package/dist/chunk-NNHCCRGN-qV8bfiMQ.cjs +0 -159
  208. package/dist/chunk-NZK2D7GU-CPxdSJTy.js +0 -67
  209. package/dist/chunk-NZK2D7GU-CRneGIrP.cjs +0 -1
  210. package/dist/chunk-O5CBEL6O-Cd4Z5Dy9.cjs +0 -70
  211. package/dist/chunk-QZHKN3VN-ZJ4hLUIw.cjs +0 -1
  212. package/dist/chunk-WU5MYG2G-DuCEb9G-.js +0 -9
  213. package/dist/chunk-WU5MYG2G-ExiaHFbF.cjs +0 -1
  214. package/dist/chunk-XPW4576I-BybfDrup.cjs +0 -32
  215. package/dist/chunk-XPW4576I-D3DQ47oC.js +0 -1146
  216. package/dist/classDiagram-4FO5ZUOK-CRX1QumH.js +0 -29
  217. package/dist/classDiagram-4FO5ZUOK-yTAlLFG2.cjs +0 -1
  218. package/dist/classDiagram-v2-Q7XG4LA2-oM01mYfB.js +0 -29
  219. package/dist/classDiagram-v2-Q7XG4LA2-yTAlLFG2.cjs +0 -1
  220. package/dist/cose-bilkent-S5V4N54A-D7fhWOP4.cjs +0 -1
  221. package/dist/cytoscape.esm-CElDUMAx.cjs +0 -321
  222. package/dist/dagre-B2BBwKNb.cjs +0 -1
  223. package/dist/dagre-BM42HDAG-DfpR5Mml.js +0 -297
  224. package/dist/dagre-BM42HDAG-kORxgFz_.cjs +0 -4
  225. package/dist/defaultLocale-u9yUoUmE.cjs +0 -1
  226. package/dist/diagram-2AECGRRQ-B0IEGKjr.cjs +0 -43
  227. package/dist/diagram-5GNKFQAL-BEY9x4us.js +0 -101
  228. package/dist/diagram-5GNKFQAL-vb6e35PR.cjs +0 -10
  229. package/dist/diagram-KO2AKTUF-9V_zu-2x.cjs +0 -3
  230. package/dist/diagram-LMA3HP47-BN_geiB9.cjs +0 -24
  231. package/dist/diagram-OG6HWLK6-6OnEK9-6.cjs +0 -24
  232. package/dist/dist-D8RD2QWc.cjs +0 -1
  233. package/dist/erDiagram-TEJ5UH35-6OEXIM6m.js +0 -1700
  234. package/dist/erDiagram-TEJ5UH35-CzsOt0l4.cjs +0 -85
  235. package/dist/eventmodeling-FCH6USID-Cued7Lz2.cjs +0 -1
  236. package/dist/eventmodeling-FCH6USID-mCB8hc7X.js +0 -3
  237. package/dist/flowDiagram-I6XJVG4X-DR1CMtZZ.cjs +0 -162
  238. package/dist/ganttDiagram-6RSMTGT7-C5t5_mjf.cjs +0 -292
  239. package/dist/gitGraph-WXDBUCRP-B23gOjfP.js +0 -3
  240. package/dist/gitGraph-WXDBUCRP-Bi-Y5dA7.cjs +0 -1
  241. package/dist/gitGraphDiagram-PVQCEYII-CLdgm7yJ.cjs +0 -106
  242. package/dist/graphlib-CkkG5MuS.cjs +0 -1
  243. package/dist/info-J43DQDTF-DC3N8SoX.js +0 -3
  244. package/dist/info-J43DQDTF-jRjlWVKj.cjs +0 -1
  245. package/dist/infoDiagram-5YYISTIA-BIM8xaiE.js +0 -19
  246. package/dist/infoDiagram-5YYISTIA-CbnHgs-I.cjs +0 -2
  247. package/dist/init-07zIhv_j.cjs +0 -1
  248. package/dist/ishikawaDiagram-YF4QCWOH-DAWMXD1l.cjs +0 -70
  249. package/dist/journeyDiagram-JHISSGLW-DfnmJPLn.cjs +0 -139
  250. package/dist/kanban-definition-UN3LZRKU-CbeoJJE7.cjs +0 -89
  251. package/dist/katex-CkiTumqg.cjs +0 -257
  252. package/dist/ketchup2.cjs.js +0 -485
  253. package/dist/line-CzwncDY3.cjs +0 -1
  254. package/dist/linear-1lpO_WlJ.cjs +0 -1
  255. package/dist/mermaid-parser.core-ADyJ_PY4.cjs +0 -3
  256. package/dist/mermaid-parser.core-D6xVjl2t.js +0 -373
  257. package/dist/mindmap-definition-RKZ34NQL-C8cZ7xN-.cjs +0 -96
  258. package/dist/ordinal-CUPR-p0T.cjs +0 -1
  259. package/dist/packet-YPE3B663-CGZxZ1Z0.cjs +0 -1
  260. package/dist/packet-YPE3B663-D2JW2EUF.js +0 -3
  261. package/dist/path-Kklx0M1v.cjs +0 -1
  262. package/dist/pie-LRSECV5Y-BHyd33ZA.js +0 -3
  263. package/dist/pie-LRSECV5Y-Ca_qbHEv.cjs +0 -1
  264. package/dist/pieDiagram-4H26LBE5-BvhguaHn.js +0 -165
  265. package/dist/pieDiagram-4H26LBE5-DpDrJBQK.cjs +0 -30
  266. package/dist/quadrantDiagram-W4KKPZXB-hWSN7YfD.cjs +0 -7
  267. package/dist/radar-GUYGQ44K-BpJWFTCm.js +0 -3
  268. package/dist/radar-GUYGQ44K-CYqWSxO_.cjs +0 -1
  269. package/dist/requirementDiagram-4Y6WPE33-GmjmsbiY.cjs +0 -84
  270. package/dist/rough.esm-r0QOSzHM.cjs +0 -1
  271. package/dist/sankeyDiagram-5OEKKPKP-DbGAx-Bm.cjs +0 -40
  272. package/dist/sequenceDiagram-3UESZ5HK-D85rpewi.cjs +0 -162
  273. package/dist/src-DEmZ9bFr.cjs +0 -1
  274. package/dist/stateDiagram-AJRCARHV-Bg4Y3HPa.cjs +0 -1
  275. package/dist/stateDiagram-AJRCARHV-wqjltbKb.js +0 -217
  276. package/dist/stateDiagram-v2-BHNVJYJU-Cgrf5tQC.js +0 -27
  277. package/dist/stateDiagram-v2-BHNVJYJU-D_Tzn4WM.cjs +0 -1
  278. package/dist/timeline-definition-PNZ67QCA-Dpu3hfhP.cjs +0 -120
  279. package/dist/treeView-BLDUP644-C9tQMbiq.js +0 -3
  280. package/dist/treeView-BLDUP644-DKh9BcaT.cjs +0 -1
  281. package/dist/treemap-LRROVOQU-2aferAph.cjs +0 -1
  282. package/dist/treemap-LRROVOQU-CBv3oGC3.js +0 -3
  283. package/dist/v4-Dyp-SQ1c.cjs +0 -1
  284. package/dist/vennDiagram-CIIHVFJN-BLBDqWTG.cjs +0 -34
  285. package/dist/wardley-L42UT6IY-CIM0_V5T.js +0 -3
  286. package/dist/wardley-L42UT6IY-DjjjOB8T.cjs +0 -1
  287. package/dist/wardleyDiagram-YWT4CUSO-dzyAWKiV.cjs +0 -78
  288. package/dist/xychartDiagram-2RQKCTM6-DA3O42Dk.cjs +0 -7
@@ -1,13 +1,15 @@
1
- import { g as e, h as t, p as n, x as r, y as i } from "./src-DjDATEq3.js";
2
- import { H as a, J as o, K as s, U as c, a as l, b as u, f as d, v as f, w as p, x as m, y as h, z as g } from "./chunk-CSCIHK7Q-BEk3YcEH.js";
3
- import { c as _, i as v } from "./chunk-5ZQYHXKU-B_nOC8-n.js";
4
- import { t as y } from "./chunk-WU5MYG2G-DuCEb9G-.js";
5
- import { a as b, i as x, n as S, r as C } from "./chunk-O5CBEL6O-DbWeP4Au.js";
6
- import { t as w } from "./mermaid-parser.core-D6xVjl2t.js";
7
- import { t as T } from "./chunk-4BX2VUAB-zglw1T4d.js";
8
- import { t as E } from "./cytoscape.esm-BU21wl3m.js";
1
+ import { _ as e, m as t, p as n, y as r } from "./src-DQoflmwT.js";
2
+ import { H as i, J as a, K as o, U as s, a as c, b as l, f as u, v as d, w as f, x as p, y as m, z as h } from "./chunk-DU6HZSFF-waeanndy.js";
3
+ import { n as g } from "./chunk-Y2CYZVJY-i11wjrBe.js";
4
+ import { c as _, i as v } from "./chunk-75Z2AOVW-Drsj7a97.js";
5
+ import { t as y } from "./chunk-CLGD4ZFX-CLGio9rD.js";
6
+ import { i as b, r as x, t as S } from "./chunk-PWAF6VOD-D37VoZ8H.js";
7
+ import { n as C } from "./chunk-GMAD6QVW-D80II4AD.js";
8
+ import { n as w } from "./mermaid-parser.core-BwVmI_Rq.js";
9
+ import { t as T } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
10
+ import { t as E } from "./cytoscape.esm-C5TvPYYm.js";
9
11
  //#region node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js
10
- var D = /* @__PURE__ */ i(((e, t) => {
12
+ var D = /* @__PURE__ */ e(((e, t) => {
11
13
  (function(n, r) {
12
14
  typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.layoutBase = r() : n.layoutBase = r();
13
15
  })(e, function() {
@@ -101,7 +103,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
101
103
  (function(e, t, n) {
102
104
  var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(5);
103
105
  function l(e, t, n, o) {
104
- n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ? this.rect = new a(t.x, t.y, n.width, n.height) : this.rect = new a();
106
+ n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, this.rect = n != null && t != null ? new a(t.x, t.y, n.width, n.height) : new a();
105
107
  }
106
108
  for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
107
109
  l.prototype.getEdges = function() {
@@ -151,7 +153,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
151
153
  }, l.prototype.getEdgesBetween = function(e) {
152
154
  var t = [], n = this;
153
155
  return n.edges.forEach(function(r) {
154
- if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
156
+ if (r.source != n && r.target != n) throw "Incorrect edge source and/or target";
155
157
  (r.target == e || r.source == e) && t.push(r);
156
158
  }), t;
157
159
  }, l.prototype.getNeighborsList = function() {
@@ -271,17 +273,16 @@ var D = /* @__PURE__ */ i(((e, t) => {
271
273
  if (this.graphManager == null) throw "Graph has no graph mgr!";
272
274
  if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
273
275
  return r.owner = this, this.getNodes().push(r), r;
274
- } else {
275
- var i = e;
276
- if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
277
- if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
278
- return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
279
276
  }
277
+ var i = e;
278
+ if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
279
+ if (t.owner != n.owner || t.owner != this) throw "Both owners must be this graph!";
280
+ return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
280
281
  }, f.prototype.remove = function(e) {
281
282
  var t = e;
282
283
  if (e instanceof s) {
283
284
  if (t == null) throw "Node is null!";
284
- if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
285
+ if (t.owner == null || t.owner != this) throw "Owner graph is invalid!";
285
286
  if (this.graphManager == null) throw "Owner graph manager is invalid!";
286
287
  for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
287
288
  var o = this.nodes.indexOf(t);
@@ -290,8 +291,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
290
291
  } else if (e instanceof c) {
291
292
  var r = e;
292
293
  if (r == null) throw "Edge is null!";
293
- if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
294
- if (!(r.source.owner != null && r.target.owner != null && r.source.owner == this && r.target.owner == this)) throw "Source and/or target owner is invalid!";
294
+ if (r.source == null || r.target == null) throw "Source and/or target is null!";
295
+ if (r.source.owner == null || r.target.owner == null || r.source.owner != this || r.target.owner != this) throw "Source and/or target owner is invalid!";
295
296
  var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
296
297
  if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
297
298
  r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
@@ -328,7 +329,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
328
329
  var i = t[r];
329
330
  e += i.calcEstimatedSize();
330
331
  }
331
- return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
332
+ return this.estimatedSize = e == 0 ? a.EMPTY_COMPOUND_NODE_SIZE : e / Math.sqrt(this.nodes.length), this.estimatedSize;
332
333
  }, f.prototype.updateConnected = function() {
333
334
  var e = this;
334
335
  if (this.nodes.length == 0) {
@@ -368,17 +369,16 @@ var D = /* @__PURE__ */ i(((e, t) => {
368
369
  if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
369
370
  if (t.child != null) throw "Already has a child!";
370
371
  return e.parent = t, t.child = e, e;
371
- } else {
372
- i = n, r = t, n = e;
373
- var a = r.getOwner(), o = i.getOwner();
374
- if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
375
- if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
376
- if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
377
- if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
378
- if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
379
- if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
380
- return n.source.edges.push(n), n.target.edges.push(n), n;
381
372
  }
373
+ i = n, r = t, n = e;
374
+ var a = r.getOwner(), o = i.getOwner();
375
+ if (a == null || a.getGraphManager() != this) throw "Source not in this graph mgr!";
376
+ if (o == null || o.getGraphManager() != this) throw "Target not in this graph mgr!";
377
+ if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
378
+ if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
379
+ if (this.edges.push(n), n.source == null || n.target == null) throw "Edge source and/or target is null!";
380
+ if (n.source.edges.indexOf(n) != -1 || n.target.edges.indexOf(n) != -1) throw "Edge already in source and/or target incidency list!";
381
+ return n.source.edges.push(n), n.target.edges.push(n), n;
382
382
  }, a.prototype.remove = function(e) {
383
383
  if (e instanceof r) {
384
384
  var t = e;
@@ -398,10 +398,10 @@ var D = /* @__PURE__ */ i(((e, t) => {
398
398
  } else if (e instanceof i) {
399
399
  if (a = e, a == null) throw "Edge is null!";
400
400
  if (!a.isInterGraph) throw "Not an inter-graph edge!";
401
- if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
402
- if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
401
+ if (a.source == null || a.target == null) throw "Source and/or target is null!";
402
+ if (a.source.edges.indexOf(a) == -1 || a.target.edges.indexOf(a) == -1) throw "Source and/or target doesn't know this edge!";
403
403
  var u = a.source.edges.indexOf(a);
404
- if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
404
+ if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), a.source.owner == null || a.source.owner.getGraphManager() == null) throw "Edge owner graph or owner graph manager is null!";
405
405
  if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
406
406
  var u = a.source.owner.getGraphManager().edges.indexOf(a);
407
407
  a.source.owner.getGraphManager().edges.splice(u, 1);
@@ -443,7 +443,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
443
443
  }, a.prototype.getLayout = function() {
444
444
  return this.layout;
445
445
  }, a.prototype.isOneAncestorOfOther = function(e, t) {
446
- if (!(e != null && t != null)) throw "assert failed";
446
+ if (e == null || t == null) throw "assert failed";
447
447
  if (e == t) return !0;
448
448
  var n = e.getOwner(), r;
449
449
  do {
@@ -514,7 +514,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
514
514
  var o = a * n[0], s = n[1] / a;
515
515
  n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
516
516
  }, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
517
- e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
517
+ n[0] = e.getCenterX() < t.getCenterX() ? -1 : 1, n[1] = e.getCenterY() < t.getCenterY() ? -1 : 1;
518
518
  }, i.getIntersection2 = function(e, t, n) {
519
519
  var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
520
520
  if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
@@ -538,9 +538,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
538
538
  case 3:
539
539
  j = d, A = r + m / D, n[0] = A, n[1] = j;
540
540
  break;
541
- case 4:
542
- A = u, j = i + -p * D, n[0] = A, n[1] = j;
543
- break;
541
+ case 4: A = u, j = i + -p * D, n[0] = A, n[1] = j;
544
542
  }
545
543
  if (!w) switch (k) {
546
544
  case 1:
@@ -552,9 +550,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
552
550
  case 3:
553
551
  N = y, M = a + S / D, n[2] = M, n[3] = N;
554
552
  break;
555
- case 4:
556
- M = v, N = o + -x * D, n[2] = M, n[3] = N;
557
- break;
553
+ case 4: M = v, N = o + -x * D, n[2] = M, n[3] = N;
558
554
  }
559
555
  }
560
556
  return !1;
@@ -577,7 +573,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
577
573
  if (c * c - 4 * s * l >= 0) {
578
574
  var u = (-c + Math.sqrt(c * c - 4 * s * l)) / (2 * s), d = (-c - Math.sqrt(c * c - 4 * s * l)) / (2 * s);
579
575
  return u >= 0 && u <= 1 ? [u] : d >= 0 && d <= 1 ? [d] : null;
580
- } else return null;
576
+ }
577
+ return null;
581
578
  }, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
582
579
  }),
583
580
  (function(e, t, n) {
@@ -813,7 +810,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
813
810
  if (Array.isArray(e)) {
814
811
  for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
815
812
  return n;
816
- } else return Array.from(e);
813
+ }
814
+ return Array.from(e);
817
815
  }
818
816
  var i = n(0), a = n(7), o = n(3), s = n(1), c = n(6), l = n(5), u = n(17), d = n(29);
819
817
  function f(e) {
@@ -840,8 +838,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
840
838
  return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
841
839
  }, f.prototype.runLayout = function() {
842
840
  this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
843
- var e = this.checkLayoutSuccess() ? !1 : this.layout();
844
- return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
841
+ var e = !this.checkLayoutSuccess() && this.layout();
842
+ return i.ANIMATE !== "during" && (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
845
843
  }, f.prototype.doPostLayout = function() {
846
844
  this.incremental || this.transform(), this.update();
847
845
  }, f.prototype.update2 = function() {
@@ -887,10 +885,12 @@ var D = /* @__PURE__ */ i(((e, t) => {
887
885
  s.splice(0, 1), o.add(u);
888
886
  for (var d = u.getEdges(), a = 0; a < d.length; a++) {
889
887
  var f = d[a].getOtherEnd(u);
890
- if (c.get(u) != f) if (!o.has(f)) s.push(f), c.set(f, u);
891
- else {
892
- t = !1;
893
- break;
888
+ if (c.get(u) != f) {
889
+ if (!o.has(f)) s.push(f), c.set(f, u);
890
+ else {
891
+ t = !1;
892
+ break;
893
+ }
894
894
  }
895
895
  }
896
896
  }
@@ -939,10 +939,9 @@ var D = /* @__PURE__ */ i(((e, t) => {
939
939
  i += (o - t) / 50 * (e - 50);
940
940
  }
941
941
  return i;
942
- } else {
943
- var s, c;
944
- return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
945
942
  }
943
+ var s, c;
944
+ return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
946
945
  }, f.findCenterOfTree = function(e) {
947
946
  var t = [];
948
947
  t = t.concat(e);
@@ -1036,7 +1035,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
1036
1035
  if (Array.isArray(e)) {
1037
1036
  for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
1038
1037
  return n;
1039
- } else return Array.from(e);
1038
+ }
1039
+ return Array.from(e);
1040
1040
  }
1041
1041
  var i = n(15), a = n(4), o = n(0), s = n(8), c = n(9);
1042
1042
  function l() {
@@ -1049,11 +1049,11 @@ var D = /* @__PURE__ */ i(((e, t) => {
1049
1049
  for (var e, t, n, r, i, s, c, l = this.getGraphManager().getAllEdges(), u = 0; u < l.length; u++) e = l[u], t = e.idealLength, e.isInterGraph && (r = e.getSource(), i = e.getTarget(), s = e.getSourceInLca().getEstimatedSize(), c = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += s + c - 2 * o.SIMPLE_NODE_SIZE), n = e.getLca().getInclusionTreeDepth(), e.idealLength += t * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (r.getInclusionTreeDepth() + i.getInclusionTreeDepth() - 2 * n));
1050
1050
  }, l.prototype.initSpringEmbedder = function() {
1051
1051
  var e = this.getAllNodes().length;
1052
- this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1052
+ this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (this.coolingFactor = e > a.ADAPTATION_LOWER_NODE_LIMIT ? Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1053
1053
  }, l.prototype.calcSpringForces = function() {
1054
1054
  for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
1055
1055
  }, l.prototype.calcRepulsionForces = function() {
1056
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n, r, i, o, s = this.getAllNodes(), c;
1056
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n, r, i, o, s = this.getAllNodes(), c;
1057
1057
  if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
1058
1058
  else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
1059
1059
  }, l.prototype.calcGravitationalForces = function() {
@@ -1105,7 +1105,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
1105
1105
  var o = /* @__PURE__ */ new Set();
1106
1106
  e.surrounding = [];
1107
1107
  for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
1108
- for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], !(e.getOwner() != s.getOwner() || e == s) && !t.has(s) && !o.has(s)) {
1108
+ for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], e.getOwner() == s.getOwner() && e != s && !t.has(s) && !o.has(s)) {
1109
1109
  var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
1110
1110
  f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
1111
1111
  }
@@ -1441,8 +1441,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
1441
1441
  var K = n[E - 2];
1442
1442
  n[E - 2] = 0;
1443
1443
  for (var q = E - 2; q >= U; q--) {
1444
- var J = r.hypot(this.s[q], K), Y = this.s[q] / J, ae = K / J;
1445
- if (this.s[q] = J, q !== U && (K = -ae * n[q - 1], n[q - 1] = Y * n[q - 1]), o) for (var X = 0; X < this.n; X++) J = Y * this.V[X][q] + ae * this.V[X][E - 1], this.V[X][E - 1] = -ae * this.V[X][q] + Y * this.V[X][E - 1], this.V[X][q] = J;
1444
+ var ae = r.hypot(this.s[q], K), J = this.s[q] / ae, Y = K / ae;
1445
+ if (this.s[q] = ae, q !== U && (K = -Y * n[q - 1], n[q - 1] = J * n[q - 1]), o) for (var X = 0; X < this.n; X++) ae = J * this.V[X][q] + Y * this.V[X][E - 1], this.V[X][E - 1] = -Y * this.V[X][q] + J * this.V[X][E - 1], this.V[X][q] = ae;
1446
1446
  }
1447
1447
  break;
1448
1448
  case 2:
@@ -1474,7 +1474,6 @@ var D = /* @__PURE__ */ i(((e, t) => {
1474
1474
  U++;
1475
1475
  }
1476
1476
  H = 0, E--;
1477
- break;
1478
1477
  }
1479
1478
  }
1480
1479
  return {
@@ -1638,7 +1637,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
1638
1637
  })
1639
1638
  ]);
1640
1639
  });
1641
- })), O = /* @__PURE__ */ i(((e, t) => {
1640
+ })), O = /* @__PURE__ */ e(((e, t) => {
1642
1641
  (function(n, r) {
1643
1642
  typeof e == "object" && typeof t == "object" ? t.exports = r(D()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(D()) : n.coseBase = r(n.layoutBase);
1644
1643
  })(e, function(e) {
@@ -1694,7 +1693,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
1694
1693
  }, x.prototype.newEdge = function(e) {
1695
1694
  return new s(null, null, e);
1696
1695
  }, x.prototype.initParameters = function() {
1697
- r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1696
+ r.prototype.initParameters.call(this, arguments), this.isSubLayout || (this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH < 10 ? 10 : c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1698
1697
  }, x.prototype.initSpringEmbedder = function() {
1699
1698
  r.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / u.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = .04, this.coolingAdjuster = 1;
1700
1699
  }, x.prototype.layout = function() {
@@ -1719,26 +1718,32 @@ var D = /* @__PURE__ */ i(((e, t) => {
1719
1718
  }
1720
1719
  return Object.keys(this.constraints).length > 0 && (l.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), c.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
1721
1720
  }, x.prototype.tick = function() {
1722
- if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1723
- else return !0;
1724
- if (this.totalIterations % u.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1725
- if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1721
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {
1722
+ if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1726
1723
  else return !0;
1724
+ }
1725
+ if (this.totalIterations % u.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1726
+ if (this.isConverged()) {
1727
+ if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1728
+ else return !0;
1729
+ }
1727
1730
  this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - this.coolingCycle ** +(Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
1728
1731
  }
1729
1732
  if (this.isTreeGrowing) {
1730
- if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
1731
- this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1732
- var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1733
- return e.has(t);
1734
- });
1735
- this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1736
- } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1733
+ if (this.growTreeIterations % 10 == 0) {
1734
+ if (this.prunedNodesAll.length > 0) {
1735
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1736
+ var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1737
+ return e.has(t);
1738
+ });
1739
+ this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = c.PURE_INCREMENTAL ? u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1740
+ } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1741
+ }
1737
1742
  this.growTreeIterations++;
1738
1743
  }
1739
1744
  if (this.isGrowthFinished) {
1740
1745
  if (this.isConverged()) return !0;
1741
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1746
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = c.PURE_INCREMENTAL ? u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1742
1747
  }
1743
1748
  var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1744
1749
  return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
@@ -1882,66 +1887,68 @@ var D = /* @__PURE__ */ i(((e, t) => {
1882
1887
  for (var l = s / o[n].length, i = 0; i < o[n].length; i++) this.idToNodeMap.get(o[n][i]).displacementY = l;
1883
1888
  }
1884
1889
  }
1885
- if (this.constraints.relativePlacementConstraint) if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(t) {
1886
- if (!e.fixedNodesOnHorizontal.has(t)) {
1887
- var n = 0;
1888
- n = e.dummyToNodeForVerticalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX : e.idToNodeMap.get(t).displacementX, e.nodeToRelativeConstraintMapHorizontal.get(t).forEach(function(r) {
1889
- if (r.right) {
1890
- var i = e.nodeToTempPositionMapHorizontal.get(r.right) - e.nodeToTempPositionMapHorizontal.get(t) - n;
1891
- i < r.gap && (n -= r.gap - i);
1892
- } else {
1893
- var i = e.nodeToTempPositionMapHorizontal.get(t) - e.nodeToTempPositionMapHorizontal.get(r.left) + n;
1894
- i < r.gap && (n += r.gap - i);
1895
- }
1896
- }), e.nodeToTempPositionMapHorizontal.set(t, e.nodeToTempPositionMapHorizontal.get(t) + n), e.dummyToNodeForVerticalAlignment.has(t) ? e.dummyToNodeForVerticalAlignment.get(t).forEach(function(t) {
1897
- e.idToNodeMap.get(t).displacementX = n;
1898
- }) : e.idToNodeMap.get(t).displacementX = n;
1899
- }
1900
- }), this.nodesInRelativeVertical.forEach(function(t) {
1901
- if (!e.fixedNodesOnHorizontal.has(t)) {
1902
- var n = 0;
1903
- n = e.dummyToNodeForHorizontalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY : e.idToNodeMap.get(t).displacementY, e.nodeToRelativeConstraintMapVertical.get(t).forEach(function(r) {
1904
- if (r.bottom) {
1905
- var i = e.nodeToTempPositionMapVertical.get(r.bottom) - e.nodeToTempPositionMapVertical.get(t) - n;
1906
- i < r.gap && (n -= r.gap - i);
1907
- } else {
1908
- var i = e.nodeToTempPositionMapVertical.get(t) - e.nodeToTempPositionMapVertical.get(r.top) + n;
1909
- i < r.gap && (n += r.gap - i);
1890
+ if (this.constraints.relativePlacementConstraint) {
1891
+ if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(t) {
1892
+ if (!e.fixedNodesOnHorizontal.has(t)) {
1893
+ var n = 0;
1894
+ n = e.dummyToNodeForVerticalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX : e.idToNodeMap.get(t).displacementX, e.nodeToRelativeConstraintMapHorizontal.get(t).forEach(function(r) {
1895
+ if (r.right) {
1896
+ var i = e.nodeToTempPositionMapHorizontal.get(r.right) - e.nodeToTempPositionMapHorizontal.get(t) - n;
1897
+ i < r.gap && (n -= r.gap - i);
1898
+ } else {
1899
+ var i = e.nodeToTempPositionMapHorizontal.get(t) - e.nodeToTempPositionMapHorizontal.get(r.left) + n;
1900
+ i < r.gap && (n += r.gap - i);
1901
+ }
1902
+ }), e.nodeToTempPositionMapHorizontal.set(t, e.nodeToTempPositionMapHorizontal.get(t) + n), e.dummyToNodeForVerticalAlignment.has(t) ? e.dummyToNodeForVerticalAlignment.get(t).forEach(function(t) {
1903
+ e.idToNodeMap.get(t).displacementX = n;
1904
+ }) : e.idToNodeMap.get(t).displacementX = n;
1905
+ }
1906
+ }), this.nodesInRelativeVertical.forEach(function(t) {
1907
+ if (!e.fixedNodesOnHorizontal.has(t)) {
1908
+ var n = 0;
1909
+ n = e.dummyToNodeForHorizontalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY : e.idToNodeMap.get(t).displacementY, e.nodeToRelativeConstraintMapVertical.get(t).forEach(function(r) {
1910
+ if (r.bottom) {
1911
+ var i = e.nodeToTempPositionMapVertical.get(r.bottom) - e.nodeToTempPositionMapVertical.get(t) - n;
1912
+ i < r.gap && (n -= r.gap - i);
1913
+ } else {
1914
+ var i = e.nodeToTempPositionMapVertical.get(t) - e.nodeToTempPositionMapVertical.get(r.top) + n;
1915
+ i < r.gap && (n += r.gap - i);
1916
+ }
1917
+ }), e.nodeToTempPositionMapVertical.set(t, e.nodeToTempPositionMapVertical.get(t) + n), e.dummyToNodeForHorizontalAlignment.has(t) ? e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t) {
1918
+ e.idToNodeMap.get(t).displacementY = n;
1919
+ }) : e.idToNodeMap.get(t).displacementY = n;
1920
+ }
1921
+ });
1922
+ else {
1923
+ for (var n = 0; n < this.componentsOnHorizontal.length; n++) {
1924
+ var u = this.componentsOnHorizontal[n];
1925
+ if (this.fixedComponentsOnHorizontal[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1926
+ e.idToNodeMap.get(t).displacementX = 0;
1927
+ }) : this.idToNodeMap.get(u[i]).displacementX = 0;
1928
+ else {
1929
+ for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForVerticalAlignment.has(u[i])) {
1930
+ var p = this.dummyToNodeForVerticalAlignment.get(u[i]);
1931
+ d += p.length * this.idToNodeMap.get(p[0]).displacementX, f += p.length;
1932
+ } else d += this.idToNodeMap.get(u[i]).displacementX, f++;
1933
+ for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1934
+ e.idToNodeMap.get(t).displacementX = m;
1935
+ }) : this.idToNodeMap.get(u[i]).displacementX = m;
1910
1936
  }
1911
- }), e.nodeToTempPositionMapVertical.set(t, e.nodeToTempPositionMapVertical.get(t) + n), e.dummyToNodeForHorizontalAlignment.has(t) ? e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t) {
1912
- e.idToNodeMap.get(t).displacementY = n;
1913
- }) : e.idToNodeMap.get(t).displacementY = n;
1914
- }
1915
- });
1916
- else {
1917
- for (var n = 0; n < this.componentsOnHorizontal.length; n++) {
1918
- var u = this.componentsOnHorizontal[n];
1919
- if (this.fixedComponentsOnHorizontal[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1920
- e.idToNodeMap.get(t).displacementX = 0;
1921
- }) : this.idToNodeMap.get(u[i]).displacementX = 0;
1922
- else {
1923
- for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForVerticalAlignment.has(u[i])) {
1924
- var p = this.dummyToNodeForVerticalAlignment.get(u[i]);
1925
- d += p.length * this.idToNodeMap.get(p[0]).displacementX, f += p.length;
1926
- } else d += this.idToNodeMap.get(u[i]).displacementX, f++;
1927
- for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1928
- e.idToNodeMap.get(t).displacementX = m;
1929
- }) : this.idToNodeMap.get(u[i]).displacementX = m;
1930
1937
  }
1931
- }
1932
- for (var n = 0; n < this.componentsOnVertical.length; n++) {
1933
- var u = this.componentsOnVertical[n];
1934
- if (this.fixedComponentsOnVertical[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1935
- e.idToNodeMap.get(t).displacementY = 0;
1936
- }) : this.idToNodeMap.get(u[i]).displacementY = 0;
1937
- else {
1938
- for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForHorizontalAlignment.has(u[i])) {
1939
- var p = this.dummyToNodeForHorizontalAlignment.get(u[i]);
1940
- d += p.length * this.idToNodeMap.get(p[0]).displacementY, f += p.length;
1941
- } else d += this.idToNodeMap.get(u[i]).displacementY, f++;
1942
- for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1943
- e.idToNodeMap.get(t).displacementY = m;
1944
- }) : this.idToNodeMap.get(u[i]).displacementY = m;
1938
+ for (var n = 0; n < this.componentsOnVertical.length; n++) {
1939
+ var u = this.componentsOnVertical[n];
1940
+ if (this.fixedComponentsOnVertical[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1941
+ e.idToNodeMap.get(t).displacementY = 0;
1942
+ }) : this.idToNodeMap.get(u[i]).displacementY = 0;
1943
+ else {
1944
+ for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForHorizontalAlignment.has(u[i])) {
1945
+ var p = this.dummyToNodeForHorizontalAlignment.get(u[i]);
1946
+ d += p.length * this.idToNodeMap.get(p[0]).displacementY, f += p.length;
1947
+ } else d += this.idToNodeMap.get(u[i]).displacementY, f++;
1948
+ for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1949
+ e.idToNodeMap.get(t).displacementY = m;
1950
+ }) : this.idToNodeMap.get(u[i]).displacementY = m;
1951
+ }
1945
1952
  }
1946
1953
  }
1947
1954
  }
@@ -2317,7 +2324,8 @@ var D = /* @__PURE__ */ i(((e, t) => {
2317
2324
  if (Array.isArray(e)) {
2318
2325
  for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
2319
2326
  return n;
2320
- } else return Array.from(e);
2327
+ }
2328
+ return Array.from(e);
2321
2329
  }
2322
2330
  var i = n(806), a = n(551).LinkedList, o = n(551).Matrix, s = n(551).SVD;
2323
2331
  function c() {}
@@ -2329,7 +2337,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
2329
2337
  m.getChild() ?? (c.set(m.id, f++), l.push(m.getCenterX()), u.push(m.getCenterY()), n.set(m.id, m));
2330
2338
  }
2331
2339
  t.relativePlacementConstraint && t.relativePlacementConstraint.forEach(function(e) {
2332
- !e.gap && e.gap != 0 && (e.left ? e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
2340
+ !e.gap && e.gap != 0 && (e.gap = e.left ? i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
2333
2341
  });
2334
2342
  var h = function(e, t) {
2335
2343
  return {
@@ -2373,7 +2381,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
2373
2381
  });
2374
2382
  var f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = new a();
2375
2383
  d.forEach(function(e, r) {
2376
- e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, new Set([r]));
2384
+ e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, /* @__PURE__ */ new Set([r]));
2377
2385
  }), n && o.forEach(function(e) {
2378
2386
  var r = [];
2379
2387
  if (e.forEach(function(e) {
@@ -2388,7 +2396,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
2388
2396
  } else {
2389
2397
  var o = 0;
2390
2398
  e.forEach(function(e) {
2391
- t == "horizontal" ? o += c.has(e) ? l[c.get(e)] : i.get(e) : o += c.has(e) ? u[c.get(e)] : i.get(e);
2399
+ o += t == "horizontal" ? c.has(e) ? l[c.get(e)] : i.get(e) : c.has(e) ? u[c.get(e)] : i.get(e);
2392
2400
  }), o /= e.length, e.forEach(function(e) {
2393
2401
  f.set(e, o);
2394
2402
  });
@@ -2397,15 +2405,17 @@ var D = /* @__PURE__ */ i(((e, t) => {
2397
2405
  for (var h = function() {
2398
2406
  var r = m.shift();
2399
2407
  e.get(r).forEach(function(e) {
2400
- if (f.get(e.id) < f.get(r) + e.gap) if (n && n.has(e.id)) {
2401
- var a = void 0;
2402
- if (a = t == "horizontal" ? c.has(e.id) ? l[c.get(e.id)] : i.get(e.id) : c.has(e.id) ? u[c.get(e.id)] : i.get(e.id), f.set(e.id, a), a < f.get(r) + e.gap) {
2403
- var o = f.get(r) + e.gap - a;
2404
- p.get(r).forEach(function(e) {
2405
- f.set(e, f.get(e) - o);
2406
- });
2407
- }
2408
- } else f.set(e.id, f.get(r) + e.gap);
2408
+ if (f.get(e.id) < f.get(r) + e.gap) {
2409
+ if (n && n.has(e.id)) {
2410
+ var a = void 0;
2411
+ if (a = t == "horizontal" ? c.has(e.id) ? l[c.get(e.id)] : i.get(e.id) : c.has(e.id) ? u[c.get(e.id)] : i.get(e.id), f.set(e.id, a), a < f.get(r) + e.gap) {
2412
+ var o = f.get(r) + e.gap - a;
2413
+ p.get(r).forEach(function(e) {
2414
+ f.set(e, f.get(e) - o);
2415
+ });
2416
+ }
2417
+ } else f.set(e.id, f.get(r) + e.gap);
2418
+ }
2409
2419
  d.set(e.id, d.get(e.id) - 1), d.get(e.id) == 0 && m.push(e.id), n && p.set(e.id, s(p.get(r), p.get(e.id)));
2410
2420
  });
2411
2421
  }; m.length != 0;) h();
@@ -2647,7 +2657,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
2647
2657
  E.has(e) || (l[c.get(e)] = i);
2648
2658
  });
2649
2659
  }, K = 0; K < G.length; K++) ie(K);
2650
- if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal, J = function(e) {
2660
+ if (t.alignmentConstraint.horizontal) for (var q = t.alignmentConstraint.horizontal, ae = function(e) {
2651
2661
  var t = /* @__PURE__ */ new Set();
2652
2662
  q[e].forEach(function(e) {
2653
2663
  t.add(e);
@@ -2658,7 +2668,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
2658
2668
  i = n.size > 0 ? u[c.get(n.values().next().value)] : g(t).y, t.forEach(function(e) {
2659
2669
  E.has(e) || (u[c.get(e)] = i);
2660
2670
  });
2661
- }, Y = 0; Y < q.length; Y++) J(Y);
2671
+ }, J = 0; J < q.length; J++) ae(J);
2662
2672
  }
2663
2673
  t.relativePlacementConstraint && (function() {
2664
2674
  var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
@@ -2737,25 +2747,25 @@ var D = /* @__PURE__ */ i(((e, t) => {
2737
2747
  i.get(e) ? i.get(e).forEach(function(t) {
2738
2748
  u[c.get(t)] = ee.get(e);
2739
2749
  }) : u[c.get(e)] = ee.get(e);
2740
- }, K = !0, q = !1, J = void 0;
2750
+ }, K = !0, q = !1, ae = void 0;
2741
2751
  try {
2742
- for (var Y = ee.keys()[Symbol.iterator](), ae; !(K = (ae = Y.next()).done); K = !0) {
2743
- var G = ae.value;
2752
+ for (var J = ee.keys()[Symbol.iterator](), Y; !(K = (Y = J.next()).done); K = !0) {
2753
+ var G = Y.value;
2744
2754
  ie(G);
2745
2755
  }
2746
2756
  } catch (e) {
2747
- q = !0, J = e;
2757
+ q = !0, ae = e;
2748
2758
  } finally {
2749
2759
  try {
2750
- !K && Y.return && Y.return();
2760
+ !K && J.return && J.return();
2751
2761
  } finally {
2752
- if (q) throw J;
2762
+ if (q) throw ae;
2753
2763
  }
2754
2764
  }
2755
2765
  })();
2756
2766
  }
2757
- for (var ae = 0; ae < d.length; ae++) {
2758
- var X = d[ae];
2767
+ for (var Y = 0; Y < d.length; Y++) {
2768
+ var X = d[Y];
2759
2769
  X.getChild() ?? X.setCenter(l[c.get(X.id)], u[c.get(X.id)]);
2760
2770
  }
2761
2771
  }, e.exports = c;
@@ -2773,7 +2783,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
2773
2783
  return r(45);
2774
2784
  })();
2775
2785
  });
2776
- })), k = /* @__PURE__ */ r((/* @__PURE__ */ i(((e, t) => {
2786
+ })), k = /* @__PURE__ */ r((/* @__PURE__ */ e(((e, t) => {
2777
2787
  (function(n, r) {
2778
2788
  typeof e == "object" && typeof t == "object" ? t.exports = r(O()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeFcose = r(O()) : n.cytoscapeFcose = r(n.coseBase);
2779
2789
  })(e, function(e) {
@@ -2931,13 +2941,15 @@ var D = /* @__PURE__ */ i(((e, t) => {
2931
2941
  var d = n[u], f = null;
2932
2942
  d.intersection(b).length == 0 && (f = d.children());
2933
2943
  var p = void 0, v = d.layoutDimensions({ nodeDimensionsIncludeLabels: c.nodeDimensionsIncludeLabels });
2934
- if (d.outerWidth() != null && d.outerHeight() != null) if (c.randomize) if (!d.isParent()) p = t.add(new a(i.graphManager, new o(h[m.get(d.id())] - v.w / 2, g[m.get(d.id())] - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2935
- else {
2936
- var x = r.calcBoundingBox(d, h, g, m);
2937
- p = d.intersection(b).length == 0 ? t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(x.width, x.height))) : t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(parseFloat(v.w), parseFloat(v.h))));
2938
- }
2939
- else p = t.add(new a(i.graphManager, new o(d.position("x") - v.w / 2, d.position("y") - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2940
- else p = t.add(new a(this.graphManager));
2944
+ if (d.outerWidth() != null && d.outerHeight() != null) {
2945
+ if (c.randomize) {
2946
+ if (!d.isParent()) p = t.add(new a(i.graphManager, new o(h[m.get(d.id())] - v.w / 2, g[m.get(d.id())] - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2947
+ else {
2948
+ var x = r.calcBoundingBox(d, h, g, m);
2949
+ p = d.intersection(b).length == 0 ? t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(x.width, x.height))) : t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(parseFloat(v.w), parseFloat(v.h))));
2950
+ }
2951
+ } else p = t.add(new a(i.graphManager, new o(d.position("x") - v.w / 2, d.position("y") - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2952
+ } else p = t.add(new a(this.graphManager));
2941
2953
  if (p.id = d.data("id"), p.nodeRepulsion = y(c.nodeRepulsion, d), p.paddingLeft = parseInt(d.css("padding")), p.paddingTop = parseInt(d.css("padding")), p.paddingRight = parseInt(d.css("padding")), p.paddingBottom = parseInt(d.css("padding")), c.nodeDimensionsIncludeLabels && (p.labelWidth = d.boundingBox({
2942
2954
  includeLabels: !0,
2943
2955
  includeNodes: !1,
@@ -2959,11 +2971,11 @@ var D = /* @__PURE__ */ i(((e, t) => {
2959
2971
  f.id = s.id(), f.idealLength = y(e.idealEdgeLength, s), f.edgeElasticity = y(e.edgeElasticity, s), i += f.idealLength, a++;
2960
2972
  }
2961
2973
  }
2962
- e.idealEdgeLength != null && (a > 0 ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = i / a : v(e.idealEdgeLength) ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = 50 : u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
2974
+ e.idealEdgeLength != null && (u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = a > 0 ? i / a : v(e.idealEdgeLength) ? 50 : e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
2963
2975
  }, C = function(e, t) {
2964
2976
  t.fixedNodeConstraint && (e.constraints.fixedNodeConstraint = t.fixedNodeConstraint), t.alignmentConstraint && (e.constraints.alignmentConstraint = t.alignmentConstraint), t.relativePlacementConstraint && (e.constraints.relativePlacementConstraint = t.relativePlacementConstraint);
2965
2977
  };
2966
- e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), e.quality == "proof" ? c.QUALITY = 2 : c.QUALITY = 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (e.randomize ? u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint ? u.TREE_REDUCTION_ON_INCREMENTAL = !1 : u.TREE_REDUCTION_ON_INCREMENTAL = !0;
2978
+ e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), c.QUALITY = e.quality == "proof" ? 2 : 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !!e.randomize, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), u.TREE_REDUCTION_ON_INCREMENTAL = !(e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint);
2967
2979
  var w = new i(), T = w.newGraphManager();
2968
2980
  return x(T.addRoot(), r.getTopMostNodes(f), w, e), S(w, T, p), C(w, e), w.runLayout(), _;
2969
2981
  } };
@@ -3035,132 +3047,137 @@ var D = /* @__PURE__ */ i(((e, t) => {
3035
3047
  var e = this, t = this.options, n = t.cy, r = t.eles, i = [], a = [], l = void 0, u = [];
3036
3048
  t.fixedNodeConstraint && (!Array.isArray(t.fixedNodeConstraint) || t.fixedNodeConstraint.length == 0) && (t.fixedNodeConstraint = void 0), t.alignmentConstraint && (t.alignmentConstraint.vertical && (!Array.isArray(t.alignmentConstraint.vertical) || t.alignmentConstraint.vertical.length == 0) && (t.alignmentConstraint.vertical = void 0), t.alignmentConstraint.horizontal && (!Array.isArray(t.alignmentConstraint.horizontal) || t.alignmentConstraint.horizontal.length == 0) && (t.alignmentConstraint.horizontal = void 0)), t.relativePlacementConstraint && (!Array.isArray(t.relativePlacementConstraint) || t.relativePlacementConstraint.length == 0) && (t.relativePlacementConstraint = void 0), (t.fixedNodeConstraint || t.alignmentConstraint || t.relativePlacementConstraint) && (t.tile = !1, t.packComponents = !1);
3037
3049
  var d = void 0, f = !1;
3038
- if (n.layoutUtilities && t.packComponents && (d = n.layoutUtilities("get"), d ||= n.layoutUtilities(), f = !0), r.nodes().length > 0) if (f) {
3039
- var p = o.getTopMostNodes(t.eles.nodes());
3040
- if (l = o.connectComponents(n, t.eles, p), l.forEach(function(e) {
3041
- var t = e.boundingBox();
3042
- u.push({
3043
- x: t.x1 + t.w / 2,
3044
- y: t.y1 + t.h / 2
3045
- });
3046
- }), t.randomize && l.forEach(function(e) {
3047
- t.eles = e, i.push(s(t));
3048
- }), t.quality == "default" || t.quality == "proof") {
3049
- var m = n.collection();
3050
- if (t.tile) {
3051
- var h = /* @__PURE__ */ new Map(), g = [], _ = [], v = 0, y = {
3052
- nodeIndexes: h,
3053
- xCoords: g,
3054
- yCoords: _
3055
- }, b = [];
3056
- if (l.forEach(function(e, t) {
3057
- e.edges().length == 0 && (e.nodes().forEach(function(t, n) {
3058
- m.merge(e.nodes()[n]), t.isParent() || (y.nodeIndexes.set(e.nodes()[n].id(), v++), y.xCoords.push(e.nodes()[0].position().x), y.yCoords.push(e.nodes()[0].position().y));
3059
- }), b.push(t));
3060
- }), m.length > 1) {
3061
- var x = m.boundingBox();
3062
- u.push({
3063
- x: x.x1 + x.w / 2,
3064
- y: x.y1 + x.h / 2
3065
- }), l.push(m), i.push(y);
3066
- for (var S = b.length - 1; S >= 0; S--) l.splice(b[S], 1), i.splice(b[S], 1), u.splice(b[S], 1);
3050
+ if (n.layoutUtilities && t.packComponents && (d = n.layoutUtilities("get"), d ||= n.layoutUtilities(), f = !0), r.nodes().length > 0) {
3051
+ if (f) {
3052
+ var p = o.getTopMostNodes(t.eles.nodes());
3053
+ if (l = o.connectComponents(n, t.eles, p), l.forEach(function(e) {
3054
+ var t = e.boundingBox();
3055
+ u.push({
3056
+ x: t.x1 + t.w / 2,
3057
+ y: t.y1 + t.h / 2
3058
+ });
3059
+ }), t.randomize && l.forEach(function(e) {
3060
+ t.eles = e, i.push(s(t));
3061
+ }), t.quality == "default" || t.quality == "proof") {
3062
+ var m = n.collection();
3063
+ if (t.tile) {
3064
+ var h = /* @__PURE__ */ new Map(), g = [], _ = [], v = 0, y = {
3065
+ nodeIndexes: h,
3066
+ xCoords: g,
3067
+ yCoords: _
3068
+ }, b = [];
3069
+ if (l.forEach(function(e, t) {
3070
+ e.edges().length == 0 && (e.nodes().forEach(function(t, n) {
3071
+ m.merge(e.nodes()[n]), t.isParent() || (y.nodeIndexes.set(e.nodes()[n].id(), v++), y.xCoords.push(e.nodes()[0].position().x), y.yCoords.push(e.nodes()[0].position().y));
3072
+ }), b.push(t));
3073
+ }), m.length > 1) {
3074
+ var x = m.boundingBox();
3075
+ u.push({
3076
+ x: x.x1 + x.w / 2,
3077
+ y: x.y1 + x.h / 2
3078
+ }), l.push(m), i.push(y);
3079
+ for (var S = b.length - 1; S >= 0; S--) l.splice(b[S], 1), i.splice(b[S], 1), u.splice(b[S], 1);
3080
+ }
3067
3081
  }
3068
- }
3069
- l.forEach(function(e, n) {
3070
- t.eles = e, a.push(c(t, i[n])), o.relocateComponent(u[n], a[n], t);
3071
- });
3072
- } else l.forEach(function(e, n) {
3073
- o.relocateComponent(u[n], i[n], t);
3074
- });
3075
- var C = /* @__PURE__ */ new Set();
3076
- if (l.length > 1) {
3077
- var w = [], T = r.filter(function(e) {
3078
- return e.css("display") == "none";
3082
+ l.forEach(function(e, n) {
3083
+ t.eles = e, a.push(c(t, i[n])), o.relocateComponent(u[n], a[n], t);
3084
+ });
3085
+ } else l.forEach(function(e, n) {
3086
+ o.relocateComponent(u[n], i[n], t);
3079
3087
  });
3080
- l.forEach(function(e, n) {
3081
- var r = void 0;
3082
- if (t.quality == "draft" && (r = i[n].nodeIndexes), e.nodes().not(T).length > 0) {
3083
- var s = {};
3084
- s.edges = [], s.nodes = [];
3085
- var c = void 0;
3086
- e.nodes().not(T).forEach(function(e) {
3087
- if (t.quality == "draft") if (!e.isParent()) c = r.get(e.id()), s.nodes.push({
3088
- x: i[n].xCoords[c] - e.boundingbox().w / 2,
3089
- y: i[n].yCoords[c] - e.boundingbox().h / 2,
3090
- width: e.boundingbox().w,
3091
- height: e.boundingbox().h
3092
- });
3093
- else {
3094
- var l = o.calcBoundingBox(e, i[n].xCoords, i[n].yCoords, r);
3095
- s.nodes.push({
3096
- x: l.topLeftX,
3097
- y: l.topLeftY,
3098
- width: l.width,
3099
- height: l.height
3100
- });
3101
- }
3102
- else a[n][e.id()] && s.nodes.push({
3103
- x: a[n][e.id()].getLeft(),
3104
- y: a[n][e.id()].getTop(),
3105
- width: a[n][e.id()].getWidth(),
3106
- height: a[n][e.id()].getHeight()
3107
- });
3108
- }), e.edges().forEach(function(e) {
3109
- var c = e.source(), l = e.target();
3110
- if (c.css("display") != "none" && l.css("display") != "none") if (t.quality == "draft") {
3111
- var u = r.get(c.id()), d = r.get(l.id()), f = [], p = [];
3112
- if (c.isParent()) {
3113
- var m = o.calcBoundingBox(c, i[n].xCoords, i[n].yCoords, r);
3114
- f.push(m.topLeftX + m.width / 2), f.push(m.topLeftY + m.height / 2);
3115
- } else f.push(i[n].xCoords[u]), f.push(i[n].yCoords[u]);
3116
- if (l.isParent()) {
3117
- var h = o.calcBoundingBox(l, i[n].xCoords, i[n].yCoords, r);
3118
- p.push(h.topLeftX + h.width / 2), p.push(h.topLeftY + h.height / 2);
3119
- } else p.push(i[n].xCoords[d]), p.push(i[n].yCoords[d]);
3120
- s.edges.push({
3121
- startX: f[0],
3122
- startY: f[1],
3123
- endX: p[0],
3124
- endY: p[1]
3088
+ var C = /* @__PURE__ */ new Set();
3089
+ if (l.length > 1) {
3090
+ var w = [], T = r.filter(function(e) {
3091
+ return e.css("display") == "none";
3092
+ });
3093
+ l.forEach(function(e, n) {
3094
+ var r = void 0;
3095
+ if (t.quality == "draft" && (r = i[n].nodeIndexes), e.nodes().not(T).length > 0) {
3096
+ var s = {};
3097
+ s.edges = [], s.nodes = [];
3098
+ var c = void 0;
3099
+ e.nodes().not(T).forEach(function(e) {
3100
+ if (t.quality == "draft") {
3101
+ if (!e.isParent()) c = r.get(e.id()), s.nodes.push({
3102
+ x: i[n].xCoords[c] - e.boundingbox().w / 2,
3103
+ y: i[n].yCoords[c] - e.boundingbox().h / 2,
3104
+ width: e.boundingbox().w,
3105
+ height: e.boundingbox().h
3106
+ });
3107
+ else {
3108
+ var l = o.calcBoundingBox(e, i[n].xCoords, i[n].yCoords, r);
3109
+ s.nodes.push({
3110
+ x: l.topLeftX,
3111
+ y: l.topLeftY,
3112
+ width: l.width,
3113
+ height: l.height
3114
+ });
3115
+ }
3116
+ } else a[n][e.id()] && s.nodes.push({
3117
+ x: a[n][e.id()].getLeft(),
3118
+ y: a[n][e.id()].getTop(),
3119
+ width: a[n][e.id()].getWidth(),
3120
+ height: a[n][e.id()].getHeight()
3125
3121
  });
3126
- } else a[n][c.id()] && a[n][l.id()] && s.edges.push({
3127
- startX: a[n][c.id()].getCenterX(),
3128
- startY: a[n][c.id()].getCenterY(),
3129
- endX: a[n][l.id()].getCenterX(),
3130
- endY: a[n][l.id()].getCenterY()
3131
- });
3132
- }), s.nodes.length > 0 && (w.push(s), C.add(n));
3133
- }
3134
- });
3135
- var E = d.packComponents(w, t.randomize).shifts;
3136
- if (t.quality == "draft") i.forEach(function(e, t) {
3137
- var n = e.xCoords.map(function(e) {
3138
- return e + E[t].dx;
3139
- }), r = e.yCoords.map(function(e) {
3140
- return e + E[t].dy;
3122
+ }), e.edges().forEach(function(e) {
3123
+ var c = e.source(), l = e.target();
3124
+ if (c.css("display") != "none" && l.css("display") != "none") {
3125
+ if (t.quality == "draft") {
3126
+ var u = r.get(c.id()), d = r.get(l.id()), f = [], p = [];
3127
+ if (c.isParent()) {
3128
+ var m = o.calcBoundingBox(c, i[n].xCoords, i[n].yCoords, r);
3129
+ f.push(m.topLeftX + m.width / 2), f.push(m.topLeftY + m.height / 2);
3130
+ } else f.push(i[n].xCoords[u]), f.push(i[n].yCoords[u]);
3131
+ if (l.isParent()) {
3132
+ var h = o.calcBoundingBox(l, i[n].xCoords, i[n].yCoords, r);
3133
+ p.push(h.topLeftX + h.width / 2), p.push(h.topLeftY + h.height / 2);
3134
+ } else p.push(i[n].xCoords[d]), p.push(i[n].yCoords[d]);
3135
+ s.edges.push({
3136
+ startX: f[0],
3137
+ startY: f[1],
3138
+ endX: p[0],
3139
+ endY: p[1]
3140
+ });
3141
+ } else a[n][c.id()] && a[n][l.id()] && s.edges.push({
3142
+ startX: a[n][c.id()].getCenterX(),
3143
+ startY: a[n][c.id()].getCenterY(),
3144
+ endX: a[n][l.id()].getCenterX(),
3145
+ endY: a[n][l.id()].getCenterY()
3146
+ });
3147
+ }
3148
+ }), s.nodes.length > 0 && (w.push(s), C.add(n));
3149
+ }
3141
3150
  });
3142
- e.xCoords = n, e.yCoords = r;
3143
- });
3144
- else {
3145
- var D = 0;
3146
- C.forEach(function(e) {
3147
- Object.keys(a[e]).forEach(function(t) {
3148
- var n = a[e][t];
3149
- n.setCenter(n.getCenterX() + E[D].dx, n.getCenterY() + E[D].dy);
3150
- }), D++;
3151
+ var E = d.packComponents(w, t.randomize).shifts;
3152
+ if (t.quality == "draft") i.forEach(function(e, t) {
3153
+ var n = e.xCoords.map(function(e) {
3154
+ return e + E[t].dx;
3155
+ }), r = e.yCoords.map(function(e) {
3156
+ return e + E[t].dy;
3157
+ });
3158
+ e.xCoords = n, e.yCoords = r;
3151
3159
  });
3160
+ else {
3161
+ var D = 0;
3162
+ C.forEach(function(e) {
3163
+ Object.keys(a[e]).forEach(function(t) {
3164
+ var n = a[e][t];
3165
+ n.setCenter(n.getCenterX() + E[D].dx, n.getCenterY() + E[D].dy);
3166
+ }), D++;
3167
+ });
3168
+ }
3152
3169
  }
3170
+ } else {
3171
+ var O = t.eles.boundingBox();
3172
+ if (u.push({
3173
+ x: O.x1 + O.w / 2,
3174
+ y: O.y1 + O.h / 2
3175
+ }), t.randomize) {
3176
+ var k = s(t);
3177
+ i.push(k);
3178
+ }
3179
+ t.quality == "default" || t.quality == "proof" ? (a.push(c(t, i[0])), o.relocateComponent(u[0], a[0], t)) : o.relocateComponent(u[0], i[0], t);
3153
3180
  }
3154
- } else {
3155
- var O = t.eles.boundingBox();
3156
- if (u.push({
3157
- x: O.x1 + O.w / 2,
3158
- y: O.y1 + O.h / 2
3159
- }), t.randomize) {
3160
- var k = s(t);
3161
- i.push(k);
3162
- }
3163
- t.quality == "default" || t.quality == "proof" ? (a.push(c(t, i[0])), o.relocateComponent(u[0], a[0], t)) : o.relocateComponent(u[0], i[0], t);
3164
3181
  }
3165
3182
  var A = function(e, n) {
3166
3183
  if (t.quality == "default" || t.quality == "proof") {
@@ -3178,22 +3195,21 @@ var D = /* @__PURE__ */ i(((e, t) => {
3178
3195
  x: r.x,
3179
3196
  y: r.y
3180
3197
  };
3181
- } else {
3182
- var c = void 0;
3183
- return i.forEach(function(t) {
3184
- var n = t.nodeIndexes.get(e.id());
3185
- n != null && (c = {
3186
- x: t.xCoords[n],
3187
- y: t.yCoords[n]
3188
- });
3189
- }), c ??= {
3190
- x: e.position("x"),
3191
- y: e.position("y")
3192
- }, {
3193
- x: c.x,
3194
- y: c.y
3195
- };
3196
3198
  }
3199
+ var c = void 0;
3200
+ return i.forEach(function(t) {
3201
+ var n = t.nodeIndexes.get(e.id());
3202
+ n != null && (c = {
3203
+ x: t.xCoords[n],
3204
+ y: t.yCoords[n]
3205
+ });
3206
+ }), c ??= {
3207
+ x: e.position("x"),
3208
+ y: e.position("y")
3209
+ }, {
3210
+ x: c.x,
3211
+ y: c.y
3212
+ };
3197
3213
  };
3198
3214
  if (t.quality == "default" || t.quality == "proof" || t.randomize) {
3199
3215
  var j = o.calcParentsWithoutChildren(n, r), M = r.filter(function(e) {
@@ -3339,18 +3355,17 @@ var D = /* @__PURE__ */ i(((e, t) => {
3339
3355
  xCoords: f,
3340
3356
  yCoords: p
3341
3357
  }), U;
3342
- } else {
3343
- var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), J = K.outerWidth();
3344
- if (f.push(q.x), p.push(q.y), y == 2) {
3345
- var Y = t.getElementById(ie.next().value).outerWidth();
3346
- f.push(q.x + J / 2 + Y / 2 + e.idealEdgeLength), p.push(q.y);
3347
- }
3348
- return U = {
3349
- nodeIndexes: l,
3350
- xCoords: f,
3351
- yCoords: p
3352
- }, U;
3353
3358
  }
3359
+ var ie = l.keys(), K = t.getElementById(ie.next().value), q = K.position(), ae = K.outerWidth();
3360
+ if (f.push(q.x), p.push(q.y), y == 2) {
3361
+ var J = t.getElementById(ie.next().value).outerWidth();
3362
+ f.push(q.x + ae / 2 + J / 2 + e.idealEdgeLength), p.push(q.y);
3363
+ }
3364
+ return U = {
3365
+ nodeIndexes: l,
3366
+ xCoords: f,
3367
+ yCoords: p
3368
+ }, U;
3354
3369
  } };
3355
3370
  }),
3356
3371
  579: ((e, t, n) => {
@@ -3378,54 +3393,57 @@ var D = /* @__PURE__ */ i(((e, t) => {
3378
3393
  T: "top",
3379
3394
  B: "bottom"
3380
3395
  }, j = {
3381
- L: /* @__PURE__ */ t((e) => `${e},${e / 2} 0,${e} 0,0`, "L"),
3382
- R: /* @__PURE__ */ t((e) => `0,${e / 2} ${e},0 ${e},${e}`, "R"),
3383
- T: /* @__PURE__ */ t((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
3384
- B: /* @__PURE__ */ t((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
3396
+ L: /* @__PURE__ */ g((e) => `${e},${e / 2} 0,${e} 0,0`, "L"),
3397
+ R: /* @__PURE__ */ g((e) => `0,${e / 2} ${e},0 ${e},${e}`, "R"),
3398
+ T: /* @__PURE__ */ g((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
3399
+ B: /* @__PURE__ */ g((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
3385
3400
  }, M = {
3386
- L: /* @__PURE__ */ t((e, t) => e - t + 2, "L"),
3387
- R: /* @__PURE__ */ t((e, t) => e - 2, "R"),
3388
- T: /* @__PURE__ */ t((e, t) => e - t + 2, "T"),
3389
- B: /* @__PURE__ */ t((e, t) => e - 2, "B")
3390
- }, N = /* @__PURE__ */ t(function(e) {
3401
+ L: /* @__PURE__ */ g((e, t) => e - t + 2, "L"),
3402
+ R: /* @__PURE__ */ g((e, t) => e - 2, "R"),
3403
+ T: /* @__PURE__ */ g((e, t) => e - t + 2, "T"),
3404
+ B: /* @__PURE__ */ g((e, t) => e - 2, "B")
3405
+ }, N = /* @__PURE__ */ g(function(e) {
3391
3406
  return F(e) ? e === "L" ? "R" : "L" : e === "T" ? "B" : "T";
3392
- }, "getOppositeArchitectureDirection"), P = /* @__PURE__ */ t(function(e) {
3407
+ }, "getOppositeArchitectureDirection"), P = /* @__PURE__ */ g(function(e) {
3393
3408
  let t = e;
3394
3409
  return t === "L" || t === "R" || t === "T" || t === "B";
3395
- }, "isArchitectureDirection"), F = /* @__PURE__ */ t(function(e) {
3410
+ }, "isArchitectureDirection"), F = /* @__PURE__ */ g(function(e) {
3396
3411
  let t = e;
3397
3412
  return t === "L" || t === "R";
3398
- }, "isArchitectureDirectionX"), I = /* @__PURE__ */ t(function(e) {
3413
+ }, "isArchitectureDirectionX"), I = /* @__PURE__ */ g(function(e) {
3399
3414
  let t = e;
3400
3415
  return t === "T" || t === "B";
3401
- }, "isArchitectureDirectionY"), L = /* @__PURE__ */ t(function(e, t) {
3416
+ }, "isArchitectureDirectionY"), L = /* @__PURE__ */ g(function(e, t) {
3402
3417
  let n = F(e) && I(t), r = I(e) && F(t);
3403
3418
  return n || r;
3404
- }, "isArchitectureDirectionXY"), R = /* @__PURE__ */ t(function(e) {
3419
+ }, "isArchitectureDirectionXY"), R = /* @__PURE__ */ g(function(e) {
3405
3420
  let t = e[0], n = e[1], r = F(t) && I(n), i = I(t) && F(n);
3406
3421
  return r || i;
3407
- }, "isArchitecturePairXY"), z = /* @__PURE__ */ t(function(e) {
3422
+ }, "isArchitecturePairXY"), z = /* @__PURE__ */ g(function(e) {
3408
3423
  return e !== "LL" && e !== "RR" && e !== "TT" && e !== "BB";
3409
- }, "isValidArchitectureDirectionPair"), B = /* @__PURE__ */ t(function(e, t) {
3424
+ }, "isValidArchitectureDirectionPair"), B = /* @__PURE__ */ g(function(e, t) {
3410
3425
  let n = `${e}${t}`;
3411
3426
  return z(n) ? n : void 0;
3412
- }, "getArchitectureDirectionPair"), V = /* @__PURE__ */ t(function([e, t], n) {
3427
+ }, "getArchitectureDirectionPair"), V = /* @__PURE__ */ g(function([e, t], n) {
3413
3428
  let r = n[0], i = n[1];
3414
3429
  return F(r) ? I(i) ? [e + (r === "L" ? -1 : 1), t + (i === "T" ? 1 : -1)] : [e + (r === "L" ? -1 : 1), t] : F(i) ? [e + (i === "L" ? 1 : -1), t + (r === "T" ? 1 : -1)] : [e, t + (r === "T" ? 1 : -1)];
3415
- }, "shiftPositionByArchitectureDirectionPair"), ee = /* @__PURE__ */ t(function(e) {
3430
+ }, "shiftPositionByArchitectureDirectionPair"), ee = /* @__PURE__ */ g(function(e) {
3416
3431
  return e === "LT" || e === "TL" ? [1, 1] : e === "BL" || e === "LB" ? [1, -1] : e === "BR" || e === "RB" ? [-1, -1] : [-1, 1];
3417
- }, "getArchitectureDirectionXYFactors"), te = /* @__PURE__ */ t(function(e, t) {
3432
+ }, "getArchitectureDirectionXYFactors"), te = /* @__PURE__ */ g(function(e, t) {
3418
3433
  return L(e, t) ? "bend" : F(e) ? "horizontal" : "vertical";
3419
- }, "getArchitectureDirectionAlignment"), H = /* @__PURE__ */ t(function(e) {
3434
+ }, "getArchitectureDirectionAlignment"), H = /* @__PURE__ */ g(function(e) {
3420
3435
  return e.type === "service";
3421
- }, "isArchitectureService"), ne = /* @__PURE__ */ t(function(e) {
3436
+ }, "isArchitectureService"), ne = /* @__PURE__ */ g(function(e) {
3422
3437
  return e.type === "junction";
3423
- }, "isArchitectureJunction"), re = /* @__PURE__ */ t((e) => e.data(), "edgeData"), U = /* @__PURE__ */ t((e) => e.data(), "nodeData"), W = d.architecture, G = class {
3438
+ }, "isArchitectureJunction"), re = /* @__PURE__ */ g((e, t) => {
3439
+ let [n, r] = [e, t].sort();
3440
+ return `${JSON.stringify(n)}-${JSON.stringify(r)}`;
3441
+ }, "architectureGroupAlignmentKey"), U = /* @__PURE__ */ g((e) => e.data(), "edgeData"), W = /* @__PURE__ */ g((e) => e.data(), "nodeData"), G = u.architecture, ie = class {
3424
3442
  constructor() {
3425
- this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.diagramId = "", this.setAccTitle = c, this.getAccTitle = h, this.setDiagramTitle = s, this.getDiagramTitle = p, this.getAccDescription = f, this.setAccDescription = a, this.clear();
3443
+ this.nodes = /* @__PURE__ */ new Map(), this.groups = /* @__PURE__ */ new Map(), this.edges = [], this.layoutHints = [], this.registeredIds = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(), this.diagramId = "", this.setAccTitle = s, this.getAccTitle = m, this.setDiagramTitle = o, this.getDiagramTitle = f, this.getAccDescription = d, this.setAccDescription = i, this.clear();
3426
3444
  }
3427
3445
  static {
3428
- t(this, "ArchitectureDB");
3446
+ g(this, "ArchitectureDB");
3429
3447
  }
3430
3448
  setDiagramId(e) {
3431
3449
  this.diagramId = e;
@@ -3434,16 +3452,16 @@ var D = /* @__PURE__ */ i(((e, t) => {
3434
3452
  return this.diagramId;
3435
3453
  }
3436
3454
  clear() {
3437
- this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", l();
3455
+ this.nodes = /* @__PURE__ */ new Map(), this.groups = /* @__PURE__ */ new Map(), this.edges = [], this.layoutHints = [], this.registeredIds = /* @__PURE__ */ new Map(), this.dataStructures = void 0, this.elements = /* @__PURE__ */ new Map(), this.diagramId = "", c();
3438
3456
  }
3439
3457
  addService({ id: e, icon: t, in: n, title: r, iconText: i }) {
3440
- if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
3458
+ if (this.registeredIds.has(e)) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
3441
3459
  if (n !== void 0) {
3442
3460
  if (e === n) throw Error(`The service [${e}] cannot be placed within itself`);
3443
- if (this.registeredIds[n] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
3444
- if (this.registeredIds[n] === "node") throw Error(`The service [${e}]'s parent is not a group`);
3461
+ if (!this.registeredIds.has(n)) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
3462
+ if (this.registeredIds.get(n) === "node") throw Error(`The service [${e}]'s parent is not a group`);
3445
3463
  }
3446
- this.registeredIds[e] = "node", this.nodes[e] = {
3464
+ this.registeredIds.set(e, "node"), this.nodes.set(e, {
3447
3465
  id: e,
3448
3466
  type: "service",
3449
3467
  icon: t,
@@ -3451,57 +3469,57 @@ var D = /* @__PURE__ */ i(((e, t) => {
3451
3469
  title: r,
3452
3470
  edges: [],
3453
3471
  in: n
3454
- };
3472
+ });
3455
3473
  }
3456
3474
  getServices() {
3457
- return Object.values(this.nodes).filter(H);
3475
+ return [...this.nodes.values()].filter(H);
3458
3476
  }
3459
3477
  addJunction({ id: e, in: t }) {
3460
- if (this.registeredIds[e] !== void 0) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);
3478
+ if (this.registeredIds.has(e)) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
3461
3479
  if (t !== void 0) {
3462
3480
  if (e === t) throw Error(`The junction [${e}] cannot be placed within itself`);
3463
- if (this.registeredIds[t] === void 0) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
3464
- if (this.registeredIds[t] === "node") throw Error(`The junction [${e}]'s parent is not a group`);
3481
+ if (!this.registeredIds.has(t)) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
3482
+ if (this.registeredIds.get(t) === "node") throw Error(`The junction [${e}]'s parent is not a group`);
3465
3483
  }
3466
- this.registeredIds[e] = "node", this.nodes[e] = {
3484
+ this.registeredIds.set(e, "node"), this.nodes.set(e, {
3467
3485
  id: e,
3468
3486
  type: "junction",
3469
3487
  edges: [],
3470
3488
  in: t
3471
- };
3489
+ });
3472
3490
  }
3473
3491
  getJunctions() {
3474
- return Object.values(this.nodes).filter(ne);
3492
+ return [...this.nodes.values()].filter(ne);
3475
3493
  }
3476
3494
  getNodes() {
3477
- return Object.values(this.nodes);
3495
+ return [...this.nodes.values()];
3478
3496
  }
3479
3497
  getNode(e) {
3480
- return this.nodes[e] ?? null;
3498
+ return this.nodes.get(e) ?? null;
3481
3499
  }
3482
3500
  addGroup({ id: e, icon: t, in: n, title: r }) {
3483
- if (this.registeredIds?.[e] !== void 0) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);
3501
+ if (this.registeredIds.has(e)) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);
3484
3502
  if (n !== void 0) {
3485
3503
  if (e === n) throw Error(`The group [${e}] cannot be placed within itself`);
3486
- if (this.registeredIds?.[n] === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
3487
- if (this.registeredIds?.[n] === "node") throw Error(`The group [${e}]'s parent is not a group`);
3504
+ if (!this.registeredIds.has(n)) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
3505
+ if (this.registeredIds.get(n) === "node") throw Error(`The group [${e}]'s parent is not a group`);
3488
3506
  }
3489
- this.registeredIds[e] = "group", this.groups[e] = {
3507
+ this.registeredIds.set(e, "group"), this.groups.set(e, {
3490
3508
  id: e,
3491
3509
  icon: t,
3492
3510
  title: r,
3493
3511
  in: n
3494
- };
3512
+ });
3495
3513
  }
3496
3514
  getGroups() {
3497
- return Object.values(this.groups);
3515
+ return [...this.groups.values()];
3498
3516
  }
3499
3517
  addEdge({ lhsId: e, rhsId: t, lhsDir: n, rhsDir: r, lhsInto: i, rhsInto: a, lhsGroup: o, rhsGroup: s, title: c }) {
3500
3518
  if (!P(n)) throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);
3501
3519
  if (!P(r)) throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);
3502
- if (this.nodes[e] === void 0 && this.groups[e] === void 0) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3503
- if (this.nodes[t] === void 0 && this.groups[t] === void 0) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3504
- let l = this.nodes[e].in, u = this.nodes[t].in;
3520
+ if (!this.nodes.has(e) && !this.groups.has(e)) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3521
+ if (!this.nodes.has(t) && !this.groups.has(t)) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3522
+ let l = this.nodes.get(e).in, u = this.nodes.get(t).in;
3505
3523
  if (o && l && u && l == u) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3506
3524
  if (s && l && u && l == u) throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3507
3525
  let d = {
@@ -3515,86 +3533,112 @@ var D = /* @__PURE__ */ i(((e, t) => {
3515
3533
  rhsGroup: s,
3516
3534
  title: c
3517
3535
  };
3518
- this.edges.push(d), this.nodes[e] && this.nodes[t] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[t].edges.push(this.edges[this.edges.length - 1]));
3536
+ this.edges.push(d);
3537
+ let f = this.nodes.get(e), p = this.nodes.get(t);
3538
+ f && p && (f.edges.push(this.edges[this.edges.length - 1]), p.edges.push(this.edges[this.edges.length - 1]));
3519
3539
  }
3520
3540
  getEdges() {
3521
3541
  return this.edges;
3522
3542
  }
3543
+ addLayoutHint(e) {
3544
+ if (e.members.length < 2) throw Error(`An align directive requires at least two members; got ${e.members.length}`);
3545
+ let t = /* @__PURE__ */ new Set();
3546
+ e.members.forEach((n) => {
3547
+ if (this.registeredIds.get(n) !== "node") throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);
3548
+ if (t.has(n)) throw Error(`align ${e.direction} lists [${n}] more than once`);
3549
+ t.add(n);
3550
+ }), this.layoutHints.push(e);
3551
+ }
3552
+ getLayoutHints() {
3553
+ return this.layoutHints;
3554
+ }
3523
3555
  getDataStructures() {
3524
3556
  if (this.dataStructures === void 0) {
3525
- let e = {}, n = Object.entries(this.nodes).reduce((t, [n, r]) => (t[n] = r.edges.reduce((t, r) => {
3526
- let i = this.getNode(r.lhsId)?.in, a = this.getNode(r.rhsId)?.in;
3527
- if (i && a && i !== a) {
3528
- let t = te(r.lhsDir, r.rhsDir);
3529
- t !== "bend" && (e[i] ??= {}, e[i][a] = t, e[a] ??= {}, e[a][i] = t);
3530
- }
3531
- if (r.lhsId === n) {
3532
- let e = B(r.lhsDir, r.rhsDir);
3533
- e && (t[e] = r.rhsId);
3534
- } else {
3535
- let e = B(r.rhsDir, r.lhsDir);
3536
- e && (t[e] = r.lhsId);
3557
+ let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
3558
+ for (let [n, r] of this.nodes.entries()) {
3559
+ let i = /* @__PURE__ */ new Map();
3560
+ for (let t of r.edges) {
3561
+ let r = this.getNode(t.lhsId)?.in, a = this.getNode(t.rhsId)?.in;
3562
+ if (r && a && r !== a) {
3563
+ let n = te(t.lhsDir, t.rhsDir);
3564
+ n !== "bend" && e.set(re(r, a), n);
3565
+ }
3566
+ if (t.lhsId === n) {
3567
+ let e = B(t.lhsDir, t.rhsDir);
3568
+ e && i.set(e, t.rhsId);
3569
+ } else {
3570
+ let e = B(t.rhsDir, t.lhsDir);
3571
+ e && i.set(e, t.lhsId);
3572
+ }
3537
3573
  }
3538
- return t;
3539
- }, {}), t), {}), r = Object.keys(n)[0], i = { [r]: 1 }, a = Object.keys(n).reduce((e, t) => t === r ? e : {
3540
- ...e,
3541
- [t]: 1
3542
- }, {}), o = /* @__PURE__ */ t((e) => {
3543
- let t = { [e]: [0, 0] }, r = [e];
3544
- for (; r.length > 0;) {
3545
- let e = r.shift();
3574
+ t.set(n, i);
3575
+ }
3576
+ let n = /* @__PURE__ */ new Set(), r = new Set(t.keys()), i = /* @__PURE__ */ g((e) => {
3577
+ let i = /* @__PURE__ */ new Map([[e, [0, 0]]]), a = [e];
3578
+ for (; a.length > 0;) {
3579
+ let e = a.shift();
3546
3580
  if (e) {
3547
- i[e] = 1, delete a[e];
3548
- let o = n[e], [s, c] = t[e];
3549
- Object.entries(o).forEach(([e, n]) => {
3550
- i[n] || (t[n] = V([s, c], e), r.push(n));
3581
+ n.add(e), r.delete(e);
3582
+ let o = t.get(e);
3583
+ if (!o) throw Error(`BFS error: adjacency list for id ${e} not found. Please report this as a bug.`);
3584
+ let s = i.get(e);
3585
+ if (!s) throw Error(`BFS error: position for id ${e} not found in spatial map. Please report this as a bug.`);
3586
+ let [c, l] = s;
3587
+ o.forEach((e, t) => {
3588
+ n.has(e) || (i.set(e, V([c, l], t)), a.push(e));
3551
3589
  });
3552
3590
  }
3553
3591
  }
3554
- return t;
3555
- }, "BFS"), s = [o(r)];
3556
- for (; Object.keys(a).length > 0;) s.push(o(Object.keys(a)[0]));
3592
+ return i;
3593
+ }, "BFS"), a = [];
3594
+ for (; r.size > 0;) {
3595
+ let e = r.values().next().value;
3596
+ a.push(i(e));
3597
+ }
3557
3598
  this.dataStructures = {
3558
- adjList: n,
3559
- spatialMaps: s,
3599
+ adjList: t,
3600
+ spatialMaps: a,
3560
3601
  groupAlignments: e
3561
3602
  };
3562
3603
  }
3563
3604
  return this.dataStructures;
3564
3605
  }
3565
3606
  setElementForId(e, t) {
3566
- this.elements[e] = t;
3607
+ this.elements.set(e, t);
3567
3608
  }
3568
3609
  getElementById(e) {
3569
- return this.elements[e];
3610
+ return this.elements.get(e);
3570
3611
  }
3571
3612
  getConfig() {
3572
3613
  return v({
3573
- ...W,
3574
- ...u().architecture
3614
+ ...G,
3615
+ ...l().architecture
3575
3616
  });
3576
3617
  }
3577
3618
  getConfigField(e) {
3578
3619
  return this.getConfig()[e];
3579
3620
  }
3580
- }, ie = /* @__PURE__ */ t((e, t) => {
3621
+ }, K = /* @__PURE__ */ g((e, t) => {
3581
3622
  T(e, t), e.groups.map((e) => t.addGroup(e)), e.services.map((e) => t.addService({
3582
3623
  ...e,
3583
3624
  type: "service"
3584
3625
  })), e.junctions.map((e) => t.addJunction({
3585
3626
  ...e,
3586
3627
  type: "junction"
3587
- })), e.edges.map((e) => t.addEdge(e));
3588
- }, "populateDb"), K = {
3628
+ })), e.edges.map((e) => t.addEdge(e)), e.alignments?.map((e) => t.addLayoutHint({
3629
+ direction: e.direction,
3630
+ members: [...e.members]
3631
+ }));
3632
+ }, "populateDb"), q = {
3589
3633
  parser: { yy: void 0 },
3590
- parse: /* @__PURE__ */ t(async (t) => {
3591
- let n = await w("architecture", t);
3592
- e.debug(n);
3593
- let r = K.parser?.yy;
3594
- if (!(r instanceof G)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
3595
- ie(n, r);
3634
+ parse: /* @__PURE__ */ g(async (e) => {
3635
+ let n = await w("architecture", e);
3636
+ t.debug(n);
3637
+ let r = q.parser?.yy;
3638
+ if (!(r instanceof ie)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
3639
+ K(n, r);
3596
3640
  }, "parse")
3597
- }, q = /* @__PURE__ */ t((e) => `
3641
+ }, ae = /* @__PURE__ */ g((e) => `
3598
3642
  .edge {
3599
3643
  stroke-width: ${e.archEdgeWidth};
3600
3644
  stroke: ${e.archEdgeColor};
@@ -3625,51 +3669,67 @@ var D = /* @__PURE__ */ i(((e, t) => {
3625
3669
  display: -webkit-box;
3626
3670
  -webkit-box-orient: vertical;
3627
3671
  }
3628
- `, "getStyles"), J = /* @__PURE__ */ t((e) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`, "wrapIcon"), Y = {
3672
+ `, "getStyles");
3673
+ function J(e, t) {
3674
+ if (e === 0) return t();
3675
+ let n = Math.random, r = e >>> 0;
3676
+ Math.random = function() {
3677
+ r = r + 1831565813 >>> 0;
3678
+ let e = r;
3679
+ return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
3680
+ };
3681
+ try {
3682
+ return t();
3683
+ } finally {
3684
+ Math.random = n;
3685
+ }
3686
+ }
3687
+ g(J, "withSeededRandom");
3688
+ var Y = /* @__PURE__ */ g((e) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`, "wrapIcon"), X = {
3629
3689
  prefix: "mermaid-architecture",
3630
3690
  height: 80,
3631
3691
  width: 80,
3632
3692
  icons: {
3633
- database: { body: J("<path id=\"b\" data-name=\"4\" d=\"m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"c\" data-name=\"3\" d=\"m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"d\" data-name=\"2\" d=\"m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse id=\"e\" data-name=\"1\" cx=\"40\" cy=\"22.14\" rx=\"20\" ry=\"7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"20\" y1=\"57.86\" x2=\"20\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"60\" y1=\"57.86\" x2=\"60\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3634
- server: { body: J("<rect x=\"17.5\" y=\"17.5\" width=\"45\" height=\"45\" rx=\"2\" ry=\"2\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"32.5\" x2=\"62.5\" y2=\"32.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"47.5\" x2=\"62.5\" y2=\"47.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><g><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g>") },
3635
- disk: { body: J("<rect x=\"20\" y=\"15\" width=\"40\" height=\"50\" rx=\"1\" ry=\"1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"14\" ry=\"14.58\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"4\" ry=\"4.17\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z\" style=\"fill: #fff; stroke-width: 0px;\"/>") },
3636
- internet: { body: J("<circle cx=\"40\" cy=\"40\" r=\"22.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"40\" y1=\"17.5\" x2=\"40\" y2=\"62.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"40\" x2=\"62.5\" y2=\"40\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"30.1\" x2=\"60.25\" y2=\"30.1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"49.9\" x2=\"60.25\" y2=\"49.9\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3637
- cloud: { body: J("<path d=\"m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3693
+ database: { body: Y("<path id=\"b\" data-name=\"4\" d=\"m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"c\" data-name=\"3\" d=\"m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"d\" data-name=\"2\" d=\"m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse id=\"e\" data-name=\"1\" cx=\"40\" cy=\"22.14\" rx=\"20\" ry=\"7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"20\" y1=\"57.86\" x2=\"20\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"60\" y1=\"57.86\" x2=\"60\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3694
+ server: { body: Y("<rect x=\"17.5\" y=\"17.5\" width=\"45\" height=\"45\" rx=\"2\" ry=\"2\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"32.5\" x2=\"62.5\" y2=\"32.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"47.5\" x2=\"62.5\" y2=\"47.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><g><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g>") },
3695
+ disk: { body: Y("<rect x=\"20\" y=\"15\" width=\"40\" height=\"50\" rx=\"1\" ry=\"1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"14\" ry=\"14.58\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"4\" ry=\"4.17\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z\" style=\"fill: #fff; stroke-width: 0px;\"/>") },
3696
+ internet: { body: Y("<circle cx=\"40\" cy=\"40\" r=\"22.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"40\" y1=\"17.5\" x2=\"40\" y2=\"62.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"40\" x2=\"62.5\" y2=\"40\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"30.1\" x2=\"60.25\" y2=\"30.1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"49.9\" x2=\"60.25\" y2=\"49.9\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3697
+ cloud: { body: Y("<path d=\"m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3638
3698
  unknown: b,
3639
- blank: { body: J("") }
3699
+ blank: { body: Y("") }
3640
3700
  }
3641
- }, ae = /* @__PURE__ */ t(async function(e, t, n, r) {
3701
+ }, oe = /* @__PURE__ */ g(async function(e, t, n, r) {
3642
3702
  let i = n.getConfigField("padding"), a = n.getConfigField("iconSize"), o = a / 2, s = a / 6, c = s / 2;
3643
3703
  await Promise.all(t.edges().map(async (t) => {
3644
- let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: p, targetArrow: h, targetGroup: g, label: v } = re(t), { x: y, y: b } = t[0].sourceEndpoint(), { x, y: C } = t[0].midpoint(), { x: w, y: T } = t[0].targetEndpoint(), E = i + 4;
3645
- if (d && (F(l) ? y += l === "L" ? -E : E : b += l === "T" ? -E : E + 18), g && (F(p) ? w += p === "L" ? -E : E : T += p === "T" ? -E : E + 18), !d && n.getNode(a)?.type === "junction" && (F(l) ? y += l === "L" ? o : -o : b += l === "T" ? o : -o), !g && n.getNode(f)?.type === "junction" && (F(p) ? w += p === "L" ? o : -o : T += p === "T" ? o : -o), t[0]._private.rscratch) {
3704
+ let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: m, targetArrow: h, targetGroup: g, label: v } = U(t), { x: y, y: b } = t[0].sourceEndpoint(), { x, y: S } = t[0].midpoint(), { x: w, y: T } = t[0].targetEndpoint(), E = i + 4;
3705
+ if (d && (F(l) ? y += l === "L" ? -E : E : b += l === "T" ? -E : E + 18), g && (F(m) ? w += m === "L" ? -E : E : T += m === "T" ? -E : E + 18), !d && n.getNode(a)?.type === "junction" && (F(l) ? y += l === "L" ? o : -o : b += l === "T" ? o : -o), !g && n.getNode(f)?.type === "junction" && (F(m) ? w += m === "L" ? o : -o : T += m === "T" ? o : -o), t[0]._private.rscratch) {
3646
3706
  let t = e.insert("g");
3647
- if (t.insert("path").attr("d", `M ${y},${b} L ${x},${C} L${w},${T} `).attr("class", "edge").attr("id", `${r}-${_(a, f, { prefix: "L" })}`), u) {
3707
+ if (t.insert("path").attr("d", `M ${y},${b} L ${x},${S} L${w},${T} `).attr("class", "edge").attr("id", `${r}-${_(a, f, { prefix: "L" })}`), u) {
3648
3708
  let e = F(l) ? M[l](y, s) : y - c, n = I(l) ? M[l](b, s) : b - c;
3649
3709
  t.insert("polygon").attr("points", j[l](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3650
3710
  }
3651
3711
  if (h) {
3652
- let e = F(p) ? M[p](w, s) : w - c, n = I(p) ? M[p](T, s) : T - c;
3653
- t.insert("polygon").attr("points", j[p](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3712
+ let e = F(m) ? M[m](w, s) : w - c, n = I(m) ? M[m](T, s) : T - c;
3713
+ t.insert("polygon").attr("points", j[m](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3654
3714
  }
3655
3715
  if (v) {
3656
- let e = L(l, p) ? "XY" : F(l) ? "X" : "Y", n = 0;
3716
+ let e = L(l, m) ? "XY" : F(l) ? "X" : "Y", n = 0;
3657
3717
  n = e === "X" ? Math.abs(y - w) : e === "Y" ? Math.abs(b - T) / 1.5 : Math.abs(y - w) / 2;
3658
3718
  let r = t.append("g");
3659
- if (await S(r, v, {
3719
+ if (await C(r, v, {
3660
3720
  useHtmlLabels: !1,
3661
3721
  width: n,
3662
3722
  classes: "architecture-service-label"
3663
- }, m()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + x + ", " + C + ")");
3664
- else if (e === "Y") r.attr("transform", "translate(" + x + ", " + C + ") rotate(-90)");
3723
+ }, p()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + x + ", " + S + ")");
3724
+ else if (e === "Y") r.attr("transform", "translate(" + x + ", " + S + ") rotate(-90)");
3665
3725
  else if (e === "XY") {
3666
- let e = B(l, p);
3726
+ let e = B(l, m);
3667
3727
  if (e && R(e)) {
3668
3728
  let t = r.node().getBoundingClientRect(), [n, i] = ee(e);
3669
3729
  r.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * n * i * 45})`);
3670
3730
  let a = r.node().getBoundingClientRect();
3671
3731
  r.attr("transform", `
3672
- translate(${x}, ${C - t.height / 2})
3732
+ translate(${x}, ${S - t.height / 2})
3673
3733
  translate(${n * a.width / 2}, ${i * a.height / 2})
3674
3734
  rotate(${-1 * n * i * 45}, 0, ${t.height / 2})
3675
3735
  `);
@@ -3678,58 +3738,58 @@ var D = /* @__PURE__ */ i(((e, t) => {
3678
3738
  }
3679
3739
  }
3680
3740
  }));
3681
- }, "drawEdges"), X = /* @__PURE__ */ t(async function(e, t, n, r) {
3741
+ }, "drawEdges"), Z = /* @__PURE__ */ g(async function(e, t, n, r) {
3682
3742
  let i = n.getConfigField("padding") * .75, a = n.getConfigField("fontSize"), o = n.getConfigField("iconSize") / 2;
3683
3743
  await Promise.all(t.nodes().map(async (t) => {
3684
- let s = U(t);
3744
+ let s = W(t);
3685
3745
  if (s.type === "group") {
3686
3746
  let { h: c, w: l, x1: u, y1: d } = t.boundingBox(), f = e.append("rect");
3687
3747
  f.attr("id", `${r}-group-${s.id}`).attr("x", u + o).attr("y", d + o).attr("width", l).attr("height", c).attr("class", "node-bkg");
3688
- let p = e.append("g"), h = u, g = d;
3748
+ let m = e.append("g"), h = u, g = d;
3689
3749
  if (s.icon) {
3690
- let e = p.append("g");
3691
- e.html(`<g>${await C(s.icon, {
3750
+ let e = m.append("g");
3751
+ e.html(`<g>${await S(s.icon, {
3692
3752
  height: i,
3693
3753
  width: i,
3694
- fallbackPrefix: Y.prefix
3754
+ fallbackPrefix: X.prefix
3695
3755
  })}</g>`), e.attr("transform", "translate(" + (h + o + 1) + ", " + (g + o + 1) + ")"), h += i, g += a / 2 - 1 - 2;
3696
3756
  }
3697
3757
  if (s.label) {
3698
- let e = p.append("g");
3699
- await S(e, s.label, {
3758
+ let e = m.append("g");
3759
+ await C(e, s.label, {
3700
3760
  useHtmlLabels: !1,
3701
3761
  width: l,
3702
3762
  classes: "architecture-service-label"
3703
- }, m()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (h + o + 4) + ", " + (g + o + 2) + ")");
3763
+ }, p()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (h + o + 4) + ", " + (g + o + 2) + ")");
3704
3764
  }
3705
3765
  n.setElementForId(s.id, f);
3706
3766
  }
3707
3767
  }));
3708
- }, "drawGroups"), oe = /* @__PURE__ */ t(async function(e, t, n, r) {
3709
- let i = m();
3768
+ }, "drawGroups"), se = /* @__PURE__ */ g(async function(e, t, n, r) {
3769
+ let i = p();
3710
3770
  for (let a of n) {
3711
3771
  let n = t.append("g"), o = e.getConfigField("iconSize");
3712
3772
  if (a.title) {
3713
3773
  let e = n.append("g");
3714
- await S(e, a.title, {
3774
+ await C(e, a.title, {
3715
3775
  useHtmlLabels: !1,
3716
3776
  width: o * 1.5,
3717
3777
  classes: "architecture-service-label"
3718
3778
  }, i), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + o / 2 + ", " + o + ")");
3719
3779
  }
3720
3780
  let s = n.append("g");
3721
- if (a.icon) s.html(`<g>${await C(a.icon, {
3781
+ if (a.icon) s.html(`<g>${await S(a.icon, {
3722
3782
  height: o,
3723
3783
  width: o,
3724
- fallbackPrefix: Y.prefix
3784
+ fallbackPrefix: X.prefix
3725
3785
  })}</g>`);
3726
3786
  else if (a.iconText) {
3727
- s.html(`<g>${await C("blank", {
3787
+ s.html(`<g>${await S("blank", {
3728
3788
  height: o,
3729
3789
  width: o,
3730
- fallbackPrefix: Y.prefix
3790
+ fallbackPrefix: X.prefix
3731
3791
  })}</g>`);
3732
- let e = s.append("g").append("foreignObject").attr("width", o).attr("height", o).append("div").attr("class", "node-icon-text").attr("style", `height: ${o}px;`).append("div").html(g(a.iconText, i)), t = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
3792
+ let e = s.append("g").append("foreignObject").attr("width", o).attr("height", o).append("div").attr("class", "node-icon-text").attr("style", `height: ${o}px;`).append("div").html(h(a.iconText, i)), t = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
3733
3793
  e.attr("style", `-webkit-line-clamp: ${Math.floor((o - 2) / t)};`);
3734
3794
  } else s.append("path").attr("class", "node-bkg").attr("id", `${r}-node-${a.id}`).attr("d", `M0,${o} V5 Q0,0 5,0 H${o - 5} Q${o},0 ${o},5 V${o} Z`);
3735
3795
  n.attr("id", `${r}-service-${a.id}`).attr("class", "architecture-service");
@@ -3737,7 +3797,7 @@ var D = /* @__PURE__ */ i(((e, t) => {
3737
3797
  a.width = c, a.height = l, e.setElementForId(a.id, n);
3738
3798
  }
3739
3799
  return 0;
3740
- }, "drawServices"), Z = /* @__PURE__ */ t(function(e, t, n, r) {
3800
+ }, "drawServices"), ce = /* @__PURE__ */ g(function(e, t, n, r) {
3741
3801
  n.forEach((n) => {
3742
3802
  let i = t.append("g"), a = e.getConfigField("iconSize");
3743
3803
  i.append("g").append("rect").attr("id", `${r}-node-${n.id}`).attr("fill-opacity", "0").attr("width", a).attr("height", a), i.attr("class", "architecture-junction");
@@ -3746,10 +3806,10 @@ var D = /* @__PURE__ */ i(((e, t) => {
3746
3806
  });
3747
3807
  }, "drawJunctions");
3748
3808
  x([{
3749
- name: Y.prefix,
3750
- icons: Y
3809
+ name: X.prefix,
3810
+ icons: X
3751
3811
  }]), E.use(k.default);
3752
- function se(e, t, n) {
3812
+ function le(e, t, n) {
3753
3813
  e.forEach((e) => {
3754
3814
  t.add({
3755
3815
  group: "nodes",
@@ -3766,8 +3826,8 @@ function se(e, t, n) {
3766
3826
  });
3767
3827
  });
3768
3828
  }
3769
- t(se, "addServices");
3770
- function ce(e, t, n) {
3829
+ g(le, "addServices");
3830
+ function ue(e, t, n) {
3771
3831
  e.forEach((e) => {
3772
3832
  t.add({
3773
3833
  group: "nodes",
@@ -3782,15 +3842,15 @@ function ce(e, t, n) {
3782
3842
  });
3783
3843
  });
3784
3844
  }
3785
- t(ce, "addJunctions");
3786
- function le(e, t) {
3845
+ g(ue, "addJunctions");
3846
+ function de(e, t) {
3787
3847
  t.nodes().map((t) => {
3788
- let n = U(t);
3848
+ let n = W(t);
3789
3849
  n.type !== "group" && (n.x = t.position().x, n.y = t.position().y, e.getElementById(n.id).attr("transform", "translate(" + (n.x || 0) + "," + (n.y || 0) + ")"));
3790
3850
  });
3791
3851
  }
3792
- t(le, "positionNodes");
3793
- function ue(e, t) {
3852
+ g(de, "positionNodes");
3853
+ function fe(e, t) {
3794
3854
  e.forEach((e) => {
3795
3855
  t.add({
3796
3856
  group: "nodes",
@@ -3805,8 +3865,8 @@ function ue(e, t) {
3805
3865
  });
3806
3866
  });
3807
3867
  }
3808
- t(ue, "addGroups");
3809
- function de(e, t) {
3868
+ g(fe, "addGroups");
3869
+ function pe(e, t) {
3810
3870
  e.forEach((e) => {
3811
3871
  let { lhsId: n, rhsId: r, lhsInto: i, lhsGroup: a, rhsInto: o, lhsDir: s, rhsDir: c, rhsGroup: l, title: u } = e, d = L(e.lhsDir, e.rhsDir) ? "segments" : "straight", f = {
3812
3872
  id: `${n}-${r}`,
@@ -3829,80 +3889,114 @@ function de(e, t) {
3829
3889
  });
3830
3890
  });
3831
3891
  }
3832
- t(de, "addEdges");
3833
- function fe(e, n, r) {
3834
- let i = /* @__PURE__ */ t((e, t) => Object.entries(e).reduce((e, [n, i]) => {
3835
- let a = 0, o = Object.entries(i);
3836
- if (o.length === 1) return e[n] = o[0][1], e;
3837
- for (let i = 0; i < o.length - 1; i++) for (let s = i + 1; s < o.length; s++) {
3838
- let [c, l] = o[i], [u, d] = o[s];
3839
- if (r[c]?.[u] === t) e[n] ??= [], e[n] = [
3840
- ...e[n],
3841
- ...l,
3842
- ...d
3843
- ];
3844
- else if (c === "default" || u === "default") e[n] ??= [], e[n] = [
3845
- ...e[n],
3846
- ...l,
3847
- ...d
3848
- ];
3849
- else {
3850
- let t = `${n}-${a++}`;
3851
- e[t] = l;
3852
- let r = `${n}-${a++}`;
3853
- e[r] = d;
3892
+ g(pe, "addEdges");
3893
+ function me(e, t, n, r = []) {
3894
+ let i = /* @__PURE__ */ g((e, t) => {
3895
+ let r = /* @__PURE__ */ new Map();
3896
+ for (let [i, a] of e.entries()) {
3897
+ let e = `${i}`, o = 0, s = [...a.entries()];
3898
+ if (s.length === 1) {
3899
+ r.set(e, s[0][1]);
3900
+ continue;
3901
+ }
3902
+ for (let i = 0; i < s.length - 1; i++) for (let a = i + 1; a < s.length; a++) {
3903
+ let [c, l] = s[i], [u, d] = s[a];
3904
+ if (n.get(re(c, u)) === t) r.set(e, [
3905
+ ...r.get(e) ?? [],
3906
+ ...l,
3907
+ ...d
3908
+ ]);
3909
+ else if (c === "default" || u === "default") r.set(e, [
3910
+ ...r.get(e) ?? [],
3911
+ ...l,
3912
+ ...d
3913
+ ]);
3914
+ else {
3915
+ let t = `${e}-${o++}`;
3916
+ r.set(t, l);
3917
+ let n = `${e}-${o++}`;
3918
+ r.set(n, d);
3919
+ }
3854
3920
  }
3855
3921
  }
3856
- return e;
3857
- }, {}), "flattenAlignments"), [a, o] = n.map((t) => {
3858
- let n = {}, r = {};
3859
- return Object.entries(t).forEach(([t, [i, a]]) => {
3860
- let o = e.getNode(t)?.in ?? "default";
3861
- n[a] ??= {}, n[a][o] ??= [], n[a][o].push(t), r[i] ??= {}, r[i][o] ??= [], r[i][o].push(t);
3922
+ return r;
3923
+ }, "flattenAlignments"), [a, o] = t.map((t) => {
3924
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
3925
+ return t.forEach(([t, i], a) => {
3926
+ let o = e.getNode(a)?.in ?? "default", s = n.get(i) ?? /* @__PURE__ */ new Map();
3927
+ n.has(i) || n.set(i, s);
3928
+ let c = r.get(t) ?? /* @__PURE__ */ new Map();
3929
+ r.has(t) || r.set(t, c);
3930
+ for (let e of [s, c]) {
3931
+ let t = e.get(o) ?? [];
3932
+ e.has(o) || e.set(o, t), t.push(a);
3933
+ }
3862
3934
  }), {
3863
- horiz: Object.values(i(n, "horizontal")).filter((e) => e.length > 1),
3864
- vert: Object.values(i(r, "vertical")).filter((e) => e.length > 1)
3935
+ horiz: [...i(n, "horizontal").values()].filter((e) => e.length > 1),
3936
+ vert: [...i(r, "vertical").values()].filter((e) => e.length > 1)
3865
3937
  };
3866
- }).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]);
3867
- return {
3868
- horizontal: a,
3869
- vertical: o
3938
+ }).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]), s = /* @__PURE__ */ new Set();
3939
+ r.forEach((e) => e.members.forEach((e) => s.add(e)));
3940
+ let c = /* @__PURE__ */ g((e) => e.filter((e) => !e.some((e) => s.has(e))), "dropOverlapping"), l = c(a), u = c(o);
3941
+ return r.forEach((e) => {
3942
+ e.members.length < 2 || (e.direction === "row" ? l.push([...e.members]) : u.push([...e.members]));
3943
+ }), {
3944
+ horizontal: l,
3945
+ vertical: u
3870
3946
  };
3871
3947
  }
3872
- t(fe, "getAlignments");
3873
- function pe(e, n) {
3874
- let r = [], i = /* @__PURE__ */ t((e) => `${e[0]},${e[1]}`, "posToStr"), a = /* @__PURE__ */ t((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
3948
+ g(me, "getAlignments");
3949
+ function he(e, t, n = []) {
3950
+ let r = [], i = t.getConfigField("iconSize"), a = t.getConfigField("idealEdgeLengthMultiplier"), o = a * i, s = /* @__PURE__ */ new Set();
3951
+ n.forEach((e) => {
3952
+ for (let t = 0; t < e.members.length - 1; t++) {
3953
+ let n = e.members[t], i = e.members[t + 1];
3954
+ s.add(`${n}|${i}`), s.add(`${i}|${n}`), e.direction === "row" ? r.push({
3955
+ left: n,
3956
+ right: i,
3957
+ gap: o
3958
+ }) : r.push({
3959
+ top: n,
3960
+ bottom: i,
3961
+ gap: o
3962
+ });
3963
+ }
3964
+ });
3965
+ let c = /* @__PURE__ */ g((e) => `${e[0]},${e[1]}`, "posToStr"), l = /* @__PURE__ */ g((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
3875
3966
  return e.forEach((e) => {
3876
- let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [i(t), e])), o = [i([0, 0])], s = {}, c = {
3967
+ let t = new Map([...e.entries()].map(([e, t]) => [c(t), e])), n = [c([0, 0])], o = {}, u = {
3877
3968
  L: [-1, 0],
3878
3969
  R: [1, 0],
3879
3970
  T: [0, 1],
3880
3971
  B: [0, -1]
3881
3972
  };
3882
- for (; o.length > 0;) {
3883
- let e = o.shift();
3973
+ for (; n.length > 0;) {
3974
+ let e = n.shift();
3884
3975
  if (e) {
3885
- s[e] = 1;
3886
- let l = t[e];
3887
- if (l) {
3888
- let u = a(e);
3889
- Object.entries(c).forEach(([e, a]) => {
3890
- let c = i([u[0] + a[0], u[1] + a[1]]), d = t[c];
3891
- d && !s[c] && (o.push(c), r.push({
3892
- [A[e]]: d,
3893
- [A[N(e)]]: l,
3894
- gap: 1.5 * n.getConfigField("iconSize")
3895
- }));
3976
+ o[e] = 1;
3977
+ let d = t.get(e);
3978
+ if (d) {
3979
+ let f = l(e);
3980
+ Object.entries(u).forEach(([e, l]) => {
3981
+ let u = c([f[0] + l[0], f[1] + l[1]]), p = t.get(u);
3982
+ if (p && !o[u]) {
3983
+ if (n.push(u), s.has(`${d}|${p}`)) return;
3984
+ r.push({
3985
+ [A[e]]: p,
3986
+ [A[N(e)]]: d,
3987
+ gap: a * i
3988
+ });
3989
+ }
3896
3990
  });
3897
3991
  }
3898
3992
  }
3899
3993
  }
3900
3994
  }), r;
3901
3995
  }
3902
- t(pe, "getRelativeConstraints");
3903
- function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
3904
- return new Promise((u) => {
3905
- let d = n("body").append("div").attr("id", "cy").attr("style", "display:none"), f = E({
3996
+ g(he, "getRelativeConstraints");
3997
+ function ge(e, r, i, a, o, { spatialMaps: s, groupAlignments: c }) {
3998
+ return new Promise((l) => {
3999
+ let u = n("body").append("div").attr("id", "cy").attr("style", "display:none"), d = E({
3906
4000
  container: document.getElementById("cy"),
3907
4001
  style: [
3908
4002
  {
@@ -3937,7 +4031,7 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
3937
4031
  style: {
3938
4032
  "text-valign": "bottom",
3939
4033
  "text-halign": "center",
3940
- "font-size": `${s.getConfigField("fontSize")}px`
4034
+ "font-size": `${o.getConfigField("fontSize")}px`
3941
4035
  }
3942
4036
  },
3943
4037
  {
@@ -3957,7 +4051,7 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
3957
4051
  },
3958
4052
  {
3959
4053
  selector: ".node-group",
3960
- style: { padding: `${s.getConfigField("padding")}px` }
4054
+ style: { padding: `${o.getConfigField("padding")}px` }
3961
4055
  }
3962
4056
  ],
3963
4057
  layout: {
@@ -3970,28 +4064,28 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
3970
4064
  }
3971
4065
  }
3972
4066
  });
3973
- d.remove(), ue(a, f), se(r, f, s), ce(i, f, s), de(o, f);
3974
- let p = fe(s, c, l), m = pe(c, s), h = s.getConfigField("iconSize"), g = s.getConfigField("idealEdgeLengthMultiplier") * h, _ = .5 * h, v = s.getConfigField("edgeElasticity"), y = f.layout({
4067
+ u.remove(), fe(i, d), le(e, d, o), ue(r, d, o), pe(a, d);
4068
+ let f = o.getLayoutHints(), p = me(o, s, c, f), m = he(s, o, f), h = o.getConfigField("iconSize"), _ = o.getConfigField("idealEdgeLengthMultiplier") * h, v = .5 * h, y = o.getConfigField("edgeElasticity"), b = o.getConfigField("seed"), x = d.layout({
3975
4069
  name: "fcose",
3976
4070
  quality: "proof",
3977
- randomize: s.getConfigField("randomize"),
3978
- nodeSeparation: s.getConfigField("nodeSeparation"),
3979
- numIter: s.getConfigField("numIter"),
4071
+ randomize: o.getConfigField("randomize"),
4072
+ nodeSeparation: o.getConfigField("nodeSeparation"),
4073
+ numIter: o.getConfigField("numIter"),
3980
4074
  styleEnabled: !1,
3981
4075
  animate: !1,
3982
4076
  nodeDimensionsIncludeLabels: !1,
3983
4077
  idealEdgeLength(e) {
3984
- let [t, n] = e.connectedNodes(), { parent: r } = U(t), { parent: i } = U(n);
3985
- return r === i ? g : _;
4078
+ let [t, n] = e.connectedNodes(), { parent: r } = W(t), { parent: i } = W(n);
4079
+ return r === i ? _ : v;
3986
4080
  },
3987
4081
  edgeElasticity(e) {
3988
- let [t, n] = e.connectedNodes(), { parent: r } = U(t), { parent: i } = U(n);
3989
- return r === i ? v : .001;
4082
+ let [t, n] = e.connectedNodes(), { parent: r } = W(t), { parent: i } = W(n);
4083
+ return r === i ? y : .001;
3990
4084
  },
3991
4085
  alignmentConstraint: p,
3992
4086
  relativePlacementConstraint: m
3993
4087
  });
3994
- y.one("layoutstop", () => {
4088
+ x.one("layoutstop", () => {
3995
4089
  function e(e, t, n, r) {
3996
4090
  let i, a, { x: o, y: s } = e, { x: c, y: l } = t;
3997
4091
  a = (r - s + (o - n) * (s - l) / (o - c)) / Math.sqrt(1 + ((s - l) / (o - c)) ** 2), i = Math.sqrt((r - s) ** 2 + (n - o) ** 2 - a ** 2);
@@ -4002,57 +4096,59 @@ function me(r, i, a, o, s, { spatialMaps: c, groupAlignments: l }) {
4002
4096
  case d >= 0:
4003
4097
  d = 1;
4004
4098
  break;
4005
- case d < 0:
4006
- d = -1;
4007
- break;
4099
+ case d < 0: d = -1;
4008
4100
  }
4009
4101
  let f = (c - o) * (n - o) + (l - s) * (r - s);
4010
4102
  switch (!0) {
4011
4103
  case f >= 0:
4012
4104
  f = 1;
4013
4105
  break;
4014
- case f < 0:
4015
- f = -1;
4016
- break;
4106
+ case f < 0: f = -1;
4017
4107
  }
4018
4108
  return a = Math.abs(a) * d, i *= f, {
4019
4109
  distances: a,
4020
4110
  weights: i
4021
4111
  };
4022
4112
  }
4023
- t(e, "getSegmentWeights"), f.startBatch();
4024
- for (let t of Object.values(f.edges())) if (t.data?.()) {
4113
+ g(e, "getSegmentWeights"), d.startBatch();
4114
+ for (let t of Object.values(d.edges())) if (t.data?.()) {
4025
4115
  let { x: n, y: r } = t.source().position(), { x: i, y: a } = t.target().position();
4026
4116
  if (n !== i && r !== a) {
4027
- let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } = re(t), [a, o] = I(i) ? [n.x, r.y] : [r.x, n.y], { weights: s, distances: c } = e(n, r, a, o);
4117
+ let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } = U(t), [a, o] = I(i) ? [n.x, r.y] : [r.x, n.y], { weights: s, distances: c } = e(n, r, a, o);
4028
4118
  t.style("segment-distances", c), t.style("segment-weights", s);
4029
4119
  }
4030
4120
  }
4031
- f.endBatch(), y.run();
4032
- }), y.run(), f.ready((t) => {
4033
- e.info("Ready", t), u(f);
4121
+ d.endBatch(), J(b, () => x.run());
4122
+ });
4123
+ try {
4124
+ J(b, () => x.run());
4125
+ } catch (e) {
4126
+ throw e instanceof RangeError && e.message.includes("Invalid array length") ? Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.") : e;
4127
+ }
4128
+ d.ready((e) => {
4129
+ t.info("Ready", e), l(d);
4034
4130
  });
4035
4131
  });
4036
4132
  }
4037
- t(me, "layoutArchitecture");
4038
- var he = {
4039
- parser: K,
4133
+ g(ge, "layoutArchitecture");
4134
+ var _e = {
4135
+ parser: q,
4040
4136
  get db() {
4041
- return new G();
4137
+ return new ie();
4042
4138
  },
4043
- renderer: { draw: /* @__PURE__ */ t(async (e, t, n, r) => {
4139
+ renderer: { draw: /* @__PURE__ */ g(async (e, t, n, r) => {
4044
4140
  let i = r.db;
4045
4141
  i.setDiagramId(t);
4046
- let a = i.getServices(), s = i.getJunctions(), c = i.getGroups(), l = i.getEdges(), u = i.getDataStructures(), d = y(t), f = d.append("g");
4142
+ let o = i.getServices(), s = i.getJunctions(), c = i.getGroups(), l = i.getEdges(), u = i.getDataStructures(), d = y(t), f = d.append("g");
4047
4143
  f.attr("class", "architecture-edges");
4048
4144
  let p = d.append("g");
4049
4145
  p.attr("class", "architecture-services");
4050
4146
  let m = d.append("g");
4051
- m.attr("class", "architecture-groups"), await oe(i, p, a, t), Z(i, p, s, t);
4052
- let h = await me(a, s, c, l, i, u);
4053
- await ae(f, h, i, t), await X(m, h, i, t), le(i, h), o(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4147
+ m.attr("class", "architecture-groups"), await se(i, p, o, t), ce(i, p, s, t);
4148
+ let h = await ge(o, s, c, l, i, u);
4149
+ await oe(f, h, i, t), await Z(m, h, i, t), de(i, h), a(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4054
4150
  }, "draw") },
4055
- styles: q
4151
+ styles: ae
4056
4152
  };
4057
4153
  //#endregion
4058
- export { he as diagram };
4154
+ export { _e as diagram };