@sme.up/ketchup2 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/dist/arc-CqG9Hxdf.cjs +1 -0
  2. package/dist/arc-Klgb378K.js +80 -0
  3. package/dist/architecture-YZFGNWBL-BRqToLcm.js +3 -0
  4. package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +1 -0
  5. package/dist/architectureDiagram-Q4EWVU46-JSjagcXX.cjs +36 -0
  6. package/dist/architectureDiagram-Q4EWVU46-u2vgZv3N.js +4057 -0
  7. package/dist/array-D8NZ46Ht.js +6 -0
  8. package/dist/array-Dxz0O8Q3.cjs +1 -0
  9. package/dist/assets/imageListAssets.d.ts +3 -1
  10. package/dist/assets/imageListAssets.d.ts.map +1 -1
  11. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  12. package/dist/basic-components/list/list-types.d.ts +0 -1
  13. package/dist/basic-components/list/list-types.d.ts.map +1 -1
  14. package/dist/basic-components/list/list.d.ts.map +1 -1
  15. package/dist/basic-components/notification/notification.assets.d.ts.map +1 -1
  16. package/dist/basic-components/select/select.d.ts.map +1 -1
  17. package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
  18. package/dist/blockDiagram-DXYQGD6D-BpB6_kTP.js +3033 -0
  19. package/dist/blockDiagram-DXYQGD6D-DlcDXSwH.cjs +132 -0
  20. package/dist/c4Diagram-AHTNJAMY-B5Z8nO1s.js +2961 -0
  21. package/dist/c4Diagram-AHTNJAMY-CX5IjREU.cjs +10 -0
  22. package/dist/channel-BY9Lkyz7.cjs +1 -0
  23. package/dist/channel-BqNr2cYO.js +5 -0
  24. package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +23 -0
  25. package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +1 -0
  26. package/dist/chunk-336JU56O-CuXRn1VH.cjs +1 -0
  27. package/dist/chunk-336JU56O-xKPgkG3O.js +49 -0
  28. package/dist/chunk-426QAEUC-Df31vuwu.cjs +1 -0
  29. package/dist/chunk-426QAEUC-JjFVHKYG.js +9 -0
  30. package/dist/chunk-4BX2VUAB-BW54-JWg.js +8 -0
  31. package/dist/chunk-4BX2VUAB-Qba52sxc.cjs +1 -0
  32. package/dist/chunk-4TB4RGXK-CKyHmNcP.js +3253 -0
  33. package/dist/chunk-4TB4RGXK-DdKJIFS5.cjs +206 -0
  34. package/dist/chunk-55IACEB6-Bu3k0Yz5.js +8 -0
  35. package/dist/chunk-55IACEB6-DPatBzu7.cjs +1 -0
  36. package/dist/chunk-5FUZZQ4R-2kdZJWq2.js +3638 -0
  37. package/dist/chunk-5FUZZQ4R-D_vnCbAb.cjs +62 -0
  38. package/dist/chunk-5PVQY5BW-C5U7sJAA.js +1299 -0
  39. package/dist/chunk-5PVQY5BW-CfQDYQZt.cjs +2 -0
  40. package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +1 -0
  41. package/dist/chunk-67CJDMHE-YMBkJcAO.js +23 -0
  42. package/dist/chunk-7N4EOEYR-C-GuhRgW.js +35 -0
  43. package/dist/chunk-7N4EOEYR-jNBQwvHx.cjs +1 -0
  44. package/dist/chunk-AA7GKIK3-B_ZB6dou.js +30 -0
  45. package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +1 -0
  46. package/dist/chunk-BSJP7CBP-CFzYPvgr.cjs +1 -0
  47. package/dist/chunk-BSJP7CBP-oNTXVRA7.js +82 -0
  48. package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +1 -0
  49. package/dist/chunk-CIAEETIT-XlxsAz-4.js +23 -0
  50. package/dist/chunk-D-IZpNpi.cjs +1 -0
  51. package/dist/chunk-EDXVE4YY-BZsJORf8.cjs +1 -0
  52. package/dist/chunk-EDXVE4YY-Bzf4FU3i.js +25 -0
  53. package/dist/chunk-ENJZ2VHE-BluGQPyl.js +560 -0
  54. package/dist/chunk-ENJZ2VHE-CwgVASaU.cjs +10 -0
  55. package/dist/{chunk-FMBD7UC4-C1wIcaJH.js → chunk-FMBD7UC4-CS9_r76V.cjs} +2 -6
  56. package/dist/chunk-FMBD7UC4-RRSc9jqt.js +5 -0
  57. package/dist/chunk-FOC6F5B3-DcZs851j.cjs +1 -0
  58. package/dist/chunk-FOC6F5B3-E9n6-juB.js +23 -0
  59. package/dist/chunk-ICPOFSXX-CoaJw-IT.cjs +122 -0
  60. package/dist/chunk-ICPOFSXX-Sn6LWD0k.js +3316 -0
  61. package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +94 -0
  62. package/dist/chunk-K5T4RW27-DY7TOEqa.js +16070 -0
  63. package/dist/chunk-KGLVRYIC-5OJpfQCj.js +23 -0
  64. package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +1 -0
  65. package/dist/chunk-LIHQZDEY-59I4-LWb.js +64 -0
  66. package/dist/chunk-LIHQZDEY-CrogR3nT.cjs +1 -0
  67. package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +1 -0
  68. package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +31 -0
  69. package/dist/chunk-OYMX7WX6-BCT45RPu.cjs +231 -0
  70. package/dist/chunk-OYMX7WX6-BQADsxYi.js +2014 -0
  71. package/dist/chunk-QZHKN3VN-Bx8I6l3c.js +15 -0
  72. package/dist/chunk-QZHKN3VN-CSMKL2rB.cjs +1 -0
  73. package/dist/chunk-U2HBQHQK-BZ3YFMXB.js +1879 -0
  74. package/dist/chunk-U2HBQHQK-D0AoQWxK.cjs +70 -0
  75. package/dist/chunk-WQLz0Won.js +20 -0
  76. package/dist/chunk-X2U36JSP-CY7mJR8m.js +67 -0
  77. package/dist/chunk-X2U36JSP-D1RYKjVc.cjs +1 -0
  78. package/dist/chunk-XPW4576I-BcWkx-AL.js +1146 -0
  79. package/dist/chunk-XPW4576I-D8Pp6a3j.cjs +32 -0
  80. package/dist/chunk-YZCP3GAM-9K9WNdyN.js +60 -0
  81. package/dist/chunk-YZCP3GAM-BmaAafMm.cjs +1 -0
  82. package/dist/chunk-ZZ45TVLE-AQQsnXy4.cjs +1 -0
  83. package/dist/chunk-ZZ45TVLE-CIYrdg-O.js +32 -0
  84. package/dist/classDiagram-6PBFFD2Q-B6betnLH.cjs +1 -0
  85. package/dist/classDiagram-6PBFFD2Q-XGxl_AeB.js +29 -0
  86. package/dist/classDiagram-v2-HSJHXN6E-CwayYG4G.js +29 -0
  87. package/dist/classDiagram-v2-HSJHXN6E-Dda8WDvn.cjs +1 -0
  88. package/dist/clone-Dn__H8fX.js +8 -0
  89. package/dist/clone-lShkT11Q.cjs +1 -0
  90. package/dist/components/image-list/components/image-list-command-panel.d.ts +15 -0
  91. package/dist/components/image-list/components/image-list-command-panel.d.ts.map +1 -0
  92. package/dist/components/image-list/components/image-list-command-trigger.d.ts +16 -0
  93. package/dist/components/image-list/components/image-list-command-trigger.d.ts.map +1 -0
  94. package/dist/components/image-list/components/image-list-filter-picker.d.ts +14 -0
  95. package/dist/components/image-list/components/image-list-filter-picker.d.ts.map +1 -0
  96. package/dist/components/image-list/components/image-list-h-strip.d.ts.map +1 -1
  97. package/dist/components/image-list/components/image-list-json-viewer.d.ts +11 -0
  98. package/dist/components/image-list/components/image-list-json-viewer.d.ts.map +1 -0
  99. package/dist/components/image-list/components/image-list-menu.d.ts.map +1 -1
  100. package/dist/components/image-list/components/image-list-navigation-picker.d.ts +6 -2
  101. package/dist/components/image-list/components/image-list-navigation-picker.d.ts.map +1 -1
  102. package/dist/components/image-list/components/image-list-sort-picker.d.ts +14 -0
  103. package/dist/components/image-list/components/image-list-sort-picker.d.ts.map +1 -0
  104. package/dist/components/image-list/components/image-list-v-strip.d.ts.map +1 -1
  105. package/dist/components/image-list/components/items/image-list-card-item.d.ts +5 -0
  106. package/dist/components/image-list/components/items/image-list-card-item.d.ts.map +1 -0
  107. package/dist/components/image-list/components/items/image-list-folder-item.d.ts.map +1 -1
  108. package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
  109. package/dist/components/image-list/components/menu-nav-item.d.ts.map +1 -1
  110. package/dist/components/image-list/components/navigation-modes/image-list-catalog.d.ts.map +1 -1
  111. package/dist/components/image-list/components/navigation-modes/image-list-explorer.d.ts.map +1 -1
  112. package/dist/components/image-list/components/navigation-modes/image-list-tree.d.ts.map +1 -1
  113. package/dist/components/image-list/components/strip-item.d.ts.map +1 -1
  114. package/dist/components/image-list/hooks/useCommandPickers.d.ts +13 -0
  115. package/dist/components/image-list/hooks/useCommandPickers.d.ts.map +1 -0
  116. package/dist/components/image-list/image-list-column-utils.d.ts +9 -0
  117. package/dist/components/image-list/image-list-column-utils.d.ts.map +1 -0
  118. package/dist/components/image-list/image-list-context.d.ts +5 -2
  119. package/dist/components/image-list/image-list-context.d.ts.map +1 -1
  120. package/dist/components/image-list/image-list-debug-utils.d.ts +13 -0
  121. package/dist/components/image-list/image-list-debug-utils.d.ts.map +1 -0
  122. package/dist/components/image-list/image-list-filter-context.d.ts +9 -0
  123. package/dist/components/image-list/image-list-filter-context.d.ts.map +1 -0
  124. package/dist/components/image-list/image-list-filter-utils.d.ts +12 -0
  125. package/dist/components/image-list/image-list-filter-utils.d.ts.map +1 -0
  126. package/dist/components/image-list/image-list-sort-context.d.ts +9 -0
  127. package/dist/components/image-list/image-list-sort-context.d.ts.map +1 -0
  128. package/dist/components/image-list/image-list-sort-utils.d.ts +13 -0
  129. package/dist/components/image-list/image-list-sort-utils.d.ts.map +1 -0
  130. package/dist/components/image-list/image-list-state-context.d.ts +5 -0
  131. package/dist/components/image-list/image-list-state-context.d.ts.map +1 -0
  132. package/dist/components/image-list/image-list-types.d.ts +45 -2
  133. package/dist/components/image-list/image-list-types.d.ts.map +1 -1
  134. package/dist/components/image-list/image-list-utils.d.ts +24 -1
  135. package/dist/components/image-list/image-list-utils.d.ts.map +1 -1
  136. package/dist/components/image-list/image-list.d.ts +1 -1
  137. package/dist/components/image-list/image-list.d.ts.map +1 -1
  138. package/dist/cose-bilkent-S5V4N54A-B30Rh9DR.js +2250 -0
  139. package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +1 -0
  140. package/dist/cytoscape.esm-CPjF_mSK.js +18100 -0
  141. package/dist/cytoscape.esm-CrBwLFXE.cjs +321 -0
  142. package/dist/dagre-BjnWDdkw.cjs +1 -0
  143. package/dist/dagre-DVLnxd7n.js +1606 -0
  144. package/dist/dagre-KV5264BT-BjqayRYC.js +293 -0
  145. package/dist/dagre-KV5264BT-BvInGAUC.cjs +4 -0
  146. package/dist/defaultLocale-Dcyuaxxg.js +201 -0
  147. package/dist/defaultLocale-DtzyZW63.cjs +1 -0
  148. package/dist/diagram-5BDNPKRD-Bk7depC0.js +101 -0
  149. package/dist/diagram-5BDNPKRD-D6EXksHo.cjs +10 -0
  150. package/dist/diagram-G4DWMVQ6-BkQnbCLv.js +524 -0
  151. package/dist/diagram-G4DWMVQ6-CJASbR70.cjs +24 -0
  152. package/dist/diagram-MMDJMWI5-DEt7jQx9.cjs +43 -0
  153. package/dist/diagram-MMDJMWI5-DUUVPi55.js +213 -0
  154. package/dist/diagram-TYMM5635-5auoAFCi.cjs +24 -0
  155. package/dist/diagram-TYMM5635-Cpj8wfoJ.js +133 -0
  156. package/dist/dist-BgvMZbfo.cjs +1 -0
  157. package/dist/dist-DL30VIBI.js +60 -0
  158. package/dist/erDiagram-SMLLAGMA-DVUT6TBy.cjs +85 -0
  159. package/dist/erDiagram-SMLLAGMA-D_ByPk0C.js +1700 -0
  160. package/dist/flatten-BE1bWL-7.js +40 -0
  161. package/dist/flatten-DxvYSoR8.cjs +1 -0
  162. package/dist/flowDiagram-DWJPFMVM-BWrkDnqc.js +4145 -0
  163. package/dist/flowDiagram-DWJPFMVM-BbK42NaF.cjs +162 -0
  164. package/dist/functional-components/action/action-types.d.ts +6 -1
  165. package/dist/functional-components/action/action-types.d.ts.map +1 -1
  166. package/dist/functional-components/action/action.d.ts.map +1 -1
  167. package/dist/ganttDiagram-T4ZO3ILL-DUi8jF9H.cjs +292 -0
  168. package/dist/ganttDiagram-T4ZO3ILL-LuaYkUvj.js +3077 -0
  169. package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +1 -0
  170. package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +3 -0
  171. package/dist/gitGraphDiagram-UUTBAWPF-D-tMWUQ1.cjs +106 -0
  172. package/dist/gitGraphDiagram-UUTBAWPF-DKkENwcV.js +728 -0
  173. package/dist/graphlib-Cpifseqb.js +373 -0
  174. package/dist/graphlib-HdfvGLpV.cjs +1 -0
  175. package/dist/hooks/useClickOutside.d.ts.map +1 -1
  176. package/dist/identity-KQSjemTb.cjs +1 -0
  177. package/dist/identity-g0dsMjx7.js +393 -0
  178. package/dist/info-OMHHGYJF-Bk0VWVNW.js +3 -0
  179. package/dist/info-OMHHGYJF-C8QtwF0k.cjs +1 -0
  180. package/dist/infoDiagram-42DDH7IO-CH5xHj8H.cjs +2 -0
  181. package/dist/infoDiagram-42DDH7IO-CLkQPFe0.js +19 -0
  182. package/dist/init-B2MubQrj.cjs +1 -0
  183. package/dist/init-BO60vQHJ.js +15 -0
  184. package/dist/isEmpty-CA3kJuev.cjs +1 -0
  185. package/dist/isEmpty-RwX-oIQS.js +35 -0
  186. package/dist/ishikawaDiagram-UXIWVN3A-Cl3Ivm8H.cjs +70 -0
  187. package/dist/ishikawaDiagram-UXIWVN3A-DqbVPChK.js +718 -0
  188. package/dist/journeyDiagram-VCZTEJTY-DudduR0c.js +883 -0
  189. package/dist/journeyDiagram-VCZTEJTY-XRc0J8gM.cjs +139 -0
  190. package/dist/kanban-definition-6JOO6SKY-Br87atRc.cjs +89 -0
  191. package/dist/kanban-definition-6JOO6SKY-DzEqE64J.js +973 -0
  192. package/dist/katex-Du5WiYIy.js +22000 -0
  193. package/dist/katex-SAH56fvc.cjs +257 -0
  194. package/dist/ketchup2.cjs.js +190 -1
  195. package/dist/ketchup2.css +2 -1
  196. package/dist/ketchup2.es.js +132419 -52
  197. package/dist/line-BbHmiwbs.cjs +1 -0
  198. package/dist/line-JyRBGWft.js +34 -0
  199. package/dist/linear-BsPvNLJv.js +289 -0
  200. package/dist/linear-CxHa1DsM.cjs +1 -0
  201. package/dist/mermaid-parser.core-CERDf-UG.js +69 -0
  202. package/dist/mermaid-parser.core-DHpvGOZR.cjs +3 -0
  203. package/dist/mindmap-definition-QFDTVHPH-BCq8zmLt.cjs +96 -0
  204. package/dist/mindmap-definition-QFDTVHPH-NGjPQ5SM.js +978 -0
  205. package/dist/ordinal-C-VoL0XF.js +65 -0
  206. package/dist/ordinal-Civr0hZL.cjs +1 -0
  207. package/dist/packet-4T2RLAQJ-X0BMsNFj.js +3 -0
  208. package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +1 -0
  209. package/dist/path-Civic7PQ.cjs +1 -0
  210. package/dist/path-CvfwEr8y.js +85 -0
  211. package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +3 -0
  212. package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +1 -0
  213. package/dist/pieDiagram-DEJITSTG-CK4xy0PS.cjs +30 -0
  214. package/dist/pieDiagram-DEJITSTG-DTeyzHmB.js +165 -0
  215. package/dist/quadrantDiagram-34T5L4WZ-CCcJIf91.js +1974 -0
  216. package/dist/quadrantDiagram-34T5L4WZ-D-_iiK79.cjs +7 -0
  217. package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +1 -0
  218. package/dist/radar-PYXPWWZC-DgZIW9Ah.js +3 -0
  219. package/dist/reduce-B7WW9rkU.cjs +1 -0
  220. package/dist/reduce-DNnkcf3M.js +532 -0
  221. package/dist/requirementDiagram-MS252O5E-BdOanuYe.js +2221 -0
  222. package/dist/requirementDiagram-MS252O5E-EfY029Xj.cjs +84 -0
  223. package/dist/rough.esm-1mqTSjCt.js +1352 -0
  224. package/dist/rough.esm-BLKo1fIQ.cjs +1 -0
  225. package/dist/sankeyDiagram-XADWPNL6-3jlM2UcU.cjs +10 -0
  226. package/dist/sankeyDiagram-XADWPNL6-3wviN_U4.js +920 -0
  227. package/dist/sequenceDiagram-FGHM5R23-DC8SjhFN.js +4157 -0
  228. package/dist/sequenceDiagram-FGHM5R23-lK1G3QLN.cjs +157 -0
  229. package/dist/src-BQiFKP24.js +2146 -0
  230. package/dist/src-DFxq-N5I.cjs +1 -0
  231. package/dist/stateDiagram-FHFEXIEX-DnkzFphf.js +217 -0
  232. package/dist/stateDiagram-FHFEXIEX-DsQigFuR.cjs +1 -0
  233. package/dist/stateDiagram-v2-QKLJ7IA2-2v8JiIJr.js +27 -0
  234. package/dist/stateDiagram-v2-QKLJ7IA2-UKKfWPoT.cjs +1 -0
  235. package/dist/timeline-definition-GMOUNBTQ-CBnYBWN0.js +1068 -0
  236. package/dist/timeline-definition-GMOUNBTQ-DWpngnE4.cjs +120 -0
  237. package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +1 -0
  238. package/dist/treeView-SZITEDCU-Df3xzFtO.js +3 -0
  239. package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +1 -0
  240. package/dist/treemap-W4RFUUIX-ClUtdSdn.js +3 -0
  241. package/dist/utils/translation.d.ts.map +1 -1
  242. package/dist/v4-6yr83DbP.cjs +1 -0
  243. package/dist/v4-BR71w5_q.js +33 -0
  244. package/dist/vennDiagram-DHZGUBPP-D-kj-sVU.cjs +34 -0
  245. package/dist/vennDiagram-DHZGUBPP-M-kkEkXj.js +1858 -0
  246. package/dist/wardley-RL74JXVD-BtHQbnUy.js +3 -0
  247. package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +1 -0
  248. package/dist/wardleyDiagram-NUSXRM2D-CUX1SYhw.js +578 -0
  249. package/dist/wardleyDiagram-NUSXRM2D-thoOuA_D.cjs +20 -0
  250. package/dist/xychartDiagram-5P7HB3ND-1cXRZ1bi.js +2044 -0
  251. package/dist/xychartDiagram-5P7HB3ND-BF2WmJ4-.cjs +7 -0
  252. package/package.json +31 -31
  253. package/dist/_basePickBy-CPekwY_Z.js +0 -151
  254. package/dist/_basePickBy-DDhgLyLp.cjs +0 -1
  255. package/dist/_baseUniq-CAhfZr5S.js +0 -614
  256. package/dist/_baseUniq-bLb2QO_4.cjs +0 -1
  257. package/dist/arc-CnmUepZA.cjs +0 -1
  258. package/dist/arc-Md6Ds0JZ.js +0 -83
  259. package/dist/architecture-7HQA4BMR-DLImbuCr.js +0 -6
  260. package/dist/architecture-7HQA4BMR-zD1jCFXs.cjs +0 -1
  261. package/dist/architectureDiagram-VXUJARFQ-BkTy7RJA.js +0 -4661
  262. package/dist/architectureDiagram-VXUJARFQ-Vl-ya9R6.cjs +0 -36
  263. package/dist/blockDiagram-VD42YOAC-C9AJNM79.js +0 -2256
  264. package/dist/blockDiagram-VD42YOAC-D_EmYywD.cjs +0 -122
  265. package/dist/c4Diagram-YG6GDRKO-BfwBYulK.cjs +0 -10
  266. package/dist/c4Diagram-YG6GDRKO-YW-l-SYp.js +0 -1580
  267. package/dist/channel-BGeX_R6w.cjs +0 -1
  268. package/dist/channel-lqmaHMPZ.js +0 -5
  269. package/dist/chunk-4BX2VUAB-C6nahV0u.cjs +0 -1
  270. package/dist/chunk-4BX2VUAB-UMbIiF-V.js +0 -8
  271. package/dist/chunk-55IACEB6-CH_wWg2p.js +0 -8
  272. package/dist/chunk-55IACEB6-Cxt8uWHb.cjs +0 -1
  273. package/dist/chunk-B4BG7PRW-CTNZzNh0.js +0 -1375
  274. package/dist/chunk-B4BG7PRW-ekpXKNa3.cjs +0 -165
  275. package/dist/chunk-DI55MBZ5-BrLh6Fue.js +0 -1370
  276. package/dist/chunk-DI55MBZ5-TYqUGYGr.cjs +0 -220
  277. package/dist/chunk-FMBD7UC4-D0Nmh8EL.cjs +0 -15
  278. package/dist/chunk-QN33PNHL-B91UelWj.js +0 -19
  279. package/dist/chunk-QN33PNHL-KGNgU1-8.cjs +0 -1
  280. package/dist/chunk-QZHKN3VN-IV7jnz-R.js +0 -15
  281. package/dist/chunk-QZHKN3VN-ajuovO9B.cjs +0 -1
  282. package/dist/chunk-TZMSLE5B-Bkf7U79o.cjs +0 -1
  283. package/dist/chunk-TZMSLE5B-DArsm2Pn.js +0 -64
  284. package/dist/classDiagram-2ON5EDUG-C0_Gqd5k.js +0 -16
  285. package/dist/classDiagram-2ON5EDUG-Cnous8-m.cjs +0 -1
  286. package/dist/classDiagram-v2-WZHVMYZB-C0_Gqd5k.js +0 -16
  287. package/dist/classDiagram-v2-WZHVMYZB-Cnous8-m.cjs +0 -1
  288. package/dist/clone-B_MxWhab.js +0 -8
  289. package/dist/clone-D6gFD6F-.cjs +0 -1
  290. package/dist/cose-bilkent-S5V4N54A-DHZ_jZYH.js +0 -2608
  291. package/dist/cose-bilkent-S5V4N54A-Da7jSuau.cjs +0 -1
  292. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  293. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  294. package/dist/dagre-6UL2VRFP-CI2ww-SU.js +0 -444
  295. package/dist/dagre-6UL2VRFP-qOR4yAIQ.cjs +0 -4
  296. package/dist/defaultLocale-D7EN2tov.js +0 -171
  297. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
  298. package/dist/diagram-PSM6KHXK-1g8345m3.js +0 -531
  299. package/dist/diagram-PSM6KHXK-DHWL3g5V.cjs +0 -24
  300. package/dist/diagram-QEK2KX5R-B-VP4dVY.js +0 -217
  301. package/dist/diagram-QEK2KX5R-DDWbMmAv.cjs +0 -43
  302. package/dist/diagram-S2PKOQOG-BbSGqLET.js +0 -142
  303. package/dist/diagram-S2PKOQOG-Djw9RGNh.cjs +0 -24
  304. package/dist/erDiagram-Q2GNP2WA-CxY1P4hJ.js +0 -841
  305. package/dist/erDiagram-Q2GNP2WA-Pw9i-eBN.cjs +0 -60
  306. package/dist/flowDiagram-NV44I4VS-BOr3T0H8.js +0 -1620
  307. package/dist/flowDiagram-NV44I4VS-D9VKU1cV.cjs +0 -162
  308. package/dist/ganttDiagram-JELNMOA3-B4T6J11z.js +0 -2670
  309. package/dist/ganttDiagram-JELNMOA3-C4Y4VT0h.cjs +0 -267
  310. package/dist/gitGraph-G5XIXVHT-C5QaeLIs.cjs +0 -1
  311. package/dist/gitGraph-G5XIXVHT-bOZ2ppp1.js +0 -6
  312. package/dist/gitGraphDiagram-V2S2FVAM-CteUW9ML.js +0 -699
  313. package/dist/gitGraphDiagram-V2S2FVAM-D_v6ae_z.cjs +0 -65
  314. package/dist/graph-BBPk5jyk.cjs +0 -1
  315. package/dist/graph-h6vsxKyr.js +0 -247
  316. package/dist/index-CYQM-t1d.cjs +0 -390
  317. package/dist/index-FiV1b00w.js +0 -133122
  318. package/dist/info-VBDWY6EO-BEIYBsnB.cjs +0 -1
  319. package/dist/info-VBDWY6EO-BQAW_660.js +0 -6
  320. package/dist/infoDiagram-HS3SLOUP-DMalb3kC.js +0 -24
  321. package/dist/infoDiagram-HS3SLOUP-Tepm6ygN.cjs +0 -2
  322. package/dist/init-CHZsXQcr.cjs +0 -1
  323. package/dist/init-DjUOC4st.js +0 -16
  324. package/dist/journeyDiagram-XKPGCS4Q-CzePcKne.cjs +0 -139
  325. package/dist/journeyDiagram-XKPGCS4Q-D0u-RLFV.js +0 -834
  326. package/dist/kanban-definition-3W4ZIXB7-BSCzAsMJ.js +0 -719
  327. package/dist/kanban-definition-3W4ZIXB7-DdbH9sci.cjs +0 -89
  328. package/dist/katex-C2g-EhzP.cjs +0 -261
  329. package/dist/katex-CUSbq6rG.js +0 -11692
  330. package/dist/layout-6z7-eUnZ.js +0 -1335
  331. package/dist/layout-DbcrMh5B.cjs +0 -1
  332. package/dist/linear-BKevCbhh.js +0 -259
  333. package/dist/linear-C7uVEtWW.cjs +0 -1
  334. package/dist/mermaid-parser.core-Cwy51n_e.js +0 -17907
  335. package/dist/mermaid-parser.core-DQ2yhapR.cjs +0 -160
  336. package/dist/mindmap-definition-VGOIOE7T-CcEisj0R.cjs +0 -68
  337. package/dist/mindmap-definition-VGOIOE7T-xp6GmSIx.js +0 -758
  338. package/dist/ordinal-B6-f3MAq.js +0 -61
  339. package/dist/ordinal-CagbB1m8.cjs +0 -1
  340. package/dist/packet-DYOGHKS2-BGgwnMhM.js +0 -6
  341. package/dist/packet-DYOGHKS2-BWg8qxI8.cjs +0 -1
  342. package/dist/pie-VRWISCQL-DhM8CUW4.cjs +0 -1
  343. package/dist/pie-VRWISCQL-DrWIWm7W.js +0 -6
  344. package/dist/pieDiagram-ADFJNKIX-BdvacM-Z.cjs +0 -30
  345. package/dist/pieDiagram-ADFJNKIX-D6Fa7W_r.js +0 -161
  346. package/dist/quadrantDiagram-AYHSOK5B-CHMoSBvg.js +0 -1022
  347. package/dist/quadrantDiagram-AYHSOK5B-ddq5zZEg.cjs +0 -7
  348. package/dist/radar-ZZBFDIW7-CPvW4Njh.js +0 -6
  349. package/dist/radar-ZZBFDIW7-YJK72BlV.cjs +0 -1
  350. package/dist/requirementDiagram-UZGBJVZJ-Cr9HnGVO.js +0 -850
  351. package/dist/requirementDiagram-UZGBJVZJ-NdpzVbnf.cjs +0 -64
  352. package/dist/sankeyDiagram-TZEHDZUN-3f19WwKd.js +0 -810
  353. package/dist/sankeyDiagram-TZEHDZUN-D2Hzq4Kr.cjs +0 -10
  354. package/dist/sequenceDiagram-WL72ISMW-Cu-7V--6.js +0 -2511
  355. package/dist/sequenceDiagram-WL72ISMW-Nk6vhSK9.cjs +0 -145
  356. package/dist/stateDiagram-FKZM4ZOC-BSnDKUaW.cjs +0 -1
  357. package/dist/stateDiagram-FKZM4ZOC-BleTIniP.js +0 -263
  358. package/dist/stateDiagram-v2-4FDKWEC3-7EjW078x.js +0 -16
  359. package/dist/stateDiagram-v2-4FDKWEC3-BJPzO53y.cjs +0 -1
  360. package/dist/timeline-definition-IT6M3QCI-CFTjPpKy.js +0 -795
  361. package/dist/timeline-definition-IT6M3QCI-CfaGtuF2.cjs +0 -61
  362. package/dist/treemap-GDKQZRPO-CtDdEOaj.cjs +0 -1
  363. package/dist/treemap-GDKQZRPO-DlODAdQ2.js +0 -6
  364. package/dist/xychartDiagram-PRI3JC2R-mShGv2CD.cjs +0 -7
  365. package/dist/xychartDiagram-PRI3JC2R-vEJER5zT.js +0 -1340
@@ -0,0 +1,3638 @@
1
+ import { L as e, R as t, b as n, h as r, j as i, k as a, w as o, y as s } from "./chunk-ICPOFSXX-Sn6LWD0k.js";
2
+ import { g as c, h as l, p as u } from "./src-BQiFKP24.js";
3
+ import { i as d, l as f, n as p } from "./chunk-5PVQY5BW-C5U7sJAA.js";
4
+ import { n as m, t as h } from "./chunk-ZZ45TVLE-CIYrdg-O.js";
5
+ import { a as g, i as _, r as v, t as y } from "./chunk-X2U36JSP-CY7mJR8m.js";
6
+ import { n as b, r as x } from "./chunk-U2HBQHQK-BZ3YFMXB.js";
7
+ import { t as S } from "./rough.esm-1mqTSjCt.js";
8
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.mjs
9
+ var C = /* @__PURE__ */ l(async (t, i, a) => {
10
+ let o, s = i.useHtmlLabels || r(n()?.htmlLabels);
11
+ o = a || "node default";
12
+ let c = t.insert("g").attr("class", o).attr("id", i.domId || i.id), l = c.insert("g").attr("class", "label").attr("style", f(i.labelStyle)), p;
13
+ p = i.label === void 0 ? "" : typeof i.label == "string" ? i.label : i.label[0];
14
+ let m = !!i.icon || !!i.img, g = i.labelType === "markdown", _ = await b(l, e(d(p), n()), {
15
+ useHtmlLabels: s,
16
+ width: i.width || n().flowchart?.wrappingWidth,
17
+ classes: g ? "markdown-node-label" : "",
18
+ style: i.labelStyle,
19
+ addSvgBackground: m,
20
+ markdown: g
21
+ }, n()), v = _.getBBox(), y = (i?.padding ?? 0) / 2;
22
+ if (s) {
23
+ let e = _.children[0], t = u(_);
24
+ await h(e, p), v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
25
+ }
26
+ return s ? l.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")") : l.attr("transform", "translate(0, " + -v.height / 2 + ")"), i.centerLabel && l.attr("transform", "translate(" + -v.width / 2 + ", " + -v.height / 2 + ")"), l.insert("rect", ":first-child"), {
27
+ shapeSvg: c,
28
+ bbox: v,
29
+ halfPadding: y,
30
+ label: l
31
+ };
32
+ }, "labelHelper"), w = /* @__PURE__ */ l(async (t, r, i) => {
33
+ let a = i.useHtmlLabels ?? o(n()), s = t.insert("g").attr("class", "label").attr("style", i.labelStyle || ""), c = await b(s, e(d(r), n()), {
34
+ useHtmlLabels: a,
35
+ width: i.width || n()?.flowchart?.wrappingWidth,
36
+ style: i.labelStyle,
37
+ addSvgBackground: !!i.icon || !!i.img
38
+ }), l = c.getBBox(), f = i.padding / 2;
39
+ if (o(n())) {
40
+ let e = c.children[0], t = u(c);
41
+ l = e.getBoundingClientRect(), t.attr("width", l.width), t.attr("height", l.height);
42
+ }
43
+ return a ? s.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")") : s.attr("transform", "translate(0, " + -l.height / 2 + ")"), i.centerLabel && s.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), s.insert("rect", ":first-child"), {
44
+ shapeSvg: t,
45
+ bbox: l,
46
+ halfPadding: f,
47
+ label: s
48
+ };
49
+ }, "insertLabel"), T = /* @__PURE__ */ l((e, t) => {
50
+ let n = t.node().getBBox();
51
+ e.width = n.width, e.height = n.height;
52
+ }, "updateNodeBounds"), E = /* @__PURE__ */ l((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
53
+ function D(e) {
54
+ let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
55
+ return t.push("Z"), t.join(" ");
56
+ }
57
+ l(D, "createPathFromPoints");
58
+ function O(e, t, n, r, i, a) {
59
+ let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
60
+ for (let t = 0; t <= 50; t++) {
61
+ let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
62
+ o.push({
63
+ x: n,
64
+ y: r
65
+ });
66
+ }
67
+ return o;
68
+ }
69
+ l(O, "generateFullSineWavePoints");
70
+ function k(e, t, n, r, i, a) {
71
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
72
+ for (let i = 0; i < r; i++) {
73
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
74
+ o.push({
75
+ x: -a,
76
+ y: -l
77
+ });
78
+ }
79
+ return o;
80
+ }
81
+ l(k, "generateCirclePoints");
82
+ function A(e) {
83
+ let t = Array.from(e.childNodes).filter((e) => e.tagName === "path"), n = document.createElementNS("http://www.w3.org/2000/svg", "path"), r = t.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
84
+ n.setAttribute("d", r);
85
+ let i = t.find((e) => e.getAttribute("fill") !== "none"), a = t.find((e) => e.getAttribute("stroke") !== "none"), o = /* @__PURE__ */ l((e, t) => e?.getAttribute(t) ?? void 0, "getAttr");
86
+ if (i) {
87
+ let e = {
88
+ fill: o(i, "fill"),
89
+ "fill-opacity": o(i, "fill-opacity") ?? "1"
90
+ };
91
+ Object.entries(e).forEach(([e, t]) => {
92
+ t && n.setAttribute(e, t);
93
+ });
94
+ }
95
+ if (a) {
96
+ let e = {
97
+ stroke: o(a, "stroke"),
98
+ "stroke-width": o(a, "stroke-width") ?? "1",
99
+ "stroke-opacity": o(a, "stroke-opacity") ?? "1"
100
+ };
101
+ Object.entries(e).forEach(([e, t]) => {
102
+ t && n.setAttribute(e, t);
103
+ });
104
+ }
105
+ let s = document.createElementNS("http://www.w3.org/2000/svg", "g");
106
+ return s.appendChild(n), s;
107
+ }
108
+ l(A, "mergePaths");
109
+ var j = /* @__PURE__ */ l((e, t) => {
110
+ var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
111
+ return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
112
+ x: n + c,
113
+ y: r + l
114
+ };
115
+ }, "intersectRect"), M = /* @__PURE__ */ l(async (e, t, r, i = !1, a = !1) => {
116
+ let s = t || "";
117
+ typeof s == "object" && (s = s[0]);
118
+ let c = n(), l = o(c);
119
+ return await b(e, s, {
120
+ style: r,
121
+ isTitle: i,
122
+ useHtmlLabels: l,
123
+ markdown: !1,
124
+ isNode: a,
125
+ width: Infinity
126
+ }, c);
127
+ }, "createLabel"), N = /* @__PURE__ */ l((e, t, n, r, i) => [
128
+ "M",
129
+ e + i,
130
+ t,
131
+ "H",
132
+ e + n - i,
133
+ "A",
134
+ i,
135
+ i,
136
+ 0,
137
+ 0,
138
+ 1,
139
+ e + n,
140
+ t + i,
141
+ "V",
142
+ t + r - i,
143
+ "A",
144
+ i,
145
+ i,
146
+ 0,
147
+ 0,
148
+ 1,
149
+ e + n - i,
150
+ t + r,
151
+ "H",
152
+ e + i,
153
+ "A",
154
+ i,
155
+ i,
156
+ 0,
157
+ 0,
158
+ 1,
159
+ e,
160
+ t + r - i,
161
+ "V",
162
+ t + i,
163
+ "A",
164
+ i,
165
+ i,
166
+ 0,
167
+ 0,
168
+ 1,
169
+ e + i,
170
+ t,
171
+ "Z"
172
+ ].join(" "), "createRoundedRectPathD"), P = /* @__PURE__ */ l(async (e, t) => {
173
+ c.info("Creating subgraph rect for ", t.id, t);
174
+ let r = n(), { themeVariables: i, handDrawnSeed: a } = r, { clusterBkg: s, clusterBorder: l } = i, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(t), v = e.insert("g").attr("class", "cluster " + t.cssClasses).attr("id", t.domId).attr("data-look", t.look), y = o(r), x = v.insert("g").attr("class", "cluster-label "), C;
175
+ C = t.labelType === "markdown" ? await b(x, t.label, {
176
+ style: t.labelStyle,
177
+ useHtmlLabels: y,
178
+ isNode: !0,
179
+ width: t.width
180
+ }) : await M(x, t.label, t.labelStyle || "", !1, !0);
181
+ let w = C.getBBox();
182
+ if (o(r)) {
183
+ let e = C.children[0], t = u(C);
184
+ w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
185
+ }
186
+ let T = t.width <= w.width + t.padding ? w.width + t.padding : t.width;
187
+ t.width <= w.width + t.padding ? t.diff = (T - t.width) / 2 - t.padding : t.diff = -t.padding;
188
+ let E = t.height, D = t.x - T / 2, O = t.y - E / 2;
189
+ c.trace("Data ", t, JSON.stringify(t));
190
+ let k;
191
+ if (t.look === "handDrawn") {
192
+ let e = S.svg(v), n = g(t, {
193
+ roughness: .7,
194
+ fill: s,
195
+ stroke: l,
196
+ fillWeight: 3,
197
+ seed: a
198
+ }), r = e.path(N(D, O, T, E, 0), n);
199
+ k = v.insert(() => (c.debug("Rough node insert CXC", r), r), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
200
+ } else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", t.rx).attr("ry", t.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
201
+ let { subGraphTitleTopMargin: A } = m(r);
202
+ if (x.attr("transform", `translate(${t.x - w.width / 2}, ${t.y - t.height / 2 + A})`), d) {
203
+ let e = x.select("span");
204
+ e && e.attr("style", d);
205
+ }
206
+ let P = k.node().getBBox();
207
+ return t.offsetX = 0, t.width = P.width, t.height = P.height, t.offsetY = w.height - t.padding / 2, t.intersect = function(e) {
208
+ return j(t, e);
209
+ }, {
210
+ cluster: v,
211
+ labelBBox: w
212
+ };
213
+ }, "rect"), F = {
214
+ rect: P,
215
+ squareRect: P,
216
+ roundedWithTitle: /* @__PURE__ */ l(async (e, t) => {
217
+ let r = n(), { themeVariables: i, handDrawnSeed: a } = r, { altBackground: s, compositeBackground: c, compositeTitleBackground: l, nodeBorder: d } = i, f = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-id", t.id).attr("data-look", t.look), p = f.insert("g", ":first-child"), m = f.insert("g").attr("class", "cluster-label"), h = f.append("rect"), g = await M(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
218
+ if (o(r)) {
219
+ let e = g.children[0], t = u(g);
220
+ _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
221
+ }
222
+ let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
223
+ t.width <= _.width + t.padding ? t.diff = (b - t.width) / 2 - t.padding : t.diff = -t.padding;
224
+ let x = t.height + v, C = t.height + v - _.height - 6, w = t.x - b / 2, T = t.y - x / 2;
225
+ t.width = b;
226
+ let E = t.y - t.height / 2 - y + _.height + 2, D;
227
+ if (t.look === "handDrawn") {
228
+ let e = t.cssClasses.includes("statediagram-cluster-alt"), n = S.svg(f), r = t.rx || t.ry ? n.path(N(w, T, b, x, 10), {
229
+ roughness: .7,
230
+ fill: l,
231
+ fillStyle: "solid",
232
+ stroke: d,
233
+ seed: a
234
+ }) : n.rectangle(w, T, b, x, { seed: a });
235
+ D = f.insert(() => r, ":first-child");
236
+ let i = n.rectangle(w, E, b, C, {
237
+ fill: e ? s : c,
238
+ fillStyle: e ? "hachure" : "solid",
239
+ stroke: d,
240
+ seed: a
241
+ });
242
+ D = f.insert(() => r, ":first-child"), h = f.insert(() => i);
243
+ } else D = p.insert("rect", ":first-child"), D.attr("class", "outer").attr("x", w).attr("y", T).attr("width", b).attr("height", x).attr("data-look", t.look), h.attr("class", "inner").attr("x", w).attr("y", E).attr("width", b).attr("height", C);
244
+ return m.attr("transform", `translate(${t.x - _.width / 2}, ${T + 1 - (o(r) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
245
+ return j(t, e);
246
+ }, {
247
+ cluster: f,
248
+ labelBBox: _
249
+ };
250
+ }, "roundedWithTitle"),
251
+ noteGroup: /* @__PURE__ */ l((e, t) => {
252
+ let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
253
+ r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
254
+ let o = r.node().getBBox();
255
+ return t.width = o.width, t.height = o.height, t.intersect = function(e) {
256
+ return j(t, e);
257
+ }, {
258
+ cluster: n,
259
+ labelBBox: {
260
+ width: 0,
261
+ height: 0
262
+ }
263
+ };
264
+ }, "noteGroup"),
265
+ divider: /* @__PURE__ */ l((e, t) => {
266
+ let { themeVariables: r, handDrawnSeed: i } = n(), { nodeBorder: a } = r, o = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), s = o.insert("g", ":first-child"), c = 0 * t.padding, l = t.width + c;
267
+ t.diff = -t.padding;
268
+ let u = t.height + c, d = t.x - l / 2, f = t.y - u / 2;
269
+ t.width = l;
270
+ let p;
271
+ if (t.look === "handDrawn") {
272
+ let e = S.svg(o).rectangle(d, f, l, u, {
273
+ fill: "lightgrey",
274
+ roughness: .5,
275
+ strokeLineDash: [5],
276
+ stroke: a,
277
+ seed: i
278
+ });
279
+ p = o.insert(() => e, ":first-child");
280
+ } else {
281
+ p = s.insert("rect", ":first-child");
282
+ let e = "outer";
283
+ e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width", l).attr("height", u).attr("data-look", t.look);
284
+ }
285
+ return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
286
+ return j(t, e);
287
+ }, {
288
+ cluster: o,
289
+ labelBBox: {}
290
+ };
291
+ }, "divider"),
292
+ kanbanSection: /* @__PURE__ */ l(async (e, t) => {
293
+ c.info("Creating subgraph rect for ", t.id, t);
294
+ let r = n(), { themeVariables: i, handDrawnSeed: a } = r, { clusterBkg: s, clusterBorder: l } = i, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = _(t), v = e.insert("g").attr("class", "cluster " + t.cssClasses).attr("id", t.domId).attr("data-look", t.look), y = o(r), x = v.insert("g").attr("class", "cluster-label "), C = await b(x, t.label, {
295
+ style: t.labelStyle,
296
+ useHtmlLabels: y,
297
+ isNode: !0,
298
+ width: t.width
299
+ }), w = C.getBBox();
300
+ if (o(r)) {
301
+ let e = C.children[0], t = u(C);
302
+ w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
303
+ }
304
+ let T = t.width <= w.width + t.padding ? w.width + t.padding : t.width;
305
+ t.width <= w.width + t.padding ? t.diff = (T - t.width) / 2 - t.padding : t.diff = -t.padding;
306
+ let E = t.height, D = t.x - T / 2, O = t.y - E / 2;
307
+ c.trace("Data ", t, JSON.stringify(t));
308
+ let k;
309
+ if (t.look === "handDrawn") {
310
+ let e = S.svg(v), n = g(t, {
311
+ roughness: .7,
312
+ fill: s,
313
+ stroke: l,
314
+ fillWeight: 4,
315
+ seed: a
316
+ }), r = e.path(N(D, O, T, E, t.rx), n);
317
+ k = v.insert(() => (c.debug("Rough node insert CXC", r), r), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
318
+ } else k = v.insert("rect", ":first-child"), k.attr("style", f).attr("rx", t.rx).attr("ry", t.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
319
+ let { subGraphTitleTopMargin: A } = m(r);
320
+ if (x.attr("transform", `translate(${t.x - w.width / 2}, ${t.y - t.height / 2 + A})`), d) {
321
+ let e = x.select("span");
322
+ e && e.attr("style", d);
323
+ }
324
+ let M = k.node().getBBox();
325
+ return t.offsetX = 0, t.width = M.width, t.height = M.height, t.offsetY = w.height - t.padding / 2, t.intersect = function(e) {
326
+ return j(t, e);
327
+ }, {
328
+ cluster: v,
329
+ labelBBox: w
330
+ };
331
+ }, "kanbanSection")
332
+ }, I = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ l(async (e, t) => {
333
+ let n = await F[t.shape || "rect"](e, t);
334
+ return I.set(t.id, n), n;
335
+ }, "insertCluster"), te = /* @__PURE__ */ l(() => {
336
+ I = /* @__PURE__ */ new Map();
337
+ }, "clear");
338
+ function L(e, t) {
339
+ return e.intersect(t);
340
+ }
341
+ l(L, "intersectNode");
342
+ var R = L;
343
+ function ne(e, t, n, r) {
344
+ var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
345
+ r.x < i && (l = -l);
346
+ var u = Math.abs(t * n * s / c);
347
+ return r.y < a && (u = -u), {
348
+ x: i + l,
349
+ y: a + u
350
+ };
351
+ }
352
+ l(ne, "intersectEllipse");
353
+ var z = ne;
354
+ function B(e, t, n) {
355
+ return z(e, t, t, n);
356
+ }
357
+ l(B, "intersectCircle");
358
+ var V = B;
359
+ function H(e, t, n, r) {
360
+ {
361
+ let i = t.y - e.y, a = e.x - t.x, o = t.x * e.y - e.x * t.y, s = i * n.x + a * n.y + o, c = i * r.x + a * r.y + o, l = 1e-6;
362
+ if (s !== 0 && c !== 0 && re(s, c)) return;
363
+ let u = r.y - n.y, d = n.x - r.x, f = r.x * n.y - n.x * r.y, p = u * e.x + d * e.y + f, m = u * t.x + d * t.y + f;
364
+ if (Math.abs(p) < l && Math.abs(m) < l && re(p, m)) return;
365
+ let h = i * d - u * a;
366
+ if (h === 0) return;
367
+ let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
368
+ return _ = u * o - i * f, {
369
+ x: v,
370
+ y: _ < 0 ? (_ - g) / h : (_ + g) / h
371
+ };
372
+ }
373
+ }
374
+ l(H, "intersectLine");
375
+ function re(e, t) {
376
+ return e * t > 0;
377
+ }
378
+ l(re, "sameSign");
379
+ var ie = H;
380
+ function U(e, t, n) {
381
+ let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
382
+ typeof t.forEach == "function" ? t.forEach(function(e) {
383
+ o = Math.min(o, e.x), s = Math.min(s, e.y);
384
+ }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
385
+ let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
386
+ for (let r = 0; r < t.length; r++) {
387
+ let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = ie(e, n, {
388
+ x: c + i.x,
389
+ y: l + i.y
390
+ }, {
391
+ x: c + o.x,
392
+ y: l + o.y
393
+ });
394
+ s && a.push(s);
395
+ }
396
+ return a.length ? (a.length > 1 && a.sort(function(e, t) {
397
+ let r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
398
+ return a < c ? -1 : a === c ? 0 : 1;
399
+ }), a[0]) : e;
400
+ }
401
+ l(U, "intersectPolygon");
402
+ var W = {
403
+ node: R,
404
+ circle: V,
405
+ ellipse: z,
406
+ polygon: U,
407
+ rect: j
408
+ };
409
+ function G(e, t) {
410
+ let { labelStyles: n } = _(t);
411
+ t.labelStyle = n;
412
+ let r = E(t), i = r;
413
+ r || (i = "anchor");
414
+ let a = e.insert("g").attr("class", i).attr("id", t.domId || t.id), { cssStyles: o } = t, s = S.svg(a), l = g(t, {
415
+ fill: "black",
416
+ stroke: "none",
417
+ fillStyle: "solid"
418
+ });
419
+ t.look !== "handDrawn" && (l.roughness = 0);
420
+ let u = s.circle(0, 0, 2, l), d = a.insert(() => u, ":first-child");
421
+ return d.attr("class", "anchor").attr("style", f(o)), T(t, d), t.intersect = function(e) {
422
+ return c.info("Circle intersect", t, 1, e), W.circle(t, 1, e);
423
+ }, a;
424
+ }
425
+ l(G, "anchor");
426
+ function K(e, t, n, r, i, a, o) {
427
+ let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(f ** 2 + p ** 2);
428
+ if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
429
+ let h = Math.sqrt(1 - m ** 2), g = s + h * a * Math.sin(l) * (o ? -1 : 1), _ = c - h * i * Math.cos(l) * (o ? -1 : 1), v = Math.atan2((t - _) / a, (e - g) / i), y = Math.atan2((r - _) / a, (n - g) / i) - v;
430
+ o && y < 0 && (y += 2 * Math.PI), !o && y > 0 && (y -= 2 * Math.PI);
431
+ let b = [];
432
+ for (let e = 0; e < 20; e++) {
433
+ let t = v + e / 19 * y, n = g + i * Math.cos(t), r = _ + a * Math.sin(t);
434
+ b.push({
435
+ x: n,
436
+ y: r
437
+ });
438
+ }
439
+ return b;
440
+ }
441
+ l(K, "generateArcPoints");
442
+ function ae(e, t, n) {
443
+ let [r, i] = [t, n].sort((e, t) => t - e);
444
+ return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
445
+ }
446
+ l(ae, "calculateArcSagitta");
447
+ async function oe(e, t) {
448
+ let { labelStyles: n, nodeStyles: r } = _(t);
449
+ t.labelStyle = n;
450
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = /* @__PURE__ */ l((e) => e + o, "calcTotalHeight"), c = /* @__PURE__ */ l((e) => {
451
+ let t = e / 2;
452
+ return [t / (2.5 + e / 50), t];
453
+ }, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await C(e, t, E(t)), f = s(t?.height ? t?.height : d.height), [p, m] = c(f), h = ae(f, p, m), v = (t?.width ? t?.width : d.width) + a * 2 + h - h, y = f, { cssStyles: b } = t, x = [
454
+ {
455
+ x: v / 2,
456
+ y: -y / 2
457
+ },
458
+ {
459
+ x: -v / 2,
460
+ y: -y / 2
461
+ },
462
+ ...K(-v / 2, -y / 2, -v / 2, y / 2, p, m, !1),
463
+ {
464
+ x: v / 2,
465
+ y: y / 2
466
+ },
467
+ ...K(v / 2, y / 2, v / 2, -y / 2, p, m, !0)
468
+ ], w = S.svg(u), O = g(t, {});
469
+ t.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
470
+ let k = D(x), A = w.path(k, O), j = u.insert(() => A, ":first-child");
471
+ return j.attr("class", "basic label-container outer-path"), b && t.look !== "handDrawn" && j.selectAll("path").attr("style", b), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(${p / 2}, 0)`), T(t, j), t.intersect = function(e) {
472
+ return W.polygon(t, x, e);
473
+ }, u;
474
+ }
475
+ l(oe, "bowTieRect");
476
+ function q(e, t, n, r) {
477
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
478
+ return e.x + "," + e.y;
479
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
480
+ }
481
+ l(q, "insertPolygonShape");
482
+ var se = 12;
483
+ async function ce(e, t) {
484
+ let { labelStyles: n, nodeStyles: r } = _(t);
485
+ t.labelStyle = n;
486
+ let i = t.padding ?? 0, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a + se), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
487
+ {
488
+ x: 0 + se,
489
+ y: f
490
+ },
491
+ {
492
+ x: d,
493
+ y: f
494
+ },
495
+ {
496
+ x: d,
497
+ y: 0
498
+ },
499
+ {
500
+ x: 0,
501
+ y: 0
502
+ },
503
+ {
504
+ x: 0,
505
+ y: f + se
506
+ },
507
+ {
508
+ x: 0 + se,
509
+ y: f
510
+ }
511
+ ], m, { cssStyles: h } = t;
512
+ if (t.look === "handDrawn") {
513
+ let e = S.svg(s), n = g(t, {}), r = D(p), i = e.path(r, n);
514
+ m = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), h && m.attr("style", h);
515
+ } else m = q(s, l, u, p);
516
+ return r && m.attr("style", r), T(t, m), t.intersect = function(e) {
517
+ return W.polygon(t, p, e);
518
+ }, s;
519
+ }
520
+ l(ce, "card");
521
+ function le(e, t) {
522
+ let { nodeStyles: n } = _(t);
523
+ t.label = "";
524
+ let r = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
525
+ {
526
+ x: 0,
527
+ y: a / 2
528
+ },
529
+ {
530
+ x: a / 2,
531
+ y: 0
532
+ },
533
+ {
534
+ x: 0,
535
+ y: -a / 2
536
+ },
537
+ {
538
+ x: -a / 2,
539
+ y: 0
540
+ }
541
+ ], s = S.svg(r), c = g(t, {});
542
+ t.look !== "handDrawn" && (c.roughness = 0, c.fillStyle = "solid");
543
+ let l = D(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
544
+ return i && t.look !== "handDrawn" && d.selectAll("path").attr("style", i), n && t.look !== "handDrawn" && d.selectAll("path").attr("style", n), t.width = 28, t.height = 28, t.intersect = function(e) {
545
+ return W.polygon(t, o, e);
546
+ }, r;
547
+ }
548
+ l(le, "choice");
549
+ async function ue(e, t, n) {
550
+ let { labelStyles: r, nodeStyles: i } = _(t);
551
+ t.labelStyle = r;
552
+ let { shapeSvg: a, bbox: o, halfPadding: s } = await C(e, t, E(t)), l = n?.padding ?? s, u = t.look === "neo" ? o.width / 2 + 32 : o.width / 2 + l, d, { cssStyles: p } = t;
553
+ if (t.look === "handDrawn") {
554
+ let e = S.svg(a), n = g(t, {}), r = e.circle(0, 0, u * 2, n);
555
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", f(p));
556
+ } else d = a.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", i).attr("r", u).attr("cx", 0).attr("cy", 0);
557
+ return T(t, d), t.calcIntersect = function(e, t) {
558
+ let n = e.width / 2;
559
+ return W.circle(e, n, t);
560
+ }, t.intersect = function(e) {
561
+ return c.info("Circle intersect", t, u, e), W.circle(t, u, e);
562
+ }, a;
563
+ }
564
+ l(ue, "circle");
565
+ function de(e) {
566
+ let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
567
+ x: r / 2 * t,
568
+ y: r / 2 * n
569
+ }, a = {
570
+ x: -(r / 2) * t,
571
+ y: r / 2 * n
572
+ }, o = {
573
+ x: -(r / 2) * t,
574
+ y: -(r / 2) * n
575
+ }, s = {
576
+ x: r / 2 * t,
577
+ y: -(r / 2) * n
578
+ };
579
+ return `M ${a.x},${a.y} L ${s.x},${s.y}
580
+ M ${i.x},${i.y} L ${o.x},${o.y}`;
581
+ }
582
+ l(de, "createLine");
583
+ function fe(e, t) {
584
+ let { labelStyles: n, nodeStyles: r } = _(t);
585
+ t.labelStyle = n, t.label = "";
586
+ let i = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), a = Math.max(30, t?.width ?? 0), { cssStyles: o } = t, s = S.svg(i), l = g(t, {});
587
+ t.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
588
+ let u = s.circle(0, 0, a * 2, l), d = de(a), f = s.path(d, l), p = i.insert(() => u, ":first-child");
589
+ return p.insert(() => f), p.attr("class", "outer-path"), o && t.look !== "handDrawn" && p.selectAll("path").attr("style", o), r && t.look !== "handDrawn" && p.selectAll("path").attr("style", r), T(t, p), t.intersect = function(e) {
590
+ return c.info("crossedCircle intersect", t, {
591
+ radius: a,
592
+ point: e
593
+ }), W.circle(t, a, e);
594
+ }, i;
595
+ }
596
+ l(fe, "crossedCircle");
597
+ function J(e, t, n, r = 100, i = 0, a = 180) {
598
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
599
+ for (let i = 0; i < r; i++) {
600
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
601
+ o.push({
602
+ x: -a,
603
+ y: -l
604
+ });
605
+ }
606
+ return o;
607
+ }
608
+ l(J, "generateCirclePoints");
609
+ async function pe(e, t) {
610
+ let { labelStyles: n, nodeStyles: r } = _(t);
611
+ t.labelStyle = n;
612
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + s, u = a.height + c, d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
613
+ ...J(l / 2, -u / 2, d, 30, -90, 0),
614
+ {
615
+ x: -l / 2 - d,
616
+ y: d
617
+ },
618
+ ...J(l / 2 + d * 2, -d, d, 20, -180, -270),
619
+ ...J(l / 2 + d * 2, d, d, 20, -90, -180),
620
+ {
621
+ x: -l / 2 - d,
622
+ y: -u / 2
623
+ },
624
+ ...J(l / 2, u / 2, d, 20, 0, 90)
625
+ ], m = [
626
+ {
627
+ x: l / 2,
628
+ y: -u / 2 - d
629
+ },
630
+ {
631
+ x: -l / 2,
632
+ y: -u / 2 - d
633
+ },
634
+ ...J(l / 2, -u / 2, d, 20, -90, 0),
635
+ {
636
+ x: -l / 2 - d,
637
+ y: -d
638
+ },
639
+ ...J(l / 2 + l * .1, -d, d, 20, -180, -270),
640
+ ...J(l / 2 + l * .1, d, d, 20, -90, -180),
641
+ {
642
+ x: -l / 2 - d,
643
+ y: u / 2
644
+ },
645
+ ...J(l / 2, u / 2, d, 20, 0, 90),
646
+ {
647
+ x: -l / 2,
648
+ y: u / 2 + d
649
+ },
650
+ {
651
+ x: l / 2,
652
+ y: u / 2 + d
653
+ }
654
+ ], h = S.svg(i), v = g(t, { fill: "none" });
655
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
656
+ let y = D(p).replace("Z", ""), b = h.path(y, v), x = D(m), w = h.path(x, { ...v }), O = i.insert("g", ":first-child");
657
+ return O.insert(() => w, ":first-child").attr("stroke-opacity", 0), O.insert(() => b, ":first-child"), O.attr("class", "text"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${d}, 0)`), o.attr("transform", `translate(${-l / 2 + d - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, O), t.intersect = function(e) {
658
+ return W.polygon(t, m, e);
659
+ }, i;
660
+ }
661
+ l(pe, "curlyBraceLeft");
662
+ function Y(e, t, n, r = 100, i = 0, a = 180) {
663
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
664
+ for (let i = 0; i < r; i++) {
665
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
666
+ o.push({
667
+ x: a,
668
+ y: l
669
+ });
670
+ }
671
+ return o;
672
+ }
673
+ l(Y, "generateCirclePoints");
674
+ async function me(e, t) {
675
+ let { labelStyles: n, nodeStyles: r } = _(t);
676
+ t.labelStyle = n;
677
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
678
+ ...Y(l / 2, -u / 2, d, 20, -90, 0),
679
+ {
680
+ x: l / 2 + d,
681
+ y: -d
682
+ },
683
+ ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
684
+ ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
685
+ {
686
+ x: l / 2 + d,
687
+ y: u / 2
688
+ },
689
+ ...Y(l / 2, u / 2, d, 20, 0, 90)
690
+ ], m = [
691
+ {
692
+ x: -l / 2,
693
+ y: -u / 2 - d
694
+ },
695
+ {
696
+ x: l / 2,
697
+ y: -u / 2 - d
698
+ },
699
+ ...Y(l / 2, -u / 2, d, 20, -90, 0),
700
+ {
701
+ x: l / 2 + d,
702
+ y: -d
703
+ },
704
+ ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
705
+ ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
706
+ {
707
+ x: l / 2 + d,
708
+ y: u / 2
709
+ },
710
+ ...Y(l / 2, u / 2, d, 20, 0, 90),
711
+ {
712
+ x: l / 2,
713
+ y: u / 2 + d
714
+ },
715
+ {
716
+ x: -l / 2,
717
+ y: u / 2 + d
718
+ }
719
+ ], h = S.svg(i), v = g(t, { fill: "none" });
720
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
721
+ let y = D(p).replace("Z", ""), b = h.path(y, v), x = D(m), w = h.path(x, { ...v }), O = i.insert("g", ":first-child");
722
+ return O.insert(() => w, ":first-child").attr("stroke-opacity", 0), O.insert(() => b, ":first-child"), O.attr("class", "text"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${-d}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, O), t.intersect = function(e) {
723
+ return W.polygon(t, m, e);
724
+ }, i;
725
+ }
726
+ l(me, "curlyBraceRight");
727
+ function X(e, t, n, r = 100, i = 0, a = 180) {
728
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
729
+ for (let i = 0; i < r; i++) {
730
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
731
+ o.push({
732
+ x: -a,
733
+ y: -l
734
+ });
735
+ }
736
+ return o;
737
+ }
738
+ l(X, "generateCirclePoints");
739
+ async function he(e, t) {
740
+ let { labelStyles: n, nodeStyles: r } = _(t);
741
+ t.labelStyle = n;
742
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
743
+ ...X(l / 2, -u / 2, d, 30, -90, 0),
744
+ {
745
+ x: -l / 2 - d,
746
+ y: d
747
+ },
748
+ ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
749
+ ...X(l / 2 + d * 2, d, d, 20, -90, -180),
750
+ {
751
+ x: -l / 2 - d,
752
+ y: -u / 2
753
+ },
754
+ ...X(l / 2, u / 2, d, 20, 0, 90)
755
+ ], m = [
756
+ ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
757
+ {
758
+ x: l / 2 - d / 2,
759
+ y: d
760
+ },
761
+ ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
762
+ ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
763
+ {
764
+ x: l / 2 - d / 2,
765
+ y: -d
766
+ },
767
+ ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
768
+ ], h = [
769
+ {
770
+ x: l / 2,
771
+ y: -u / 2 - d
772
+ },
773
+ {
774
+ x: -l / 2,
775
+ y: -u / 2 - d
776
+ },
777
+ ...X(l / 2, -u / 2, d, 20, -90, 0),
778
+ {
779
+ x: -l / 2 - d,
780
+ y: -d
781
+ },
782
+ ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
783
+ ...X(l / 2 + d * 2, d, d, 20, -90, -180),
784
+ {
785
+ x: -l / 2 - d,
786
+ y: u / 2
787
+ },
788
+ ...X(l / 2, u / 2, d, 20, 0, 90),
789
+ {
790
+ x: -l / 2,
791
+ y: u / 2 + d
792
+ },
793
+ {
794
+ x: l / 2 - d - d / 2,
795
+ y: u / 2 + d
796
+ },
797
+ ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
798
+ {
799
+ x: l / 2 - d / 2,
800
+ y: d
801
+ },
802
+ ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
803
+ ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
804
+ {
805
+ x: l / 2 - d / 2,
806
+ y: -d
807
+ },
808
+ ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
809
+ ], v = S.svg(i), y = g(t, { fill: "none" });
810
+ t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
811
+ let b = D(p).replace("Z", ""), x = v.path(b, y), w = D(m).replace("Z", ""), O = v.path(w, y), k = D(h), A = v.path(k, { ...y }), j = i.insert("g", ":first-child");
812
+ return j.insert(() => A, ":first-child").attr("stroke-opacity", 0), j.insert(() => x, ":first-child"), j.insert(() => O, ":first-child"), j.attr("class", "text"), f && t.look !== "handDrawn" && j.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(${d - d / 4}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, j), t.intersect = function(e) {
813
+ return W.polygon(t, h, e);
814
+ }, i;
815
+ }
816
+ l(he, "curlyBraces");
817
+ async function ge(e, t) {
818
+ let { labelStyles: n, nodeStyles: r } = _(t);
819
+ t.labelStyle = n;
820
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(20, (c.width + a * 2) * 1.25, t?.width ?? 0), u = Math.max(5, c.height + o * 2, t?.height ?? 0), d = u / 2, { cssStyles: f } = t, p = S.svg(s), m = g(t, {});
821
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
822
+ let h = l, v = u, y = h - d, b = v / 4, x = [
823
+ {
824
+ x: y,
825
+ y: 0
826
+ },
827
+ {
828
+ x: b,
829
+ y: 0
830
+ },
831
+ {
832
+ x: 0,
833
+ y: v / 2
834
+ },
835
+ {
836
+ x: b,
837
+ y: v
838
+ },
839
+ {
840
+ x: y,
841
+ y: v
842
+ },
843
+ ...k(-y, -v / 2, d, 50, 270, 90)
844
+ ], w = D(x), O = p.path(w, m), A = s.insert(() => O, ":first-child");
845
+ return A.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && A.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && A.selectChildren("path").attr("style", r), A.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(t, A), t.intersect = function(e) {
846
+ return W.polygon(t, x, e);
847
+ }, s;
848
+ }
849
+ l(ge, "curvedTrapezoid");
850
+ var _e = /* @__PURE__ */ l((e, t, n, r, i, a) => [
851
+ `M${e},${t + a}`,
852
+ `a${i},${a} 0,0,0 ${n},0`,
853
+ `a${i},${a} 0,0,0 ${-n},0`,
854
+ `l0,${r}`,
855
+ `a${i},${a} 0,0,0 ${n},0`,
856
+ `l0,${-r}`
857
+ ].join(" "), "createCylinderPathD"), ve = /* @__PURE__ */ l((e, t, n, r, i, a) => [
858
+ `M${e},${t + a}`,
859
+ `M${e + n},${t + a}`,
860
+ `a${i},${a} 0,0,0 ${-n},0`,
861
+ `l0,${r}`,
862
+ `a${i},${a} 0,0,0 ${n},0`,
863
+ `l0,${-r}`
864
+ ].join(" "), "createOuterCylinderPathD"), ye = /* @__PURE__ */ l((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), be = 8, xe = 8;
865
+ async function Se(e, t) {
866
+ let { labelStyles: n, nodeStyles: r } = _(t);
867
+ t.labelStyle = n;
868
+ let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i;
869
+ if (t.width || t.height) {
870
+ let e = t.width ?? 0;
871
+ t.width = (t.width ?? 0) - o, t.width < xe && (t.width = xe);
872
+ let n = e / 2 / (2.5 + e / 50);
873
+ t.height = (t.height ?? 0) - a - n * 3, t.height < be && (t.height = be);
874
+ }
875
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t.width ? t.width : c.width) + o, d = u / 2, p = d / (2.5 + u / 50), m = (t.height ? t.height : c.height) + a + p, h, { cssStyles: v } = t;
876
+ if (t.look === "handDrawn") {
877
+ let e = S.svg(s), n = ve(0, 0, u, m, d, p), r = ye(0, p, u, m, d, p), i = g(t, {}), a = e.path(n, i), o = e.path(r, g(t, { fill: "none" }));
878
+ h = s.insert(() => o, ":first-child"), h = s.insert(() => a, ":first-child"), h.attr("class", "basic label-container"), v && h.attr("style", v);
879
+ } else {
880
+ let e = _e(0, 0, u, m, d, p);
881
+ h = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", f(v)).attr("style", r);
882
+ }
883
+ return h.attr("label-offset-y", p), h.attr("transform", `translate(${-u / 2}, ${-(m / 2 + p)})`), T(t, h), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + (t.padding ?? 0) / 1.5 - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
884
+ let n = W.rect(t, e), r = n.x - (t.x ?? 0);
885
+ if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - p)) {
886
+ let i = p * p * (1 - r * r / (d * d));
887
+ i > 0 && (i = Math.sqrt(i)), i = p - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
888
+ }
889
+ return n;
890
+ }, s;
891
+ }
892
+ l(Se, "cylinder");
893
+ async function Ce(e, t) {
894
+ let { labelStyles: n, nodeStyles: r } = _(t);
895
+ t.labelStyle = n;
896
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = S.svg(o), v = g(t, {});
897
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
898
+ let y = [
899
+ {
900
+ x: f,
901
+ y: p + d
902
+ },
903
+ {
904
+ x: -f,
905
+ y: p + d
906
+ },
907
+ {
908
+ x: -f,
909
+ y: -p
910
+ },
911
+ {
912
+ x: f,
913
+ y: -p
914
+ },
915
+ {
916
+ x: f,
917
+ y: p
918
+ },
919
+ {
920
+ x: -f,
921
+ y: p
922
+ },
923
+ {
924
+ x: -f,
925
+ y: p + d
926
+ }
927
+ ], b = h.polygon(y.map((e) => [e.x, e.y]), v), x = o.insert(() => b, ":first-child");
928
+ return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), c.attr("transform", `translate(${f + (t.padding ?? 0) / 2 - (s.x - (s.left ?? 0))}, ${p + d + (t.padding ?? 0) / 2 - (s.y - (s.top ?? 0))})`), T(t, x), t.intersect = function(e) {
929
+ return W.rect(t, e);
930
+ }, o;
931
+ }
932
+ l(Ce, "dividedRectangle");
933
+ async function we(e, t) {
934
+ let { labelStyles: n, nodeStyles: r } = _(t), i = t.look === "neo" ? 12 : 5;
935
+ t.labelStyle = n;
936
+ let a = t.padding ?? 0, o = t.look === "neo" ? 16 : a, { shapeSvg: s, bbox: l } = await C(e, t, E(t)), u = (t?.width ? t?.width / 2 : l.width / 2) + (o ?? 0), d = u - i, p, { cssStyles: m } = t;
937
+ if (t.look === "handDrawn") {
938
+ let e = S.svg(s), n = g(t, {
939
+ roughness: .2,
940
+ strokeWidth: 2.5
941
+ }), r = g(t, {
942
+ roughness: .2,
943
+ strokeWidth: 1.5
944
+ }), i = e.circle(0, 0, u * 2, n), a = e.circle(0, 0, d * 2, r);
945
+ p = s.insert("g", ":first-child"), p.attr("class", f(t.cssClasses)).attr("style", f(m)), p.node()?.appendChild(i), p.node()?.appendChild(a);
946
+ } else {
947
+ p = s.insert("g", ":first-child");
948
+ let e = p.insert("circle", ":first-child"), t = p.insert("circle");
949
+ p.attr("class", "basic label-container").attr("style", r), e.attr("class", "outer-circle").attr("style", r).attr("r", u).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", r).attr("r", d).attr("cx", 0).attr("cy", 0);
950
+ }
951
+ return T(t, p), t.intersect = function(e) {
952
+ return c.info("DoubleCircle intersect", t, u, e), W.circle(t, u, e);
953
+ }, s;
954
+ }
955
+ l(we, "doublecircle");
956
+ function Te(e, t, { config: { themeVariables: n } }) {
957
+ let { labelStyles: r, nodeStyles: i } = _(t);
958
+ t.label = "", t.labelStyle = r;
959
+ let a = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: o } = t, s = S.svg(a), { nodeBorder: l } = n, u = g(t, { fillStyle: "solid" });
960
+ t.look !== "handDrawn" && (u.roughness = 0);
961
+ let d = s.circle(0, 0, 14, u), f = a.insert(() => d, ":first-child");
962
+ return f.selectAll("path").attr("style", `fill: ${l} !important;`), o && o.length > 0 && t.look !== "handDrawn" && f.selectAll("path").attr("style", o), i && t.look !== "handDrawn" && f.selectAll("path").attr("style", i), T(t, f), t.intersect = function(e) {
963
+ return c.info("filledCircle intersect", t, {
964
+ radius: 7,
965
+ point: e
966
+ }), W.circle(t, 7, e);
967
+ }, a;
968
+ }
969
+ l(Te, "filledCircle");
970
+ var Ee = 10, De = 10;
971
+ async function Oe(e, t) {
972
+ let { labelStyles: n, nodeStyles: r } = _(t);
973
+ t.labelStyle = n;
974
+ let i = t.padding ?? 0, a = t.look === "neo" ? i * 2 : i;
975
+ (t.width || t.height) && (t.height = t?.height ?? 0, t.height < Ee && (t.height = Ee), t.width = (t?.width ?? 0) - a - a / 2, t.width < De && (t.width = De));
976
+ let { shapeSvg: o, bbox: s, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : s.width) + (a ?? 0), d = t?.height ? t?.height : u + s.height, f = d, p = [
977
+ {
978
+ x: 0,
979
+ y: -d
980
+ },
981
+ {
982
+ x: f,
983
+ y: -d
984
+ },
985
+ {
986
+ x: f / 2,
987
+ y: 0
988
+ }
989
+ ], { cssStyles: m } = t, h = S.svg(o), v = g(t, {});
990
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
991
+ let y = D(p), b = h.path(y, v), x = o.insert(() => b, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
992
+ return m && t.look !== "handDrawn" && x.selectChildren("path").attr("style", m), r && t.look !== "handDrawn" && x.selectChildren("path").attr("style", r), t.width = u, t.height = d, T(t, x), l.attr("transform", `translate(${-s.width / 2 - (s.x - (s.left ?? 0))}, ${-d / 2 + (t.padding ?? 0) / 2 + (s.y - (s.top ?? 0))})`), t.intersect = function(e) {
993
+ return c.info("Triangle intersect", t, p, e), W.polygon(t, p, e);
994
+ }, o;
995
+ }
996
+ l(Oe, "flippedTriangle");
997
+ function ke(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
998
+ let { nodeStyles: a } = _(t);
999
+ t.label = "";
1000
+ let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
1001
+ n === "LR" && (c = Math.max(10, t?.width ?? 0), l = Math.max(70, t?.height ?? 0));
1002
+ let u = -1 * c / 2, d = -1 * l / 2, f = S.svg(o), p = g(t, {
1003
+ stroke: i.lineColor,
1004
+ fill: i.lineColor
1005
+ });
1006
+ t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
1007
+ let m = f.rectangle(u, d, c, l, p), h = o.insert(() => m, ":first-child");
1008
+ s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), T(t, h);
1009
+ let v = r?.padding ?? 0;
1010
+ return t.width && t.height && (t.width += v / 2 || 0, t.height += v / 2 || 0), t.intersect = function(e) {
1011
+ return W.rect(t, e);
1012
+ }, o;
1013
+ }
1014
+ l(ke, "forkJoin");
1015
+ async function Ae(e, t) {
1016
+ let { labelStyles: n, nodeStyles: r } = _(t);
1017
+ t.labelStyle = n;
1018
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
1019
+ (t.width || t.height) && (t.height = (t?.height ?? 0) - a * 2, t.height < 10 && (t.height = 10), t.width = (t?.width ?? 0) - i * 2, t.width < 15 && (t.width = 15));
1020
+ let { shapeSvg: o, bbox: s } = await C(e, t, E(t)), l = (t?.width ? t?.width : Math.max(15, s.width)) + i * 2, u = (t?.height ? t?.height : Math.max(10, s.height)) + a * 2, d = u / 2, { cssStyles: f } = t, p = S.svg(o), m = g(t, {});
1021
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1022
+ let h = [
1023
+ {
1024
+ x: -l / 2,
1025
+ y: -u / 2
1026
+ },
1027
+ {
1028
+ x: l / 2 - d,
1029
+ y: -u / 2
1030
+ },
1031
+ ...k(-l / 2 + d, 0, d, 50, 90, 270),
1032
+ {
1033
+ x: l / 2 - d,
1034
+ y: u / 2
1035
+ },
1036
+ {
1037
+ x: -l / 2,
1038
+ y: u / 2
1039
+ }
1040
+ ], v = D(h), y = p.path(v, m), b = o.insert(() => y, ":first-child");
1041
+ return b.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && b.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && b.selectChildren("path").attr("style", r), T(t, b), t.intersect = function(e) {
1042
+ return c.info("Pill intersect", t, {
1043
+ radius: d,
1044
+ point: e
1045
+ }), W.polygon(t, h, e);
1046
+ }, o;
1047
+ }
1048
+ l(Ae, "halfRoundedRectangle");
1049
+ var je = /* @__PURE__ */ l((e, t, n, r, i) => [
1050
+ `M${e + i},${t}`,
1051
+ `L${e + n - i},${t}`,
1052
+ `L${e + n},${t - r / 2}`,
1053
+ `L${e + n - i},${t - r}`,
1054
+ `L${e + i},${t - r}`,
1055
+ `L${e},${t - r / 2}`,
1056
+ "Z"
1057
+ ].join(" "), "createHexagonPathD");
1058
+ async function Me(e, t) {
1059
+ let { labelStyles: n, nodeStyles: r } = _(t), i = t.look === "neo" ? 3.5 : 4;
1060
+ t.labelStyle = n;
1061
+ let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
1062
+ if (t.width || t.height) {
1063
+ let e = (t.height ?? 0) / i;
1064
+ t.width = (t?.width ?? 0) - 2 * e - s, t.height = (t.height ?? 0) - o;
1065
+ }
1066
+ let { shapeSvg: c, bbox: l } = await C(e, t, E(t)), u = (t?.height ? t?.height : l.height) + o, d = u / i, f = (t?.width ? t?.width : l.width) + 2 * d + s, p = [
1067
+ {
1068
+ x: d,
1069
+ y: 0
1070
+ },
1071
+ {
1072
+ x: f - d,
1073
+ y: 0
1074
+ },
1075
+ {
1076
+ x: f,
1077
+ y: -u / 2
1078
+ },
1079
+ {
1080
+ x: f - d,
1081
+ y: -u
1082
+ },
1083
+ {
1084
+ x: d,
1085
+ y: -u
1086
+ },
1087
+ {
1088
+ x: 0,
1089
+ y: -u / 2
1090
+ }
1091
+ ], m, { cssStyles: h } = t;
1092
+ if (t.look === "handDrawn") {
1093
+ let e = S.svg(c), n = g(t, {}), r = je(0, 0, f, u, d), i = e.path(r, n);
1094
+ m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
1095
+ } else m = q(c, f, u, p);
1096
+ return r && m.attr("style", r), t.width = f, t.height = u, T(t, m), t.intersect = function(e) {
1097
+ return W.polygon(t, p, e);
1098
+ }, c;
1099
+ }
1100
+ l(Me, "hexagon");
1101
+ async function Ne(e, t) {
1102
+ let { labelStyles: n, nodeStyles: r } = _(t);
1103
+ t.label = "", t.labelStyle = n;
1104
+ let { shapeSvg: i } = await C(e, t, E(t)), a = Math.max(30, t?.width ?? 0), o = Math.max(30, t?.height ?? 0), { cssStyles: s } = t, l = S.svg(i), u = g(t, {});
1105
+ t.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1106
+ let d = [
1107
+ {
1108
+ x: 0,
1109
+ y: 0
1110
+ },
1111
+ {
1112
+ x: a,
1113
+ y: 0
1114
+ },
1115
+ {
1116
+ x: 0,
1117
+ y: o
1118
+ },
1119
+ {
1120
+ x: a,
1121
+ y: o
1122
+ }
1123
+ ], f = D(d), p = l.path(f, u), m = i.insert(() => p, ":first-child");
1124
+ return m.attr("class", "basic label-container outer-path"), s && t.look !== "handDrawn" && m.selectChildren("path").attr("style", s), r && t.look !== "handDrawn" && m.selectChildren("path").attr("style", r), m.attr("transform", `translate(${-a / 2}, ${-o / 2})`), T(t, m), t.intersect = function(e) {
1125
+ return c.info("Pill intersect", t, { points: d }), W.polygon(t, d, e);
1126
+ }, i;
1127
+ }
1128
+ l(Ne, "hourglass");
1129
+ async function Pe(e, t, { config: { themeVariables: n, flowchart: r } }) {
1130
+ let { labelStyles: i } = _(t);
1131
+ t.labelStyle = i;
1132
+ let a = t.assetHeight ?? 48, o = t.assetWidth ?? 48, s = Math.max(a, o), l = r?.wrappingWidth;
1133
+ t.width = Math.max(s, l ?? 0);
1134
+ let { shapeSvg: u, bbox: d, label: f } = await C(e, t, "icon-shape default"), p = t.pos === "t", m = s, h = s, { nodeBorder: v } = n, { stylesMap: b } = y(t), w = -h / 2, E = -m / 2, D = t.label ? 8 : 0, O = S.svg(u), k = g(t, {
1135
+ stroke: "none",
1136
+ fill: "none"
1137
+ });
1138
+ t.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1139
+ let A = O.rectangle(w, E, h, m, k), j = Math.max(h, d.width), M = m + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1140
+ ...k,
1141
+ fill: "transparent",
1142
+ stroke: "none"
1143
+ }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1144
+ if (t.icon) {
1145
+ let e = u.append("g");
1146
+ e.html(`<g>${await x(t.icon, {
1147
+ height: s,
1148
+ width: s,
1149
+ fallbackPrefix: ""
1150
+ })}</g>`);
1151
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1152
+ e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? v};`);
1153
+ }
1154
+ return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(t, F), t.intersect = function(e) {
1155
+ if (c.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1156
+ let n = t.x ?? 0, r = t.y ?? 0, i = t.height ?? 0, a = [];
1157
+ return a = p ? [
1158
+ {
1159
+ x: n - d.width / 2,
1160
+ y: r - i / 2
1161
+ },
1162
+ {
1163
+ x: n + d.width / 2,
1164
+ y: r - i / 2
1165
+ },
1166
+ {
1167
+ x: n + d.width / 2,
1168
+ y: r - i / 2 + d.height + D
1169
+ },
1170
+ {
1171
+ x: n + h / 2,
1172
+ y: r - i / 2 + d.height + D
1173
+ },
1174
+ {
1175
+ x: n + h / 2,
1176
+ y: r + i / 2
1177
+ },
1178
+ {
1179
+ x: n - h / 2,
1180
+ y: r + i / 2
1181
+ },
1182
+ {
1183
+ x: n - h / 2,
1184
+ y: r - i / 2 + d.height + D
1185
+ },
1186
+ {
1187
+ x: n - d.width / 2,
1188
+ y: r - i / 2 + d.height + D
1189
+ }
1190
+ ] : [
1191
+ {
1192
+ x: n - h / 2,
1193
+ y: r - i / 2
1194
+ },
1195
+ {
1196
+ x: n + h / 2,
1197
+ y: r - i / 2
1198
+ },
1199
+ {
1200
+ x: n + h / 2,
1201
+ y: r - i / 2 + m
1202
+ },
1203
+ {
1204
+ x: n + d.width / 2,
1205
+ y: r - i / 2 + m
1206
+ },
1207
+ {
1208
+ x: n + d.width / 2 / 2,
1209
+ y: r + i / 2
1210
+ },
1211
+ {
1212
+ x: n - d.width / 2,
1213
+ y: r + i / 2
1214
+ },
1215
+ {
1216
+ x: n - d.width / 2,
1217
+ y: r - i / 2 + m
1218
+ },
1219
+ {
1220
+ x: n - h / 2,
1221
+ y: r - i / 2 + m
1222
+ }
1223
+ ], W.polygon(t, a, e);
1224
+ }, u;
1225
+ }
1226
+ l(Pe, "icon");
1227
+ async function Fe(e, t, { config: { themeVariables: n, flowchart: r } }) {
1228
+ let { labelStyles: i } = _(t);
1229
+ t.labelStyle = i;
1230
+ let a = t.assetHeight ?? 48, o = t.assetWidth ?? 48, s = Math.max(a, o), l = r?.wrappingWidth;
1231
+ t.width = Math.max(s, l ?? 0);
1232
+ let { shapeSvg: u, bbox: d, label: f } = await C(e, t, "icon-shape default"), p = t.label ? 8 : 0, m = t.pos === "t", { nodeBorder: h, mainBkg: v } = n, { stylesMap: b } = y(t), w = S.svg(u), E = g(t, {});
1233
+ t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? v;
1234
+ let D = u.append("g");
1235
+ t.icon && D.html(`<g>${await x(t.icon, {
1236
+ height: s,
1237
+ width: s,
1238
+ fallbackPrefix: ""
1239
+ })}</g>`);
1240
+ let O = D.node().getBBox(), k = O.width, A = O.height, j = O.x, M = O.y, N = Math.max(k, A) * Math.SQRT2 + 40, P = w.circle(0, 0, N, E), F = Math.max(N, d.width), I = N + d.height + p, ee = w.rectangle(-F / 2, -I / 2, F, I, {
1241
+ ...E,
1242
+ fill: "transparent",
1243
+ stroke: "none"
1244
+ }), te = u.insert(() => P, ":first-child"), L = u.insert(() => ee);
1245
+ return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? h};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), te.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(t, L), t.intersect = function(e) {
1246
+ return c.info("iconSquare intersect", t, e), W.rect(t, e);
1247
+ }, u;
1248
+ }
1249
+ l(Fe, "iconCircle");
1250
+ async function Ie(e, t, { config: { themeVariables: n, flowchart: r } }) {
1251
+ let { labelStyles: i } = _(t);
1252
+ t.labelStyle = i;
1253
+ let a = t.assetHeight ?? 48, o = t.assetWidth ?? 48, s = Math.max(a, o), l = r?.wrappingWidth;
1254
+ t.width = Math.max(s, l ?? 0);
1255
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, t, "icon-shape default"), m = t.pos === "t", h = s + f * 2, v = s + f * 2, { nodeBorder: b, mainBkg: w } = n, { stylesMap: E } = y(t), D = -v / 2, O = -h / 2, k = t.label ? 8 : 0, A = S.svg(u), j = g(t, {});
1256
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1257
+ let M = A.path(N(D, O, v, h, 5), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1258
+ ...j,
1259
+ fill: "transparent",
1260
+ stroke: "none"
1261
+ }), ee = u.insert(() => M, ":first-child").attr("class", "icon-shape2"), te = u.insert(() => I);
1262
+ if (t.icon) {
1263
+ let e = u.append("g");
1264
+ e.html(`<g>${await x(t.icon, {
1265
+ height: s,
1266
+ width: s,
1267
+ fallbackPrefix: ""
1268
+ })}</g>`);
1269
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1270
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1271
+ }
1272
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(t, te), t.intersect = function(e) {
1273
+ if (c.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1274
+ let n = t.x ?? 0, r = t.y ?? 0, i = t.height ?? 0, a = [];
1275
+ return a = m ? [
1276
+ {
1277
+ x: n - d.width / 2,
1278
+ y: r - i / 2
1279
+ },
1280
+ {
1281
+ x: n + d.width / 2,
1282
+ y: r - i / 2
1283
+ },
1284
+ {
1285
+ x: n + d.width / 2,
1286
+ y: r - i / 2 + d.height + k
1287
+ },
1288
+ {
1289
+ x: n + v / 2,
1290
+ y: r - i / 2 + d.height + k
1291
+ },
1292
+ {
1293
+ x: n + v / 2,
1294
+ y: r + i / 2
1295
+ },
1296
+ {
1297
+ x: n - v / 2,
1298
+ y: r + i / 2
1299
+ },
1300
+ {
1301
+ x: n - v / 2,
1302
+ y: r - i / 2 + d.height + k
1303
+ },
1304
+ {
1305
+ x: n - d.width / 2,
1306
+ y: r - i / 2 + d.height + k
1307
+ }
1308
+ ] : [
1309
+ {
1310
+ x: n - v / 2,
1311
+ y: r - i / 2
1312
+ },
1313
+ {
1314
+ x: n + v / 2,
1315
+ y: r - i / 2
1316
+ },
1317
+ {
1318
+ x: n + v / 2,
1319
+ y: r - i / 2 + h
1320
+ },
1321
+ {
1322
+ x: n + d.width / 2,
1323
+ y: r - i / 2 + h
1324
+ },
1325
+ {
1326
+ x: n + d.width / 2 / 2,
1327
+ y: r + i / 2
1328
+ },
1329
+ {
1330
+ x: n - d.width / 2,
1331
+ y: r + i / 2
1332
+ },
1333
+ {
1334
+ x: n - d.width / 2,
1335
+ y: r - i / 2 + h
1336
+ },
1337
+ {
1338
+ x: n - v / 2,
1339
+ y: r - i / 2 + h
1340
+ }
1341
+ ], W.polygon(t, a, e);
1342
+ }, u;
1343
+ }
1344
+ l(Ie, "iconRounded");
1345
+ async function Le(e, t, { config: { themeVariables: n, flowchart: r } }) {
1346
+ let { labelStyles: i } = _(t);
1347
+ t.labelStyle = i;
1348
+ let a = t.assetHeight ?? 48, o = t.assetWidth ?? 48, s = Math.max(a, o), l = r?.wrappingWidth;
1349
+ t.width = Math.max(s, l ?? 0);
1350
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, t, "icon-shape default"), m = t.pos === "t", h = s + f * 2, v = s + f * 2, { nodeBorder: b, mainBkg: w } = n, { stylesMap: E } = y(t), D = -v / 2, O = -h / 2, k = t.label ? 8 : 0, A = S.svg(u), j = g(t, {});
1351
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1352
+ let M = A.path(N(D, O, v, h, .1), j), P = Math.max(v, d.width), F = h + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1353
+ ...j,
1354
+ fill: "transparent",
1355
+ stroke: "none"
1356
+ }), ee = u.insert(() => M, ":first-child"), te = u.insert(() => I);
1357
+ if (t.icon) {
1358
+ let e = u.append("g");
1359
+ e.html(`<g>${await x(t.icon, {
1360
+ height: s,
1361
+ width: s,
1362
+ fallbackPrefix: ""
1363
+ })}</g>`);
1364
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1365
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1366
+ }
1367
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(t, te), t.intersect = function(e) {
1368
+ if (c.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1369
+ let n = t.x ?? 0, r = t.y ?? 0, i = t.height ?? 0, a = [];
1370
+ return a = m ? [
1371
+ {
1372
+ x: n - d.width / 2,
1373
+ y: r - i / 2
1374
+ },
1375
+ {
1376
+ x: n + d.width / 2,
1377
+ y: r - i / 2
1378
+ },
1379
+ {
1380
+ x: n + d.width / 2,
1381
+ y: r - i / 2 + d.height + k
1382
+ },
1383
+ {
1384
+ x: n + v / 2,
1385
+ y: r - i / 2 + d.height + k
1386
+ },
1387
+ {
1388
+ x: n + v / 2,
1389
+ y: r + i / 2
1390
+ },
1391
+ {
1392
+ x: n - v / 2,
1393
+ y: r + i / 2
1394
+ },
1395
+ {
1396
+ x: n - v / 2,
1397
+ y: r - i / 2 + d.height + k
1398
+ },
1399
+ {
1400
+ x: n - d.width / 2,
1401
+ y: r - i / 2 + d.height + k
1402
+ }
1403
+ ] : [
1404
+ {
1405
+ x: n - v / 2,
1406
+ y: r - i / 2
1407
+ },
1408
+ {
1409
+ x: n + v / 2,
1410
+ y: r - i / 2
1411
+ },
1412
+ {
1413
+ x: n + v / 2,
1414
+ y: r - i / 2 + h
1415
+ },
1416
+ {
1417
+ x: n + d.width / 2,
1418
+ y: r - i / 2 + h
1419
+ },
1420
+ {
1421
+ x: n + d.width / 2 / 2,
1422
+ y: r + i / 2
1423
+ },
1424
+ {
1425
+ x: n - d.width / 2,
1426
+ y: r + i / 2
1427
+ },
1428
+ {
1429
+ x: n - d.width / 2,
1430
+ y: r - i / 2 + h
1431
+ },
1432
+ {
1433
+ x: n - v / 2,
1434
+ y: r - i / 2 + h
1435
+ }
1436
+ ], W.polygon(t, a, e);
1437
+ }, u;
1438
+ }
1439
+ l(Le, "iconSquare");
1440
+ async function Re(e, t, { config: { flowchart: n } }) {
1441
+ let r = new Image();
1442
+ r.src = t?.img ?? "", await r.decode();
1443
+ let i = Number(r.naturalWidth.toString().replace("px", "")), a = Number(r.naturalHeight.toString().replace("px", ""));
1444
+ t.imageAspectRatio = i / a;
1445
+ let { labelStyles: o } = _(t);
1446
+ t.labelStyle = o;
1447
+ let s = n?.wrappingWidth;
1448
+ t.defaultWidth = n?.wrappingWidth;
1449
+ let l = Math.max(t.label ? s ?? 0 : 0, t?.assetWidth ?? i), u = t.constraint === "on" && t?.assetHeight ? t.assetHeight * t.imageAspectRatio : l, d = t.constraint === "on" ? u / t.imageAspectRatio : t?.assetHeight ?? a;
1450
+ t.width = Math.max(u, s ?? 0);
1451
+ let { shapeSvg: f, bbox: p, label: m } = await C(e, t, "image-shape default"), h = t.pos === "t", v = -u / 2, y = -d / 2, b = t.label ? 8 : 0, x = S.svg(f), w = g(t, {});
1452
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1453
+ let E = x.rectangle(v, y, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
1454
+ ...w,
1455
+ fill: "none",
1456
+ stroke: "none"
1457
+ }), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
1458
+ if (t.img) {
1459
+ let e = f.append("image");
1460
+ e.attr("href", t.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
1461
+ }
1462
+ return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(t, j), t.intersect = function(e) {
1463
+ if (c.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1464
+ let n = t.x ?? 0, r = t.y ?? 0, i = t.height ?? 0, a = [];
1465
+ return a = h ? [
1466
+ {
1467
+ x: n - p.width / 2,
1468
+ y: r - i / 2
1469
+ },
1470
+ {
1471
+ x: n + p.width / 2,
1472
+ y: r - i / 2
1473
+ },
1474
+ {
1475
+ x: n + p.width / 2,
1476
+ y: r - i / 2 + p.height + b
1477
+ },
1478
+ {
1479
+ x: n + u / 2,
1480
+ y: r - i / 2 + p.height + b
1481
+ },
1482
+ {
1483
+ x: n + u / 2,
1484
+ y: r + i / 2
1485
+ },
1486
+ {
1487
+ x: n - u / 2,
1488
+ y: r + i / 2
1489
+ },
1490
+ {
1491
+ x: n - u / 2,
1492
+ y: r - i / 2 + p.height + b
1493
+ },
1494
+ {
1495
+ x: n - p.width / 2,
1496
+ y: r - i / 2 + p.height + b
1497
+ }
1498
+ ] : [
1499
+ {
1500
+ x: n - u / 2,
1501
+ y: r - i / 2
1502
+ },
1503
+ {
1504
+ x: n + u / 2,
1505
+ y: r - i / 2
1506
+ },
1507
+ {
1508
+ x: n + u / 2,
1509
+ y: r - i / 2 + d
1510
+ },
1511
+ {
1512
+ x: n + p.width / 2,
1513
+ y: r - i / 2 + d
1514
+ },
1515
+ {
1516
+ x: n + p.width / 2 / 2,
1517
+ y: r + i / 2
1518
+ },
1519
+ {
1520
+ x: n - p.width / 2,
1521
+ y: r + i / 2
1522
+ },
1523
+ {
1524
+ x: n - p.width / 2,
1525
+ y: r - i / 2 + d
1526
+ },
1527
+ {
1528
+ x: n - u / 2,
1529
+ y: r - i / 2 + d
1530
+ }
1531
+ ], W.polygon(t, a, e);
1532
+ }, f;
1533
+ }
1534
+ l(Re, "imageSquare");
1535
+ async function ze(e, t) {
1536
+ let { labelStyles: n, nodeStyles: r } = _(t);
1537
+ t.labelStyle = n;
1538
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(c.width + (o ?? 0) * 2, t?.width ?? 0), u = Math.max(c.height + (a ?? 0) * 2, t?.height ?? 0), d = [
1539
+ {
1540
+ x: 0,
1541
+ y: 0
1542
+ },
1543
+ {
1544
+ x: l,
1545
+ y: 0
1546
+ },
1547
+ {
1548
+ x: l + 3 * u / 6,
1549
+ y: -u
1550
+ },
1551
+ {
1552
+ x: -3 * u / 6,
1553
+ y: -u
1554
+ }
1555
+ ], f, { cssStyles: p } = t;
1556
+ if (t.look === "handDrawn") {
1557
+ let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
1558
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), p && f.attr("style", p);
1559
+ } else f = q(s, l, u, d);
1560
+ return r && f.attr("style", r), t.width = l, t.height = u, T(t, f), t.intersect = function(e) {
1561
+ return W.polygon(t, d, e);
1562
+ }, s;
1563
+ }
1564
+ l(ze, "inv_trapezoid");
1565
+ async function Be(e, t, n) {
1566
+ let { labelStyles: r, nodeStyles: i } = _(t);
1567
+ t.labelStyle = r;
1568
+ let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: p, ry: m } = t, { cssStyles: h } = t;
1569
+ if (n?.rx && n.ry && (p = n.rx, m = n.ry), t.look === "handDrawn") {
1570
+ let e = S.svg(a), n = g(t, {}), r = p || m ? e.path(N(l, u, s, c, p || 0), n) : e.rectangle(l, u, s, c, n);
1571
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", f(h));
1572
+ } else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", f(p)).attr("ry", f(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
1573
+ return T(t, d), t.calcIntersect = function(e, t) {
1574
+ return W.rect(e, t);
1575
+ }, t.intersect = function(e) {
1576
+ return W.rect(t, e);
1577
+ }, a;
1578
+ }
1579
+ l(Be, "drawRect");
1580
+ async function Ve(e, t) {
1581
+ let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
1582
+ return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), T(t, a), t.intersect = function(e) {
1583
+ return W.rect(t, e);
1584
+ }, n;
1585
+ }
1586
+ l(Ve, "labelRect");
1587
+ async function He(e, t) {
1588
+ let { labelStyles: n, nodeStyles: r } = _(t);
1589
+ t.labelStyle = n;
1590
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
1591
+ {
1592
+ x: 0,
1593
+ y: 0
1594
+ },
1595
+ {
1596
+ x: u + 3 * l / 6,
1597
+ y: 0
1598
+ },
1599
+ {
1600
+ x: u,
1601
+ y: -l
1602
+ },
1603
+ {
1604
+ x: -(3 * l) / 6,
1605
+ y: -l
1606
+ }
1607
+ ], f, { cssStyles: p } = t;
1608
+ if (t.look === "handDrawn") {
1609
+ let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
1610
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1611
+ } else f = q(s, u, l, d);
1612
+ return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1613
+ return W.polygon(t, d, e);
1614
+ }, s;
1615
+ }
1616
+ l(He, "lean_left");
1617
+ async function Ue(e, t) {
1618
+ let { labelStyles: n, nodeStyles: r } = _(t);
1619
+ t.labelStyle = n;
1620
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
1621
+ {
1622
+ x: -3 * l / 6,
1623
+ y: 0
1624
+ },
1625
+ {
1626
+ x: u,
1627
+ y: 0
1628
+ },
1629
+ {
1630
+ x: u + 3 * l / 6,
1631
+ y: -l
1632
+ },
1633
+ {
1634
+ x: 0,
1635
+ y: -l
1636
+ }
1637
+ ], f, { cssStyles: p } = t;
1638
+ if (t.look === "handDrawn") {
1639
+ let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
1640
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1641
+ } else f = q(s, u, l, d);
1642
+ return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1643
+ return W.polygon(t, d, e);
1644
+ }, s;
1645
+ }
1646
+ l(Ue, "lean_right");
1647
+ function We(e, t) {
1648
+ let { labelStyles: n, nodeStyles: r } = _(t);
1649
+ t.label = "", t.labelStyle = n;
1650
+ let i = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: a } = t, o = Math.max(35, t?.width ?? 0), s = Math.max(35, t?.height ?? 0), l = [
1651
+ {
1652
+ x: o,
1653
+ y: 0
1654
+ },
1655
+ {
1656
+ x: 0,
1657
+ y: s + 7 / 2
1658
+ },
1659
+ {
1660
+ x: o - 14,
1661
+ y: s + 7 / 2
1662
+ },
1663
+ {
1664
+ x: 0,
1665
+ y: 2 * s
1666
+ },
1667
+ {
1668
+ x: o,
1669
+ y: s - 7 / 2
1670
+ },
1671
+ {
1672
+ x: 14,
1673
+ y: s - 7 / 2
1674
+ }
1675
+ ], u = S.svg(i), d = g(t, {});
1676
+ t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
1677
+ let f = D(l), p = u.path(f, d), m = i.insert(() => p, ":first-child");
1678
+ return m.attr("class", "outer-path"), a && t.look !== "handDrawn" && m.selectAll("path").attr("style", a), r && t.look !== "handDrawn" && m.selectAll("path").attr("style", r), m.attr("transform", `translate(-${o / 2},${-s})`), T(t, m), t.intersect = function(e) {
1679
+ return c.info("lightningBolt intersect", t, e), W.polygon(t, l, e);
1680
+ }, i;
1681
+ }
1682
+ l(We, "lightningBolt");
1683
+ var Ge = /* @__PURE__ */ l((e, t, n, r, i, a, o) => [
1684
+ `M${e},${t + a}`,
1685
+ `a${i},${a} 0,0,0 ${n},0`,
1686
+ `a${i},${a} 0,0,0 ${-n},0`,
1687
+ `l0,${r}`,
1688
+ `a${i},${a} 0,0,0 ${n},0`,
1689
+ `l0,${-r}`,
1690
+ `M${e},${t + a + o}`,
1691
+ `a${i},${a} 0,0,0 ${n},0`
1692
+ ].join(" "), "createCylinderPathD"), Ke = /* @__PURE__ */ l((e, t, n, r, i, a, o) => [
1693
+ `M${e},${t + a}`,
1694
+ `M${e + n},${t + a}`,
1695
+ `a${i},${a} 0,0,0 ${-n},0`,
1696
+ `l0,${r}`,
1697
+ `a${i},${a} 0,0,0 ${n},0`,
1698
+ `l0,${-r}`,
1699
+ `M${e},${t + a + o}`,
1700
+ `a${i},${a} 0,0,0 ${n},0`
1701
+ ].join(" "), "createOuterCylinderPathD"), qe = /* @__PURE__ */ l((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Je = 10, Ye = 10;
1702
+ async function Xe(e, t) {
1703
+ let { labelStyles: n, nodeStyles: r } = _(t);
1704
+ t.labelStyle = n;
1705
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
1706
+ if (t.width || t.height) {
1707
+ let e = t.width ?? 0;
1708
+ t.width = (t.width ?? 0) - a, t.width < Ye && (t.width = Ye);
1709
+ let n = e / 2 / (2.5 + e / 50);
1710
+ t.height = (t.height ?? 0) - o - n * 3, t.height < Je && (t.height = Je);
1711
+ }
1712
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = u / 2, p = d / (2.5 + u / 50), m = (t?.height ? t?.height : c.height) + p + o * 2, h = m * .1, v, { cssStyles: y } = t;
1713
+ if (t.look === "handDrawn") {
1714
+ let e = S.svg(s), n = Ke(0, 0, u, m, d, p, h), r = qe(0, p, u, m, d, p), i = g(t, {}), a = e.path(n, i), o = e.path(r, i);
1715
+ s.insert(() => o, ":first-child").attr("class", "line"), v = s.insert(() => a, ":first-child"), v.attr("class", "basic label-container"), y && v.attr("style", y);
1716
+ } else {
1717
+ let e = Ge(0, 0, u, m, d, p, h);
1718
+ v = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", f(y)).attr("style", r);
1719
+ }
1720
+ return v.attr("label-offset-y", p), v.attr("transform", `translate(${-u / 2}, ${-(m / 2 + p)})`), T(t, v), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + p - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
1721
+ let n = W.rect(t, e), r = n.x - (t.x ?? 0);
1722
+ if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - p)) {
1723
+ let i = p * p * (1 - r * r / (d * d));
1724
+ i > 0 && (i = Math.sqrt(i)), i = p - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
1725
+ }
1726
+ return n;
1727
+ }, s;
1728
+ }
1729
+ l(Xe, "linedCylinder");
1730
+ async function Ze(e, t) {
1731
+ let { labelStyles: n, nodeStyles: r } = _(t);
1732
+ t.labelStyle = n;
1733
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
1734
+ (t.width || t.height) && (t.width = (t.width ?? 0) * 10 / 11 - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
1735
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + (a ?? 0) * 2, d = (t?.height ? t?.height : c.height) + (o ?? 0) * 2, f = t.look === "neo" ? d / 4 : d / 8, p = d + f, { cssStyles: m } = t, h = S.svg(s), v = g(t, {});
1736
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1737
+ let y = [
1738
+ {
1739
+ x: -u / 2 - u / 2 * .1,
1740
+ y: -p / 2
1741
+ },
1742
+ {
1743
+ x: -u / 2 - u / 2 * .1,
1744
+ y: p / 2
1745
+ },
1746
+ ...O(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
1747
+ {
1748
+ x: u / 2 + u / 2 * .1,
1749
+ y: -p / 2
1750
+ },
1751
+ {
1752
+ x: -u / 2 - u / 2 * .1,
1753
+ y: -p / 2
1754
+ },
1755
+ {
1756
+ x: -u / 2,
1757
+ y: -p / 2
1758
+ },
1759
+ {
1760
+ x: -u / 2,
1761
+ y: p / 2 * 1.1
1762
+ },
1763
+ {
1764
+ x: -u / 2,
1765
+ y: -p / 2
1766
+ }
1767
+ ], b = h.polygon(y.map((e) => [e.x, e.y]), v), x = s.insert(() => b, ":first-child");
1768
+ return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(0,${-f / 2})`), l.attr("transform", `translate(${-u / 2 + (t.padding ?? 0) + u / 2 * .1 / 2 - (c.x - (c.left ?? 0))},${-d / 2 + (t.padding ?? 0) - f / 2 - (c.y - (c.top ?? 0))})`), T(t, x), t.intersect = function(e) {
1769
+ return W.polygon(t, y, e);
1770
+ }, s;
1771
+ }
1772
+ l(Ze, "linedWaveEdgedRect");
1773
+ async function Qe(e, t) {
1774
+ let { labelStyles: n, nodeStyles: r } = _(t);
1775
+ t.labelStyle = n;
1776
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
1777
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - a * 2 - 2 * s, 10), t.height = Math.max((t?.height ?? 0) - o * 2 - 2 * s, 10));
1778
+ let { shapeSvg: c, bbox: l, label: u } = await C(e, t, E(t)), d = (t?.width ? t?.width : l.width) + a * 2 + 2 * s, f = (t?.height ? t?.height : l.height) + o * 2 + 2 * s, p = d - 2 * s, m = f - 2 * s, h = -p / 2, v = -m / 2, { cssStyles: y } = t, b = S.svg(c), x = g(t, {}), w = [
1779
+ {
1780
+ x: h - s,
1781
+ y: v + s
1782
+ },
1783
+ {
1784
+ x: h - s,
1785
+ y: v + m + s
1786
+ },
1787
+ {
1788
+ x: h + p - s,
1789
+ y: v + m + s
1790
+ },
1791
+ {
1792
+ x: h + p - s,
1793
+ y: v + m
1794
+ },
1795
+ {
1796
+ x: h + p,
1797
+ y: v + m
1798
+ },
1799
+ {
1800
+ x: h + p,
1801
+ y: v + m - s
1802
+ },
1803
+ {
1804
+ x: h + p + s,
1805
+ y: v + m - s
1806
+ },
1807
+ {
1808
+ x: h + p + s,
1809
+ y: v - s
1810
+ },
1811
+ {
1812
+ x: h + s,
1813
+ y: v - s
1814
+ },
1815
+ {
1816
+ x: h + s,
1817
+ y: v
1818
+ },
1819
+ {
1820
+ x: h,
1821
+ y: v
1822
+ },
1823
+ {
1824
+ x: h,
1825
+ y: v + s
1826
+ }
1827
+ ], O = [
1828
+ {
1829
+ x: h,
1830
+ y: v + s
1831
+ },
1832
+ {
1833
+ x: h + p - s,
1834
+ y: v + s
1835
+ },
1836
+ {
1837
+ x: h + p - s,
1838
+ y: v + m
1839
+ },
1840
+ {
1841
+ x: h + p,
1842
+ y: v + m
1843
+ },
1844
+ {
1845
+ x: h + p,
1846
+ y: v
1847
+ },
1848
+ {
1849
+ x: h,
1850
+ y: v
1851
+ }
1852
+ ];
1853
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1854
+ let k = D(w), j = b.path(k, x), M = D(O), N = b.path(M, x);
1855
+ t.look !== "handDrawn" && (j = A(j), N = A(N));
1856
+ let P = c.insert("g", ":first-child");
1857
+ return P.insert(() => j), P.insert(() => N), P.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && P.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && P.selectAll("path").attr("style", r), u.attr("transform", `translate(${-(l.width / 2) - s - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + s - (l.y - (l.top ?? 0))})`), T(t, P), t.intersect = function(e) {
1858
+ return W.polygon(t, w, e);
1859
+ }, c;
1860
+ }
1861
+ l(Qe, "multiRect");
1862
+ async function $e(e, t) {
1863
+ let { labelStyles: n, nodeStyles: r } = _(t);
1864
+ t.labelStyle = n;
1865
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
1866
+ (t.width || t.height) && (u = !1, t.width = (t?.width ?? 0) - c * 2, t.height = (t?.height ?? 0) - l * 3);
1867
+ let d = Math.max(a.width, t?.width ?? 0) + c * 2, f = Math.max(a.height, t?.height ?? 0) + l * 3, p = t.look === "neo" ? f / 4 : f / 8, m = f + (u ? p / 2 : -p / 2), h = -d / 2, v = -m / 2, { cssStyles: y } = t, b = O(h - 10, v + m + 10, h + d - 10, v + m + 10, p, .8), x = b?.[b.length - 1], w = [
1868
+ {
1869
+ x: h - 10,
1870
+ y: v + 10
1871
+ },
1872
+ {
1873
+ x: h - 10,
1874
+ y: v + m + 10
1875
+ },
1876
+ ...b,
1877
+ {
1878
+ x: h + d - 10,
1879
+ y: x.y - 10
1880
+ },
1881
+ {
1882
+ x: h + d,
1883
+ y: x.y - 10
1884
+ },
1885
+ {
1886
+ x: h + d,
1887
+ y: x.y - 20
1888
+ },
1889
+ {
1890
+ x: h + d + 10,
1891
+ y: x.y - 20
1892
+ },
1893
+ {
1894
+ x: h + d + 10,
1895
+ y: v - 10
1896
+ },
1897
+ {
1898
+ x: h + 10,
1899
+ y: v - 10
1900
+ },
1901
+ {
1902
+ x: h + 10,
1903
+ y: v
1904
+ },
1905
+ {
1906
+ x: h,
1907
+ y: v
1908
+ },
1909
+ {
1910
+ x: h,
1911
+ y: v + 10
1912
+ }
1913
+ ], k = [
1914
+ {
1915
+ x: h,
1916
+ y: v + 10
1917
+ },
1918
+ {
1919
+ x: h + d - 10,
1920
+ y: v + 10
1921
+ },
1922
+ {
1923
+ x: h + d - 10,
1924
+ y: x.y - 10
1925
+ },
1926
+ {
1927
+ x: h + d,
1928
+ y: x.y - 10
1929
+ },
1930
+ {
1931
+ x: h + d,
1932
+ y: v
1933
+ },
1934
+ {
1935
+ x: h,
1936
+ y: v
1937
+ }
1938
+ ], A = S.svg(i), j = g(t, {});
1939
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
1940
+ let M = D(w), N = A.path(M, j), P = D(k), F = A.path(P, j), I = i.insert(() => N, ":first-child");
1941
+ return I.insert(() => F), I.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && I.selectAll("path").attr("style", y), r && t.look !== "handDrawn" && I.selectAll("path").attr("style", r), I.attr("transform", `translate(0,${-p / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 10 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 10 - p / 2 - (a.y - (a.top ?? 0))})`), T(t, I), t.intersect = function(e) {
1942
+ return W.polygon(t, w, e);
1943
+ }, i;
1944
+ }
1945
+ l($e, "multiWaveEdgedRectangle");
1946
+ async function et(e, t, { config: { themeVariables: n } }) {
1947
+ let { labelStyles: r, nodeStyles: i } = _(t);
1948
+ t.labelStyle = r, t.useHtmlLabels || o(s()) || (t.centerLabel = !0);
1949
+ let { shapeSvg: a, bbox: c, label: l } = await C(e, t, E(t)), u = Math.max(c.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(c.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -u / 2, p = -d / 2, { cssStyles: m } = t, h = S.svg(a), v = g(t, {
1950
+ fill: n.noteBkgColor,
1951
+ stroke: n.noteBorderColor
1952
+ });
1953
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1954
+ let y = h.rectangle(f, p, u, d, v), b = a.insert(() => y, ":first-child");
1955
+ return b.attr("class", "basic label-container outer-path"), l.attr("class", "label noteLabel"), m && t.look !== "handDrawn" && b.selectAll("path").attr("style", m), i && t.look !== "handDrawn" && b.selectAll("path").attr("style", i), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), T(t, b), t.intersect = function(e) {
1956
+ return W.rect(t, e);
1957
+ }, a;
1958
+ }
1959
+ l(et, "note");
1960
+ var tt = /* @__PURE__ */ l((e, t, n) => [
1961
+ `M${e + n / 2},${t}`,
1962
+ `L${e + n},${t - n / 2}`,
1963
+ `L${e + n / 2},${t - n}`,
1964
+ `L${e},${t - n / 2}`,
1965
+ "Z"
1966
+ ].join(" "), "createDecisionBoxPathD");
1967
+ async function nt(e, t) {
1968
+ let { labelStyles: n, nodeStyles: r } = _(t);
1969
+ t.labelStyle = n;
1970
+ let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
1971
+ {
1972
+ x: o / 2,
1973
+ y: 0
1974
+ },
1975
+ {
1976
+ x: o,
1977
+ y: -o / 2
1978
+ },
1979
+ {
1980
+ x: o / 2,
1981
+ y: -o
1982
+ },
1983
+ {
1984
+ x: 0,
1985
+ y: -o / 2
1986
+ }
1987
+ ], l, { cssStyles: u } = t;
1988
+ if (t.look === "handDrawn") {
1989
+ let e = S.svg(i), n = g(t, {}), r = tt(0, 0, o), a = e.path(r, n);
1990
+ l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
1991
+ } else l = q(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
1992
+ return r && l.attr("style", r), T(t, l), t.calcIntersect = function(e, t) {
1993
+ let n = e.width, r = [
1994
+ {
1995
+ x: n / 2,
1996
+ y: 0
1997
+ },
1998
+ {
1999
+ x: n,
2000
+ y: -n / 2
2001
+ },
2002
+ {
2003
+ x: n / 2,
2004
+ y: -n
2005
+ },
2006
+ {
2007
+ x: 0,
2008
+ y: -n / 2
2009
+ }
2010
+ ], i = W.polygon(e, r, t);
2011
+ return {
2012
+ x: i.x - .5,
2013
+ y: i.y - .5
2014
+ };
2015
+ }, t.intersect = function(e) {
2016
+ return this.calcIntersect(t, e);
2017
+ }, i;
2018
+ }
2019
+ l(nt, "question");
2020
+ async function rt(e, t) {
2021
+ let { labelStyles: n, nodeStyles: r } = _(t);
2022
+ t.labelStyle = n;
2023
+ let i = t.padding ?? 0, a = t.look === "neo" ? 21 : i ?? 0, o = t.look === "neo" ? 12 : i ?? 0, { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a), d = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), f = -u / 2, p = -d / 2, m = p / 2, h = [
2024
+ {
2025
+ x: f + m,
2026
+ y: p
2027
+ },
2028
+ {
2029
+ x: f,
2030
+ y: 0
2031
+ },
2032
+ {
2033
+ x: f + m,
2034
+ y: -p
2035
+ },
2036
+ {
2037
+ x: -f,
2038
+ y: -p
2039
+ },
2040
+ {
2041
+ x: -f,
2042
+ y: p
2043
+ }
2044
+ ], { cssStyles: v } = t, y = S.svg(s), b = g(t, {});
2045
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2046
+ let x = D(h), w = y.path(x, b), O = s.insert(() => w, ":first-child");
2047
+ return O.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && O.selectAll("path").attr("style", v), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${-m / 2},0)`), l.attr("transform", `translate(${-m / 2 - c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), T(t, O), t.intersect = function(e) {
2048
+ return W.polygon(t, h, e);
2049
+ }, s;
2050
+ }
2051
+ l(rt, "rect_left_inv_arrow");
2052
+ async function it(e, t) {
2053
+ let { labelStyles: r, nodeStyles: i } = _(t);
2054
+ t.labelStyle = r;
2055
+ let a;
2056
+ a = t.cssClasses ? "node " + t.cssClasses : "node default";
2057
+ let s = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = s.insert("g"), d = s.insert("g").attr("class", "label").attr("style", i), f = t.description, p = t.label, m = await M(d, p, t.labelStyle, !0, !0), h = {
2058
+ width: 0,
2059
+ height: 0
2060
+ };
2061
+ if (o(n())) {
2062
+ let e = m.children[0], t = u(m);
2063
+ h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2064
+ }
2065
+ c.info("Text 2", f);
2066
+ let v = f || [], y = m.getBBox(), b = await M(d, Array.isArray(v) ? v.join("<br/>") : v, t.labelStyle, !0, !0), x = b.children[0], C = u(b);
2067
+ h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
2068
+ let w = (t.padding || 0) / 2;
2069
+ u(b).attr("transform", "translate( " + (h.width > y.width ? 0 : (y.width - h.width) / 2) + ", " + (y.height + w + 5) + ")"), u(m).attr("transform", "translate( " + (h.width < y.width ? 0 : -(y.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2070
+ let E = h.width + (t.padding || 0), D = h.height + (t.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, j;
2071
+ if (t.look === "handDrawn") {
2072
+ let e = S.svg(s), n = g(t, {}), r = e.path(N(O, k, E, D, t.rx || 0), n), i = e.line(-h.width / 2 - w, -h.height / 2 - w + y.height + w, h.width / 2 + w, -h.height / 2 - w + y.height + w, n);
2073
+ j = s.insert(() => (c.debug("Rough node insert CXC", r), i), ":first-child"), A = s.insert(() => (c.debug("Rough node insert CXC", r), r), ":first-child");
2074
+ } else A = l.insert("rect", ":first-child"), j = l.insert("line"), A.attr("class", "outer title-state").attr("style", i).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (t.padding || 0)).attr("height", h.height + (t.padding || 0)), j.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + y.height + w).attr("y2", -h.height / 2 - w + y.height + w);
2075
+ return T(t, A), t.intersect = function(e) {
2076
+ return W.rect(t, e);
2077
+ }, s;
2078
+ }
2079
+ l(it, "rectWithTitle");
2080
+ async function at(e, t, { config: { themeVariables: n } }) {
2081
+ let r = n?.radius ?? 5;
2082
+ return Be(e, t, {
2083
+ rx: r,
2084
+ ry: r,
2085
+ classes: "",
2086
+ labelPaddingX: (t?.padding ?? 0) * 1,
2087
+ labelPaddingY: (t?.padding ?? 0) * 1
2088
+ });
2089
+ }
2090
+ l(at, "roundedRect");
2091
+ var Z = 8;
2092
+ async function ot(e, t) {
2093
+ let { labelStyles: n, nodeStyles: r } = _(t);
2094
+ t.labelStyle = n;
2095
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? Z : Z * 2), u = (t?.height ?? s.height) + a * 2, d = l - Z, p = u, m = Z - l / 2, h = -u / 2, { cssStyles: v } = t, y = S.svg(o), b = g(t, {});
2096
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2097
+ let x = [
2098
+ {
2099
+ x: m,
2100
+ y: h
2101
+ },
2102
+ {
2103
+ x: m + d,
2104
+ y: h
2105
+ },
2106
+ {
2107
+ x: m + d,
2108
+ y: h + p
2109
+ },
2110
+ {
2111
+ x: m - Z,
2112
+ y: h + p
2113
+ },
2114
+ {
2115
+ x: m - Z,
2116
+ y: h
2117
+ },
2118
+ {
2119
+ x: m,
2120
+ y: h
2121
+ },
2122
+ {
2123
+ x: m,
2124
+ y: h + p
2125
+ }
2126
+ ], w = y.polygon(x.map((e) => [e.x, e.y]), b), D = o.insert(() => w, ":first-child");
2127
+ return D.attr("class", "basic label-container outer-path").attr("style", f(v)), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), v && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${Z / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
2128
+ return W.rect(t, e);
2129
+ }, o;
2130
+ }
2131
+ l(ot, "shadedProcess");
2132
+ async function st(e, t) {
2133
+ let { labelStyles: n, nodeStyles: r } = _(t);
2134
+ t.labelStyle = n;
2135
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2136
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - a * 2, 10), t.height = Math.max((t?.height ?? 0) / 1.5 - o * 2, 10));
2137
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = ((t?.height ? t?.height : c.height) + o * 2) * 1.5, f = u, p = d / 1.5, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = S.svg(s), b = g(t, {});
2138
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2139
+ let x = [
2140
+ {
2141
+ x: m,
2142
+ y: h
2143
+ },
2144
+ {
2145
+ x: m,
2146
+ y: h + p
2147
+ },
2148
+ {
2149
+ x: m + f,
2150
+ y: h + p
2151
+ },
2152
+ {
2153
+ x: m + f,
2154
+ y: h - p / 2
2155
+ }
2156
+ ], w = D(x), O = y.path(w, b), k = s.insert(() => O, ":first-child");
2157
+ return k.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && k.selectChildren("path").attr("style", v), r && t.look !== "handDrawn" && k.selectChildren("path").attr("style", r), k.attr("transform", `translate(0, ${p / 4})`), l.attr("transform", `translate(${-f / 2 + (t.padding ?? 0) - (c.x - (c.left ?? 0))}, ${-p / 4 + (t.padding ?? 0) - (c.y - (c.top ?? 0))})`), T(t, k), t.intersect = function(e) {
2158
+ return W.polygon(t, x, e);
2159
+ }, s;
2160
+ }
2161
+ l(st, "slopedRect");
2162
+ async function ct(e, t) {
2163
+ let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n;
2164
+ return Be(e, t, {
2165
+ rx: 0,
2166
+ ry: 0,
2167
+ classes: "",
2168
+ labelPaddingX: t.labelPaddingX ?? r,
2169
+ labelPaddingY: i
2170
+ });
2171
+ }
2172
+ l(ct, "squareRect");
2173
+ async function lt(e, t) {
2174
+ let { labelStyles: n, nodeStyles: r } = _(t);
2175
+ t.labelStyle = n;
2176
+ let i = t.padding ?? 0, a = t.look === "neo" ? 20 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = c.height + (t.look === "neo" ? o * 2 : o), u = c.width + l / 4 + (t.look === "neo" ? a * 2 : a), d = l / 2, { cssStyles: f } = t, p = S.svg(s), m = g(t, {});
2177
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
2178
+ let h = [
2179
+ {
2180
+ x: -u / 2 + d,
2181
+ y: -l / 2
2182
+ },
2183
+ {
2184
+ x: u / 2 - d,
2185
+ y: -l / 2
2186
+ },
2187
+ ...k(-u / 2 + d, 0, d, 50, 90, 270),
2188
+ {
2189
+ x: u / 2 - d,
2190
+ y: l / 2
2191
+ },
2192
+ ...k(u / 2 - d, 0, d, 50, 270, 450)
2193
+ ], v = D(h), y = p.path(v, m), b = s.insert(() => y, ":first-child");
2194
+ return b.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && b.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && b.selectChildren("path").attr("style", r), T(t, b), t.intersect = function(e) {
2195
+ return W.polygon(t, h, e);
2196
+ }, s;
2197
+ }
2198
+ l(lt, "stadium");
2199
+ async function ut(e, t) {
2200
+ return Be(e, t, {
2201
+ rx: t.look === "neo" ? 3 : 5,
2202
+ ry: t.look === "neo" ? 3 : 5,
2203
+ classes: "flowchart-node"
2204
+ });
2205
+ }
2206
+ l(ut, "state");
2207
+ function dt(e, t, { config: { themeVariables: n } }) {
2208
+ let { labelStyles: r, nodeStyles: i } = _(t);
2209
+ t.labelStyle = r;
2210
+ let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
2211
+ (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2212
+ let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = S.svg(u), f = g(t, {});
2213
+ t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
2214
+ let p = d.circle(0, 0, t.width, {
2215
+ ...f,
2216
+ stroke: o,
2217
+ strokeWidth: 2
2218
+ }), m = s ?? c, h = (t.width ?? 0) * 5 / 14, v = d.circle(0, 0, h, {
2219
+ ...f,
2220
+ fill: m,
2221
+ stroke: m,
2222
+ strokeWidth: 2,
2223
+ fillStyle: "solid"
2224
+ }), y = u.insert(() => p, ":first-child");
2225
+ if (y.insert(() => v), t.look !== "handDrawn" && y.attr("class", "outer-path"), a && y.selectAll("path").attr("style", a), i && y.selectAll("path").attr("style", i), t.width < 25 && l && t.look !== "handDrawn") {
2226
+ let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2227
+ y.attr("style", `filter:url(#${n})`);
2228
+ }
2229
+ return T(t, y), t.intersect = function(e) {
2230
+ return W.circle(t, (t.width ?? 0) / 2, e);
2231
+ }, u;
2232
+ }
2233
+ l(dt, "stateEnd");
2234
+ function ft(e, t, { config: { themeVariables: n } }) {
2235
+ let { lineColor: r, nodeShadow: i } = n;
2236
+ (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2237
+ let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
2238
+ if (t.look === "handDrawn") {
2239
+ let e = S.svg(a).circle(0, 0, t.width, v(r));
2240
+ o = a.insert(() => e), o.attr("class", "state-start").attr("r", (t.width ?? 7) / 2).attr("width", t.width ?? 14).attr("height", t.height ?? 14);
2241
+ } else o = a.insert("circle", ":first-child"), o.attr("class", "state-start").attr("r", (t.width ?? 7) / 2).attr("width", t.width ?? 14).attr("height", t.height ?? 14);
2242
+ if (t.width < 25 && i && t.look !== "handDrawn") {
2243
+ let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2244
+ o.attr("style", `filter:url(#${n})`);
2245
+ }
2246
+ return T(t, o), t.intersect = function(e) {
2247
+ return W.circle(t, (t.width ?? 7) / 2, e);
2248
+ }, a;
2249
+ }
2250
+ l(ft, "stateStart");
2251
+ var pt = 8;
2252
+ async function mt(e, t) {
2253
+ let { labelStyles: n, nodeStyles: r } = _(t);
2254
+ t.labelStyle = n;
2255
+ let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + 2 * pt + a, u = (t?.height ?? c.height) + o, d = l - 2 * pt, p = u, m = -l / 2, h = -u / 2, v = [
2256
+ {
2257
+ x: 0,
2258
+ y: 0
2259
+ },
2260
+ {
2261
+ x: d,
2262
+ y: 0
2263
+ },
2264
+ {
2265
+ x: d,
2266
+ y: -p
2267
+ },
2268
+ {
2269
+ x: 0,
2270
+ y: -p
2271
+ },
2272
+ {
2273
+ x: 0,
2274
+ y: 0
2275
+ },
2276
+ {
2277
+ x: -8,
2278
+ y: 0
2279
+ },
2280
+ {
2281
+ x: d + 8,
2282
+ y: 0
2283
+ },
2284
+ {
2285
+ x: d + 8,
2286
+ y: -p
2287
+ },
2288
+ {
2289
+ x: -8,
2290
+ y: -p
2291
+ },
2292
+ {
2293
+ x: -8,
2294
+ y: 0
2295
+ }
2296
+ ];
2297
+ if (t.look === "handDrawn") {
2298
+ let e = S.svg(s), n = g(t, {}), r = e.rectangle(m, h, d + 16, p, n), i = e.line(m + pt, h, m + pt, h + p, n), a = e.line(m + pt + d, h, m + pt + d, h + p, n);
2299
+ s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
2300
+ let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
2301
+ o.attr("class", "basic label-container").attr("style", f(c)), T(t, o);
2302
+ } else {
2303
+ let e = q(s, d, p, v);
2304
+ r && e.attr("style", r), T(t, e);
2305
+ }
2306
+ return t.intersect = function(e) {
2307
+ return W.polygon(t, v, e);
2308
+ }, s;
2309
+ }
2310
+ l(mt, "subroutine");
2311
+ var ht = .2;
2312
+ async function gt(e, t) {
2313
+ let { labelStyles: n, nodeStyles: r } = _(t);
2314
+ t.labelStyle = n;
2315
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2316
+ (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - ht * (t.height + o * 2), 10));
2317
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = ht * l, d = ht * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: v } = t, y = S.svg(s), b = g(t, {}), x = [
2318
+ {
2319
+ x: m - u / 2,
2320
+ y: h
2321
+ },
2322
+ {
2323
+ x: m + f + u / 2,
2324
+ y: h
2325
+ },
2326
+ {
2327
+ x: m + f + u / 2,
2328
+ y: h + p
2329
+ },
2330
+ {
2331
+ x: m - u / 2,
2332
+ y: h + p
2333
+ }
2334
+ ], w = [
2335
+ {
2336
+ x: m + f - u / 2,
2337
+ y: h + p
2338
+ },
2339
+ {
2340
+ x: m + f + u / 2,
2341
+ y: h + p
2342
+ },
2343
+ {
2344
+ x: m + f + u / 2,
2345
+ y: h + p - d
2346
+ }
2347
+ ];
2348
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2349
+ let O = D(x), k = y.path(O, b), A = D(w), j = y.path(A, {
2350
+ ...b,
2351
+ fillStyle: "solid"
2352
+ }), M = s.insert(() => j, ":first-child");
2353
+ return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), v && t.look !== "handDrawn" && M.selectAll("path").attr("style", v), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), T(t, M), t.intersect = function(e) {
2354
+ return W.polygon(t, x, e);
2355
+ }, s;
2356
+ }
2357
+ l(gt, "taggedRect");
2358
+ async function _t(e, t) {
2359
+ let { labelStyles: n, nodeStyles: r } = _(t);
2360
+ t.labelStyle = n;
2361
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 8, u = .2 * s, d = .2 * c, f = c + l, { cssStyles: p } = t, m = S.svg(i), h = g(t, {});
2362
+ t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2363
+ let v = [
2364
+ {
2365
+ x: -s / 2 - s / 2 * .1,
2366
+ y: f / 2
2367
+ },
2368
+ ...O(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2369
+ {
2370
+ x: s / 2 + s / 2 * .1,
2371
+ y: -f / 2
2372
+ },
2373
+ {
2374
+ x: -s / 2 - s / 2 * .1,
2375
+ y: -f / 2
2376
+ }
2377
+ ], y = -s / 2 + s / 2 * .1, b = -f / 2 - d * .4, x = [
2378
+ {
2379
+ x: y + s - u,
2380
+ y: (b + c) * 1.3
2381
+ },
2382
+ {
2383
+ x: y + s,
2384
+ y: b + c - d
2385
+ },
2386
+ {
2387
+ x: y + s,
2388
+ y: (b + c) * .9
2389
+ },
2390
+ ...O(y + s, (b + c) * 1.25, y + s - u, (b + c) * 1.3, -c * .02, .5)
2391
+ ], w = D(v), k = m.path(w, h), A = D(x), j = m.path(A, {
2392
+ ...h,
2393
+ fillStyle: "solid"
2394
+ }), M = i.insert(() => j, ":first-child");
2395
+ return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && M.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), M.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l / 2 - (a.y - (a.top ?? 0))})`), T(t, M), t.intersect = function(e) {
2396
+ return W.polygon(t, v, e);
2397
+ }, i;
2398
+ }
2399
+ l(_t, "taggedWaveEdgedRectangle");
2400
+ async function vt(e, t) {
2401
+ let { labelStyles: n, nodeStyles: r } = _(t);
2402
+ t.labelStyle = n;
2403
+ let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width || 0), s = Math.max(a.height + (t.padding ?? 0), t?.height || 0), c = -o / 2, l = -s / 2, u = i.insert("rect", ":first-child");
2404
+ return u.attr("class", "text").attr("style", r).attr("rx", 0).attr("ry", 0).attr("x", c).attr("y", l).attr("width", o).attr("height", s), T(t, u), t.intersect = function(e) {
2405
+ return W.rect(t, e);
2406
+ }, i;
2407
+ }
2408
+ l(vt, "text");
2409
+ var yt = /* @__PURE__ */ l((e, t, n, r, i, a) => `M${e},${t}
2410
+ a${i},${a} 0,0,1 0,${-r}
2411
+ l${n},0
2412
+ a${i},${a} 0,0,1 0,${r}
2413
+ M${n},${-r}
2414
+ a${i},${a} 0,0,0 0,${r}
2415
+ l${-n},0`, "createCylinderPathD"), bt = /* @__PURE__ */ l((e, t, n, r, i, a) => [
2416
+ `M${e},${t}`,
2417
+ `M${e + n},${t}`,
2418
+ `a${i},${a} 0,0,0 0,${-r}`,
2419
+ `l${-n},0`,
2420
+ `a${i},${a} 0,0,0 0,${r}`,
2421
+ `l${n},0`
2422
+ ].join(" "), "createOuterCylinderPathD"), xt = /* @__PURE__ */ l((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), St = 5, Ct = 10;
2423
+ async function wt(e, t) {
2424
+ let { labelStyles: n, nodeStyles: r } = _(t);
2425
+ t.labelStyle = n;
2426
+ let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2;
2427
+ if (t.width || t.height) {
2428
+ let e = t.height ?? 0;
2429
+ t.height = (t.height ?? 0) - a, t.height < St && (t.height = St);
2430
+ let n = e / 2 / (2.5 + e / 50);
2431
+ t.width = (t.width ?? 0) - a - n * 3, t.width < Ct && (t.width = Ct);
2432
+ }
2433
+ let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t.height ? t.height : s.height) + a, u = l / 2, d = u / (2.5 + l / 50), p = (t.width ? t.width : s.width) + d + a, { cssStyles: m } = t, h;
2434
+ if (t.look === "handDrawn") {
2435
+ let e = S.svg(o), n = bt(0, 0, p, l, d, u), r = xt(0, 0, p, l, d, u), i = e.path(n, g(t, {})), a = e.path(r, g(t, { fill: "none" }));
2436
+ h = o.insert(() => a, ":first-child"), h = o.insert(() => i, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
2437
+ } else {
2438
+ let e = yt(0, 0, p, l, d, u);
2439
+ h = o.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", f(m)).attr("style", r), h.attr("class", "basic label-container outer-path"), m && h.selectAll("path").attr("style", m), r && h.selectAll("path").attr("style", r);
2440
+ }
2441
+ return h.attr("label-offset-x", d), h.attr("transform", `translate(${-p / 2}, ${l / 2} )`), c.attr("transform", `translate(${-(s.width / 2) - d - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, h), t.intersect = function(e) {
2442
+ let n = W.rect(t, e), r = n.y - (t.y ?? 0);
2443
+ if (u != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - d)) {
2444
+ let i = d * d * (1 - r * r / (u * u));
2445
+ i != 0 && (i = Math.sqrt(Math.abs(i))), i = d - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2446
+ }
2447
+ return n;
2448
+ }, o;
2449
+ }
2450
+ l(wt, "tiltedCylinder");
2451
+ async function Tt(e, t) {
2452
+ let { labelStyles: n, nodeStyles: r } = _(t);
2453
+ t.labelStyle = n;
2454
+ let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
2455
+ {
2456
+ x: -3 * l / 6,
2457
+ y: 0
2458
+ },
2459
+ {
2460
+ x: u + 3 * l / 6,
2461
+ y: 0
2462
+ },
2463
+ {
2464
+ x: u,
2465
+ y: -l
2466
+ },
2467
+ {
2468
+ x: 0,
2469
+ y: -l
2470
+ }
2471
+ ], f, { cssStyles: p } = t;
2472
+ if (t.look === "handDrawn") {
2473
+ let e = S.svg(s), n = g(t, {}), r = D(d), i = e.path(r, n);
2474
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2475
+ } else f = q(s, u, l, d);
2476
+ return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
2477
+ return W.polygon(t, d, e);
2478
+ }, s;
2479
+ }
2480
+ l(Tt, "trapezoid");
2481
+ async function Et(e, t) {
2482
+ let { labelStyles: n, nodeStyles: r } = _(t);
2483
+ t.labelStyle = n;
2484
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2485
+ (t.width || t.height) && (t.height = (t.height ?? 0) - o * 2, t.height < 5 && (t.height = 5), t.width = (t.width ?? 0) - a * 2, t.width < 15 && (t.width = 15));
2486
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o * 2, { cssStyles: d } = t, f = S.svg(s), p = g(t, {});
2487
+ t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
2488
+ let m = [
2489
+ {
2490
+ x: -l / 2 * .8,
2491
+ y: -u / 2
2492
+ },
2493
+ {
2494
+ x: l / 2 * .8,
2495
+ y: -u / 2
2496
+ },
2497
+ {
2498
+ x: l / 2,
2499
+ y: -u / 2 * .6
2500
+ },
2501
+ {
2502
+ x: l / 2,
2503
+ y: u / 2
2504
+ },
2505
+ {
2506
+ x: -l / 2,
2507
+ y: u / 2
2508
+ },
2509
+ {
2510
+ x: -l / 2,
2511
+ y: -u / 2 * .6
2512
+ }
2513
+ ], h = D(m), v = f.path(h, p), y = s.insert(() => v, ":first-child");
2514
+ return y.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && y.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && y.selectChildren("path").attr("style", r), T(t, y), t.intersect = function(e) {
2515
+ return W.polygon(t, m, e);
2516
+ }, s;
2517
+ }
2518
+ l(Et, "trapezoidalPentagon");
2519
+ var Dt = 10, Ot = 10;
2520
+ async function kt(e, t) {
2521
+ let { labelStyles: i, nodeStyles: a } = _(t);
2522
+ t.labelStyle = i;
2523
+ let o = t.padding ?? 0, s = t.look === "neo" ? o * 2 : o;
2524
+ (t.width || t.height) && (t.width = ((t?.width ?? 0) - s) / 2, t.width < Ot && (t.width = Ot), t.height = t?.height ?? 0, t.height < Dt && (t.height = Dt));
2525
+ let { shapeSvg: l, bbox: u, label: d } = await C(e, t, E(t)), f = r(n().flowchart?.htmlLabels), p = (t?.width ? t?.width : u.width) + s, m = t?.height ? t?.height : p + u.height, h = m, v = [
2526
+ {
2527
+ x: 0,
2528
+ y: 0
2529
+ },
2530
+ {
2531
+ x: h,
2532
+ y: 0
2533
+ },
2534
+ {
2535
+ x: h / 2,
2536
+ y: -m
2537
+ }
2538
+ ], { cssStyles: y } = t, b = S.svg(l), x = g(t, {});
2539
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2540
+ let w = D(v), O = b.path(w, x), k = l.insert(() => O, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
2541
+ return y && t.look !== "handDrawn" && k.selectChildren("path").attr("style", y), a && t.look !== "handDrawn" && k.selectChildren("path").attr("style", a), t.width = p, t.height = m, T(t, k), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (t.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), t.intersect = function(e) {
2542
+ return c.info("Triangle intersect", t, v, e), W.polygon(t, v, e);
2543
+ }, l;
2544
+ }
2545
+ l(kt, "triangle");
2546
+ async function At(e, t) {
2547
+ let { labelStyles: n, nodeStyles: r } = _(t);
2548
+ t.labelStyle = n;
2549
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
2550
+ (t.width || t.height) && (s = !1, t.width = (t?.width ?? 0) - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
2551
+ let { shapeSvg: c, bbox: l, label: u } = await C(e, t, E(t)), d = (t?.width ? t?.width : l.width) + (a ?? 0) * 2, f = (t?.height ? t?.height : l.height) + (o ?? 0) * 2, p = t.look === "neo" ? f / 4 : f / 8, m = f + (s ? p : -p), { cssStyles: h } = t, v = 14 - d, y = v > 0 ? v / 2 : 0, b = S.svg(c), x = g(t, {});
2552
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2553
+ let w = [
2554
+ {
2555
+ x: -d / 2 - y,
2556
+ y: m / 2
2557
+ },
2558
+ ...O(-d / 2 - y, m / 2, d / 2 + y, m / 2, p, .8),
2559
+ {
2560
+ x: d / 2 + y,
2561
+ y: -m / 2
2562
+ },
2563
+ {
2564
+ x: -d / 2 - y,
2565
+ y: -m / 2
2566
+ }
2567
+ ], k = D(w), A = b.path(k, x), j = c.insert(() => A, ":first-child");
2568
+ return j.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && j.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(0,${-p / 2})`), u.attr("transform", `translate(${-d / 2 + (t.padding ?? 0) - (l.x - (l.left ?? 0))},${-f / 2 + (t.padding ?? 0) - p - (l.y - (l.top ?? 0))})`), T(t, j), t.intersect = function(e) {
2569
+ return W.polygon(t, w, e);
2570
+ }, c;
2571
+ }
2572
+ l(At, "waveEdgedRectangle");
2573
+ async function jt(e, t) {
2574
+ let { labelStyles: n, nodeStyles: r } = _(t);
2575
+ t.labelStyle = n;
2576
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
2577
+ if (t.width || t.height) {
2578
+ t.width = t?.width ?? 0, t.width < 20 && (t.width = 20), t.height = t?.height ?? 0, t.height < 10 && (t.height = 10);
2579
+ let e = Math.min(t.height * .2, t.height / 4);
2580
+ t.height = Math.ceil(t.height - o - 20 / 9 * e), t.width -= a * 2;
2581
+ }
2582
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o, d = u / 8, f = u + d * 2, { cssStyles: p } = t, m = S.svg(s), h = g(t, {});
2583
+ t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2584
+ let v = [
2585
+ {
2586
+ x: -l / 2,
2587
+ y: f / 2
2588
+ },
2589
+ ...O(-l / 2, f / 2, l / 2, f / 2, d, 1),
2590
+ {
2591
+ x: l / 2,
2592
+ y: -f / 2
2593
+ },
2594
+ ...O(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
2595
+ ], y = D(v), b = m.path(y, h), x = s.insert(() => b, ":first-child");
2596
+ return x.attr("class", "basic label-container"), p && t.look !== "handDrawn" && x.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), T(t, x), t.intersect = function(e) {
2597
+ return W.polygon(t, v, e);
2598
+ }, s;
2599
+ }
2600
+ l(jt, "waveRectangle");
2601
+ var Q = 10;
2602
+ async function Mt(e, t) {
2603
+ let { labelStyles: n, nodeStyles: r } = _(t);
2604
+ t.labelStyle = n;
2605
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
2606
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - i * 2 - Q, 10), t.height = Math.max((t?.height ?? 0) - a * 2 - Q, 10));
2607
+ let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : s.width) + i * 2 + Q, u = (t?.height ? t?.height : s.height) + a * 2 + Q, d = l - Q, f = u - Q, p = -d / 2, m = -f / 2, { cssStyles: h } = t, v = S.svg(o), y = g(t, {}), b = [
2608
+ {
2609
+ x: p - Q,
2610
+ y: m - Q
2611
+ },
2612
+ {
2613
+ x: p - Q,
2614
+ y: m + f
2615
+ },
2616
+ {
2617
+ x: p + d,
2618
+ y: m + f
2619
+ },
2620
+ {
2621
+ x: p + d,
2622
+ y: m - Q
2623
+ }
2624
+ ], x = `M${p - Q},${m - Q} L${p + d},${m - Q} L${p + d},${m + f} L${p - Q},${m + f} L${p - Q},${m - Q}
2625
+ M${p - Q},${m} L${p + d},${m}
2626
+ M${p},${m - Q} L${p},${m + f}`;
2627
+ t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
2628
+ let w = v.path(x, y), D = o.insert(() => w, ":first-child");
2629
+ return D.attr("transform", `translate(${Q / 2}, ${Q / 2})`), D.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && D.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${-(s.width / 2) + Q / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) + Q / 2 - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
2630
+ return W.polygon(t, b, e);
2631
+ }, o;
2632
+ }
2633
+ l(Mt, "windowPane");
2634
+ var Nt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Pt = /* @__PURE__ */ new Set([
2635
+ "redux",
2636
+ "redux-dark",
2637
+ "redux-color",
2638
+ "redux-dark-color"
2639
+ ]);
2640
+ async function Ft(e, t) {
2641
+ let n = t;
2642
+ n.alias && (t.label = n.alias);
2643
+ let { theme: i, themeVariables: a } = s(), { rowEven: o, rowOdd: c, nodeBorder: l, borderColorArray: d } = a;
2644
+ if (t.look === "handDrawn") {
2645
+ let { themeVariables: n } = s(), { background: r } = n;
2646
+ await Ft(e, {
2647
+ ...t,
2648
+ id: t.id + "-background",
2649
+ domId: (t.domId || t.id) + "-background",
2650
+ look: "default",
2651
+ cssStyles: ["stroke: none", `fill: ${r}`]
2652
+ });
2653
+ }
2654
+ let f = s();
2655
+ t.useHtmlLabels = f.htmlLabels;
2656
+ let m = f.er?.diagramPadding ?? 10, h = f.er?.entityPadding ?? 6, { cssStyles: v } = t, { labelStyles: y, nodeStyles: b } = _(t);
2657
+ if (n.attributes.length === 0 && t.label) {
2658
+ let a = {
2659
+ rx: 0,
2660
+ ry: 0,
2661
+ labelPaddingX: m,
2662
+ labelPaddingY: m * 1.5,
2663
+ classes: ""
2664
+ };
2665
+ p(t.label, f) + a.labelPaddingX * 2 < f.er.minEntityWidth && (t.width = f.er.minEntityWidth);
2666
+ let o = await Be(e, t, a);
2667
+ if (i != null && Nt.has(i)) {
2668
+ let e = n.colorIndex ?? 0;
2669
+ o.attr("data-color-id", `color-${e % d.length}`);
2670
+ }
2671
+ if (!r(f.htmlLabels)) {
2672
+ let e = o.select("text"), t = e.node()?.getBBox();
2673
+ e.attr("transform", `translate(${-t.width / 2}, 0)`);
2674
+ }
2675
+ return o;
2676
+ }
2677
+ f.htmlLabels || (m *= 1.25, h *= 1.25);
2678
+ let x = E(t);
2679
+ x ||= "node default";
2680
+ let C = e.insert("g").attr("class", x).attr("id", t.domId || t.id), w = await It(C, t.label ?? "", f, 0, 0, ["name"], y);
2681
+ w.height += h;
2682
+ let D = 0, O = [], k = [], A = 0, j = 0, M = 0, N = 0, P = !0, F = !0;
2683
+ for (let e of n.attributes) {
2684
+ let t = await It(C, e.type, f, 0, D, ["attribute-type"], y);
2685
+ A = Math.max(A, t.width + m);
2686
+ let n = await It(C, e.name, f, 0, D, ["attribute-name"], y);
2687
+ j = Math.max(j, n.width + m);
2688
+ let r = await It(C, e.keys.join(), f, 0, D, ["attribute-keys"], y);
2689
+ M = Math.max(M, r.width + m);
2690
+ let i = await It(C, e.comment, f, 0, D, ["attribute-comment"], y);
2691
+ N = Math.max(N, i.width + m);
2692
+ let a = Math.max(t.height, n.height, r.height, i.height) + h;
2693
+ k.push({
2694
+ yOffset: D,
2695
+ rowHeight: a
2696
+ }), D += a;
2697
+ }
2698
+ let I = 4;
2699
+ M <= m && (P = !1, M = 0, I--), N <= m && (F = !1, N = 0, I--);
2700
+ let ee = C.node().getBBox();
2701
+ if (w.width + m * 2 - (A + j + M + N) > 0) {
2702
+ let e = w.width + m * 2 - (A + j + M + N);
2703
+ A += e / I, j += e / I, M > 0 && (M += e / I), N > 0 && (N += e / I);
2704
+ }
2705
+ let te = A + j + M + N, L = S.svg(C), R = g(t, {});
2706
+ t.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid");
2707
+ let ne = 0;
2708
+ k.length > 0 && (ne = k.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
2709
+ let z = Math.max(ee.width + m * 2, t?.width || 0, te), B = Math.max((ne ?? 0) + w.height, t?.height || 0), V = -z / 2, H = -B / 2;
2710
+ if (C.selectAll("g:not(:first-child)").each((e, t, n) => {
2711
+ let r = u(n[t]), i = r.attr("transform"), a = 0, o = 0;
2712
+ if (i) {
2713
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);
2714
+ e && (a = parseFloat(e[1]), o = parseFloat(e[2]), r.attr("class").includes("attribute-name") ? a += A : r.attr("class").includes("attribute-keys") ? a += A + j : r.attr("class").includes("attribute-comment") && (a += A + j + M));
2715
+ }
2716
+ r.attr("transform", `translate(${V + m / 2 + a}, ${o + H + w.height + h / 2})`);
2717
+ }), C.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null && Nt.has(i)) {
2718
+ let e = n.colorIndex ?? 0;
2719
+ C.attr("data-color-id", `color-${e % d.length}`);
2720
+ }
2721
+ let re = L.rectangle(V, H, z, B, R), ie = C.insert(() => re, ":first-child").attr("class", "outer-path").attr("style", v.join(""));
2722
+ O.push(0);
2723
+ for (let [e, t] of k.entries()) {
2724
+ let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = L.rectangle(V, w.height + H + t?.yOffset, z, t?.rowHeight, {
2725
+ ...R,
2726
+ fill: n ? o : c,
2727
+ stroke: l
2728
+ });
2729
+ C.insert(() => r, "g.label").attr("style", v.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
2730
+ }
2731
+ let U = 1e-4, G = Lt(V, w.height + H, z + V, w.height + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R);
2732
+ if (C.insert(() => K).attr("class", "divider"), G = Lt(A + V, w.height + H, A + V, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider"), P) {
2733
+ let e = A + j + V;
2734
+ G = Lt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
2735
+ }
2736
+ if (F) {
2737
+ let e = A + j + M + V;
2738
+ G = Lt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
2739
+ }
2740
+ for (let e of O) {
2741
+ let t = w.height + H + e;
2742
+ G = Lt(V, t, z + V, t, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
2743
+ }
2744
+ if (T(t, ie), b && t.look !== "handDrawn") if (i != null && Pt.has(i)) C.selectAll("path").attr("style", b);
2745
+ else {
2746
+ let e = b.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
2747
+ C.selectAll("path").attr("style", e ?? ""), C.selectAll(".row-rect-even path").attr("style", b);
2748
+ }
2749
+ return t.intersect = function(e) {
2750
+ return W.rect(t, e);
2751
+ }, C;
2752
+ }
2753
+ l(Ft, "erBox");
2754
+ async function It(e, t, n, a = 0, o = 0, s = [], c = "") {
2755
+ let l = e.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${a}, ${o})`).attr("style", c);
2756
+ t !== i(t) && (t = i(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2757
+ let d = l.node().appendChild(await b(l, t, {
2758
+ width: p(t, n) + 100,
2759
+ style: c,
2760
+ useHtmlLabels: n.htmlLabels
2761
+ }, n));
2762
+ if (t.includes("&lt;") || t.includes("&gt;")) {
2763
+ let e = d.children[0];
2764
+ for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
2765
+ }
2766
+ let f = d.getBBox();
2767
+ if (r(n.htmlLabels)) {
2768
+ let e = d.children[0];
2769
+ e.style.textAlign = "start";
2770
+ let t = u(d);
2771
+ f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
2772
+ }
2773
+ return f;
2774
+ }
2775
+ l(It, "addText");
2776
+ function Lt(e, t, n, r, i) {
2777
+ return e === n ? [
2778
+ {
2779
+ x: e - i / 2,
2780
+ y: t
2781
+ },
2782
+ {
2783
+ x: e + i / 2,
2784
+ y: t
2785
+ },
2786
+ {
2787
+ x: n + i / 2,
2788
+ y: r
2789
+ },
2790
+ {
2791
+ x: n - i / 2,
2792
+ y: r
2793
+ }
2794
+ ] : [
2795
+ {
2796
+ x: e,
2797
+ y: t - i / 2
2798
+ },
2799
+ {
2800
+ x: e,
2801
+ y: t + i / 2
2802
+ },
2803
+ {
2804
+ x: n,
2805
+ y: r + i / 2
2806
+ },
2807
+ {
2808
+ x: n,
2809
+ y: r - i / 2
2810
+ }
2811
+ ];
2812
+ }
2813
+ l(Lt, "lineToPolygon");
2814
+ async function Rt(e, t, n, r, i = n.class.padding ?? 12) {
2815
+ let a = r ? 0 : 3, o = e.insert("g").attr("class", E(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
2816
+ if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
2817
+ let e = t.annotations[0];
2818
+ await zt(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
2819
+ }
2820
+ c = o.insert("g").attr("class", "label-group text"), await zt(c, t, 0, ["font-weight: bolder"]);
2821
+ let m = c.node().getBBox();
2822
+ f = m.height, l = o.insert("g").attr("class", "members-group text");
2823
+ let h = 0;
2824
+ for (let e of t.members) {
2825
+ let t = await zt(l, e, h, [e.parseClassifier()]);
2826
+ h += t + a;
2827
+ }
2828
+ p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
2829
+ let g = 0;
2830
+ for (let e of t.methods) {
2831
+ let t = await zt(u, e, g, [e.parseClassifier()]);
2832
+ g += t + a;
2833
+ }
2834
+ let _ = o.node().getBBox();
2835
+ if (s !== null) {
2836
+ let e = s.node().getBBox();
2837
+ s.attr("transform", `translate(${-e.width / 2})`);
2838
+ }
2839
+ return c.attr("transform", `translate(${-m.width / 2}, ${d})`), _ = o.node().getBBox(), l.attr("transform", `translate(0, ${d + f + i * 2})`), _ = o.node().getBBox(), u.attr("transform", `translate(0, ${d + f + (p ? p + i * 4 : i * 2)})`), _ = o.node().getBBox(), {
2840
+ shapeSvg: o,
2841
+ bbox: _
2842
+ };
2843
+ }
2844
+ l(Rt, "textHelper");
2845
+ async function zt(e, n, i, o = []) {
2846
+ let c = e.insert("g").attr("class", "label").attr("style", o.join("; ")), f = s(), m = "useHtmlLabels" in n ? n.useHtmlLabels : r(f.htmlLabels) ?? !0, h = "";
2847
+ h = "text" in n ? n.text : n.label, !m && h.startsWith("\\") && (h = h.substring(1)), a(h) && (m = !0);
2848
+ let g = await b(c, t(d(h)), {
2849
+ width: p(h, f) + 50,
2850
+ classes: "markdown-node-label",
2851
+ useHtmlLabels: m
2852
+ }, f), _, v = 1;
2853
+ if (m) {
2854
+ let e = g.children[0], t = u(g);
2855
+ v = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (v += e.innerHTML.split("<mrow>").length - 1);
2856
+ let n = e.getElementsByTagName("img");
2857
+ if (n) {
2858
+ let e = h.replace(/<img[^>]*>/g, "").trim() === "";
2859
+ await Promise.all([...n].map((t) => new Promise((n) => {
2860
+ function r() {
2861
+ if (t.style.display = "flex", t.style.flexDirection = "column", e) {
2862
+ let e = f.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, n = parseInt(e, 10) * 5 + "px";
2863
+ t.style.minWidth = n, t.style.maxWidth = n;
2864
+ } else t.style.width = "100%";
2865
+ n(t);
2866
+ }
2867
+ l(r, "setupImage"), setTimeout(() => {
2868
+ t.complete && r();
2869
+ }), t.addEventListener("error", r), t.addEventListener("load", r);
2870
+ })));
2871
+ }
2872
+ _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
2873
+ } else {
2874
+ o.includes("font-weight: bolder") && u(g).selectAll("tspan").attr("font-weight", ""), v = g.children.length;
2875
+ let e = g.children[0];
2876
+ (g.textContent === "" || g.textContent.includes("&gt")) && (e.textContent = h[0] + h.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), h[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), _ = g.getBBox();
2877
+ }
2878
+ return c.attr("transform", "translate(0," + (-_.height / (2 * v) + i) + ")"), _.height;
2879
+ }
2880
+ l(zt, "addText");
2881
+ async function Bt(e, t) {
2882
+ let i = n(), { themeVariables: a } = i, { useGradient: o } = a, s = i.class.padding ?? 12, c = s, l = t.useHtmlLabels ?? r(i.htmlLabels) ?? !0, d = t;
2883
+ d.annotations = d.annotations ?? [], d.members = d.members ?? [], d.methods = d.methods ?? [];
2884
+ let { shapeSvg: f, bbox: p } = await Rt(e, t, i, l, c), { labelStyles: m, nodeStyles: h } = _(t);
2885
+ t.labelStyle = m, t.cssStyles = d.styles || "";
2886
+ let v = d.styles?.join(";") || h || "";
2887
+ t.cssStyles ||= v.replaceAll("!important", "").split(";");
2888
+ let y = d.members.length === 0 && d.methods.length === 0 && !i.class?.hideEmptyMembersBox, b = S.svg(f), x = g(t, {});
2889
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2890
+ let C = Math.max(t.width ?? 0, p.width), w = Math.max(t.height ?? 0, p.height), E = (t.height ?? 0) > p.height;
2891
+ d.members.length === 0 && d.methods.length === 0 ? w += c : d.members.length > 0 && d.methods.length === 0 && (w += c * 2);
2892
+ let D = -C / 2, O = -w / 2, k = y ? s * 2 : d.members.length === 0 && d.methods.length === 0 ? -s : 0;
2893
+ E && (k = s * 2);
2894
+ let A = b.rectangle(D - s, O - s - (y ? s : d.members.length === 0 && d.methods.length === 0 ? -s / 2 : 0), C + 2 * s, w + 2 * s + k, x), j = f.insert(() => A, ":first-child");
2895
+ j.attr("class", "basic label-container outer-path");
2896
+ let M = j.node().getBBox(), N = f.select(".annotation-group").node().getBBox().height - (y ? s / 2 : 0) || 0, P = f.select(".label-group").node().getBBox().height - (y ? s / 2 : 0) || 0, F = f.select(".members-group").node().getBBox().height - (y ? s / 2 : 0) || 0, I = (N + P + O + s - (O - s - (y ? s : d.members.length === 0 && d.methods.length === 0 ? -s / 2 : 0))) / 2;
2897
+ if (f.selectAll(".text").each((e, t, n) => {
2898
+ let r = u(n[t]), a = r.attr("transform"), o = 0;
2899
+ if (a) {
2900
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2901
+ e && (o = parseFloat(e[2]));
2902
+ }
2903
+ let p = o + O + s - (y ? s : d.members.length === 0 && d.methods.length === 0 ? -s / 2 : 0);
2904
+ if (r.attr("class").includes("methods-group")) {
2905
+ let e = Math.max(F, c / 2);
2906
+ p = E ? Math.max(I, N + P + e + O + c * 2 + s) + c * 2 : N + P + e + O + c * 4 + s;
2907
+ }
2908
+ d.members.length === 0 && d.methods.length === 0 && i.class?.hideEmptyMembersBox && (p = d.annotations.length > 0 ? o - c : o), l || (p -= 4);
2909
+ let m = D;
2910
+ (r.attr("class").includes("label-group") || r.attr("class").includes("annotation-group")) && (m = -r.node()?.getBBox().width / 2 || 0, f.selectAll("text").each(function(e, t, n) {
2911
+ window.getComputedStyle(n[t]).textAnchor === "middle" && (m = 0);
2912
+ })), r.attr("transform", `translate(${m}, ${p})`);
2913
+ }), d.members.length > 0 || d.methods.length > 0 || y) {
2914
+ let e = N + P + O + s, n = b.line(M.x, e, M.x + M.width, e + .001, x);
2915
+ f.insert(() => n).attr("class", `divider${t.look === "neo" && !o ? " neo-line" : ""}`).attr("style", v);
2916
+ }
2917
+ if (y || d.members.length > 0 || d.methods.length > 0) {
2918
+ let e = N + P + F + O + c * 2 + s, n = b.line(M.x, E ? Math.max(I, e) : e, M.x + M.width, (E ? Math.max(I, e) : e) + .001, x);
2919
+ f.insert(() => n).attr("class", `divider${t.look === "neo" && !o ? " neo-line" : ""}`).attr("style", v);
2920
+ }
2921
+ if (d.look !== "handDrawn" && f.selectAll("path").attr("style", v), j.select(":nth-child(2)").attr("style", v), f.selectAll(".divider").select("path").attr("style", v), t.labelStyle ? f.selectAll("span").attr("style", t.labelStyle) : f.selectAll("span").attr("style", v), !l) {
2922
+ let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(v);
2923
+ if (t) {
2924
+ let e = t[0].replace("color", "fill");
2925
+ f.selectAll("tspan").attr("style", e);
2926
+ } else if (m) {
2927
+ let t = e.exec(m);
2928
+ if (t) {
2929
+ let e = t[0].replace("color", "fill");
2930
+ f.selectAll("tspan").attr("style", e);
2931
+ }
2932
+ }
2933
+ }
2934
+ return T(t, j), t.intersect = function(e) {
2935
+ return W.rect(t, e);
2936
+ }, f;
2937
+ }
2938
+ l(Bt, "classBox");
2939
+ async function Vt(e, t) {
2940
+ let { labelStyles: r, nodeStyles: i } = _(t);
2941
+ t.labelStyle = r;
2942
+ let a = t, o = t, s = "verifyMethod" in t, c = E(t), { themeVariables: l } = n(), { borderColorArray: d, requirementEdgeLabelBackground: f } = l, p = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), m;
2943
+ m = s ? await $(p, `&lt;&lt;${a.type}&gt;&gt;`, 0, t.labelStyle) : await $(p, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
2944
+ let h = m, v = await $(p, a.name, h, t.labelStyle + "; font-weight: bold;");
2945
+ if (h += v + 20, s) {
2946
+ let e = await $(p, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, h, t.labelStyle);
2947
+ h += e;
2948
+ let n = await $(p, `${a.text ? `Text: ${a.text}` : ""}`, h, t.labelStyle);
2949
+ h += n;
2950
+ let r = await $(p, `${a.risk ? `Risk: ${a.risk}` : ""}`, h, t.labelStyle);
2951
+ h += r, await $(p, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, h, t.labelStyle);
2952
+ } else {
2953
+ let e = await $(p, `${o.type ? `Type: ${o.type}` : ""}`, h, t.labelStyle);
2954
+ h += e, await $(p, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, h, t.labelStyle);
2955
+ }
2956
+ let y = (p.node()?.getBBox().width ?? 200) + 20, b = (p.node()?.getBBox().height ?? 200) + 20, x = -y / 2, C = -b / 2, w = S.svg(p), D = g(t, {});
2957
+ t.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
2958
+ let O = w.rectangle(x, C, y, b, D), k = p.insert(() => O, ":first-child");
2959
+ if (k.attr("class", "basic label-container outer-path").attr("style", i), d?.length) {
2960
+ let e = t.colorIndex ?? 0;
2961
+ p.attr("data-color-id", `color-${e % d.length}`);
2962
+ }
2963
+ if (p.selectAll(".label").each((e, t, n) => {
2964
+ let r = u(n[t]), i = r.attr("transform"), a = 0, o = 0;
2965
+ if (i) {
2966
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);
2967
+ e && (a = parseFloat(e[1]), o = parseFloat(e[2]));
2968
+ }
2969
+ let s = o - b / 2, c = x + 20 / 2;
2970
+ (t === 0 || t === 1) && (c = a), r.attr("transform", `translate(${c}, ${s + 20})`);
2971
+ }), h > m + v + 20) {
2972
+ let e = C + m + v + 20, n;
2973
+ if (t.look === "neo") {
2974
+ let t = .001, r = [
2975
+ [x, e],
2976
+ [x + y, e],
2977
+ [x + y, e + t],
2978
+ [x, e + t]
2979
+ ];
2980
+ n = w.polygon(r, D);
2981
+ } else n = w.line(x, e, x + y, e, D);
2982
+ p.insert(() => n).attr("class", "divider");
2983
+ }
2984
+ return T(t, k), t.intersect = function(e) {
2985
+ return W.rect(t, e);
2986
+ }, i && t.look !== "handDrawn" && (f || d?.length) && p.selectAll("path").attr("style", i), p;
2987
+ }
2988
+ l(Vt, "requirementBox");
2989
+ async function $(e, r, i, a = "") {
2990
+ if (r === "") return 0;
2991
+ let o = e.insert("g").attr("class", "label").attr("style", a), s = n(), c = s.htmlLabels ?? !0, l = await b(o, t(d(r)), {
2992
+ width: p(r, s) + 50,
2993
+ classes: "markdown-node-label",
2994
+ useHtmlLabels: c,
2995
+ style: a
2996
+ }, s), f;
2997
+ if (c) {
2998
+ let e = l.children[0], t = u(l);
2999
+ f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
3000
+ } else {
3001
+ let e = l.children[0];
3002
+ for (let t of e.children) a && t.setAttribute("style", a);
3003
+ f = l.getBBox(), f.height += 6;
3004
+ }
3005
+ return o.attr("transform", `translate(${-f.width / 2},${-f.height / 2 + i})`), f.height;
3006
+ }
3007
+ l($, "addText");
3008
+ var Ht = /* @__PURE__ */ l((e) => {
3009
+ switch (e) {
3010
+ case "Very High": return "red";
3011
+ case "High": return "orange";
3012
+ case "Medium": return null;
3013
+ case "Low": return "blue";
3014
+ case "Very Low": return "lightblue";
3015
+ }
3016
+ }, "colorFromPriority");
3017
+ async function Ut(e, t, { config: n }) {
3018
+ let { labelStyles: r, nodeStyles: i } = _(t);
3019
+ t.labelStyle = r || "";
3020
+ let a = t.width;
3021
+ t.width = (t.width ?? 200) - 10;
3022
+ let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = t.padding || 10, u = "", d;
3023
+ "ticket" in t && t.ticket && n?.kanban?.ticketBaseUrl && (u = n?.kanban?.ticketBaseUrl.replace("#TICKET#", t.ticket), d = o.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", u).attr("target", "_blank"));
3024
+ let f = {
3025
+ useHtmlLabels: t.useHtmlLabels,
3026
+ labelStyle: t.labelStyle || "",
3027
+ width: t.width,
3028
+ img: t.img,
3029
+ padding: t.padding || 8,
3030
+ centerLabel: !1
3031
+ }, p, m;
3032
+ d ? {label: p, bbox: m} = await w(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await w(o, "ticket" in t && t.ticket || "", f);
3033
+ let { label: h, bbox: v } = await w(o, "assigned" in t && t.assigned || "", f);
3034
+ t.width = a;
3035
+ let y = t?.width || 0, b = Math.max(m.height, v.height) / 2, x = Math.max(s.height + 20, t?.height || 0) + b, D = -y / 2, O = -x / 2;
3036
+ c.attr("transform", "translate(" + (l - y / 2) + ", " + (-b - s.height / 2) + ")"), p.attr("transform", "translate(" + (l - y / 2) + ", " + (-b + s.height / 2) + ")"), h.attr("transform", "translate(" + (l + y / 2 - v.width - 20) + ", " + (-b + s.height / 2) + ")");
3037
+ let k, { rx: A, ry: j } = t, { cssStyles: M } = t;
3038
+ if (t.look === "handDrawn") {
3039
+ let e = S.svg(o), n = g(t, {}), r = A || j ? e.path(N(D, O, y, x, A || 0), n) : e.rectangle(D, O, y, x, n);
3040
+ k = o.insert(() => r, ":first-child"), k.attr("class", "basic label-container").attr("style", M || null);
3041
+ } else {
3042
+ k = o.insert("rect", ":first-child"), k.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", A ?? 5).attr("ry", j ?? 5).attr("x", D).attr("y", O).attr("width", y).attr("height", x);
3043
+ let e = "priority" in t && t.priority;
3044
+ if (e) {
3045
+ let t = o.append("line"), n = D + 2, r = O + Math.floor((A ?? 0) / 2), i = O + x - Math.floor((A ?? 0) / 2);
3046
+ t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Ht(e));
3047
+ }
3048
+ }
3049
+ return T(t, k), t.height = x, t.intersect = function(e) {
3050
+ return W.rect(t, e);
3051
+ }, o;
3052
+ }
3053
+ l(Ut, "kanbanItem");
3054
+ async function Wt(e, t) {
3055
+ let { labelStyles: n, nodeStyles: r } = _(t);
3056
+ t.labelStyle = n;
3057
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), l = a.width + 10 * o, u = a.height + 8 * o, d = .15 * l, { cssStyles: p } = t, m = a.width + 20, h = a.height + 20, v = Math.max(l, m), y = Math.max(u, h);
3058
+ s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`);
3059
+ let b, x = `M0 0
3060
+ a${d},${d} 1 0,0 ${v * .25},${-1 * y * .1}
3061
+ a${d},${d} 1 0,0 ${v * .25},0
3062
+ a${d},${d} 1 0,0 ${v * .25},0
3063
+ a${d},${d} 1 0,0 ${v * .25},${y * .1}
3064
+
3065
+ a${d},${d} 1 0,0 ${v * .15},${y * .33}
3066
+ a${d * .8},${d * .8} 1 0,0 0,${y * .34}
3067
+ a${d},${d} 1 0,0 ${-1 * v * .15},${y * .33}
3068
+
3069
+ a${d},${d} 1 0,0 ${-1 * v * .25},${y * .15}
3070
+ a${d},${d} 1 0,0 ${-1 * v * .25},0
3071
+ a${d},${d} 1 0,0 ${-1 * v * .25},0
3072
+ a${d},${d} 1 0,0 ${-1 * v * .25},${-1 * y * .15}
3073
+
3074
+ a${d},${d} 1 0,0 ${-1 * v * .1},${-1 * y * .33}
3075
+ a${d * .8},${d * .8} 1 0,0 0,${-1 * y * .34}
3076
+ a${d},${d} 1 0,0 ${v * .1},${-1 * y * .33}
3077
+ H0 V0 Z`;
3078
+ if (t.look === "handDrawn") {
3079
+ let e = S.svg(i), n = g(t, {}), r = e.path(x, n);
3080
+ b = i.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", f(p));
3081
+ } else b = i.insert("path", ":first-child").attr("class", "basic label-container").attr("style", r).attr("d", x);
3082
+ return b.attr("transform", `translate(${-v / 2}, ${-y / 2})`), T(t, b), t.calcIntersect = function(e, t) {
3083
+ return W.rect(e, t);
3084
+ }, t.intersect = function(e) {
3085
+ return c.info("Bang intersect", t, e), W.rect(t, e);
3086
+ }, i;
3087
+ }
3088
+ l(Wt, "bang");
3089
+ async function Gt(e, t) {
3090
+ let { labelStyles: n, nodeStyles: r } = _(t);
3091
+ t.labelStyle = n;
3092
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), l = a.width + 2 * o, u = a.height + 2 * o, d = .15 * l, p = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: v } = t, y, b = `M0 0
3093
+ a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3094
+ a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
3095
+ a${p},${p} 1 0,1 ${l * .35},${l * .2}
3096
+
3097
+ a${d},${d} 1 0,1 ${l * .15},${u * .35}
3098
+ a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
3099
+
3100
+ a${p},${d} 1 0,1 ${-1 * l * .25},${l * .15}
3101
+ a${m},${m} 1 0,1 ${-1 * l * .5},0
3102
+ a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
3103
+
3104
+ a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
3105
+ a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
3106
+ H0 V0 Z`;
3107
+ if (t.look === "handDrawn") {
3108
+ let e = S.svg(i), n = g(t, {}), r = e.path(b, n);
3109
+ y = i.insert(() => r, ":first-child"), y.attr("class", "basic label-container").attr("style", f(v));
3110
+ } else y = i.insert("path", ":first-child").attr("class", "basic label-container").attr("style", r).attr("d", b);
3111
+ return s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), y.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(t, y), t.calcIntersect = function(e, t) {
3112
+ return W.rect(e, t);
3113
+ }, t.intersect = function(e) {
3114
+ return c.info("Cloud intersect", t, e), W.rect(t, e);
3115
+ }, i;
3116
+ }
3117
+ l(Gt, "cloud");
3118
+ async function Kt(e, t) {
3119
+ let { labelStyles: n, nodeStyles: r } = _(t);
3120
+ t.labelStyle = n;
3121
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3122
+ M${-c / 2} ${l / 2 - 5}
3123
+ v${-l + 10}
3124
+ q0,-5 5,-5
3125
+ h${c - 10}
3126
+ q5,0 5,5
3127
+ v${l - 5}
3128
+ H${-c / 2}
3129
+ Z
3130
+ ` : `
3131
+ M${-c / 2} ${l / 2 - 5}
3132
+ v${-l + 10}
3133
+ q0,-5 5,-5
3134
+ h${c - 10}
3135
+ q5,0 5,5
3136
+ v${l - 10}
3137
+ q0,5 -5,5
3138
+ h${-(c - 10)}
3139
+ q-5,0 -5,-5
3140
+ Z
3141
+ `;
3142
+ if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3143
+ let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3144
+ return i.append("line").attr("class", "node-line-").attr("x1", -c / 2).attr("y1", l / 2).attr("x2", c / 2).attr("y2", l / 2), s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), i.append(() => s.node()), T(t, d), t.calcIntersect = function(e, t) {
3145
+ return W.rect(e, t);
3146
+ }, t.intersect = function(e) {
3147
+ return W.rect(t, e);
3148
+ }, i;
3149
+ }
3150
+ l(Kt, "defaultMindmapNode");
3151
+ async function qt(e, t) {
3152
+ return ue(e, t, { padding: t.padding ?? 0 });
3153
+ }
3154
+ l(qt, "mindmapCircle");
3155
+ var Jt = [
3156
+ {
3157
+ semanticName: "Process",
3158
+ name: "Rectangle",
3159
+ shortName: "rect",
3160
+ description: "Standard process shape",
3161
+ aliases: [
3162
+ "proc",
3163
+ "process",
3164
+ "rectangle"
3165
+ ],
3166
+ internalAliases: ["squareRect"],
3167
+ handler: ct
3168
+ },
3169
+ {
3170
+ semanticName: "Event",
3171
+ name: "Rounded Rectangle",
3172
+ shortName: "rounded",
3173
+ description: "Represents an event",
3174
+ aliases: ["event"],
3175
+ internalAliases: ["roundedRect"],
3176
+ handler: at
3177
+ },
3178
+ {
3179
+ semanticName: "Terminal Point",
3180
+ name: "Stadium",
3181
+ shortName: "stadium",
3182
+ description: "Terminal point",
3183
+ aliases: ["terminal", "pill"],
3184
+ handler: lt
3185
+ },
3186
+ {
3187
+ semanticName: "Subprocess",
3188
+ name: "Framed Rectangle",
3189
+ shortName: "fr-rect",
3190
+ description: "Subprocess",
3191
+ aliases: [
3192
+ "subprocess",
3193
+ "subproc",
3194
+ "framed-rectangle",
3195
+ "subroutine"
3196
+ ],
3197
+ handler: mt
3198
+ },
3199
+ {
3200
+ semanticName: "Database",
3201
+ name: "Cylinder",
3202
+ shortName: "cyl",
3203
+ description: "Database storage",
3204
+ aliases: [
3205
+ "db",
3206
+ "database",
3207
+ "cylinder"
3208
+ ],
3209
+ handler: Se
3210
+ },
3211
+ {
3212
+ semanticName: "Start",
3213
+ name: "Circle",
3214
+ shortName: "circle",
3215
+ description: "Starting point",
3216
+ aliases: ["circ"],
3217
+ handler: ue
3218
+ },
3219
+ {
3220
+ semanticName: "Bang",
3221
+ name: "Bang",
3222
+ shortName: "bang",
3223
+ description: "Bang",
3224
+ aliases: ["bang"],
3225
+ handler: Wt
3226
+ },
3227
+ {
3228
+ semanticName: "Cloud",
3229
+ name: "Cloud",
3230
+ shortName: "cloud",
3231
+ description: "cloud",
3232
+ aliases: ["cloud"],
3233
+ handler: Gt
3234
+ },
3235
+ {
3236
+ semanticName: "Decision",
3237
+ name: "Diamond",
3238
+ shortName: "diam",
3239
+ description: "Decision-making step",
3240
+ aliases: [
3241
+ "decision",
3242
+ "diamond",
3243
+ "question"
3244
+ ],
3245
+ handler: nt
3246
+ },
3247
+ {
3248
+ semanticName: "Prepare Conditional",
3249
+ name: "Hexagon",
3250
+ shortName: "hex",
3251
+ description: "Preparation or condition step",
3252
+ aliases: ["hexagon", "prepare"],
3253
+ handler: Me
3254
+ },
3255
+ {
3256
+ semanticName: "Data Input/Output",
3257
+ name: "Lean Right",
3258
+ shortName: "lean-r",
3259
+ description: "Represents input or output",
3260
+ aliases: ["lean-right", "in-out"],
3261
+ internalAliases: ["lean_right"],
3262
+ handler: Ue
3263
+ },
3264
+ {
3265
+ semanticName: "Data Input/Output",
3266
+ name: "Lean Left",
3267
+ shortName: "lean-l",
3268
+ description: "Represents output or input",
3269
+ aliases: ["lean-left", "out-in"],
3270
+ internalAliases: ["lean_left"],
3271
+ handler: He
3272
+ },
3273
+ {
3274
+ semanticName: "Priority Action",
3275
+ name: "Trapezoid Base Bottom",
3276
+ shortName: "trap-b",
3277
+ description: "Priority action",
3278
+ aliases: [
3279
+ "priority",
3280
+ "trapezoid-bottom",
3281
+ "trapezoid"
3282
+ ],
3283
+ handler: Tt
3284
+ },
3285
+ {
3286
+ semanticName: "Manual Operation",
3287
+ name: "Trapezoid Base Top",
3288
+ shortName: "trap-t",
3289
+ description: "Represents a manual task",
3290
+ aliases: [
3291
+ "manual",
3292
+ "trapezoid-top",
3293
+ "inv-trapezoid"
3294
+ ],
3295
+ internalAliases: ["inv_trapezoid"],
3296
+ handler: ze
3297
+ },
3298
+ {
3299
+ semanticName: "Stop",
3300
+ name: "Double Circle",
3301
+ shortName: "dbl-circ",
3302
+ description: "Represents a stop point",
3303
+ aliases: ["double-circle"],
3304
+ internalAliases: ["doublecircle"],
3305
+ handler: we
3306
+ },
3307
+ {
3308
+ semanticName: "Text Block",
3309
+ name: "Text Block",
3310
+ shortName: "text",
3311
+ description: "Text block",
3312
+ handler: vt
3313
+ },
3314
+ {
3315
+ semanticName: "Card",
3316
+ name: "Notched Rectangle",
3317
+ shortName: "notch-rect",
3318
+ description: "Represents a card",
3319
+ aliases: ["card", "notched-rectangle"],
3320
+ handler: ce
3321
+ },
3322
+ {
3323
+ semanticName: "Lined/Shaded Process",
3324
+ name: "Lined Rectangle",
3325
+ shortName: "lin-rect",
3326
+ description: "Lined process shape",
3327
+ aliases: [
3328
+ "lined-rectangle",
3329
+ "lined-process",
3330
+ "lin-proc",
3331
+ "shaded-process"
3332
+ ],
3333
+ handler: ot
3334
+ },
3335
+ {
3336
+ semanticName: "Start",
3337
+ name: "Small Circle",
3338
+ shortName: "sm-circ",
3339
+ description: "Small starting point",
3340
+ aliases: ["start", "small-circle"],
3341
+ internalAliases: ["stateStart"],
3342
+ handler: ft
3343
+ },
3344
+ {
3345
+ semanticName: "Stop",
3346
+ name: "Framed Circle",
3347
+ shortName: "fr-circ",
3348
+ description: "Stop point",
3349
+ aliases: ["stop", "framed-circle"],
3350
+ internalAliases: ["stateEnd"],
3351
+ handler: dt
3352
+ },
3353
+ {
3354
+ semanticName: "Fork/Join",
3355
+ name: "Filled Rectangle",
3356
+ shortName: "fork",
3357
+ description: "Fork or join in process flow",
3358
+ aliases: ["join"],
3359
+ internalAliases: ["forkJoin"],
3360
+ handler: ke
3361
+ },
3362
+ {
3363
+ semanticName: "Collate",
3364
+ name: "Hourglass",
3365
+ shortName: "hourglass",
3366
+ description: "Represents a collate operation",
3367
+ aliases: ["hourglass", "collate"],
3368
+ handler: Ne
3369
+ },
3370
+ {
3371
+ semanticName: "Comment",
3372
+ name: "Curly Brace",
3373
+ shortName: "brace",
3374
+ description: "Adds a comment",
3375
+ aliases: ["comment", "brace-l"],
3376
+ handler: pe
3377
+ },
3378
+ {
3379
+ semanticName: "Comment Right",
3380
+ name: "Curly Brace",
3381
+ shortName: "brace-r",
3382
+ description: "Adds a comment",
3383
+ handler: me
3384
+ },
3385
+ {
3386
+ semanticName: "Comment with braces on both sides",
3387
+ name: "Curly Braces",
3388
+ shortName: "braces",
3389
+ description: "Adds a comment",
3390
+ handler: he
3391
+ },
3392
+ {
3393
+ semanticName: "Com Link",
3394
+ name: "Lightning Bolt",
3395
+ shortName: "bolt",
3396
+ description: "Communication link",
3397
+ aliases: ["com-link", "lightning-bolt"],
3398
+ handler: We
3399
+ },
3400
+ {
3401
+ semanticName: "Document",
3402
+ name: "Document",
3403
+ shortName: "doc",
3404
+ description: "Represents a document",
3405
+ aliases: ["doc", "document"],
3406
+ handler: At
3407
+ },
3408
+ {
3409
+ semanticName: "Delay",
3410
+ name: "Half-Rounded Rectangle",
3411
+ shortName: "delay",
3412
+ description: "Represents a delay",
3413
+ aliases: ["half-rounded-rectangle"],
3414
+ handler: Ae
3415
+ },
3416
+ {
3417
+ semanticName: "Direct Access Storage",
3418
+ name: "Horizontal Cylinder",
3419
+ shortName: "h-cyl",
3420
+ description: "Direct access storage",
3421
+ aliases: ["das", "horizontal-cylinder"],
3422
+ handler: wt
3423
+ },
3424
+ {
3425
+ semanticName: "Disk Storage",
3426
+ name: "Lined Cylinder",
3427
+ shortName: "lin-cyl",
3428
+ description: "Disk storage",
3429
+ aliases: ["disk", "lined-cylinder"],
3430
+ handler: Xe
3431
+ },
3432
+ {
3433
+ semanticName: "Display",
3434
+ name: "Curved Trapezoid",
3435
+ shortName: "curv-trap",
3436
+ description: "Represents a display",
3437
+ aliases: ["curved-trapezoid", "display"],
3438
+ handler: ge
3439
+ },
3440
+ {
3441
+ semanticName: "Divided Process",
3442
+ name: "Divided Rectangle",
3443
+ shortName: "div-rect",
3444
+ description: "Divided process shape",
3445
+ aliases: [
3446
+ "div-proc",
3447
+ "divided-rectangle",
3448
+ "divided-process"
3449
+ ],
3450
+ handler: Ce
3451
+ },
3452
+ {
3453
+ semanticName: "Extract",
3454
+ name: "Triangle",
3455
+ shortName: "tri",
3456
+ description: "Extraction process",
3457
+ aliases: ["extract", "triangle"],
3458
+ handler: kt
3459
+ },
3460
+ {
3461
+ semanticName: "Internal Storage",
3462
+ name: "Window Pane",
3463
+ shortName: "win-pane",
3464
+ description: "Internal storage",
3465
+ aliases: ["internal-storage", "window-pane"],
3466
+ handler: Mt
3467
+ },
3468
+ {
3469
+ semanticName: "Junction",
3470
+ name: "Filled Circle",
3471
+ shortName: "f-circ",
3472
+ description: "Junction point",
3473
+ aliases: ["junction", "filled-circle"],
3474
+ handler: Te
3475
+ },
3476
+ {
3477
+ semanticName: "Loop Limit",
3478
+ name: "Trapezoidal Pentagon",
3479
+ shortName: "notch-pent",
3480
+ description: "Loop limit step",
3481
+ aliases: ["loop-limit", "notched-pentagon"],
3482
+ handler: Et
3483
+ },
3484
+ {
3485
+ semanticName: "Manual File",
3486
+ name: "Flipped Triangle",
3487
+ shortName: "flip-tri",
3488
+ description: "Manual file operation",
3489
+ aliases: ["manual-file", "flipped-triangle"],
3490
+ handler: Oe
3491
+ },
3492
+ {
3493
+ semanticName: "Manual Input",
3494
+ name: "Sloped Rectangle",
3495
+ shortName: "sl-rect",
3496
+ description: "Manual input step",
3497
+ aliases: ["manual-input", "sloped-rectangle"],
3498
+ handler: st
3499
+ },
3500
+ {
3501
+ semanticName: "Multi-Document",
3502
+ name: "Stacked Document",
3503
+ shortName: "docs",
3504
+ description: "Multiple documents",
3505
+ aliases: [
3506
+ "documents",
3507
+ "st-doc",
3508
+ "stacked-document"
3509
+ ],
3510
+ handler: $e
3511
+ },
3512
+ {
3513
+ semanticName: "Multi-Process",
3514
+ name: "Stacked Rectangle",
3515
+ shortName: "st-rect",
3516
+ description: "Multiple processes",
3517
+ aliases: [
3518
+ "procs",
3519
+ "processes",
3520
+ "stacked-rectangle"
3521
+ ],
3522
+ handler: Qe
3523
+ },
3524
+ {
3525
+ semanticName: "Stored Data",
3526
+ name: "Bow Tie Rectangle",
3527
+ shortName: "bow-rect",
3528
+ description: "Stored data",
3529
+ aliases: ["stored-data", "bow-tie-rectangle"],
3530
+ handler: oe
3531
+ },
3532
+ {
3533
+ semanticName: "Summary",
3534
+ name: "Crossed Circle",
3535
+ shortName: "cross-circ",
3536
+ description: "Summary",
3537
+ aliases: ["summary", "crossed-circle"],
3538
+ handler: fe
3539
+ },
3540
+ {
3541
+ semanticName: "Tagged Document",
3542
+ name: "Tagged Document",
3543
+ shortName: "tag-doc",
3544
+ description: "Tagged document",
3545
+ aliases: ["tag-doc", "tagged-document"],
3546
+ handler: _t
3547
+ },
3548
+ {
3549
+ semanticName: "Tagged Process",
3550
+ name: "Tagged Rectangle",
3551
+ shortName: "tag-rect",
3552
+ description: "Tagged process",
3553
+ aliases: [
3554
+ "tagged-rectangle",
3555
+ "tag-proc",
3556
+ "tagged-process"
3557
+ ],
3558
+ handler: gt
3559
+ },
3560
+ {
3561
+ semanticName: "Paper Tape",
3562
+ name: "Flag",
3563
+ shortName: "flag",
3564
+ description: "Paper tape",
3565
+ aliases: ["paper-tape"],
3566
+ handler: jt
3567
+ },
3568
+ {
3569
+ semanticName: "Odd",
3570
+ name: "Odd",
3571
+ shortName: "odd",
3572
+ description: "Odd shape",
3573
+ internalAliases: ["rect_left_inv_arrow"],
3574
+ handler: rt
3575
+ },
3576
+ {
3577
+ semanticName: "Lined Document",
3578
+ name: "Lined Document",
3579
+ shortName: "lin-doc",
3580
+ description: "Lined document",
3581
+ aliases: ["lined-document"],
3582
+ handler: Ze
3583
+ }
3584
+ ], Yt = (/* @__PURE__ */ l(() => {
3585
+ let e = [...Object.entries({
3586
+ state: ut,
3587
+ choice: le,
3588
+ note: et,
3589
+ rectWithTitle: it,
3590
+ labelRect: Ve,
3591
+ iconSquare: Le,
3592
+ iconCircle: Fe,
3593
+ icon: Pe,
3594
+ iconRounded: Ie,
3595
+ imageSquare: Re,
3596
+ anchor: G,
3597
+ kanbanItem: Ut,
3598
+ mindmapCircle: qt,
3599
+ defaultMindmapNode: Kt,
3600
+ classBox: Bt,
3601
+ erBox: Ft,
3602
+ requirementBox: Vt
3603
+ }), ...Jt.flatMap((e) => [
3604
+ e.shortName,
3605
+ ..."aliases" in e ? e.aliases : [],
3606
+ ..."internalAliases" in e ? e.internalAliases : []
3607
+ ].map((t) => [t, e.handler]))];
3608
+ return Object.fromEntries(e);
3609
+ }, "generateShapeMap"))();
3610
+ function Xt(e) {
3611
+ return e in Yt;
3612
+ }
3613
+ l(Xt, "isValidShape");
3614
+ var Zt = /* @__PURE__ */ new Map();
3615
+ async function Qt(e, t, n) {
3616
+ let r, i;
3617
+ t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
3618
+ let a = t.shape ? Yt[t.shape] : void 0;
3619
+ if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
3620
+ if (t.link) {
3621
+ let o;
3622
+ n.config.securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o ?? null), i = await a(r, t, n);
3623
+ } else i = await a(e, t, n), r = i;
3624
+ return r.attr("data-look", f(t.look)), t.tooltip && i.attr("title", t.tooltip), Zt.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
3625
+ }
3626
+ l(Qt, "insertNode");
3627
+ var $t = /* @__PURE__ */ l((e, t) => {
3628
+ Zt.set(t.id, e);
3629
+ }, "setNodeElem"), en = /* @__PURE__ */ l(() => {
3630
+ Zt.clear();
3631
+ }, "clear"), tn = /* @__PURE__ */ l((e) => {
3632
+ let t = Zt.get(e.id);
3633
+ c.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3634
+ let n = e.diff || 0;
3635
+ return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
3636
+ }, "positionNode");
3637
+ //#endregion
3638
+ export { Qt as a, tn as c, ee as i, $t as l, en as n, Xt as o, M as r, C as s, te as t, T as u };