@pi-outpost/embed 0.15.0 → 0.16.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 (344) hide show
  1. package/dist/PdfViewer-BEdoeHbS.cjs +1 -0
  2. package/dist/{PdfViewer-BHP5lV-o.js → PdfViewer-DvoTT6jM.js} +5 -5
  3. package/dist/{abnfDiagram-N423BO3Z-WMOVzCba.js → abnfDiagram-VCTEODGH-CYuCmqs8.js} +6 -6
  4. package/dist/abnfDiagram-VCTEODGH-SjZtzoAs.cjs +1 -0
  5. package/dist/{arc-BBnpgwVQ.js → arc-CtDF59mU.js} +8 -6
  6. package/dist/arc-Dh2Zrypi.cjs +1 -0
  7. package/dist/architecture-7GRP2DOG-BtgYGXkq.cjs +1 -0
  8. package/dist/architecture-7GRP2DOG-DBQ9eYgM.js +3 -0
  9. package/dist/{architectureDiagram-T3A2C74G-BH-F8FzB.js → architectureDiagram-5GKGNRK7-D2-hmLgN.js} +327 -318
  10. package/dist/architectureDiagram-5GKGNRK7-wrDPdf3y.cjs +36 -0
  11. package/dist/blockDiagram-OSKFZWR5-Boo8WJyt.cjs +129 -0
  12. package/dist/blockDiagram-OSKFZWR5-Bvi4xQOy.js +1922 -0
  13. package/dist/{browser-CynjNfkw.js → browser-BmmG9yeb.js} +40 -34
  14. package/dist/{browser-CAyUayTx.cjs → browser-CUQnQIhV.cjs} +5 -5
  15. package/dist/c-AHDGPWiJ.cjs +1 -0
  16. package/dist/{c-Cw4FsAeJ.js → c-BCMbpktW.js} +42 -31
  17. package/dist/c4Diagram-7LVT6UL2-BCrC0RQo.cjs +38 -0
  18. package/dist/{c4Diagram-5PPSVZJV-Cfnl6tZM.js → c4Diagram-7LVT6UL2-CU4tNaf1.js} +751 -703
  19. package/dist/{channel-Bq-0ENlK.js → channel-Cuipqk56.js} +1 -1
  20. package/dist/channel-DcrLLvcO.cjs +1 -0
  21. package/dist/{chunk-JQJVKLGR-CZorbEP3.js → chunk-3NF5O7KM-B-2znsHr.js} +155 -115
  22. package/dist/chunk-3NF5O7KM-B-DpUW2r.cjs +168 -0
  23. package/dist/chunk-4HAMMTFA-CtkrBT7X.cjs +62 -0
  24. package/dist/chunk-4HAMMTFA-dRm_HqMI.js +4188 -0
  25. package/dist/chunk-75Z2AOVW-DOXS9ORa.cjs +2 -0
  26. package/dist/{chunk-NSK5VX7P-DPxIxDdV.js → chunk-75Z2AOVW-Eg_bFxBJ.js} +60 -96
  27. package/dist/chunk-DU6HZSFF-3Hhp3Fo5.cjs +127 -0
  28. package/dist/{chunk-I66GZJ75-DexfhZwA.js → chunk-DU6HZSFF-CaHy-FdL.js} +527 -478
  29. package/dist/{chunk-2GRJ4B5K-DzaxUd3W.cjs → chunk-F27PBJKO-3UPgzIlN.cjs} +1 -1
  30. package/dist/{chunk-2GRJ4B5K-DXwE-yr5.js → chunk-F27PBJKO-BriqLvNp.js} +4 -4
  31. package/dist/{chunk-KEIR6QF5-BVnxrdHo.js → chunk-FOHPRMQF-BNNbqxGX.js} +424 -356
  32. package/dist/chunk-FOHPRMQF-tmTlwTeH.cjs +161 -0
  33. package/dist/chunk-GMAD6QVW-B6uvB_wz.cjs +72 -0
  34. package/dist/{chunk-WRU74C26-D4huAZcy.js → chunk-GMAD6QVW-DCCx2Rg1.js} +503 -267
  35. package/dist/chunk-GVQU2GXP-BRMv2gX3.js +37 -0
  36. package/dist/chunk-GVQU2GXP-iZT_vNLp.cjs +1 -0
  37. package/dist/{chunk-GF5L2VYU-BPBMCCz5.js → chunk-HLEWEB6X-DlG0X171.js} +16 -16
  38. package/dist/{chunk-GF5L2VYU-DgG-wovM.cjs → chunk-HLEWEB6X-aqFoPl02.cjs} +4 -4
  39. package/dist/chunk-L3NEJ4N5-DkoFQHrz.js +245 -0
  40. package/dist/chunk-L3NEJ4N5-vW3qRjIb.cjs +1 -0
  41. package/dist/{chunk-7Z6QIM7H-CIoK8R3m.js → chunk-OSK3NFVY-CxjvZYNR.js} +232 -150
  42. package/dist/chunk-OSK3NFVY-DU2FGOlI.cjs +10 -0
  43. package/dist/chunk-P2QGCYS3-DWeL9spl.cjs +1 -0
  44. package/dist/{chunk-W5SLKNZC-Djmw_p6f.js → chunk-P2QGCYS3-uCJfSNHC.js} +19 -19
  45. package/dist/{chunk-KBJHAD2P-CthZVYG5.cjs → chunk-POPQ4Y6H-BRQPB1-9.cjs} +1 -1
  46. package/dist/{chunk-KBJHAD2P-BlQyFndF.js → chunk-POPQ4Y6H-D2Z11lA3.js} +3 -3
  47. package/dist/{chunk-4I5QYGJK-LCSWSJfh.cjs → chunk-PWAF6VOD-CZZKCekP.cjs} +1 -1
  48. package/dist/{chunk-4I5QYGJK-JZmvuONC.js → chunk-PWAF6VOD-j4sFqhOF.js} +7 -9
  49. package/dist/{chunk-6Q2QTUOP-C5n08EA-.cjs → chunk-SVP7TREG-CTKSOFlx.cjs} +2 -2
  50. package/dist/{chunk-6Q2QTUOP-DvJxCxMM.js → chunk-SVP7TREG-CtJsmAIb.js} +4 -4
  51. package/dist/{chunk-XXDRQBXY-DsVp5qjg.js → chunk-XXDRQBXY-fOrVUHLI.js} +1 -1
  52. package/dist/{chunk-XXDRQBXY-gWcN0uCZ.cjs → chunk-XXDRQBXY-yMT3rT5Y.cjs} +1 -1
  53. package/dist/chunk-ZLD2IHE6-BZxKwfuv.cjs +231 -0
  54. package/dist/{chunk-5RXB4S5H-JthGygoA.js → chunk-ZLD2IHE6-tqumZV0E.js} +44 -48
  55. package/dist/classDiagram-CYGNFDIV-CQLOfBmz.cjs +1 -0
  56. package/dist/classDiagram-CYGNFDIV-DIu4rTyR.js +30 -0
  57. package/dist/classDiagram-v2-TLXNO2FR-BsYK4QnI.js +30 -0
  58. package/dist/classDiagram-v2-TLXNO2FR-CQLOfBmz.cjs +1 -0
  59. package/dist/{core-BO2hTFeF.js → core-B9pe29T7.js} +8 -7
  60. package/dist/core-BrupIPpc.cjs +3 -0
  61. package/dist/{cose-bilkent-JH36ORCC-BFo5zomD.js → cose-bilkent-JH36ORCC-1Ad4jvll.js} +65 -62
  62. package/dist/cose-bilkent-JH36ORCC-Cc2qvpLA.cjs +1 -0
  63. package/dist/{cpp-CeyO6lBG.js → cpp-CL2nTisp.js} +25 -14
  64. package/dist/cpp-DpAsh4uT.cjs +1 -0
  65. package/dist/{csharp-Ck6Fet_o.js → csharp-CK75iOSn.js} +37 -37
  66. package/dist/csharp-TOr_W-v9.cjs +1 -0
  67. package/dist/css-4wogsuks.cjs +1 -0
  68. package/dist/{css-ClSGJRju.js → css-DJr8nnnu.js} +6 -1
  69. package/dist/cynefin-OW5HDTMX-BmLJra-4.cjs +1 -0
  70. package/dist/cynefin-OW5HDTMX-CfYr_cVN.js +3 -0
  71. package/dist/{cynefinDiagram-MW4NZA55-CB4ZzMEN.js → cynefinDiagram-5FMLGOSQ-BSRTnQvp.js} +29 -23
  72. package/dist/cynefinDiagram-5FMLGOSQ-GvGZco52.cjs +62 -0
  73. package/dist/{cytoscape.esm-asYnbYTy.js → cytoscape.esm-Cq7KPj0t.js} +2480 -2480
  74. package/dist/cytoscape.esm-uHsEX1XI.cjs +321 -0
  75. package/dist/{dagre-BpqwxFKp.js → dagre-BMKbPnPh.js} +689 -456
  76. package/dist/dagre-EEW2OxRU.cjs +1 -0
  77. package/dist/dagre-OS7QT2EB-DFi6nnZc.cjs +4 -0
  78. package/dist/dagre-OS7QT2EB-DcpSzxsR.js +425 -0
  79. package/dist/{defaultLocale-up9-vqhM.js → defaultLocale-B4ncmkvI.js} +1 -4
  80. package/dist/defaultLocale-ybN1Vtvg.cjs +1 -0
  81. package/dist/diagram-S7CK7UJ4-BA67ZpiO.cjs +30 -0
  82. package/dist/{diagram-7IWD3JNH-Cschro8T.js → diagram-S7CK7UJ4-Cx2fQdp6.js} +39 -38
  83. package/dist/{diagram-UB23O5K3-D-yL2fvd.js → diagram-UQ7AKVKN-CvQH-Box.js} +12 -12
  84. package/dist/diagram-UQ7AKVKN-OteiyKD9.cjs +41 -0
  85. package/dist/{diagram-B4RE2ZJO-DKbKOwkP.cjs → diagram-VSXAHHWV-BjsZz1JJ.cjs} +1 -1
  86. package/dist/{diagram-B4RE2ZJO-B94mhDmV.js → diagram-VSXAHHWV-CCpCVOIq.js} +6 -6
  87. package/dist/diagram-VX7I27RA-Bx9fEhR0.cjs +24 -0
  88. package/dist/{diagram-Q27KOJAE-Cqn3IliP.js → diagram-VX7I27RA-HE5nQAXN.js} +64 -62
  89. package/dist/{diagram-LBJQPF4R-D0MEwBt6.js → diagram-Z3DM3KII-BEu4c4pP.js} +11 -11
  90. package/dist/diagram-Z3DM3KII-jy895UiZ.cjs +24 -0
  91. package/dist/{dist-D6LMt8nW.js → dist-Dtt9eY41.js} +1 -1
  92. package/dist/{dist-DNGlMOWd.cjs → dist-Dwv2VYAL.cjs} +1 -1
  93. package/dist/{ebnfDiagram-BXEA7PRR-B2HDWFYF.js → ebnfDiagram-PWID7BFC-B06rGL3A.js} +6 -6
  94. package/dist/ebnfDiagram-PWID7BFC-BQZKHpUr.cjs +1 -0
  95. package/dist/erDiagram-2YWLMYGG-CuEEIv1I.cjs +99 -0
  96. package/dist/{erDiagram-JOGREHBK-Badv_hu8.js → erDiagram-2YWLMYGG-IL4IhNXb.js} +1046 -807
  97. package/dist/eventmodeling-NTZA5JFV-D57pc07U.cjs +1 -0
  98. package/dist/eventmodeling-NTZA5JFV-DUbGOrrF.js +3 -0
  99. package/dist/flowDiagram-T62WH6J4-DdJo3Te1.js +16 -0
  100. package/dist/flowDiagram-T62WH6J4-YyzE7N5Z.cjs +1 -0
  101. package/dist/{ganttDiagram-PKOTCBZU-By0w7TmO.js → ganttDiagram-EL5Y4UJY-CIBhrOW6.js} +26 -36
  102. package/dist/ganttDiagram-EL5Y4UJY-PTWIufq8.cjs +292 -0
  103. package/dist/gitGraph-4MIJSDKK-CY4IuhXZ.js +3 -0
  104. package/dist/gitGraph-4MIJSDKK-D97vaDci.cjs +1 -0
  105. package/dist/{gitGraphDiagram-DS77QQ5N-B1uJYchG.js → gitGraphDiagram-WWUBYQGX-CjeedV4i.js} +16 -12
  106. package/dist/{gitGraphDiagram-DS77QQ5N-Fw8a66di.cjs → gitGraphDiagram-WWUBYQGX-D5yozoaq.cjs} +3 -3
  107. package/dist/{go-rg7jg1mu.js → go-B2E3I9E3.js} +4 -0
  108. package/dist/{go-D-pz-dmd.cjs → go-BDkypVKn.cjs} +1 -1
  109. package/dist/{graphlib-CkkG5MuS.cjs → graphlib-BaETKKSa.cjs} +1 -1
  110. package/dist/{graphlib-B0GbLif1.js → graphlib-CQa_B3rm.js} +5 -5
  111. package/dist/info-A6RAGUB7-Cx39sHYM.js +3 -0
  112. package/dist/info-A6RAGUB7-DT06-FB3.cjs +1 -0
  113. package/dist/{infoDiagram-6WML65LV-CkWm_KTB.js → infoDiagram-FKFFQAWI-BalzsRT4.js} +6 -6
  114. package/dist/infoDiagram-FKFFQAWI-NPtQF4vB.cjs +2 -0
  115. package/dist/init-BJdqMO10.cjs +1 -0
  116. package/dist/{init-CirqLVcp.js → init-CuXVI8k2.js} +1 -3
  117. package/dist/{ishikawaDiagram-WSZJBQD7-DTeFqC8L.js → ishikawaDiagram-5VMMS53U-BC2vrJSo.js} +14 -14
  118. package/dist/{ishikawaDiagram-WSZJBQD7-CQWHhozU.cjs → ishikawaDiagram-5VMMS53U-DN23jmFw.cjs} +3 -3
  119. package/dist/java-DFBMvIUR.cjs +1 -0
  120. package/dist/{java-HguKEfA2.js → java-T8Nr25pJ.js} +27 -22
  121. package/dist/{javascript-C8NCH8DE.js → javascript-CIP6I0eT.js} +6 -4
  122. package/dist/javascript-Gn0piXHk.cjs +1 -0
  123. package/dist/{journeyDiagram-NVQOT4AX-Cg6C3dFy.js → journeyDiagram-EYS64GPL-CLMBONXO.js} +14 -14
  124. package/dist/{journeyDiagram-NVQOT4AX-DLomv_vN.cjs → journeyDiagram-EYS64GPL-Co9rp-Q1.cjs} +3 -3
  125. package/dist/json-DOqjN5nI.js +42 -0
  126. package/dist/json-LMrXTXZM.cjs +1 -0
  127. package/dist/{kanban-definition-27J2QSJJ-B9Fog3W7.cjs → kanban-definition-UXKFOSKX-DzKPVjAq.cjs} +5 -5
  128. package/dist/{kanban-definition-27J2QSJJ-Bb7nb0gX.js → kanban-definition-UXKFOSKX-SNTHZo65.js} +31 -31
  129. package/dist/katex-CEF6MvLx.cjs +257 -0
  130. package/dist/katex-ohtLbxXc.js +21977 -0
  131. package/dist/{line-yqcJYv29.js → line-4_dF7rOW.js} +2 -2
  132. package/dist/{line-pOZ7Sdj7.cjs → line-D6gR53Af.cjs} +1 -1
  133. package/dist/{linear-CVhyaVzf.js → linear-C1gZJMVz.js} +8 -9
  134. package/dist/linear-Nt9BuHfn.cjs +1 -0
  135. package/dist/{markdown-CzgRofaE.js → markdown-BW-hB0s4.js} +2 -5
  136. package/dist/markdown-CTkHoGys.cjs +1 -0
  137. package/dist/{mermaid-parser.core-Cgsz0CdK.cjs → mermaid-parser.core-CBiDgMLi.cjs} +2 -2
  138. package/dist/{mermaid-parser.core-B8DQcCaz.js → mermaid-parser.core-DLNlSmfj.js} +31 -31
  139. package/dist/mermaid.core-B3QcBB1O.cjs +43 -0
  140. package/dist/mermaid.core-BIqYA7q2.js +3012 -0
  141. package/dist/{mindmap-definition-FAOFIHXS-9wa1P9NT.cjs → mindmap-definition-THT77NOG-Bo3D8RRT.cjs} +4 -4
  142. package/dist/{mindmap-definition-FAOFIHXS-DFG0Zs_1.js → mindmap-definition-THT77NOG-BtDuvAQ_.js} +27 -29
  143. package/dist/{ordinal-D0iNZ43g.cjs → ordinal-Bm_chml2.cjs} +1 -1
  144. package/dist/{ordinal-C1oQzsBn.js → ordinal-D3SPD7Kk.js} +2 -2
  145. package/dist/packet-AYTQ26CC-BGX2McoE.cjs +1 -0
  146. package/dist/packet-AYTQ26CC-IgkU2VYK.js +3 -0
  147. package/dist/path-DIS6ck99.cjs +1 -0
  148. package/dist/{path-mKa7UESy.js → path-PGqhG0Rz.js} +10 -11
  149. package/dist/{pdf-DyDm1M1B.js → pdf-B6zVkETi.js} +182 -220
  150. package/dist/pdf-cYqATYeW.cjs +54 -0
  151. package/dist/pegDiagram-XKGWAZYB-Cx-wZf4B.cjs +1 -0
  152. package/dist/{pegDiagram-VL7TDLO6-XOjprD-j.js → pegDiagram-XKGWAZYB-Ucd8o52_.js} +6 -6
  153. package/dist/{php-C9FOMGEA.js → php-Cn7gPoxt.js} +6 -0
  154. package/dist/{php-j6EhDZDE.cjs → php-DQmdBizx.cjs} +1 -1
  155. package/dist/pi-outpost-embed.cjs +47 -47
  156. package/dist/pi-outpost-embed.js +3750 -3717
  157. package/dist/pie-WAS4IAKB-CEyPj3UJ.cjs +1 -0
  158. package/dist/pie-WAS4IAKB-odE0A7fM.js +3 -0
  159. package/dist/pieDiagram-E7YTZNPT-BC-pW4cK.cjs +39 -0
  160. package/dist/{pieDiagram-7S7Q4E2Y-Cwe7fXgJ.js → pieDiagram-E7YTZNPT-DSx5wFMY.js} +20 -22
  161. package/dist/{python-DKAazMIE.js → python-BUfdXZqP.js} +6 -6
  162. package/dist/python-CrsffQw-.cjs +1 -0
  163. package/dist/{quadrantDiagram-CIZ2JOQS-CbaMHmYB.js → quadrantDiagram-AXDQQJYC-D8Y50xmh.js} +11 -11
  164. package/dist/{quadrantDiagram-CIZ2JOQS-CDfrU0dm.cjs → quadrantDiagram-AXDQQJYC-zPfqM9Q4.cjs} +2 -2
  165. package/dist/radar-RG4KPBEZ-ClYJNseM.cjs +1 -0
  166. package/dist/radar-RG4KPBEZ-DqbNqlJH.js +3 -0
  167. package/dist/railroad-74A4TZTK-Dzt4afqg.js +3 -0
  168. package/dist/railroad-74A4TZTK-hSKcr2y6.cjs +1 -0
  169. package/dist/railroad-abnf-HS5TGJTU-gq2RybTO.js +3 -0
  170. package/dist/railroad-abnf-HS5TGJTU-irEXz0eI.cjs +1 -0
  171. package/dist/railroad-ebnf-LZEXJU2U-CG19A1Xj.cjs +1 -0
  172. package/dist/railroad-ebnf-LZEXJU2U-D-pNpFrj.js +3 -0
  173. package/dist/railroad-peg-WCYAUIDC-BLdK3QCV.cjs +1 -0
  174. package/dist/railroad-peg-WCYAUIDC-Bo7wfe--.js +3 -0
  175. package/dist/railroadDiagram-O6MQD6OU-3JsgWyLe.cjs +1 -0
  176. package/dist/{railroadDiagram-AXF67PYL-CVXAv-Uu.js → railroadDiagram-O6MQD6OU-BTg2KtZO.js} +6 -6
  177. package/dist/{requirementDiagram-LRYGKXZP-Bzik4kgS.js → requirementDiagram-IS5BZ75X-C1OrS7DV.js} +25 -24
  178. package/dist/{requirementDiagram-LRYGKXZP-BGlGCftH.cjs → requirementDiagram-IS5BZ75X-D1BMLxZg.cjs} +4 -4
  179. package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
  180. package/dist/{rolldown-runtime-mLOUI7ql.cjs → rolldown-runtime-DF3sbh8G.cjs} +1 -1
  181. package/dist/{rough.esm-r0QOSzHM.cjs → rough.esm-ChRLLRha.cjs} +1 -1
  182. package/dist/{rough.esm-C5XyeDCN.js → rough.esm-D2JJJ0Ot.js} +60 -51
  183. package/dist/{ruby-ClR4zp-1.cjs → ruby-B1inj-Q8.cjs} +1 -1
  184. package/dist/{ruby-BAUeZQKZ.js → ruby-DYVKXPXk.js} +1 -1
  185. package/dist/{rust-DiTjMjP5.js → rust-BihXqTNi.js} +38 -25
  186. package/dist/rust-D39kF6re.cjs +1 -0
  187. package/dist/{sankeyDiagram-W5VNT64P-OeLUMuT6.cjs → sankeyDiagram-P5KCCOFB-D5BHxcxB.cjs} +2 -2
  188. package/dist/{sankeyDiagram-W5VNT64P-_8xZpo45.js → sankeyDiagram-P5KCCOFB-DTnkE4oO.js} +17 -15
  189. package/dist/{scss-CckAvQOx.js → scss-CzfrZ5cc.js} +6 -1
  190. package/dist/scss-t-vKjRr4.cjs +1 -0
  191. package/dist/{sequenceDiagram-SI44F4Z6-X4mzY21C.js → sequenceDiagram-WJ2MYXX4-Ba-z2rSx.js} +36 -48
  192. package/dist/sequenceDiagram-WJ2MYXX4-DlVJIIIl.cjs +162 -0
  193. package/dist/{sizeCapture-X5ZJPWSS-DKbHZNyz.js → sizeCapture-INFHLROL-B5Lg3qGn.js} +1 -1
  194. package/dist/{src-DJ4x3y2O.js → src-BMMAFeC3.js} +288 -291
  195. package/dist/src-D9o9TOtH.cjs +1 -0
  196. package/dist/{stateDiagram-OKZ733FA-CMM1orC_.js → stateDiagram-XQSTLZYL-BtcUS_dg.js} +21 -21
  197. package/dist/stateDiagram-XQSTLZYL-mSOJx_Wv.cjs +1 -0
  198. package/dist/stateDiagram-v2-IH3M54BS-DAa6SuH4.cjs +1 -0
  199. package/dist/stateDiagram-v2-IH3M54BS-E_Rhduzm.js +30 -0
  200. package/dist/swimlanes-V6O3JKXN-BooYLGtP.cjs +1 -0
  201. package/dist/{swimlanes-SLNWSIFB-C7LLK1V2.js → swimlanes-V6O3JKXN-xxlpXv1f.js} +1022 -1109
  202. package/dist/swimlanesDiagram-JKAHXJPX-BaMCBEUQ.cjs +8 -0
  203. package/dist/swimlanesDiagram-JKAHXJPX-DyQwD-QO.js +30 -0
  204. package/dist/timeline-definition-24CTP7MA-D6sSmprF.cjs +120 -0
  205. package/dist/{timeline-definition-Z64GVDOM-Cgc-2OmU.js → timeline-definition-24CTP7MA-Dr8ouzBO.js} +19 -19
  206. package/dist/treeView-Q6P3EWNA-BmkQxkVU.cjs +1 -0
  207. package/dist/treeView-Q6P3EWNA-CPEEGmNv.js +3 -0
  208. package/dist/treemap-WGGIJYW6-CGULpntJ.js +3 -0
  209. package/dist/treemap-WGGIJYW6-Dmi9HAR8.cjs +1 -0
  210. package/dist/typescript-BarIi8q9.cjs +1 -0
  211. package/dist/{typescript-mdYq8uqf.js → typescript-C93MG6Zk.js} +26 -24
  212. package/dist/vennDiagram-4TSXK5OY-D5MMYyff.cjs +34 -0
  213. package/dist/{vennDiagram-T6HMQDX7-BWj1BhMh.js → vennDiagram-4TSXK5OY-i6B1rhUA.js} +15 -15
  214. package/dist/wardley-WFR3VGLG-9zHZLKh9.js +3 -0
  215. package/dist/wardley-WFR3VGLG-B6YvLPJA.cjs +1 -0
  216. package/dist/{wardleyDiagram-T6FBY63Y-d_t4oVLE.js → wardleyDiagram-VM6X3IG4-1SFyFcXg.js} +46 -46
  217. package/dist/{wardleyDiagram-T6FBY63Y-OomvVIFj.cjs → wardleyDiagram-VM6X3IG4-DzZNzmB8.cjs} +36 -36
  218. package/dist/{workspacePath-BScUv3M_.js → workspacePath-CfDl0V4n.js} +1 -1
  219. package/dist/{workspacePath-kqTwbSP1.cjs → workspacePath-EgAFT36l.cjs} +1 -1
  220. package/dist/{xml-BamqaQOf.cjs → xml-B0vjUBag.cjs} +1 -1
  221. package/dist/{xml-DVYfB8uY.js → xml-GxASmsT7.js} +2 -6
  222. package/dist/{xychartDiagram-ELKLHX3M-BOSOdubI.cjs → xychartDiagram-S5SC5T6Z-BOsjfYJh.cjs} +4 -4
  223. package/dist/{xychartDiagram-ELKLHX3M-Ce-ai3a8.js → xychartDiagram-S5SC5T6Z-D6QDBBGJ.js} +263 -158
  224. package/dist/{yaml-_1BORZTQ.js → yaml-CHhF1kKQ.js} +25 -25
  225. package/dist/yaml-DZS9gzaB.cjs +1 -0
  226. package/package.json +2 -2
  227. package/dist/PdfViewer-BBmVq73v.cjs +0 -1
  228. package/dist/abnfDiagram-N423BO3Z-DOZfbvMH.cjs +0 -1
  229. package/dist/arc-DcUn9_NX.cjs +0 -1
  230. package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +0 -1
  231. package/dist/architecture-TIHT7OUA-DDyMqjR1.js +0 -3
  232. package/dist/architectureDiagram-T3A2C74G-RJUsi-Sx.cjs +0 -36
  233. package/dist/blockDiagram-VBNYF7ZC-Bz8oqXJQ.cjs +0 -132
  234. package/dist/blockDiagram-VBNYF7ZC-DYMmF9bV.js +0 -3160
  235. package/dist/c-4QgYfi8K.cjs +0 -1
  236. package/dist/c4Diagram-5PPSVZJV-DM6x-BYG.cjs +0 -10
  237. package/dist/channel-DoxF0tZj.cjs +0 -1
  238. package/dist/chunk-3NCLNEKW-CO28EZBG.cjs +0 -1
  239. package/dist/chunk-3NCLNEKW-dTH67Ne_.js +0 -10
  240. package/dist/chunk-5RXB4S5H-B5b3tdRl.cjs +0 -231
  241. package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +0 -82
  242. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +0 -1
  243. package/dist/chunk-7Z6QIM7H-Ctljl7Vq.cjs +0 -10
  244. package/dist/chunk-I66GZJ75-CrpH-Rmq.cjs +0 -127
  245. package/dist/chunk-J7OUQ5F2-DhMpZbAr.js +0 -57
  246. package/dist/chunk-J7OUQ5F2-b-MfW4O9.cjs +0 -1
  247. package/dist/chunk-JQJVKLGR-2AQwaWbm.cjs +0 -156
  248. package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +0 -161
  249. package/dist/chunk-NSK5VX7P-D5CepZHI.cjs +0 -2
  250. package/dist/chunk-QR6OTTB3-CQ_jjYb-.js +0 -3736
  251. package/dist/chunk-QR6OTTB3-DSg3ZWNW.cjs +0 -62
  252. package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +0 -1
  253. package/dist/chunk-RYQCIY6F-C-YC3QS_.js +0 -239
  254. package/dist/chunk-UBXNYLIW-BBncokef.js +0 -32
  255. package/dist/chunk-UBXNYLIW-DlNyCWjj.cjs +0 -1
  256. package/dist/chunk-W5SLKNZC-bHBkM2CL.cjs +0 -1
  257. package/dist/chunk-WRU74C26-9KZxhHnn.cjs +0 -70
  258. package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +0 -32
  259. package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +0 -1146
  260. package/dist/classDiagram-JCYQIIEL-DeHc-x8i.cjs +0 -1
  261. package/dist/classDiagram-JCYQIIEL-DlHKjVPc.js +0 -30
  262. package/dist/classDiagram-v2-OCEON4UE-DeHc-x8i.cjs +0 -1
  263. package/dist/classDiagram-v2-OCEON4UE-DlhHN57j.js +0 -30
  264. package/dist/core-2nR1zkKb.cjs +0 -3
  265. package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +0 -1
  266. package/dist/cpp-BUtp-HE2.cjs +0 -1
  267. package/dist/csharp-BJu4kEpt.cjs +0 -1
  268. package/dist/css-DeFr0lev.cjs +0 -1
  269. package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +0 -1
  270. package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +0 -3
  271. package/dist/cynefinDiagram-MW4NZA55-By102s5I.cjs +0 -62
  272. package/dist/cytoscape.esm-ByjvpCPI.cjs +0 -321
  273. package/dist/dagre-BBlCxSvR.cjs +0 -1
  274. package/dist/dagre-VZM6K2ZE-5zrH2LqV.js +0 -328
  275. package/dist/dagre-VZM6K2ZE-CNe7-jhy.cjs +0 -4
  276. package/dist/defaultLocale-u9yUoUmE.cjs +0 -1
  277. package/dist/diagram-7IWD3JNH-CSzLXhRw.cjs +0 -30
  278. package/dist/diagram-LBJQPF4R-DgD0a56I.cjs +0 -24
  279. package/dist/diagram-Q27KOJAE-DNWfiaD5.cjs +0 -24
  280. package/dist/diagram-UB23O5K3-DguyM6v_.cjs +0 -41
  281. package/dist/ebnfDiagram-BXEA7PRR-DuJrkFn-.cjs +0 -1
  282. package/dist/erDiagram-JOGREHBK-DtyaQROs.cjs +0 -85
  283. package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +0 -3
  284. package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +0 -1
  285. package/dist/flowDiagram-UKHOOZJN-C7t5VpYH.js +0 -17
  286. package/dist/flowDiagram-UKHOOZJN-CdkElxh8.cjs +0 -1
  287. package/dist/ganttDiagram-PKOTCBZU-CFgz4r57.cjs +0 -292
  288. package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +0 -3
  289. package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +0 -1
  290. package/dist/info-DKCQHKI2-BEYhR6ip.cjs +0 -1
  291. package/dist/info-DKCQHKI2-BPF6-pOb.js +0 -3
  292. package/dist/infoDiagram-6WML65LV-CB6z_iKE.cjs +0 -2
  293. package/dist/init-07zIhv_j.cjs +0 -1
  294. package/dist/java-CUN_usaq.cjs +0 -1
  295. package/dist/javascript-UZXSyUuu.cjs +0 -1
  296. package/dist/json-Cp01TR_B.js +0 -36
  297. package/dist/json-usH_MUzR.cjs +0 -1
  298. package/dist/linear-Cl2-QuPP.cjs +0 -1
  299. package/dist/map-CwPlMWPw.cjs +0 -1
  300. package/dist/map-DU12fF3s.js +0 -241
  301. package/dist/markdown-qeo95R0i.cjs +0 -1
  302. package/dist/mermaid.core-BIq27e0A.js +0 -1068
  303. package/dist/mermaid.core-DpsSj3iy.cjs +0 -10
  304. package/dist/packet-7NZHBO7P-DqvBYJTR.js +0 -3
  305. package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +0 -1
  306. package/dist/path-Kklx0M1v.cjs +0 -1
  307. package/dist/pdf-aU0TN69t.cjs +0 -54
  308. package/dist/pegDiagram-VL7TDLO6-B4FslsmM.cjs +0 -1
  309. package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +0 -1
  310. package/dist/pie-RZYD4A2V-qnruo9sH.js +0 -3
  311. package/dist/pieDiagram-7S7Q4E2Y-CNzUVS2d.cjs +0 -39
  312. package/dist/python-BYJzTRkK.cjs +0 -1
  313. package/dist/radar-I7S5WNFK-Dqdssa34.cjs +0 -1
  314. package/dist/radar-I7S5WNFK-np_pJCO-.js +0 -3
  315. package/dist/railroad-3IZDKUUU-NILjDQft.cjs +0 -1
  316. package/dist/railroad-3IZDKUUU-sjKBeXxB.js +0 -3
  317. package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +0 -1
  318. package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +0 -3
  319. package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +0 -3
  320. package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +0 -1
  321. package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +0 -1
  322. package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +0 -3
  323. package/dist/railroadDiagram-AXF67PYL-EO1cBHEj.cjs +0 -1
  324. package/dist/rust-ghVvEWhm.cjs +0 -1
  325. package/dist/scss-CKxh5HRg.cjs +0 -1
  326. package/dist/sequenceDiagram-SI44F4Z6-CuaCFBtR.cjs +0 -162
  327. package/dist/src-CR--T_NF.cjs +0 -1
  328. package/dist/stateDiagram-OKZ733FA-Dq6hI_pq.cjs +0 -1
  329. package/dist/stateDiagram-v2-UEYNNEHI-BmWUstzl.js +0 -30
  330. package/dist/stateDiagram-v2-UEYNNEHI-DZULVhS9.cjs +0 -1
  331. package/dist/swimlanes-SLNWSIFB-BMS6R0BK.cjs +0 -1
  332. package/dist/swimlanesDiagram-ULZ7WXOC-DxHKX_pj.cjs +0 -8
  333. package/dist/swimlanesDiagram-ULZ7WXOC-uXMuqsao.js +0 -31
  334. package/dist/timeline-definition-Z64GVDOM-PPJqDdOy.cjs +0 -120
  335. package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +0 -1
  336. package/dist/treeView-QDETBFTQ-DdpEhzZX.js +0 -3
  337. package/dist/treemap-6X3UGDF4-BeCuRpkA.js +0 -3
  338. package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +0 -1
  339. package/dist/typescript-clWeqIBY.cjs +0 -1
  340. package/dist/vennDiagram-T6HMQDX7-DqY7YgNx.cjs +0 -34
  341. package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +0 -1
  342. package/dist/wardley-OPB4EBWU-DlIk2K0J.js +0 -3
  343. package/dist/yaml-bAgWofBg.cjs +0 -1
  344. /package/dist/{sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs → sizeCapture-INFHLROL-bJ2ZX4Du.cjs} +0 -0
@@ -1,3736 +0,0 @@
1
- import { n as e } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
2
- import { m as t, p as n } from "./src-DJ4x3y2O.js";
3
- import { A as r, B as i, M as a, T as o, b as s, g as c, x as l, z as u } from "./chunk-I66GZJ75-DexfhZwA.js";
4
- import { a as d, r as f, u as p } from "./chunk-NSK5VX7P-DPxIxDdV.js";
5
- import { t as m } from "./chunk-4I5QYGJK-JZmvuONC.js";
6
- import { n as h } from "./chunk-WRU74C26-D4huAZcy.js";
7
- import { n as g, t as _ } from "./chunk-UBXNYLIW-BBncokef.js";
8
- import { a as v, i as y, r as b, t as x } from "./chunk-W5SLKNZC-Djmw_p6f.js";
9
- import { t as S } from "./rough.esm-C5XyeDCN.js";
10
- //#region ../node_modules/mermaid/dist/chunks/mermaid.core/chunk-QR6OTTB3.mjs
11
- var C = /* @__PURE__ */ e(async (e, t, r) => {
12
- let i, a = t.useHtmlLabels || c(l()?.htmlLabels);
13
- i = r || "node default";
14
- let o = e.insert("g").attr("class", i).attr("id", t.domId || t.id), s = o.insert("g").attr("class", "label").attr("style", p(t.labelStyle)), f;
15
- f = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
16
- let m = !!t.icon || !!t.img, g = t.labelType === "markdown", v = await h(s, u(d(f), l()), {
17
- useHtmlLabels: a,
18
- width: t.width || l().flowchart?.wrappingWidth,
19
- classes: g ? "markdown-node-label" : "",
20
- style: t.labelStyle,
21
- addSvgBackground: m,
22
- markdown: g
23
- }, l()), y = v.getBBox(), b = (t?.padding ?? 0) / 2;
24
- if (a) {
25
- let e = v.children[0], t = n(v);
26
- await _(e, f), y = e.getBoundingClientRect(), t.attr("width", y.width), t.attr("height", y.height);
27
- }
28
- return a ? s.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : s.attr("transform", "translate(0, " + -y.height / 2 + ")"), t.centerLabel && s.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), s.insert("rect", ":first-child"), {
29
- shapeSvg: o,
30
- bbox: y,
31
- halfPadding: b,
32
- label: s
33
- };
34
- }, "labelHelper"), w = /* @__PURE__ */ e(async (e, t, r) => {
35
- let i = r.useHtmlLabels ?? o(l()), a = e.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await h(a, u(d(t), l()), {
36
- useHtmlLabels: i,
37
- width: r.width || l()?.flowchart?.wrappingWidth,
38
- style: r.labelStyle,
39
- addSvgBackground: !!r.icon || !!r.img
40
- }), c = s.getBBox(), f = r.padding / 2;
41
- if (o(l())) {
42
- let e = s.children[0], t = n(s);
43
- c = e.getBoundingClientRect(), t.attr("width", c.width), t.attr("height", c.height);
44
- }
45
- return i ? a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")") : a.attr("transform", "translate(0, " + -c.height / 2 + ")"), r.centerLabel && a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), a.insert("rect", ":first-child"), {
46
- shapeSvg: e,
47
- bbox: c,
48
- halfPadding: f,
49
- label: a
50
- };
51
- }, "insertLabel"), T = /* @__PURE__ */ e((e, t) => {
52
- let n = t.node().getBBox();
53
- e.width = n.width, e.height = n.height;
54
- }, "updateNodeBounds"), E = /* @__PURE__ */ e((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
55
- function D(e) {
56
- let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
57
- return t.push("Z"), t.join(" ");
58
- }
59
- e(D, "createPathFromPoints");
60
- function O(e, t, n, r, i, a) {
61
- let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
62
- for (let t = 0; t <= 50; t++) {
63
- let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
64
- o.push({
65
- x: n,
66
- y: r
67
- });
68
- }
69
- return o;
70
- }
71
- e(O, "generateFullSineWavePoints");
72
- function k(e, t, n, r, i, a) {
73
- let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
74
- for (let i = 0; i < r; i++) {
75
- let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
76
- o.push({
77
- x: -a,
78
- y: -l
79
- });
80
- }
81
- return o;
82
- }
83
- e(k, "generateCirclePoints");
84
- function A(t) {
85
- let n = Array.from(t.childNodes).filter((e) => e.tagName === "path"), r = document.createElementNS("http://www.w3.org/2000/svg", "path"), i = n.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
86
- r.setAttribute("d", i);
87
- let a = n.find((e) => e.getAttribute("fill") !== "none"), o = n.find((e) => e.getAttribute("stroke") !== "none"), s = /* @__PURE__ */ e((e, t) => e?.getAttribute(t) ?? void 0, "getAttr");
88
- if (a) {
89
- let e = {
90
- fill: s(a, "fill"),
91
- "fill-opacity": s(a, "fill-opacity") ?? "1"
92
- };
93
- Object.entries(e).forEach(([e, t]) => {
94
- t && r.setAttribute(e, t);
95
- });
96
- }
97
- if (o) {
98
- let e = {
99
- stroke: s(o, "stroke"),
100
- "stroke-width": s(o, "stroke-width") ?? "1",
101
- "stroke-opacity": s(o, "stroke-opacity") ?? "1"
102
- };
103
- Object.entries(e).forEach(([e, t]) => {
104
- t && r.setAttribute(e, t);
105
- });
106
- }
107
- let c = document.createElementNS("http://www.w3.org/2000/svg", "g");
108
- return c.appendChild(r), c;
109
- }
110
- e(A, "mergePaths");
111
- var j = /* @__PURE__ */ e((e, t) => {
112
- 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;
113
- 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), {
114
- x: n + c,
115
- y: r + l
116
- };
117
- }, "intersectRect"), M = /* @__PURE__ */ e(async (e, t, n, r = !1, i = !1) => {
118
- let a = t || "";
119
- typeof a == "object" && (a = a[0]);
120
- let s = l(), c = o(s);
121
- return await h(e, a, {
122
- style: n,
123
- isTitle: r,
124
- useHtmlLabels: c,
125
- markdown: !1,
126
- isNode: i,
127
- width: Infinity
128
- }, s);
129
- }, "createLabel"), N = /* @__PURE__ */ e((e, t, n, r, i) => [
130
- "M",
131
- e + i,
132
- t,
133
- "H",
134
- e + n - i,
135
- "A",
136
- i,
137
- i,
138
- 0,
139
- 0,
140
- 1,
141
- e + n,
142
- t + i,
143
- "V",
144
- t + r - i,
145
- "A",
146
- i,
147
- i,
148
- 0,
149
- 0,
150
- 1,
151
- e + n - i,
152
- t + r,
153
- "H",
154
- e + i,
155
- "A",
156
- i,
157
- i,
158
- 0,
159
- 0,
160
- 1,
161
- e,
162
- t + r - i,
163
- "V",
164
- t + i,
165
- "A",
166
- i,
167
- i,
168
- 0,
169
- 0,
170
- 1,
171
- e + i,
172
- t,
173
- "Z"
174
- ].join(" "), "createRoundedRectPathD"), P = /* @__PURE__ */ e(async (e, r) => {
175
- let i = l(), { themeVariables: a, handDrawnSeed: o } = i, { clusterBkg: s, clusterBorder: u } = a, d = u, { labelStyles: f, nodeStyles: p, borderStyles: m, backgroundStyles: g } = y(r), _ = e.insert("g").attr("class", "cluster swimlane " + (r.cssClasses || "")).attr("id", r.id).attr("data-id", r.id).attr("data-et", "cluster").attr("data-look", r.look), b = c(i.flowchart.htmlLabels), x = r.direction === "LR", C = _.insert("g").attr("class", "cluster-label swimlane-label"), w = await h(C, r.label, {
176
- style: r.labelStyle,
177
- useHtmlLabels: b,
178
- isNode: !0,
179
- width: r.width
180
- }), T = w.getBBox();
181
- if (b) {
182
- let e = w.children[0], t = n(w);
183
- T = e.getBoundingClientRect(), t.attr("width", T.width), t.attr("height", T.height);
184
- }
185
- let E = r.padding ?? 0, D = r.width <= T.width + E ? T.width + E : r.width;
186
- r.width <= T.width + E ? r.diff = (D - r.width) / 2 - E : r.diff = -E;
187
- let O = r.height, k = r.y - O / 2, A = r.y + O / 2, M = r.x - D / 2, N = r.swimlaneContentTop === void 0 ? k + O / 3 : r.swimlaneContentTop, P = x ? 4 : 0, F = T.height + 2 * P, I, L;
188
- if (x) {
189
- let e = Math.max(F, T.height + 2 * P), t = M + e, n = Math.max(0, D - e);
190
- if (r.look === "handDrawn") {
191
- let i = S.svg(_), a = v(r, {
192
- roughness: .7,
193
- fill: s,
194
- stroke: d,
195
- fillWeight: 3,
196
- seed: o
197
- }), c = v(r, {
198
- roughness: .7,
199
- fill: "none",
200
- stroke: d,
201
- seed: o
202
- }), l = i.rectangle(M, k, e, O, a);
203
- I = _.insert(() => l, ":first-child");
204
- let u = i.rectangle(t, k, n, O, c);
205
- L = _.insert(() => u, ":first-child"), I.select("path:nth-child(2)").attr("style", m.join(";")), I.select("path").attr("style", g.join(";").replace("fill", "stroke"));
206
- } else I = _.insert("rect", ":first-child"), L = _.insert("rect", ":first-child"), I.attr("class", "swimlane-title").attr("style", p).attr("x", M).attr("y", k).attr("width", e).attr("height", O).attr("fill", s).attr("stroke", d), L.attr("class", "swimlane-body").attr("style", p).attr("x", t).attr("y", k).attr("width", n).attr("height", O).attr("fill", "none").attr("stroke", d);
207
- let i = M + e / 2, a = r.y;
208
- C.attr("transform", `translate(${i}, ${a}) rotate(-90) translate(${-T.width / 2}, ${-T.height / 2})`);
209
- } else {
210
- let e = Math.max(0, N - k), t = Math.min(F, e), n = k + t, i = Math.max(0, A - n), a = r.x - D / 2;
211
- if (r.look === "handDrawn") {
212
- let e = S.svg(_), c = v(r, {
213
- roughness: .7,
214
- fill: s,
215
- stroke: d,
216
- fillWeight: 3,
217
- seed: o
218
- }), l = v(r, {
219
- roughness: .7,
220
- fill: "none",
221
- stroke: d,
222
- seed: o
223
- }), u = e.rectangle(a, k, D, t, c);
224
- I = _.insert(() => u, ":first-child");
225
- let f = e.rectangle(a, n, D, i, l);
226
- L = _.insert(() => f, ":first-child"), I.select("path:nth-child(2)").attr("style", m.join(";")), I.select("path").attr("style", g.join(";").replace("fill", "stroke"));
227
- } else I = _.insert("rect", ":first-child"), L = _.insert("rect", ":first-child"), I.attr("class", "swimlane-title").attr("style", p).attr("x", a).attr("y", k).attr("width", D).attr("height", t).attr("fill", s).attr("stroke", d), L.attr("class", "swimlane-body").attr("style", p).attr("x", a).attr("y", n).attr("width", D).attr("height", i).attr("fill", "none").attr("stroke", d);
228
- let c = r.x - T.width / 2, l = k + (t - T.height) / 2;
229
- C.attr("transform", `translate(${c}, ${l})`);
230
- }
231
- if (t.trace("Swimlane data ", r, JSON.stringify(r)), f) {
232
- let e = C.select("span");
233
- e && e.attr("style", f);
234
- }
235
- return r.offsetX = 0, r.width = D, r.height = O, r.offsetY = T.height - E / 2, r.intersect = function(e) {
236
- return j(r, e);
237
- }, {
238
- cluster: _,
239
- labelBBox: T
240
- };
241
- }, "swimlane"), F = /* @__PURE__ */ e(async (e, r) => {
242
- t.info("Creating subgraph rect for ", r.id, r);
243
- let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: m } = y(r), _ = e.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), b = o(i), x = _.insert("g").attr("class", "cluster-label "), C;
244
- C = r.labelType === "markdown" ? await h(x, r.label, {
245
- style: r.labelStyle,
246
- useHtmlLabels: b,
247
- isNode: !0,
248
- width: r.width
249
- }) : await M(x, r.label, r.labelStyle || "", !1, !0);
250
- let w = C.getBBox();
251
- if (o(i)) {
252
- let e = C.children[0], t = n(C);
253
- w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
254
- }
255
- let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
256
- r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
257
- let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
258
- t.trace("Data ", r, JSON.stringify(r));
259
- let k;
260
- if (r.look === "handDrawn") {
261
- let e = S.svg(_), n = v(r, {
262
- roughness: .7,
263
- fill: c,
264
- stroke: u,
265
- fillWeight: 3,
266
- seed: s
267
- }), i = e.path(N(D, O, T, E, 0), n);
268
- k = _.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", m.join(";").replace("fill", "stroke"));
269
- } else k = _.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
270
- let { subGraphTitleTopMargin: A } = g(i);
271
- if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
272
- let e = x.select("span");
273
- e && e.attr("style", d);
274
- }
275
- let P = k.node().getBBox();
276
- return r.offsetX = 0, r.width = P.width, r.height = P.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
277
- return j(r, e);
278
- }, {
279
- cluster: _,
280
- labelBBox: w
281
- };
282
- }, "rect"), I = {
283
- rect: F,
284
- squareRect: F,
285
- roundedWithTitle: /* @__PURE__ */ e(async (e, t) => {
286
- let r = l(), { themeVariables: i, handDrawnSeed: a } = r, { altBackground: s, compositeBackground: c, compositeTitleBackground: u, 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();
287
- if (o(r)) {
288
- let e = g.children[0], t = n(g);
289
- _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
290
- }
291
- let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
292
- t.width <= _.width + t.padding ? t.diff = (b - t.width) / 2 - t.padding : t.diff = -t.padding;
293
- let x = t.height + v, C = t.height + v - _.height - 6, w = t.x - b / 2, T = t.y - x / 2;
294
- t.width = b;
295
- let E = t.y - t.height / 2 - y + _.height + 2, D;
296
- if (t.look === "handDrawn") {
297
- 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), {
298
- roughness: .7,
299
- fill: u,
300
- fillStyle: "solid",
301
- stroke: d,
302
- seed: a
303
- }) : n.rectangle(w, T, b, x, { seed: a });
304
- D = f.insert(() => r, ":first-child");
305
- let i = n.rectangle(w, E, b, C, {
306
- fill: e ? s : c,
307
- fillStyle: e ? "hachure" : "solid",
308
- stroke: d,
309
- seed: a
310
- });
311
- D = f.insert(() => r, ":first-child"), h = f.insert(() => i);
312
- } 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);
313
- 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) {
314
- return j(t, e);
315
- }, {
316
- cluster: f,
317
- labelBBox: _
318
- };
319
- }, "roundedWithTitle"),
320
- noteGroup: /* @__PURE__ */ e((e, t) => {
321
- 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;
322
- 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");
323
- let o = r.node().getBBox();
324
- return t.width = o.width, t.height = o.height, t.intersect = function(e) {
325
- return j(t, e);
326
- }, {
327
- cluster: n,
328
- labelBBox: {
329
- width: 0,
330
- height: 0
331
- }
332
- };
333
- }, "noteGroup"),
334
- divider: /* @__PURE__ */ e((e, t) => {
335
- let { themeVariables: n, handDrawnSeed: r } = l(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), o = a.insert("g", ":first-child"), s = 0 * t.padding, c = t.width + s;
336
- t.diff = -t.padding;
337
- let u = t.height + s, d = t.x - c / 2, f = t.y - u / 2;
338
- t.width = c;
339
- let p;
340
- if (t.look === "handDrawn") {
341
- let e = S.svg(a).rectangle(d, f, c, u, {
342
- fill: "lightgrey",
343
- roughness: .5,
344
- strokeLineDash: [5],
345
- stroke: i,
346
- seed: r
347
- });
348
- p = a.insert(() => e, ":first-child");
349
- } else {
350
- p = o.insert("rect", ":first-child");
351
- let e = "outer";
352
- e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width", c).attr("height", u).attr("data-look", t.look);
353
- }
354
- return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
355
- return j(t, e);
356
- }, {
357
- cluster: a,
358
- labelBBox: {}
359
- };
360
- }, "divider"),
361
- kanbanSection: /* @__PURE__ */ e(async (e, r) => {
362
- t.info("Creating subgraph rect for ", r.id, r);
363
- let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: m } = y(r), _ = e.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), b = o(i), x = _.insert("g").attr("class", "cluster-label "), C = await h(x, r.label, {
364
- style: r.labelStyle,
365
- useHtmlLabels: b,
366
- isNode: !0,
367
- width: r.width
368
- }), w = C.getBBox();
369
- if (o(i)) {
370
- let e = C.children[0], t = n(C);
371
- w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
372
- }
373
- let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
374
- r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
375
- let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
376
- t.trace("Data ", r, JSON.stringify(r));
377
- let k;
378
- if (r.look === "handDrawn") {
379
- let e = S.svg(_), n = v(r, {
380
- roughness: .7,
381
- fill: c,
382
- stroke: u,
383
- fillWeight: 4,
384
- seed: s
385
- }), i = e.path(N(D, O, T, E, r.rx), n);
386
- k = _.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", m.join(";").replace("fill", "stroke"));
387
- } else k = _.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
388
- let { subGraphTitleTopMargin: A } = g(i);
389
- if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
390
- let e = x.select("span");
391
- e && e.attr("style", d);
392
- }
393
- let M = k.node().getBBox();
394
- return r.offsetX = 0, r.width = M.width, r.height = M.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
395
- return j(r, e);
396
- }, {
397
- cluster: _,
398
- labelBBox: w
399
- };
400
- }, "kanbanSection"),
401
- swimlane: P
402
- }, L = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ e(async (e, t) => {
403
- let n = await I[t.shape || "rect"](e, t);
404
- return L.set(t.id, n), n;
405
- }, "insertCluster"), R = /* @__PURE__ */ e(() => {
406
- L = /* @__PURE__ */ new Map();
407
- }, "clear");
408
- function z(e, t) {
409
- return e.intersect(t);
410
- }
411
- e(z, "intersectNode");
412
- var te = z;
413
- function B(e, t, n, r) {
414
- 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);
415
- r.x < i && (l = -l);
416
- var u = Math.abs(t * n * s / c);
417
- return r.y < a && (u = -u), {
418
- x: i + l,
419
- y: a + u
420
- };
421
- }
422
- e(B, "intersectEllipse");
423
- var V = B;
424
- function H(e, t, n) {
425
- return V(e, t, t, n);
426
- }
427
- e(H, "intersectCircle");
428
- var U = H;
429
- function ne(e, t, n, r) {
430
- {
431
- 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;
432
- if (s !== 0 && c !== 0 && re(s, c)) return;
433
- 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;
434
- if (Math.abs(p) < l && Math.abs(m) < l && re(p, m)) return;
435
- let h = i * d - u * a;
436
- if (h === 0) return;
437
- let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
438
- return _ = u * o - i * f, {
439
- x: v,
440
- y: _ < 0 ? (_ - g) / h : (_ + g) / h
441
- };
442
- }
443
- }
444
- e(ne, "intersectLine");
445
- function re(e, t) {
446
- return e * t > 0;
447
- }
448
- e(re, "sameSign");
449
- var ie = ne;
450
- function W(e, t, n) {
451
- let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
452
- typeof t.forEach == "function" ? t.forEach(function(e) {
453
- o = Math.min(o, e.x), s = Math.min(s, e.y);
454
- }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
455
- let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
456
- for (let r = 0; r < t.length; r++) {
457
- let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = ie(e, n, {
458
- x: c + i.x,
459
- y: l + i.y
460
- }, {
461
- x: c + o.x,
462
- y: l + o.y
463
- });
464
- s && a.push(s);
465
- }
466
- return a.length ? (a.length > 1 && a.sort(function(e, t) {
467
- 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);
468
- return a < c ? -1 : a === c ? 0 : 1;
469
- }), a[0]) : e;
470
- }
471
- e(W, "intersectPolygon");
472
- var G = {
473
- node: te,
474
- circle: U,
475
- ellipse: V,
476
- polygon: W,
477
- rect: j
478
- };
479
- function K(e, n) {
480
- let { labelStyles: r } = y(n);
481
- n.labelStyle = r;
482
- let i = E(n), a = i;
483
- i || (a = "anchor");
484
- let o = e.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = S.svg(o), l = v(n, {
485
- fill: "black",
486
- stroke: "none",
487
- fillStyle: "solid"
488
- });
489
- n.look !== "handDrawn" && (l.roughness = 0);
490
- let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
491
- return d.attr("class", "anchor").attr("style", p(s)), T(n, d), n.intersect = function(e) {
492
- return t.info("Circle intersect", n, 1, e), G.circle(n, 1, e);
493
- }, o;
494
- }
495
- e(K, "anchor");
496
- function ae(e, t, n, r, i, a, o) {
497
- 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);
498
- if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
499
- 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;
500
- o && y < 0 && (y += 2 * Math.PI), !o && y > 0 && (y -= 2 * Math.PI);
501
- let b = [];
502
- for (let e = 0; e < 20; e++) {
503
- let t = v + e / 19 * y, n = g + i * Math.cos(t), r = _ + a * Math.sin(t);
504
- b.push({
505
- x: n,
506
- y: r
507
- });
508
- }
509
- return b;
510
- }
511
- e(ae, "generateArcPoints");
512
- function oe(e, t, n) {
513
- let [r, i] = [t, n].sort((e, t) => t - e);
514
- return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
515
- }
516
- e(oe, "calculateArcSagitta");
517
- async function se(t, n) {
518
- let { labelStyles: r, nodeStyles: i } = y(n);
519
- n.labelStyle = r;
520
- let a = n.padding ?? 0, o = n.look === "neo" ? 16 : a, s = n.look === "neo" ? 12 : a, c = /* @__PURE__ */ e((e) => e + s, "calcTotalHeight"), l = /* @__PURE__ */ e((e) => {
521
- let t = e / 2;
522
- return [t / (2.5 + e / 50), t];
523
- }, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await C(t, n, E(n)), f = c(n?.height ? n?.height : d.height), [p, m] = l(f), h = oe(f, p, m), g = (n?.width ? n?.width : d.width) + o * 2 + h - h, _ = f, { cssStyles: b } = n, x = [
524
- {
525
- x: g / 2,
526
- y: -_ / 2
527
- },
528
- {
529
- x: -g / 2,
530
- y: -_ / 2
531
- },
532
- ...ae(-g / 2, -_ / 2, -g / 2, _ / 2, p, m, !1),
533
- {
534
- x: g / 2,
535
- y: _ / 2
536
- },
537
- ...ae(g / 2, _ / 2, g / 2, -_ / 2, p, m, !0)
538
- ], w = S.svg(u), O = v(n, {});
539
- n.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
540
- let k = D(x), A = w.path(k, O), j = u.insert(() => A, ":first-child");
541
- return j.attr("class", "basic label-container outer-path"), b && n.look !== "handDrawn" && j.selectAll("path").attr("style", b), i && n.look !== "handDrawn" && j.selectAll("path").attr("style", i), j.attr("transform", `translate(${p / 2}, 0)`), T(n, j), n.intersect = function(e) {
542
- return G.polygon(n, x, e);
543
- }, u;
544
- }
545
- e(se, "bowTieRect");
546
- function q(e, t, n, r) {
547
- return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
548
- return e.x + "," + e.y;
549
- }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
550
- }
551
- e(q, "insertPolygonShape");
552
- var ce = 12;
553
- async function le(e, t) {
554
- let { labelStyles: n, nodeStyles: r } = y(t);
555
- t.labelStyle = n;
556
- 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 + ce), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
557
- {
558
- x: 0 + ce,
559
- y: f
560
- },
561
- {
562
- x: d,
563
- y: f
564
- },
565
- {
566
- x: d,
567
- y: 0
568
- },
569
- {
570
- x: 0,
571
- y: 0
572
- },
573
- {
574
- x: 0,
575
- y: f + ce
576
- },
577
- {
578
- x: 0 + ce,
579
- y: f
580
- }
581
- ], m, { cssStyles: h } = t;
582
- if (t.look === "handDrawn") {
583
- let e = S.svg(s), n = v(t, {}), r = D(p), i = e.path(r, n);
584
- m = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), h && m.attr("style", h);
585
- } else m = q(s, l, u, p);
586
- return r && m.attr("style", r), T(t, m), t.intersect = function(e) {
587
- return G.polygon(t, p, e);
588
- }, s;
589
- }
590
- e(le, "card");
591
- function ue(e, t) {
592
- let { nodeStyles: n } = y(t);
593
- t.label = "";
594
- 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 = [
595
- {
596
- x: 0,
597
- y: a / 2
598
- },
599
- {
600
- x: a / 2,
601
- y: 0
602
- },
603
- {
604
- x: 0,
605
- y: -a / 2
606
- },
607
- {
608
- x: -a / 2,
609
- y: 0
610
- }
611
- ], s = S.svg(r), c = v(t, {});
612
- t.look !== "handDrawn" && (c.roughness = 0, c.fillStyle = "solid");
613
- let l = D(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
614
- 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) {
615
- return G.polygon(t, o, e);
616
- }, r;
617
- }
618
- e(ue, "choice");
619
- async function de(e, n, r) {
620
- let { labelStyles: i, nodeStyles: a } = y(n);
621
- n.labelStyle = i;
622
- let { shapeSvg: o, bbox: s, halfPadding: c } = await C(e, n, E(n)), l = r?.padding ?? c, u = n.look === "neo" ? s.width / 2 + 32 : s.width / 2 + l, d, { cssStyles: f } = n;
623
- if (n.look === "handDrawn") {
624
- let e = S.svg(o), t = v(n, {}), r = e.circle(0, 0, u * 2, t);
625
- d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(f));
626
- } else d = o.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", a).attr("r", u).attr("cx", 0).attr("cy", 0);
627
- return T(n, d), n.calcIntersect = function(e, t) {
628
- let n = e.width / 2;
629
- return G.circle(e, n, t);
630
- }, n.intersect = function(e) {
631
- return t.info("Circle intersect", n, u, e), G.circle(n, u, e);
632
- }, o;
633
- }
634
- e(de, "circle");
635
- function fe(e) {
636
- let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
637
- x: r / 2 * t,
638
- y: r / 2 * n
639
- }, a = {
640
- x: -(r / 2) * t,
641
- y: r / 2 * n
642
- }, o = {
643
- x: -(r / 2) * t,
644
- y: -(r / 2) * n
645
- }, s = {
646
- x: r / 2 * t,
647
- y: -(r / 2) * n
648
- };
649
- return `M ${a.x},${a.y} L ${s.x},${s.y}
650
- M ${i.x},${i.y} L ${o.x},${o.y}`;
651
- }
652
- e(fe, "createLine");
653
- function pe(e, n) {
654
- let { labelStyles: r, nodeStyles: i } = y(n);
655
- n.labelStyle = r, n.label = "";
656
- let a = e.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = S.svg(a), l = v(n, {});
657
- n.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
658
- let u = c.circle(0, 0, o * 2, l), d = fe(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
659
- return p.insert(() => f), p.attr("class", "outer-path"), s && n.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && n.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(n, p), n.intersect = function(e) {
660
- return t.info("crossedCircle intersect", n, {
661
- radius: o,
662
- point: e
663
- }), G.circle(n, o, e);
664
- }, a;
665
- }
666
- e(pe, "crossedCircle");
667
- function J(e, t, n, r = 100, i = 0, a = 180) {
668
- let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
669
- for (let i = 0; i < r; i++) {
670
- let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
671
- o.push({
672
- x: -a,
673
- y: -l
674
- });
675
- }
676
- return o;
677
- }
678
- e(J, "generateCirclePoints");
679
- async function me(e, t) {
680
- let { labelStyles: n, nodeStyles: r } = y(t);
681
- t.labelStyle = n;
682
- 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 = [
683
- ...J(l / 2, -u / 2, d, 30, -90, 0),
684
- {
685
- x: -l / 2 - d,
686
- y: d
687
- },
688
- ...J(l / 2 + d * 2, -d, d, 20, -180, -270),
689
- ...J(l / 2 + d * 2, d, d, 20, -90, -180),
690
- {
691
- x: -l / 2 - d,
692
- y: -u / 2
693
- },
694
- ...J(l / 2, u / 2, d, 20, 0, 90)
695
- ], m = [
696
- {
697
- x: l / 2,
698
- y: -u / 2 - d
699
- },
700
- {
701
- x: -l / 2,
702
- y: -u / 2 - d
703
- },
704
- ...J(l / 2, -u / 2, d, 20, -90, 0),
705
- {
706
- x: -l / 2 - d,
707
- y: -d
708
- },
709
- ...J(l / 2 + l * .1, -d, d, 20, -180, -270),
710
- ...J(l / 2 + l * .1, d, d, 20, -90, -180),
711
- {
712
- x: -l / 2 - d,
713
- y: u / 2
714
- },
715
- ...J(l / 2, u / 2, d, 20, 0, 90),
716
- {
717
- x: -l / 2,
718
- y: u / 2 + d
719
- },
720
- {
721
- x: l / 2,
722
- y: u / 2 + d
723
- }
724
- ], h = S.svg(i), g = v(t, { fill: "none" });
725
- t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
726
- let _ = D(p).replace("Z", ""), b = h.path(_, g), x = D(m), w = h.path(x, { ...g }), O = i.insert("g", ":first-child");
727
- 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) {
728
- return G.polygon(t, m, e);
729
- }, i;
730
- }
731
- e(me, "curlyBraceLeft");
732
- function Y(e, t, n, r = 100, i = 0, a = 180) {
733
- let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
734
- for (let i = 0; i < r; i++) {
735
- let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
736
- o.push({
737
- x: a,
738
- y: l
739
- });
740
- }
741
- return o;
742
- }
743
- e(Y, "generateCirclePoints");
744
- async function he(e, t) {
745
- let { labelStyles: n, nodeStyles: r } = y(t);
746
- t.labelStyle = n;
747
- 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 = [
748
- ...Y(l / 2, -u / 2, d, 20, -90, 0),
749
- {
750
- x: l / 2 + d,
751
- y: -d
752
- },
753
- ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
754
- ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
755
- {
756
- x: l / 2 + d,
757
- y: u / 2
758
- },
759
- ...Y(l / 2, u / 2, d, 20, 0, 90)
760
- ], m = [
761
- {
762
- x: -l / 2,
763
- y: -u / 2 - d
764
- },
765
- {
766
- x: l / 2,
767
- y: -u / 2 - d
768
- },
769
- ...Y(l / 2, -u / 2, d, 20, -90, 0),
770
- {
771
- x: l / 2 + d,
772
- y: -d
773
- },
774
- ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
775
- ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
776
- {
777
- x: l / 2 + d,
778
- y: u / 2
779
- },
780
- ...Y(l / 2, u / 2, d, 20, 0, 90),
781
- {
782
- x: l / 2,
783
- y: u / 2 + d
784
- },
785
- {
786
- x: -l / 2,
787
- y: u / 2 + d
788
- }
789
- ], h = S.svg(i), g = v(t, { fill: "none" });
790
- t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
791
- let _ = D(p).replace("Z", ""), b = h.path(_, g), x = D(m), w = h.path(x, { ...g }), O = i.insert("g", ":first-child");
792
- 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) {
793
- return G.polygon(t, m, e);
794
- }, i;
795
- }
796
- e(he, "curlyBraceRight");
797
- function X(e, t, n, r = 100, i = 0, a = 180) {
798
- let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
799
- for (let i = 0; i < r; i++) {
800
- let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
801
- o.push({
802
- x: -a,
803
- y: -l
804
- });
805
- }
806
- return o;
807
- }
808
- e(X, "generateCirclePoints");
809
- async function ge(e, t) {
810
- let { labelStyles: n, nodeStyles: r } = y(t);
811
- t.labelStyle = n;
812
- 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 = [
813
- ...X(l / 2, -u / 2, d, 30, -90, 0),
814
- {
815
- x: -l / 2 - d,
816
- y: d
817
- },
818
- ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
819
- ...X(l / 2 + d * 2, d, d, 20, -90, -180),
820
- {
821
- x: -l / 2 - d,
822
- y: -u / 2
823
- },
824
- ...X(l / 2, u / 2, d, 20, 0, 90)
825
- ], m = [
826
- ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
827
- {
828
- x: l / 2 - d / 2,
829
- y: d
830
- },
831
- ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
832
- ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
833
- {
834
- x: l / 2 - d / 2,
835
- y: -d
836
- },
837
- ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
838
- ], h = [
839
- {
840
- x: l / 2,
841
- y: -u / 2 - d
842
- },
843
- {
844
- x: -l / 2,
845
- y: -u / 2 - d
846
- },
847
- ...X(l / 2, -u / 2, d, 20, -90, 0),
848
- {
849
- x: -l / 2 - d,
850
- y: -d
851
- },
852
- ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
853
- ...X(l / 2 + d * 2, d, d, 20, -90, -180),
854
- {
855
- x: -l / 2 - d,
856
- y: u / 2
857
- },
858
- ...X(l / 2, u / 2, d, 20, 0, 90),
859
- {
860
- x: -l / 2,
861
- y: u / 2 + d
862
- },
863
- {
864
- x: l / 2 - d - d / 2,
865
- y: u / 2 + d
866
- },
867
- ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
868
- {
869
- x: l / 2 - d / 2,
870
- y: d
871
- },
872
- ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
873
- ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
874
- {
875
- x: l / 2 - d / 2,
876
- y: -d
877
- },
878
- ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
879
- ], g = S.svg(i), _ = v(t, { fill: "none" });
880
- t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
881
- let b = D(p).replace("Z", ""), x = g.path(b, _), w = D(m).replace("Z", ""), O = g.path(w, _), k = D(h), A = g.path(k, { ..._ }), j = i.insert("g", ":first-child");
882
- 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) {
883
- return G.polygon(t, h, e);
884
- }, i;
885
- }
886
- e(ge, "curlyBraces");
887
- async function _e(e, t) {
888
- let { labelStyles: n, nodeStyles: r } = y(t);
889
- t.labelStyle = n;
890
- 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 = v(t, {});
891
- t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
892
- let h = l, g = u, _ = h - d, b = g / 4, x = [
893
- {
894
- x: _,
895
- y: 0
896
- },
897
- {
898
- x: b,
899
- y: 0
900
- },
901
- {
902
- x: 0,
903
- y: g / 2
904
- },
905
- {
906
- x: b,
907
- y: g
908
- },
909
- {
910
- x: _,
911
- y: g
912
- },
913
- ...k(-_, -g / 2, d, 50, 270, 90)
914
- ], w = D(x), O = p.path(w, m), A = s.insert(() => O, ":first-child");
915
- 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) {
916
- return G.polygon(t, x, e);
917
- }, s;
918
- }
919
- e(_e, "curvedTrapezoid");
920
- var ve = /* @__PURE__ */ e((e, t, n, r, i, a) => [
921
- `M${e},${t + a}`,
922
- `a${i},${a} 0,0,0 ${n},0`,
923
- `a${i},${a} 0,0,0 ${-n},0`,
924
- `l0,${r}`,
925
- `a${i},${a} 0,0,0 ${n},0`,
926
- `l0,${-r}`
927
- ].join(" "), "createCylinderPathD"), ye = /* @__PURE__ */ e((e, t, n, r, i, a) => [
928
- `M${e},${t + a}`,
929
- `M${e + n},${t + a}`,
930
- `a${i},${a} 0,0,0 ${-n},0`,
931
- `l0,${r}`,
932
- `a${i},${a} 0,0,0 ${n},0`,
933
- `l0,${-r}`
934
- ].join(" "), "createOuterCylinderPathD"), be = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), xe = 8, Se = 8;
935
- async function Ce(e, t) {
936
- let { labelStyles: n, nodeStyles: r } = y(t);
937
- t.labelStyle = n;
938
- let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i;
939
- if (t.width || t.height) {
940
- let e = t.width ?? 0;
941
- t.width = (t.width ?? 0) - o, t.width < Se && (t.width = Se);
942
- let n = e / 2 / (2.5 + e / 50);
943
- t.height = (t.height ?? 0) - a - n * 3, t.height < xe && (t.height = xe);
944
- }
945
- let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t.width ? t.width : c.width) + o, d = u / 2, f = d / (2.5 + u / 50), m = (t.height ? t.height : c.height) + a + f, h, { cssStyles: g } = t;
946
- if (t.look === "handDrawn") {
947
- let e = S.svg(s), n = ye(0, 0, u, m, d, f), r = be(0, f, u, m, d, f), i = v(t, {}), a = e.path(n, i), o = e.path(r, v(t, { fill: "none" }));
948
- h = s.insert(() => o, ":first-child"), h = s.insert(() => a, ":first-child"), h.attr("class", "basic label-container"), g && h.attr("style", g);
949
- } else {
950
- let e = ve(0, 0, u, m, d, f);
951
- h = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(g)).attr("style", r);
952
- }
953
- return h.attr("label-offset-y", f), h.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), 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) {
954
- let n = G.rect(t, e), r = n.x - (t.x ?? 0);
955
- 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 - f)) {
956
- let i = f * f * (1 - r * r / (d * d));
957
- i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
958
- }
959
- return n;
960
- }, s;
961
- }
962
- e(Ce, "cylinder");
963
- async function we(e, t, n) {
964
- let { labelStyles: r, nodeStyles: i } = y(t);
965
- t.labelStyle = r;
966
- 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: f, ry: m } = t, { cssStyles: h } = t;
967
- if (n?.rx && n.ry && (f = n.rx, m = n.ry), t.look === "handDrawn") {
968
- let e = S.svg(a), n = v(t, {}), r = f || m ? e.path(N(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
969
- d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(h));
970
- } else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", p(f)).attr("ry", p(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
971
- return T(t, d), t.calcIntersect = function(e, t) {
972
- return G.rect(e, t);
973
- }, t.intersect = function(e) {
974
- return G.rect(t, e);
975
- }, a;
976
- }
977
- e(we, "drawRect");
978
- async function Te(e, t) {
979
- let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await we(e, t, {
980
- rx: 0,
981
- ry: 0,
982
- classes: n ?? "",
983
- labelPaddingX: r ?? (a ?? 0) * 2,
984
- labelPaddingY: i ?? a ?? 0
985
- });
986
- if (t.look === "handDrawn") {
987
- let e = S.svg(c), n = v(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
988
- if (!i) return c;
989
- let a = null;
990
- if (i instanceof SVGGraphicsElement) a = i.getBBox();
991
- else return c;
992
- return c.insert(() => e.line(a.x, a.y, a.x + a.width, a.y, n), ".basic.label-container g.label"), c.insert(() => e.line(a.x, a.y + a.height, a.x + a.width, a.y + a.height, n), ".basic.label-container g.label"), r.remove(), c;
993
- }
994
- let l = c.select(".basic.label-container"), u = (Number(l.attr("width")) || o) ?? 0, d = (Number(l.attr("height")) || s) ?? 0;
995
- return u > 0 && d > 0 && l.attr("stroke-dasharray", `${u} ${d}`), c;
996
- }
997
- e(Te, "datastore");
998
- async function Ee(e, t) {
999
- let { labelStyles: n, nodeStyles: r } = y(t);
1000
- t.labelStyle = n;
1001
- 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), g = v(t, {});
1002
- t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1003
- let _ = [
1004
- {
1005
- x: f,
1006
- y: p + d
1007
- },
1008
- {
1009
- x: -f,
1010
- y: p + d
1011
- },
1012
- {
1013
- x: -f,
1014
- y: -p
1015
- },
1016
- {
1017
- x: f,
1018
- y: -p
1019
- },
1020
- {
1021
- x: f,
1022
- y: p
1023
- },
1024
- {
1025
- x: -f,
1026
- y: p
1027
- },
1028
- {
1029
- x: -f,
1030
- y: p + d
1031
- }
1032
- ], b = h.polygon(_.map((e) => [e.x, e.y]), g), x = o.insert(() => b, ":first-child");
1033
- 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) {
1034
- return G.rect(t, e);
1035
- }, o;
1036
- }
1037
- e(Ee, "dividedRectangle");
1038
- async function De(e, n) {
1039
- let { labelStyles: r, nodeStyles: i } = y(n), a = n.look === "neo" ? 12 : 5;
1040
- n.labelStyle = r;
1041
- let o = n.padding ?? 0, s = n.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await C(e, n, E(n)), u = (n?.width ? n?.width / 2 : l.width / 2) + (s ?? 0), d = u - a, f, { cssStyles: m } = n;
1042
- if (n.look === "handDrawn") {
1043
- let e = S.svg(c), t = v(n, {
1044
- roughness: .2,
1045
- strokeWidth: 2.5
1046
- }), r = v(n, {
1047
- roughness: .2,
1048
- strokeWidth: 1.5
1049
- }), i = e.circle(0, 0, u * 2, t), a = e.circle(0, 0, d * 2, r);
1050
- f = c.insert("g", ":first-child"), f.attr("class", p(n.cssClasses)).attr("style", p(m)), f.node()?.appendChild(i), f.node()?.appendChild(a);
1051
- } else {
1052
- f = c.insert("g", ":first-child");
1053
- let e = f.insert("circle", ":first-child"), t = f.insert("circle");
1054
- f.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", u).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", d).attr("cx", 0).attr("cy", 0);
1055
- }
1056
- return T(n, f), n.intersect = function(e) {
1057
- return t.info("DoubleCircle intersect", n, u, e), G.circle(n, u, e);
1058
- }, c;
1059
- }
1060
- e(De, "doublecircle");
1061
- function Oe(e, n, { config: { themeVariables: r } }) {
1062
- let { labelStyles: i, nodeStyles: a } = y(n);
1063
- n.label = "", n.labelStyle = i;
1064
- let o = e.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = S.svg(o), { nodeBorder: l } = r, u = v(n, { fillStyle: "solid" });
1065
- n.look !== "handDrawn" && (u.roughness = 0);
1066
- let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
1067
- return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && n.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && n.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(n, f), n.intersect = function(e) {
1068
- return t.info("filledCircle intersect", n, {
1069
- radius: 7,
1070
- point: e
1071
- }), G.circle(n, 7, e);
1072
- }, o;
1073
- }
1074
- e(Oe, "filledCircle");
1075
- var ke = 10, Ae = 10;
1076
- async function je(e, n) {
1077
- let { labelStyles: r, nodeStyles: i } = y(n);
1078
- n.labelStyle = r;
1079
- let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
1080
- (n.width || n.height) && (n.height = n?.height ?? 0, n.height < ke && (n.height = ke), n.width = (n?.width ?? 0) - o - o / 2, n.width < Ae && (n.width = Ae));
1081
- let { shapeSvg: s, bbox: c, label: l } = await C(e, n, E(n)), u = (n?.width ? n?.width : c.width) + (o ?? 0), d = n?.height ? n?.height : u + c.height, f = d, p = [
1082
- {
1083
- x: 0,
1084
- y: -d
1085
- },
1086
- {
1087
- x: f,
1088
- y: -d
1089
- },
1090
- {
1091
- x: f / 2,
1092
- y: 0
1093
- }
1094
- ], { cssStyles: m } = n, h = S.svg(s), g = v(n, {});
1095
- n.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1096
- let _ = D(p), b = h.path(_, g), x = s.insert(() => b, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
1097
- return m && n.look !== "handDrawn" && x.selectChildren("path").attr("style", m), i && n.look !== "handDrawn" && x.selectChildren("path").attr("style", i), n.width = u, n.height = d, T(n, x), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-d / 2 + (n.padding ?? 0) / 2 + (c.y - (c.top ?? 0))})`), n.intersect = function(e) {
1098
- return t.info("Triangle intersect", n, p, e), G.polygon(n, p, e);
1099
- }, s;
1100
- }
1101
- e(je, "flippedTriangle");
1102
- function Me(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1103
- let { nodeStyles: a } = y(t);
1104
- t.label = "";
1105
- 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);
1106
- n === "LR" && (c = Math.max(10, t?.width ?? 0), l = Math.max(70, t?.height ?? 0));
1107
- let u = -1 * c / 2, d = -1 * l / 2, f = S.svg(o), p = v(t, {
1108
- stroke: i.lineColor,
1109
- fill: i.lineColor
1110
- });
1111
- t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
1112
- let m = f.rectangle(u, d, c, l, p), h = o.insert(() => m, ":first-child");
1113
- s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), T(t, h);
1114
- let g = r?.padding ?? 0;
1115
- return t.width && t.height && (t.width += g / 2 || 0, t.height += g / 2 || 0), t.intersect = function(e) {
1116
- return G.rect(t, e);
1117
- }, o;
1118
- }
1119
- e(Me, "forkJoin");
1120
- async function Ne(e, n) {
1121
- let { labelStyles: r, nodeStyles: i } = y(n);
1122
- n.labelStyle = r;
1123
- let a = n.look === "neo" ? 16 : n.padding ?? 0, o = n.look === "neo" ? 12 : n.padding ?? 0;
1124
- (n.width || n.height) && (n.height = (n?.height ?? 0) - o * 2, n.height < 10 && (n.height = 10), n.width = (n?.width ?? 0) - a * 2, n.width < 15 && (n.width = 15));
1125
- let { shapeSvg: s, bbox: c } = await C(e, n, E(n)), l = (n?.width ? n?.width : Math.max(15, c.width)) + a * 2, u = (n?.height ? n?.height : Math.max(10, c.height)) + o * 2, d = u / 2, { cssStyles: f } = n, p = S.svg(s), m = v(n, {});
1126
- n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1127
- let h = [
1128
- {
1129
- x: -l / 2,
1130
- y: -u / 2
1131
- },
1132
- {
1133
- x: l / 2 - d,
1134
- y: -u / 2
1135
- },
1136
- ...k(-l / 2 + d, 0, d, 50, 90, 270),
1137
- {
1138
- x: l / 2 - d,
1139
- y: u / 2
1140
- },
1141
- {
1142
- x: -l / 2,
1143
- y: u / 2
1144
- }
1145
- ], g = D(h), _ = p.path(g, m), b = s.insert(() => _, ":first-child");
1146
- return b.attr("class", "basic label-container outer-path"), f && n.look !== "handDrawn" && b.selectChildren("path").attr("style", f), i && n.look !== "handDrawn" && b.selectChildren("path").attr("style", i), T(n, b), n.intersect = function(e) {
1147
- return t.info("Pill intersect", n, {
1148
- radius: d,
1149
- point: e
1150
- }), G.polygon(n, h, e);
1151
- }, s;
1152
- }
1153
- e(Ne, "halfRoundedRectangle");
1154
- var Pe = /* @__PURE__ */ e((e, t, n, r, i) => [
1155
- `M${e + i},${t}`,
1156
- `L${e + n - i},${t}`,
1157
- `L${e + n},${t - r / 2}`,
1158
- `L${e + n - i},${t - r}`,
1159
- `L${e + i},${t - r}`,
1160
- `L${e},${t - r / 2}`,
1161
- "Z"
1162
- ].join(" "), "createHexagonPathD");
1163
- async function Fe(e, t) {
1164
- let { labelStyles: n, nodeStyles: r } = y(t), i = t.look === "neo" ? 3.5 : 4;
1165
- t.labelStyle = n;
1166
- let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
1167
- if (t.width || t.height) {
1168
- let e = (t.height ?? 0) / i;
1169
- t.width = (t?.width ?? 0) - 2 * e - s, t.height = (t.height ?? 0) - o;
1170
- }
1171
- 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 = [
1172
- {
1173
- x: d,
1174
- y: 0
1175
- },
1176
- {
1177
- x: f - d,
1178
- y: 0
1179
- },
1180
- {
1181
- x: f,
1182
- y: -u / 2
1183
- },
1184
- {
1185
- x: f - d,
1186
- y: -u
1187
- },
1188
- {
1189
- x: d,
1190
- y: -u
1191
- },
1192
- {
1193
- x: 0,
1194
- y: -u / 2
1195
- }
1196
- ], m, { cssStyles: h } = t;
1197
- if (t.look === "handDrawn") {
1198
- let e = S.svg(c), n = v(t, {}), r = Pe(0, 0, f, u, d), i = e.path(r, n);
1199
- m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
1200
- } else m = q(c, f, u, p);
1201
- return r && m.attr("style", r), t.width = f, t.height = u, T(t, m), t.intersect = function(e) {
1202
- return G.polygon(t, p, e);
1203
- }, c;
1204
- }
1205
- e(Fe, "hexagon");
1206
- async function Ie(e, n) {
1207
- let { labelStyles: r, nodeStyles: i } = y(n);
1208
- n.label = "", n.labelStyle = r;
1209
- let { shapeSvg: a } = await C(e, n, E(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = S.svg(a), u = v(n, {});
1210
- n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1211
- let d = [
1212
- {
1213
- x: 0,
1214
- y: 0
1215
- },
1216
- {
1217
- x: o,
1218
- y: 0
1219
- },
1220
- {
1221
- x: 0,
1222
- y: s
1223
- },
1224
- {
1225
- x: o,
1226
- y: s
1227
- }
1228
- ], f = D(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1229
- return m.attr("class", "basic label-container outer-path"), c && n.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && n.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(n, m), n.intersect = function(e) {
1230
- return t.info("Pill intersect", n, { points: d }), G.polygon(n, d, e);
1231
- }, a;
1232
- }
1233
- e(Ie, "hourglass");
1234
- async function Le(e, n, { config: { themeVariables: r, flowchart: i } }) {
1235
- let { labelStyles: a } = y(n);
1236
- n.labelStyle = a;
1237
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1238
- n.width = Math.max(c, l ?? 0);
1239
- let { shapeSvg: u, bbox: d, label: f } = await C(e, n, "icon-shape default"), p = n.pos === "t", h = c, g = c, { nodeBorder: _ } = r, { stylesMap: b } = x(n), w = -g / 2, E = -h / 2, D = n.label ? 8 : 0, O = S.svg(u), k = v(n, {
1240
- stroke: "none",
1241
- fill: "none"
1242
- });
1243
- n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1244
- let A = O.rectangle(w, E, g, h, k), j = Math.max(g, d.width), M = h + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1245
- ...k,
1246
- fill: "transparent",
1247
- stroke: "none"
1248
- }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1249
- if (n.icon) {
1250
- let e = u.append("g");
1251
- e.html(`<g>${await m(n.icon, {
1252
- height: c,
1253
- width: c,
1254
- fallbackPrefix: ""
1255
- })}</g>`);
1256
- let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1257
- 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") ?? _};`);
1258
- }
1259
- 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(n, F), n.intersect = function(e) {
1260
- if (t.info("iconSquare intersect", n, e), !n.label) return G.rect(n, e);
1261
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1262
- return o = p ? [
1263
- {
1264
- x: r - d.width / 2,
1265
- y: i - a / 2
1266
- },
1267
- {
1268
- x: r + d.width / 2,
1269
- y: i - a / 2
1270
- },
1271
- {
1272
- x: r + d.width / 2,
1273
- y: i - a / 2 + d.height + D
1274
- },
1275
- {
1276
- x: r + g / 2,
1277
- y: i - a / 2 + d.height + D
1278
- },
1279
- {
1280
- x: r + g / 2,
1281
- y: i + a / 2
1282
- },
1283
- {
1284
- x: r - g / 2,
1285
- y: i + a / 2
1286
- },
1287
- {
1288
- x: r - g / 2,
1289
- y: i - a / 2 + d.height + D
1290
- },
1291
- {
1292
- x: r - d.width / 2,
1293
- y: i - a / 2 + d.height + D
1294
- }
1295
- ] : [
1296
- {
1297
- x: r - g / 2,
1298
- y: i - a / 2
1299
- },
1300
- {
1301
- x: r + g / 2,
1302
- y: i - a / 2
1303
- },
1304
- {
1305
- x: r + g / 2,
1306
- y: i - a / 2 + h
1307
- },
1308
- {
1309
- x: r + d.width / 2,
1310
- y: i - a / 2 + h
1311
- },
1312
- {
1313
- x: r + d.width / 2 / 2,
1314
- y: i + a / 2
1315
- },
1316
- {
1317
- x: r - d.width / 2,
1318
- y: i + a / 2
1319
- },
1320
- {
1321
- x: r - d.width / 2,
1322
- y: i - a / 2 + h
1323
- },
1324
- {
1325
- x: r - g / 2,
1326
- y: i - a / 2 + h
1327
- }
1328
- ], G.polygon(n, o, e);
1329
- }, u;
1330
- }
1331
- e(Le, "icon");
1332
- async function Re(e, n, { config: { themeVariables: r, flowchart: i } }) {
1333
- let { labelStyles: a } = y(n);
1334
- n.labelStyle = a;
1335
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1336
- n.width = Math.max(c, l ?? 0);
1337
- let { shapeSvg: u, bbox: d, label: f } = await C(e, n, "icon-shape default"), p = n.label ? 8 : 0, h = n.pos === "t", { nodeBorder: g, mainBkg: _ } = r, { stylesMap: b } = x(n), w = S.svg(u), E = v(n, {});
1338
- n.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? _;
1339
- let D = u.append("g");
1340
- n.icon && D.html(`<g>${await m(n.icon, {
1341
- height: c,
1342
- width: c,
1343
- fallbackPrefix: ""
1344
- })}</g>`);
1345
- 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, L = w.rectangle(-F / 2, -I / 2, F, I, {
1346
- ...E,
1347
- fill: "transparent",
1348
- stroke: "none"
1349
- }), ee = u.insert(() => P, ":first-child"), R = u.insert(() => L);
1350
- return D.attr("transform", `translate(${-k / 2 - j},${h ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? g};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${h ? -I / 2 : I / 2 - d.height})`), ee.attr("transform", `translate(0,${h ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(n, R), n.intersect = function(e) {
1351
- return t.info("iconSquare intersect", n, e), G.rect(n, e);
1352
- }, u;
1353
- }
1354
- e(Re, "iconCircle");
1355
- async function ze(e, n, { config: { themeVariables: r, flowchart: i } }) {
1356
- let { labelStyles: a } = y(n);
1357
- n.labelStyle = a;
1358
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1359
- n.width = Math.max(c, l ?? 0);
1360
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, n, "icon-shape default"), h = n.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = x(n), D = -_ / 2, O = -g / 2, k = n.label ? 8 : 0, A = S.svg(u), j = v(n, {});
1361
- n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1362
- let M = A.path(N(D, O, _, g, 5), j), P = Math.max(_, d.width), F = g + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1363
- ...j,
1364
- fill: "transparent",
1365
- stroke: "none"
1366
- }), L = u.insert(() => M, ":first-child").attr("class", "icon-shape2"), ee = u.insert(() => I);
1367
- if (n.icon) {
1368
- let e = u.append("g");
1369
- e.html(`<g>${await m(n.icon, {
1370
- height: c,
1371
- width: c,
1372
- fallbackPrefix: ""
1373
- })}</g>`);
1374
- let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1375
- e.attr("transform", `translate(${-r / 2 - a},${h ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1376
- }
1377
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${h ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${h ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, ee), n.intersect = function(e) {
1378
- if (t.info("iconSquare intersect", n, e), !n.label) return G.rect(n, e);
1379
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1380
- return o = h ? [
1381
- {
1382
- x: r - d.width / 2,
1383
- y: i - a / 2
1384
- },
1385
- {
1386
- x: r + d.width / 2,
1387
- y: i - a / 2
1388
- },
1389
- {
1390
- x: r + d.width / 2,
1391
- y: i - a / 2 + d.height + k
1392
- },
1393
- {
1394
- x: r + _ / 2,
1395
- y: i - a / 2 + d.height + k
1396
- },
1397
- {
1398
- x: r + _ / 2,
1399
- y: i + a / 2
1400
- },
1401
- {
1402
- x: r - _ / 2,
1403
- y: i + a / 2
1404
- },
1405
- {
1406
- x: r - _ / 2,
1407
- y: i - a / 2 + d.height + k
1408
- },
1409
- {
1410
- x: r - d.width / 2,
1411
- y: i - a / 2 + d.height + k
1412
- }
1413
- ] : [
1414
- {
1415
- x: r - _ / 2,
1416
- y: i - a / 2
1417
- },
1418
- {
1419
- x: r + _ / 2,
1420
- y: i - a / 2
1421
- },
1422
- {
1423
- x: r + _ / 2,
1424
- y: i - a / 2 + g
1425
- },
1426
- {
1427
- x: r + d.width / 2,
1428
- y: i - a / 2 + g
1429
- },
1430
- {
1431
- x: r + d.width / 2 / 2,
1432
- y: i + a / 2
1433
- },
1434
- {
1435
- x: r - d.width / 2,
1436
- y: i + a / 2
1437
- },
1438
- {
1439
- x: r - d.width / 2,
1440
- y: i - a / 2 + g
1441
- },
1442
- {
1443
- x: r - _ / 2,
1444
- y: i - a / 2 + g
1445
- }
1446
- ], G.polygon(n, o, e);
1447
- }, u;
1448
- }
1449
- e(ze, "iconRounded");
1450
- async function Be(e, n, { config: { themeVariables: r, flowchart: i } }) {
1451
- let { labelStyles: a } = y(n);
1452
- n.labelStyle = a;
1453
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1454
- n.width = Math.max(c, l ?? 0);
1455
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, n, "icon-shape default"), h = n.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = x(n), D = -_ / 2, O = -g / 2, k = n.label ? 8 : 0, A = S.svg(u), j = v(n, {});
1456
- n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1457
- let M = A.path(N(D, O, _, g, .1), j), P = Math.max(_, d.width), F = g + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1458
- ...j,
1459
- fill: "transparent",
1460
- stroke: "none"
1461
- }), L = u.insert(() => M, ":first-child"), ee = u.insert(() => I);
1462
- if (n.icon) {
1463
- let e = u.append("g");
1464
- e.html(`<g>${await m(n.icon, {
1465
- height: c,
1466
- width: c,
1467
- fallbackPrefix: ""
1468
- })}</g>`);
1469
- let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1470
- e.attr("transform", `translate(${-r / 2 - a},${h ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1471
- }
1472
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${h ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${h ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, ee), n.intersect = function(e) {
1473
- if (t.info("iconSquare intersect", n, e), !n.label) return G.rect(n, e);
1474
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1475
- return o = h ? [
1476
- {
1477
- x: r - d.width / 2,
1478
- y: i - a / 2
1479
- },
1480
- {
1481
- x: r + d.width / 2,
1482
- y: i - a / 2
1483
- },
1484
- {
1485
- x: r + d.width / 2,
1486
- y: i - a / 2 + d.height + k
1487
- },
1488
- {
1489
- x: r + _ / 2,
1490
- y: i - a / 2 + d.height + k
1491
- },
1492
- {
1493
- x: r + _ / 2,
1494
- y: i + a / 2
1495
- },
1496
- {
1497
- x: r - _ / 2,
1498
- y: i + a / 2
1499
- },
1500
- {
1501
- x: r - _ / 2,
1502
- y: i - a / 2 + d.height + k
1503
- },
1504
- {
1505
- x: r - d.width / 2,
1506
- y: i - a / 2 + d.height + k
1507
- }
1508
- ] : [
1509
- {
1510
- x: r - _ / 2,
1511
- y: i - a / 2
1512
- },
1513
- {
1514
- x: r + _ / 2,
1515
- y: i - a / 2
1516
- },
1517
- {
1518
- x: r + _ / 2,
1519
- y: i - a / 2 + g
1520
- },
1521
- {
1522
- x: r + d.width / 2,
1523
- y: i - a / 2 + g
1524
- },
1525
- {
1526
- x: r + d.width / 2 / 2,
1527
- y: i + a / 2
1528
- },
1529
- {
1530
- x: r - d.width / 2,
1531
- y: i + a / 2
1532
- },
1533
- {
1534
- x: r - d.width / 2,
1535
- y: i - a / 2 + g
1536
- },
1537
- {
1538
- x: r - _ / 2,
1539
- y: i - a / 2 + g
1540
- }
1541
- ], G.polygon(n, o, e);
1542
- }, u;
1543
- }
1544
- e(Be, "iconSquare");
1545
- async function Ve(e, n, { config: { flowchart: r } }) {
1546
- let i = new Image();
1547
- i.src = n?.img ?? "", await i.decode();
1548
- let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
1549
- n.imageAspectRatio = a / o;
1550
- let { labelStyles: s } = y(n);
1551
- n.labelStyle = s;
1552
- let c = r?.wrappingWidth;
1553
- n.defaultWidth = r?.wrappingWidth;
1554
- let l = Math.max(n.label ? c ?? 0 : 0, n?.assetWidth ?? a), u = n.constraint === "on" && n?.assetHeight ? n.assetHeight * n.imageAspectRatio : l, d = n.constraint === "on" ? u / n.imageAspectRatio : n?.assetHeight ?? o;
1555
- n.width = Math.max(u, c ?? 0);
1556
- let { shapeSvg: f, bbox: p, label: m } = await C(e, n, "image-shape default"), h = n.pos === "t", g = -u / 2, _ = -d / 2, b = n.label ? 8 : 0, x = S.svg(f), w = v(n, {});
1557
- n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1558
- let E = x.rectangle(g, _, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
1559
- ...w,
1560
- fill: "none",
1561
- stroke: "none"
1562
- }), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
1563
- if (n.img) {
1564
- let e = f.append("image");
1565
- e.attr("href", n.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})`);
1566
- }
1567
- 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(n, j), n.intersect = function(e) {
1568
- if (t.info("iconSquare intersect", n, e), !n.label) return G.rect(n, e);
1569
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1570
- return o = h ? [
1571
- {
1572
- x: r - p.width / 2,
1573
- y: i - a / 2
1574
- },
1575
- {
1576
- x: r + p.width / 2,
1577
- y: i - a / 2
1578
- },
1579
- {
1580
- x: r + p.width / 2,
1581
- y: i - a / 2 + p.height + b
1582
- },
1583
- {
1584
- x: r + u / 2,
1585
- y: i - a / 2 + p.height + b
1586
- },
1587
- {
1588
- x: r + u / 2,
1589
- y: i + a / 2
1590
- },
1591
- {
1592
- x: r - u / 2,
1593
- y: i + a / 2
1594
- },
1595
- {
1596
- x: r - u / 2,
1597
- y: i - a / 2 + p.height + b
1598
- },
1599
- {
1600
- x: r - p.width / 2,
1601
- y: i - a / 2 + p.height + b
1602
- }
1603
- ] : [
1604
- {
1605
- x: r - u / 2,
1606
- y: i - a / 2
1607
- },
1608
- {
1609
- x: r + u / 2,
1610
- y: i - a / 2
1611
- },
1612
- {
1613
- x: r + u / 2,
1614
- y: i - a / 2 + d
1615
- },
1616
- {
1617
- x: r + p.width / 2,
1618
- y: i - a / 2 + d
1619
- },
1620
- {
1621
- x: r + p.width / 2 / 2,
1622
- y: i + a / 2
1623
- },
1624
- {
1625
- x: r - p.width / 2,
1626
- y: i + a / 2
1627
- },
1628
- {
1629
- x: r - p.width / 2,
1630
- y: i - a / 2 + d
1631
- },
1632
- {
1633
- x: r - u / 2,
1634
- y: i - a / 2 + d
1635
- }
1636
- ], G.polygon(n, o, e);
1637
- }, f;
1638
- }
1639
- e(Ve, "imageSquare");
1640
- async function He(e, t) {
1641
- let { labelStyles: n, nodeStyles: r } = y(t);
1642
- t.labelStyle = n;
1643
- 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 = [
1644
- {
1645
- x: 0,
1646
- y: 0
1647
- },
1648
- {
1649
- x: l,
1650
- y: 0
1651
- },
1652
- {
1653
- x: l + 3 * u / 6,
1654
- y: -u
1655
- },
1656
- {
1657
- x: -3 * u / 6,
1658
- y: -u
1659
- }
1660
- ], f, { cssStyles: p } = t;
1661
- if (t.look === "handDrawn") {
1662
- let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
1663
- f = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), p && f.attr("style", p);
1664
- } else f = q(s, l, u, d);
1665
- return r && f.attr("style", r), t.width = l, t.height = u, T(t, f), t.intersect = function(e) {
1666
- return G.polygon(t, d, e);
1667
- }, s;
1668
- }
1669
- e(He, "inv_trapezoid");
1670
- async function Ue(e, t) {
1671
- let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
1672
- 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) {
1673
- return G.rect(t, e);
1674
- }, n;
1675
- }
1676
- e(Ue, "labelRect");
1677
- async function We(e, t) {
1678
- let { labelStyles: n, nodeStyles: r } = y(t);
1679
- t.labelStyle = n;
1680
- 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 = [
1681
- {
1682
- x: 0,
1683
- y: 0
1684
- },
1685
- {
1686
- x: u + 3 * l / 6,
1687
- y: 0
1688
- },
1689
- {
1690
- x: u,
1691
- y: -l
1692
- },
1693
- {
1694
- x: -(3 * l) / 6,
1695
- y: -l
1696
- }
1697
- ], f, { cssStyles: p } = t;
1698
- if (t.look === "handDrawn") {
1699
- let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
1700
- f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1701
- } else f = q(s, u, l, d);
1702
- return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1703
- return G.polygon(t, d, e);
1704
- }, s;
1705
- }
1706
- e(We, "lean_left");
1707
- async function Ge(e, t) {
1708
- let { labelStyles: n, nodeStyles: r } = y(t);
1709
- t.labelStyle = n;
1710
- 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 = [
1711
- {
1712
- x: -3 * l / 6,
1713
- y: 0
1714
- },
1715
- {
1716
- x: u,
1717
- y: 0
1718
- },
1719
- {
1720
- x: u + 3 * l / 6,
1721
- y: -l
1722
- },
1723
- {
1724
- x: 0,
1725
- y: -l
1726
- }
1727
- ], f, { cssStyles: p } = t;
1728
- if (t.look === "handDrawn") {
1729
- let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
1730
- f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1731
- } else f = q(s, u, l, d);
1732
- return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1733
- return G.polygon(t, d, e);
1734
- }, s;
1735
- }
1736
- e(Ge, "lean_right");
1737
- function Ke(e, n) {
1738
- let { labelStyles: r, nodeStyles: i } = y(n);
1739
- n.label = "", n.labelStyle = r;
1740
- let a = e.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: o } = n, s = Math.max(35, n?.width ?? 0), c = Math.max(35, n?.height ?? 0), l = [
1741
- {
1742
- x: s,
1743
- y: 0
1744
- },
1745
- {
1746
- x: 0,
1747
- y: c + 7 / 2
1748
- },
1749
- {
1750
- x: s - 14,
1751
- y: c + 7 / 2
1752
- },
1753
- {
1754
- x: 0,
1755
- y: 2 * c
1756
- },
1757
- {
1758
- x: s,
1759
- y: c - 7 / 2
1760
- },
1761
- {
1762
- x: 14,
1763
- y: c - 7 / 2
1764
- }
1765
- ], u = S.svg(a), d = v(n, {});
1766
- n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
1767
- let f = D(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
1768
- return m.attr("class", "outer-path"), o && n.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && n.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(n, m), n.intersect = function(e) {
1769
- return t.info("lightningBolt intersect", n, e), G.polygon(n, l, e);
1770
- }, a;
1771
- }
1772
- e(Ke, "lightningBolt");
1773
- var qe = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
1774
- `M${e},${t + a}`,
1775
- `a${i},${a} 0,0,0 ${n},0`,
1776
- `a${i},${a} 0,0,0 ${-n},0`,
1777
- `l0,${r}`,
1778
- `a${i},${a} 0,0,0 ${n},0`,
1779
- `l0,${-r}`,
1780
- `M${e},${t + a + o}`,
1781
- `a${i},${a} 0,0,0 ${n},0`
1782
- ].join(" "), "createCylinderPathD"), Je = /* @__PURE__ */ e((e, t, n, r, i, a, o) => [
1783
- `M${e},${t + a}`,
1784
- `M${e + n},${t + a}`,
1785
- `a${i},${a} 0,0,0 ${-n},0`,
1786
- `l0,${r}`,
1787
- `a${i},${a} 0,0,0 ${n},0`,
1788
- `l0,${-r}`,
1789
- `M${e},${t + a + o}`,
1790
- `a${i},${a} 0,0,0 ${n},0`
1791
- ].join(" "), "createOuterCylinderPathD"), Ye = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Xe = 10, Ze = 10;
1792
- async function Qe(e, t) {
1793
- let { labelStyles: n, nodeStyles: r } = y(t);
1794
- t.labelStyle = n;
1795
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
1796
- if (t.width || t.height) {
1797
- let e = t.width ?? 0;
1798
- t.width = (t.width ?? 0) - a, t.width < Ze && (t.width = Ze);
1799
- let n = e / 2 / (2.5 + e / 50);
1800
- t.height = (t.height ?? 0) - o - n * 3, t.height < Xe && (t.height = Xe);
1801
- }
1802
- 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, f = d / (2.5 + u / 50), m = (t?.height ? t?.height : c.height) + f + o * 2, h = m * .1, g, { cssStyles: _ } = t;
1803
- if (t.look === "handDrawn") {
1804
- let e = S.svg(s), n = Je(0, 0, u, m, d, f, h), r = Ye(0, f, u, m, d, f), i = v(t, {}), a = e.path(n, i), o = e.path(r, i);
1805
- s.insert(() => o, ":first-child").attr("class", "line"), g = s.insert(() => a, ":first-child"), g.attr("class", "basic label-container"), _ && g.attr("style", _);
1806
- } else {
1807
- let e = qe(0, 0, u, m, d, f, h);
1808
- g = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(_)).attr("style", r);
1809
- }
1810
- return g.attr("label-offset-y", f), g.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, g), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + f - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
1811
- let n = G.rect(t, e), r = n.x - (t.x ?? 0);
1812
- 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 - f)) {
1813
- let i = f * f * (1 - r * r / (d * d));
1814
- i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
1815
- }
1816
- return n;
1817
- }, s;
1818
- }
1819
- e(Qe, "linedCylinder");
1820
- async function $e(e, t) {
1821
- let { labelStyles: n, nodeStyles: r } = y(t);
1822
- t.labelStyle = n;
1823
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
1824
- (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));
1825
- 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), g = v(t, {});
1826
- t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1827
- let _ = [
1828
- {
1829
- x: -u / 2 - u / 2 * .1,
1830
- y: -p / 2
1831
- },
1832
- {
1833
- x: -u / 2 - u / 2 * .1,
1834
- y: p / 2
1835
- },
1836
- ...O(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
1837
- {
1838
- x: u / 2 + u / 2 * .1,
1839
- y: -p / 2
1840
- },
1841
- {
1842
- x: -u / 2 - u / 2 * .1,
1843
- y: -p / 2
1844
- },
1845
- {
1846
- x: -u / 2,
1847
- y: -p / 2
1848
- },
1849
- {
1850
- x: -u / 2,
1851
- y: p / 2 * 1.1
1852
- },
1853
- {
1854
- x: -u / 2,
1855
- y: -p / 2
1856
- }
1857
- ], b = h.polygon(_.map((e) => [e.x, e.y]), g), x = s.insert(() => b, ":first-child");
1858
- 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) {
1859
- return G.polygon(t, _, e);
1860
- }, s;
1861
- }
1862
- e($e, "linedWaveEdgedRect");
1863
- async function et(e, t) {
1864
- let { labelStyles: n, nodeStyles: r } = y(t);
1865
- t.labelStyle = n;
1866
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
1867
- (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));
1868
- 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, g = -m / 2, { cssStyles: _ } = t, b = S.svg(c), x = v(t, {}), w = [
1869
- {
1870
- x: h - s,
1871
- y: g + s
1872
- },
1873
- {
1874
- x: h - s,
1875
- y: g + m + s
1876
- },
1877
- {
1878
- x: h + p - s,
1879
- y: g + m + s
1880
- },
1881
- {
1882
- x: h + p - s,
1883
- y: g + m
1884
- },
1885
- {
1886
- x: h + p,
1887
- y: g + m
1888
- },
1889
- {
1890
- x: h + p,
1891
- y: g + m - s
1892
- },
1893
- {
1894
- x: h + p + s,
1895
- y: g + m - s
1896
- },
1897
- {
1898
- x: h + p + s,
1899
- y: g - s
1900
- },
1901
- {
1902
- x: h + s,
1903
- y: g - s
1904
- },
1905
- {
1906
- x: h + s,
1907
- y: g
1908
- },
1909
- {
1910
- x: h,
1911
- y: g
1912
- },
1913
- {
1914
- x: h,
1915
- y: g + s
1916
- }
1917
- ], O = [
1918
- {
1919
- x: h,
1920
- y: g + s
1921
- },
1922
- {
1923
- x: h + p - s,
1924
- y: g + s
1925
- },
1926
- {
1927
- x: h + p - s,
1928
- y: g + m
1929
- },
1930
- {
1931
- x: h + p,
1932
- y: g + m
1933
- },
1934
- {
1935
- x: h + p,
1936
- y: g
1937
- },
1938
- {
1939
- x: h,
1940
- y: g
1941
- }
1942
- ];
1943
- t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1944
- let k = D(w), j = b.path(k, x), M = D(O), N = b.path(M, x);
1945
- t.look !== "handDrawn" && (j = A(j), N = A(N));
1946
- let P = c.insert("g", ":first-child");
1947
- return P.insert(() => j), P.insert(() => N), P.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && P.selectAll("path").attr("style", _), 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) {
1948
- return G.polygon(t, w, e);
1949
- }, c;
1950
- }
1951
- e(et, "multiRect");
1952
- async function tt(e, t) {
1953
- let { labelStyles: n, nodeStyles: r } = y(t);
1954
- t.labelStyle = n;
1955
- 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;
1956
- (t.width || t.height) && (u = !1, t.width = (t?.width ?? 0) - c * 2, t.height = (t?.height ?? 0) - l * 3);
1957
- 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, g = -m / 2, { cssStyles: _ } = t, b = O(h - 10, g + m + 10, h + d - 10, g + m + 10, p, .8), x = b?.[b.length - 1], w = [
1958
- {
1959
- x: h - 10,
1960
- y: g + 10
1961
- },
1962
- {
1963
- x: h - 10,
1964
- y: g + m + 10
1965
- },
1966
- ...b,
1967
- {
1968
- x: h + d - 10,
1969
- y: x.y - 10
1970
- },
1971
- {
1972
- x: h + d,
1973
- y: x.y - 10
1974
- },
1975
- {
1976
- x: h + d,
1977
- y: x.y - 20
1978
- },
1979
- {
1980
- x: h + d + 10,
1981
- y: x.y - 20
1982
- },
1983
- {
1984
- x: h + d + 10,
1985
- y: g - 10
1986
- },
1987
- {
1988
- x: h + 10,
1989
- y: g - 10
1990
- },
1991
- {
1992
- x: h + 10,
1993
- y: g
1994
- },
1995
- {
1996
- x: h,
1997
- y: g
1998
- },
1999
- {
2000
- x: h,
2001
- y: g + 10
2002
- }
2003
- ], k = [
2004
- {
2005
- x: h,
2006
- y: g + 10
2007
- },
2008
- {
2009
- x: h + d - 10,
2010
- y: g + 10
2011
- },
2012
- {
2013
- x: h + d - 10,
2014
- y: x.y - 10
2015
- },
2016
- {
2017
- x: h + d,
2018
- y: x.y - 10
2019
- },
2020
- {
2021
- x: h + d,
2022
- y: g
2023
- },
2024
- {
2025
- x: h,
2026
- y: g
2027
- }
2028
- ], A = S.svg(i), j = v(t, {});
2029
- t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
2030
- let M = D(w), N = A.path(M, j), P = D(k), F = A.path(P, j), I = i.insert(() => N, ":first-child");
2031
- return I.insert(() => F), I.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && I.selectAll("path").attr("style", _), 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) {
2032
- return G.polygon(t, w, e);
2033
- }, i;
2034
- }
2035
- e(tt, "multiWaveEdgedRectangle");
2036
- async function nt(e, t, { config: { themeVariables: n } }) {
2037
- let { labelStyles: r, nodeStyles: i } = y(t);
2038
- t.labelStyle = r, t.useHtmlLabels || o(s()) || (t.centerLabel = !0);
2039
- 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), g = v(t, {
2040
- fill: n.noteBkgColor,
2041
- stroke: n.noteBorderColor
2042
- });
2043
- t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
2044
- let _ = h.rectangle(f, p, u, d, g), b = a.insert(() => _, ":first-child");
2045
- 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) {
2046
- return G.rect(t, e);
2047
- }, a;
2048
- }
2049
- e(nt, "note");
2050
- var rt = /* @__PURE__ */ e((e, t, n) => [
2051
- `M${e + n / 2},${t}`,
2052
- `L${e + n},${t - n / 2}`,
2053
- `L${e + n / 2},${t - n}`,
2054
- `L${e},${t - n / 2}`,
2055
- "Z"
2056
- ].join(" "), "createDecisionBoxPathD");
2057
- async function it(e, t) {
2058
- let { labelStyles: n, nodeStyles: r } = y(t);
2059
- t.labelStyle = n;
2060
- 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 = [
2061
- {
2062
- x: o / 2,
2063
- y: 0
2064
- },
2065
- {
2066
- x: o,
2067
- y: -o / 2
2068
- },
2069
- {
2070
- x: o / 2,
2071
- y: -o
2072
- },
2073
- {
2074
- x: 0,
2075
- y: -o / 2
2076
- }
2077
- ], l, { cssStyles: u } = t;
2078
- if (t.look === "handDrawn") {
2079
- let e = S.svg(i), n = v(t, {}), r = rt(0, 0, o), a = e.path(r, n);
2080
- l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
2081
- } else l = q(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
2082
- return r && l.attr("style", r), T(t, l), t.calcIntersect = function(e, t) {
2083
- let n = e.width, r = [
2084
- {
2085
- x: n / 2,
2086
- y: 0
2087
- },
2088
- {
2089
- x: n,
2090
- y: -n / 2
2091
- },
2092
- {
2093
- x: n / 2,
2094
- y: -n
2095
- },
2096
- {
2097
- x: 0,
2098
- y: -n / 2
2099
- }
2100
- ], i = G.polygon(e, r, t);
2101
- return {
2102
- x: i.x - .5,
2103
- y: i.y - .5
2104
- };
2105
- }, t.intersect = function(e) {
2106
- return this.calcIntersect(t, e);
2107
- }, i;
2108
- }
2109
- e(it, "question");
2110
- async function at(e, t) {
2111
- let { labelStyles: n, nodeStyles: r } = y(t);
2112
- t.labelStyle = n;
2113
- 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 = [
2114
- {
2115
- x: f + m,
2116
- y: p
2117
- },
2118
- {
2119
- x: f,
2120
- y: 0
2121
- },
2122
- {
2123
- x: f + m,
2124
- y: -p
2125
- },
2126
- {
2127
- x: -f,
2128
- y: -p
2129
- },
2130
- {
2131
- x: -f,
2132
- y: p
2133
- }
2134
- ], { cssStyles: g } = t, _ = S.svg(s), b = v(t, {});
2135
- t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2136
- let x = D(h), w = _.path(x, b), O = s.insert(() => w, ":first-child");
2137
- return O.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && O.selectAll("path").attr("style", g), 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) {
2138
- return G.polygon(t, h, e);
2139
- }, s;
2140
- }
2141
- e(at, "rect_left_inv_arrow");
2142
- async function ot(e, r) {
2143
- let { labelStyles: i, nodeStyles: a } = y(r);
2144
- r.labelStyle = i;
2145
- let s;
2146
- s = r.cssClasses ? "node " + r.cssClasses : "node default";
2147
- let c = e.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", a), f = r.description, p = r.label, m = await M(d, p, r.labelStyle, !0, !0), h = {
2148
- width: 0,
2149
- height: 0
2150
- };
2151
- if (o(l())) {
2152
- let e = m.children[0], t = n(m);
2153
- h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2154
- }
2155
- t.info("Text 2", f);
2156
- let g = f || [], _ = m.getBBox(), b = await M(d, Array.isArray(g) ? g.join("<br/>") : g, r.labelStyle, !0, !0), x = b.children[0], C = n(b);
2157
- h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
2158
- let w = (r.padding || 0) / 2;
2159
- n(b).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + w + 5) + ")"), n(m).attr("transform", "translate( " + (h.width < _.width ? 0 : -(_.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2160
- let E = h.width + (r.padding || 0), D = h.height + (r.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, j;
2161
- if (r.look === "handDrawn") {
2162
- let e = S.svg(c), n = v(r, {}), i = e.path(N(O, k, E, D, r.rx || 0), n), a = e.line(-h.width / 2 - w, -h.height / 2 - w + _.height + w, h.width / 2 + w, -h.height / 2 - w + _.height + w, n);
2163
- j = c.insert(() => (t.debug("Rough node insert CXC", i), a), ":first-child"), A = c.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child");
2164
- } else A = u.insert("rect", ":first-child"), j = u.insert("line"), A.attr("class", "outer title-state").attr("style", a).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), j.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + _.height + w).attr("y2", -h.height / 2 - w + _.height + w);
2165
- return T(r, A), r.intersect = function(e) {
2166
- return G.rect(r, e);
2167
- }, c;
2168
- }
2169
- e(ot, "rectWithTitle");
2170
- async function st(e, t, { config: { themeVariables: n } }) {
2171
- let r = n?.radius ?? 5;
2172
- return we(e, t, {
2173
- rx: r,
2174
- ry: r,
2175
- classes: "",
2176
- labelPaddingX: (t?.padding ?? 0) * 1,
2177
- labelPaddingY: (t?.padding ?? 0) * 1
2178
- });
2179
- }
2180
- e(st, "roundedRect");
2181
- var Z = 8;
2182
- async function ct(e, t) {
2183
- let { labelStyles: n, nodeStyles: r } = y(t);
2184
- t.labelStyle = n;
2185
- 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, f = u, m = Z - l / 2, h = -u / 2, { cssStyles: g } = t, _ = S.svg(o), b = v(t, {});
2186
- t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2187
- let x = [
2188
- {
2189
- x: m,
2190
- y: h
2191
- },
2192
- {
2193
- x: m + d,
2194
- y: h
2195
- },
2196
- {
2197
- x: m + d,
2198
- y: h + f
2199
- },
2200
- {
2201
- x: m - Z,
2202
- y: h + f
2203
- },
2204
- {
2205
- x: m - Z,
2206
- y: h
2207
- },
2208
- {
2209
- x: m,
2210
- y: h
2211
- },
2212
- {
2213
- x: m,
2214
- y: h + f
2215
- }
2216
- ], w = _.polygon(x.map((e) => [e.x, e.y]), b), D = o.insert(() => w, ":first-child");
2217
- return D.attr("class", "basic label-container outer-path").attr("style", p(g)), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), g && 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) {
2218
- return G.rect(t, e);
2219
- }, o;
2220
- }
2221
- e(ct, "shadedProcess");
2222
- async function lt(e, t) {
2223
- let { labelStyles: n, nodeStyles: r } = y(t);
2224
- t.labelStyle = n;
2225
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2226
- (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));
2227
- 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: g } = t, _ = S.svg(s), b = v(t, {});
2228
- t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2229
- let x = [
2230
- {
2231
- x: m,
2232
- y: h
2233
- },
2234
- {
2235
- x: m,
2236
- y: h + p
2237
- },
2238
- {
2239
- x: m + f,
2240
- y: h + p
2241
- },
2242
- {
2243
- x: m + f,
2244
- y: h - p / 2
2245
- }
2246
- ], w = D(x), O = _.path(w, b), k = s.insert(() => O, ":first-child");
2247
- return k.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && k.selectChildren("path").attr("style", g), 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) {
2248
- return G.polygon(t, x, e);
2249
- }, s;
2250
- }
2251
- e(lt, "slopedRect");
2252
- async function ut(e, t) {
2253
- let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n;
2254
- return we(e, t, {
2255
- rx: 0,
2256
- ry: 0,
2257
- classes: "",
2258
- labelPaddingX: t.labelPaddingX ?? r,
2259
- labelPaddingY: i
2260
- });
2261
- }
2262
- e(ut, "squareRect");
2263
- async function dt(e, t) {
2264
- let { labelStyles: n, nodeStyles: r } = y(t);
2265
- t.labelStyle = n;
2266
- 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 = v(t, {});
2267
- t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
2268
- let h = [
2269
- {
2270
- x: -u / 2 + d,
2271
- y: -l / 2
2272
- },
2273
- {
2274
- x: u / 2 - d,
2275
- y: -l / 2
2276
- },
2277
- ...k(-u / 2 + d, 0, d, 50, 90, 270),
2278
- {
2279
- x: u / 2 - d,
2280
- y: l / 2
2281
- },
2282
- ...k(u / 2 - d, 0, d, 50, 270, 450)
2283
- ], g = D(h), _ = p.path(g, m), b = s.insert(() => _, ":first-child");
2284
- 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) {
2285
- return G.polygon(t, h, e);
2286
- }, s;
2287
- }
2288
- e(dt, "stadium");
2289
- async function ft(e, t) {
2290
- return we(e, t, {
2291
- rx: t.look === "neo" ? 3 : 5,
2292
- ry: t.look === "neo" ? 3 : 5,
2293
- classes: "flowchart-node"
2294
- });
2295
- }
2296
- e(ft, "state");
2297
- function pt(e, t, { config: { themeVariables: n } }) {
2298
- let { labelStyles: r, nodeStyles: i } = y(t);
2299
- t.labelStyle = r;
2300
- let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
2301
- (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2302
- let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = S.svg(u), f = v(t, {});
2303
- t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
2304
- let p = d.circle(0, 0, t.width, {
2305
- ...f,
2306
- stroke: o,
2307
- strokeWidth: 2
2308
- }), m = s ?? c, h = (t.width ?? 0) * 5 / 14, g = d.circle(0, 0, h, {
2309
- ...f,
2310
- fill: m,
2311
- stroke: m,
2312
- strokeWidth: 2,
2313
- fillStyle: "solid"
2314
- }), _ = u.insert(() => p, ":first-child");
2315
- if (_.insert(() => g), t.look !== "handDrawn" && _.attr("class", "outer-path"), a && _.selectAll("path").attr("style", a), i && _.selectAll("path").attr("style", i), t.width < 25 && l && t.look !== "handDrawn") {
2316
- let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2317
- _.attr("style", `filter:url(#${n})`);
2318
- }
2319
- return T(t, _), t.intersect = function(e) {
2320
- return G.circle(t, (t.width ?? 0) / 2, e);
2321
- }, u;
2322
- }
2323
- e(pt, "stateEnd");
2324
- function mt(e, t, { config: { themeVariables: n } }) {
2325
- let { lineColor: r, nodeShadow: i } = n;
2326
- (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2327
- let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
2328
- if (t.look === "handDrawn") {
2329
- let e = S.svg(a).circle(0, 0, t.width, b(r));
2330
- 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);
2331
- } 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);
2332
- if (t.width < 25 && i && t.look !== "handDrawn") {
2333
- let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2334
- o.attr("style", `filter:url(#${n})`);
2335
- }
2336
- return T(t, o), t.intersect = function(e) {
2337
- return G.circle(t, (t.width ?? 7) / 2, e);
2338
- }, a;
2339
- }
2340
- e(mt, "stateStart");
2341
- var ht = 8;
2342
- async function gt(e, t) {
2343
- let { labelStyles: n, nodeStyles: r } = y(t);
2344
- t.labelStyle = n;
2345
- 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 * ht + a, u = (t?.height ?? c.height) + o, d = l - 2 * ht, f = u, m = -l / 2, h = -u / 2, g = [
2346
- {
2347
- x: 0,
2348
- y: 0
2349
- },
2350
- {
2351
- x: d,
2352
- y: 0
2353
- },
2354
- {
2355
- x: d,
2356
- y: -f
2357
- },
2358
- {
2359
- x: 0,
2360
- y: -f
2361
- },
2362
- {
2363
- x: 0,
2364
- y: 0
2365
- },
2366
- {
2367
- x: -8,
2368
- y: 0
2369
- },
2370
- {
2371
- x: d + 8,
2372
- y: 0
2373
- },
2374
- {
2375
- x: d + 8,
2376
- y: -f
2377
- },
2378
- {
2379
- x: -8,
2380
- y: -f
2381
- },
2382
- {
2383
- x: -8,
2384
- y: 0
2385
- }
2386
- ];
2387
- if (t.look === "handDrawn") {
2388
- let e = S.svg(s), n = v(t, {}), r = e.rectangle(m, h, d + 16, f, n), i = e.line(m + ht, h, m + ht, h + f, n), a = e.line(m + ht + d, h, m + ht + d, h + f, n);
2389
- s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
2390
- let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
2391
- o.attr("class", "basic label-container").attr("style", p(c)), T(t, o);
2392
- } else {
2393
- let e = q(s, d, f, g);
2394
- r && e.attr("style", r), T(t, e);
2395
- }
2396
- return t.intersect = function(e) {
2397
- return G.polygon(t, g, e);
2398
- }, s;
2399
- }
2400
- e(gt, "subroutine");
2401
- var _t = .2;
2402
- async function vt(e, t) {
2403
- let { labelStyles: n, nodeStyles: r } = y(t);
2404
- t.labelStyle = n;
2405
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2406
- (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - _t * (t.height + o * 2), 10));
2407
- let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = _t * l, d = _t * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: g } = t, _ = S.svg(s), b = v(t, {}), x = [
2408
- {
2409
- x: m - u / 2,
2410
- y: h
2411
- },
2412
- {
2413
- x: m + f + u / 2,
2414
- y: h
2415
- },
2416
- {
2417
- x: m + f + u / 2,
2418
- y: h + p
2419
- },
2420
- {
2421
- x: m - u / 2,
2422
- y: h + p
2423
- }
2424
- ], w = [
2425
- {
2426
- x: m + f - u / 2,
2427
- y: h + p
2428
- },
2429
- {
2430
- x: m + f + u / 2,
2431
- y: h + p
2432
- },
2433
- {
2434
- x: m + f + u / 2,
2435
- y: h + p - d
2436
- }
2437
- ];
2438
- t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2439
- let O = D(x), k = _.path(O, b), A = D(w), j = _.path(A, {
2440
- ...b,
2441
- fillStyle: "solid"
2442
- }), M = s.insert(() => j, ":first-child");
2443
- return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && M.selectAll("path").attr("style", g), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), T(t, M), t.intersect = function(e) {
2444
- return G.polygon(t, x, e);
2445
- }, s;
2446
- }
2447
- e(vt, "taggedRect");
2448
- async function yt(e, t) {
2449
- let { labelStyles: n, nodeStyles: r } = y(t);
2450
- t.labelStyle = n;
2451
- 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 = v(t, {});
2452
- t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2453
- let g = [
2454
- {
2455
- x: -s / 2 - s / 2 * .1,
2456
- y: f / 2
2457
- },
2458
- ...O(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2459
- {
2460
- x: s / 2 + s / 2 * .1,
2461
- y: -f / 2
2462
- },
2463
- {
2464
- x: -s / 2 - s / 2 * .1,
2465
- y: -f / 2
2466
- }
2467
- ], _ = -s / 2 + s / 2 * .1, b = -f / 2 - d * .4, x = [
2468
- {
2469
- x: _ + s - u,
2470
- y: (b + c) * 1.3
2471
- },
2472
- {
2473
- x: _ + s,
2474
- y: b + c - d
2475
- },
2476
- {
2477
- x: _ + s,
2478
- y: (b + c) * .9
2479
- },
2480
- ...O(_ + s, (b + c) * 1.25, _ + s - u, (b + c) * 1.3, -c * .02, .5)
2481
- ], w = D(g), k = m.path(w, h), A = D(x), j = m.path(A, {
2482
- ...h,
2483
- fillStyle: "solid"
2484
- }), M = i.insert(() => j, ":first-child");
2485
- 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) {
2486
- return G.polygon(t, g, e);
2487
- }, i;
2488
- }
2489
- e(yt, "taggedWaveEdgedRectangle");
2490
- async function bt(e, t) {
2491
- let { labelStyles: n, nodeStyles: r } = y(t);
2492
- t.labelStyle = n;
2493
- 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");
2494
- 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) {
2495
- return G.rect(t, e);
2496
- }, i;
2497
- }
2498
- e(bt, "text");
2499
- var xt = /* @__PURE__ */ e((e, t, n, r, i, a) => `M${e},${t}
2500
- a${i},${a} 0,0,1 0,${-r}
2501
- l${n},0
2502
- a${i},${a} 0,0,1 0,${r}
2503
- M${n},${-r}
2504
- a${i},${a} 0,0,0 0,${r}
2505
- l${-n},0`, "createCylinderPathD"), St = /* @__PURE__ */ e((e, t, n, r, i, a) => [
2506
- `M${e},${t}`,
2507
- `M${e + n},${t}`,
2508
- `a${i},${a} 0,0,0 0,${-r}`,
2509
- `l${-n},0`,
2510
- `a${i},${a} 0,0,0 0,${r}`,
2511
- `l${n},0`
2512
- ].join(" "), "createOuterCylinderPathD"), Ct = /* @__PURE__ */ e((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), wt = 5, Tt = 10;
2513
- async function Et(e, t) {
2514
- let { labelStyles: n, nodeStyles: r } = y(t);
2515
- t.labelStyle = n;
2516
- let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2;
2517
- if (t.width || t.height) {
2518
- let e = t.height ?? 0;
2519
- t.height = (t.height ?? 0) - a, t.height < wt && (t.height = wt);
2520
- let n = e / 2 / (2.5 + e / 50);
2521
- t.width = (t.width ?? 0) - a - n * 3, t.width < Tt && (t.width = Tt);
2522
- }
2523
- 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), f = (t.width ? t.width : s.width) + d + a, { cssStyles: m } = t, h;
2524
- if (t.look === "handDrawn") {
2525
- let e = S.svg(o), n = St(0, 0, f, l, d, u), r = Ct(0, 0, f, l, d, u), i = e.path(n, v(t, {})), a = e.path(r, v(t, { fill: "none" }));
2526
- h = o.insert(() => a, ":first-child"), h = o.insert(() => i, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
2527
- } else {
2528
- let e = xt(0, 0, f, l, d, u);
2529
- h = o.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", p(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);
2530
- }
2531
- return h.attr("label-offset-x", d), h.attr("transform", `translate(${-f / 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) {
2532
- let n = G.rect(t, e), r = n.y - (t.y ?? 0);
2533
- 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)) {
2534
- let i = d * d * (1 - r * r / (u * u));
2535
- i != 0 && (i = Math.sqrt(Math.abs(i))), i = d - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2536
- }
2537
- return n;
2538
- }, o;
2539
- }
2540
- e(Et, "tiltedCylinder");
2541
- async function Dt(e, t) {
2542
- let { labelStyles: n, nodeStyles: r } = y(t);
2543
- t.labelStyle = n;
2544
- 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 = [
2545
- {
2546
- x: -3 * l / 6,
2547
- y: 0
2548
- },
2549
- {
2550
- x: u + 3 * l / 6,
2551
- y: 0
2552
- },
2553
- {
2554
- x: u,
2555
- y: -l
2556
- },
2557
- {
2558
- x: 0,
2559
- y: -l
2560
- }
2561
- ], f, { cssStyles: p } = t;
2562
- if (t.look === "handDrawn") {
2563
- let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
2564
- f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2565
- } else f = q(s, u, l, d);
2566
- return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
2567
- return G.polygon(t, d, e);
2568
- }, s;
2569
- }
2570
- e(Dt, "trapezoid");
2571
- async function Ot(e, t) {
2572
- let { labelStyles: n, nodeStyles: r } = y(t);
2573
- t.labelStyle = n;
2574
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2575
- (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));
2576
- 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 = v(t, {});
2577
- t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
2578
- let m = [
2579
- {
2580
- x: -l / 2 * .8,
2581
- y: -u / 2
2582
- },
2583
- {
2584
- x: l / 2 * .8,
2585
- y: -u / 2
2586
- },
2587
- {
2588
- x: l / 2,
2589
- y: -u / 2 * .6
2590
- },
2591
- {
2592
- x: l / 2,
2593
- y: u / 2
2594
- },
2595
- {
2596
- x: -l / 2,
2597
- y: u / 2
2598
- },
2599
- {
2600
- x: -l / 2,
2601
- y: -u / 2 * .6
2602
- }
2603
- ], h = D(m), g = f.path(h, p), _ = s.insert(() => g, ":first-child");
2604
- return _.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && _.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && _.selectChildren("path").attr("style", r), T(t, _), t.intersect = function(e) {
2605
- return G.polygon(t, m, e);
2606
- }, s;
2607
- }
2608
- e(Ot, "trapezoidalPentagon");
2609
- var kt = 10, At = 10;
2610
- async function jt(e, n) {
2611
- let { labelStyles: r, nodeStyles: i } = y(n);
2612
- n.labelStyle = r;
2613
- let a = n.padding ?? 0, o = n.look === "neo" ? a * 2 : a;
2614
- (n.width || n.height) && (n.width = ((n?.width ?? 0) - o) / 2, n.width < At && (n.width = At), n.height = n?.height ?? 0, n.height < kt && (n.height = kt));
2615
- let { shapeSvg: s, bbox: u, label: d } = await C(e, n, E(n)), f = c(l().flowchart?.htmlLabels), p = (n?.width ? n?.width : u.width) + o, m = n?.height ? n?.height : p + u.height, h = m, g = [
2616
- {
2617
- x: 0,
2618
- y: 0
2619
- },
2620
- {
2621
- x: h,
2622
- y: 0
2623
- },
2624
- {
2625
- x: h / 2,
2626
- y: -m
2627
- }
2628
- ], { cssStyles: _ } = n, b = S.svg(s), x = v(n, {});
2629
- n.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2630
- let w = D(g), O = b.path(w, x), k = s.insert(() => O, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
2631
- return _ && n.look !== "handDrawn" && k.selectChildren("path").attr("style", _), i && n.look !== "handDrawn" && k.selectChildren("path").attr("style", i), n.width = p, n.height = m, T(n, k), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (n.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), n.intersect = function(e) {
2632
- return t.info("Triangle intersect", n, g, e), G.polygon(n, g, e);
2633
- }, s;
2634
- }
2635
- e(jt, "triangle");
2636
- async function Mt(e, t) {
2637
- let { labelStyles: n, nodeStyles: r } = y(t);
2638
- t.labelStyle = n;
2639
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
2640
- (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));
2641
- 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, g = 14 - d, _ = g > 0 ? g / 2 : 0, b = S.svg(c), x = v(t, {});
2642
- t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2643
- let w = [
2644
- {
2645
- x: -d / 2 - _,
2646
- y: m / 2
2647
- },
2648
- ...O(-d / 2 - _, m / 2, d / 2 + _, m / 2, p, .8),
2649
- {
2650
- x: d / 2 + _,
2651
- y: -m / 2
2652
- },
2653
- {
2654
- x: -d / 2 - _,
2655
- y: -m / 2
2656
- }
2657
- ], k = D(w), A = b.path(k, x), j = c.insert(() => A, ":first-child");
2658
- 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) {
2659
- return G.polygon(t, w, e);
2660
- }, c;
2661
- }
2662
- e(Mt, "waveEdgedRectangle");
2663
- async function Nt(e, t) {
2664
- let { labelStyles: n, nodeStyles: r } = y(t);
2665
- t.labelStyle = n;
2666
- let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
2667
- if (t.width || t.height) {
2668
- t.width = t?.width ?? 0, t.width < 20 && (t.width = 20), t.height = t?.height ?? 0, t.height < 10 && (t.height = 10);
2669
- let e = Math.min(t.height * .2, t.height / 4);
2670
- t.height = Math.ceil(t.height - o - 20 / 9 * e), t.width -= a * 2;
2671
- }
2672
- 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 = v(t, {});
2673
- t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2674
- let g = [
2675
- {
2676
- x: -l / 2,
2677
- y: f / 2
2678
- },
2679
- ...O(-l / 2, f / 2, l / 2, f / 2, d, 1),
2680
- {
2681
- x: l / 2,
2682
- y: -f / 2
2683
- },
2684
- ...O(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
2685
- ], _ = D(g), b = m.path(_, h), x = s.insert(() => b, ":first-child");
2686
- 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) {
2687
- return G.polygon(t, g, e);
2688
- }, s;
2689
- }
2690
- e(Nt, "waveRectangle");
2691
- var Q = 10;
2692
- async function Pt(e, t) {
2693
- let { labelStyles: n, nodeStyles: r } = y(t);
2694
- t.labelStyle = n;
2695
- let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
2696
- (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));
2697
- 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, g = S.svg(o), _ = v(t, {}), b = [
2698
- {
2699
- x: p - Q,
2700
- y: m - Q
2701
- },
2702
- {
2703
- x: p - Q,
2704
- y: m + f
2705
- },
2706
- {
2707
- x: p + d,
2708
- y: m + f
2709
- },
2710
- {
2711
- x: p + d,
2712
- y: m - Q
2713
- }
2714
- ], 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}
2715
- M${p - Q},${m} L${p + d},${m}
2716
- M${p},${m - Q} L${p},${m + f}`;
2717
- t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2718
- let w = g.path(x, _), D = o.insert(() => w, ":first-child");
2719
- 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) {
2720
- return G.polygon(t, b, e);
2721
- }, o;
2722
- }
2723
- e(Pt, "windowPane");
2724
- var Ft = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), It = /* @__PURE__ */ new Set([
2725
- "redux",
2726
- "redux-dark",
2727
- "redux-color",
2728
- "redux-dark-color"
2729
- ]);
2730
- async function Lt(e, t) {
2731
- let r = t;
2732
- r.alias && (t.label = r.alias);
2733
- let { theme: i, themeVariables: a } = s(), { rowEven: o, rowOdd: l, nodeBorder: u, borderColorArray: d } = a;
2734
- if (t.look === "handDrawn") {
2735
- let { themeVariables: n } = s(), { background: r } = n;
2736
- await Lt(e, {
2737
- ...t,
2738
- id: t.id + "-background",
2739
- domId: (t.domId || t.id) + "-background",
2740
- look: "default",
2741
- cssStyles: ["stroke: none", `fill: ${r}`]
2742
- });
2743
- }
2744
- let p = s();
2745
- t.useHtmlLabels = p.htmlLabels;
2746
- let m = p.er?.diagramPadding ?? 10, h = p.er?.entityPadding ?? 6, { cssStyles: g } = t, { labelStyles: _, nodeStyles: b } = y(t);
2747
- if (r.attributes.length === 0 && t.label) {
2748
- let n = {
2749
- rx: 0,
2750
- ry: 0,
2751
- labelPaddingX: m,
2752
- labelPaddingY: m * 1.5,
2753
- classes: ""
2754
- };
2755
- f(t.label, p) + n.labelPaddingX * 2 < p.er.minEntityWidth && (t.width = p.er.minEntityWidth);
2756
- let a = await we(e, t, n);
2757
- if (i != null && Ft.has(i)) {
2758
- let e = r.colorIndex ?? 0;
2759
- a.attr("data-color-id", `color-${e % d.length}`);
2760
- }
2761
- if (!c(p.htmlLabels)) {
2762
- let e = a.select("text"), t = e.node()?.getBBox();
2763
- e.attr("transform", `translate(${-t.width / 2}, 0)`);
2764
- }
2765
- return a;
2766
- }
2767
- p.htmlLabels || (m *= 1.25, h *= 1.25);
2768
- let x = E(t);
2769
- x ||= "node default";
2770
- let C = e.insert("g").attr("class", x).attr("id", t.domId || t.id), w = await Rt(C, t.label ?? "", p, 0, 0, ["name"], _);
2771
- w.height += h;
2772
- let D = 0, O = [], k = [], A = 0, j = 0, M = 0, N = 0, P = !0, F = !0;
2773
- for (let e of r.attributes) {
2774
- let t = await Rt(C, e.type, p, 0, D, ["attribute-type"], _);
2775
- A = Math.max(A, t.width + m);
2776
- let n = await Rt(C, e.name, p, 0, D, ["attribute-name"], _);
2777
- j = Math.max(j, n.width + m);
2778
- let r = await Rt(C, e.keys.join(), p, 0, D, ["attribute-keys"], _);
2779
- M = Math.max(M, r.width + m);
2780
- let i = await Rt(C, e.comment, p, 0, D, ["attribute-comment"], _);
2781
- N = Math.max(N, i.width + m);
2782
- let a = Math.max(t.height, n.height, r.height, i.height) + h;
2783
- k.push({
2784
- yOffset: D,
2785
- rowHeight: a
2786
- }), D += a;
2787
- }
2788
- let I = 4;
2789
- M <= m && (P = !1, M = 0, I--), N <= m && (F = !1, N = 0, I--);
2790
- let L = C.node().getBBox();
2791
- if (w.width + m * 2 - (A + j + M + N) > 0) {
2792
- let e = w.width + m * 2 - (A + j + M + N);
2793
- A += e / I, j += e / I, M > 0 && (M += e / I), N > 0 && (N += e / I);
2794
- }
2795
- let ee = A + j + M + N, R = S.svg(C), z = v(t, {});
2796
- t.look !== "handDrawn" && (z.roughness = 0, z.fillStyle = "solid");
2797
- let te = 0;
2798
- k.length > 0 && (te = k.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
2799
- let B = Math.max(L.width + m * 2, t?.width || 0, ee), V = Math.max((te ?? 0) + w.height, t?.height || 0), H = -B / 2, U = -V / 2;
2800
- if (C.selectAll("g:not(:first-child)").each((e, t, r) => {
2801
- let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
2802
- if (a) {
2803
- let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2804
- e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += A : i.attr("class").includes("attribute-keys") ? o += A + j : i.attr("class").includes("attribute-comment") && (o += A + j + M));
2805
- }
2806
- i.attr("transform", `translate(${H + m / 2 + o}, ${s + U + w.height + h / 2})`);
2807
- }), C.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (U + h / 2) + ")"), i != null && Ft.has(i)) {
2808
- let e = r.colorIndex ?? 0;
2809
- C.attr("data-color-id", `color-${e % d.length}`);
2810
- }
2811
- let ne = R.rectangle(H, U, B, V, z), re = C.insert(() => ne, ":first-child").attr("class", "outer-path").attr("style", g.join(""));
2812
- O.push(0);
2813
- for (let [e, t] of k.entries()) {
2814
- let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = R.rectangle(H, w.height + U + t?.yOffset, B, t?.rowHeight, {
2815
- ...z,
2816
- fill: n ? o : l,
2817
- stroke: u
2818
- });
2819
- C.insert(() => r, "g.label").attr("style", g.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
2820
- }
2821
- let ie = 1e-4, W = zt(H, w.height + U, B + H, w.height + U, ie), K = R.polygon(W.map((e) => [e.x, e.y]), z);
2822
- if (C.insert(() => K).attr("class", "divider"), W = zt(A + H, w.height + U, A + H, V + U, ie), K = R.polygon(W.map((e) => [e.x, e.y]), z), C.insert(() => K).attr("class", "divider"), P) {
2823
- let e = A + j + H;
2824
- W = zt(e, w.height + U, e, V + U, ie), K = R.polygon(W.map((e) => [e.x, e.y]), z), C.insert(() => K).attr("class", "divider");
2825
- }
2826
- if (F) {
2827
- let e = A + j + M + H;
2828
- W = zt(e, w.height + U, e, V + U, ie), K = R.polygon(W.map((e) => [e.x, e.y]), z), C.insert(() => K).attr("class", "divider");
2829
- }
2830
- for (let e of O) {
2831
- let t = w.height + U + e;
2832
- W = zt(H, t, B + H, t, ie), K = R.polygon(W.map((e) => [e.x, e.y]), z), C.insert(() => K).attr("class", "divider");
2833
- }
2834
- if (T(t, re), b && t.look !== "handDrawn") if (i != null && It.has(i)) C.selectAll("path").attr("style", b);
2835
- else {
2836
- let e = b.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
2837
- C.selectAll("path").attr("style", e ?? ""), C.selectAll(".row-rect-even path").attr("style", b);
2838
- }
2839
- return t.intersect = function(e) {
2840
- return G.rect(t, e);
2841
- }, C;
2842
- }
2843
- e(Lt, "erBox");
2844
- async function Rt(e, t, r, i = 0, o = 0, s = [], l = "") {
2845
- let u = e.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${i}, ${o})`).attr("style", l);
2846
- t !== a(t) && (t = a(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2847
- let d = u.node().appendChild(await h(u, t, {
2848
- width: f(t, r) + 100,
2849
- style: l,
2850
- useHtmlLabels: r.htmlLabels
2851
- }, r));
2852
- if (t.includes("&lt;") || t.includes("&gt;")) {
2853
- let e = d.children[0];
2854
- for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
2855
- }
2856
- let p = d.getBBox();
2857
- if (c(r.htmlLabels)) {
2858
- let e = d.children[0];
2859
- e.style.textAlign = "start";
2860
- let t = n(d);
2861
- p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
2862
- }
2863
- return p;
2864
- }
2865
- e(Rt, "addText");
2866
- function zt(e, t, n, r, i) {
2867
- return e === n ? [
2868
- {
2869
- x: e - i / 2,
2870
- y: t
2871
- },
2872
- {
2873
- x: e + i / 2,
2874
- y: t
2875
- },
2876
- {
2877
- x: n + i / 2,
2878
- y: r
2879
- },
2880
- {
2881
- x: n - i / 2,
2882
- y: r
2883
- }
2884
- ] : [
2885
- {
2886
- x: e,
2887
- y: t - i / 2
2888
- },
2889
- {
2890
- x: e,
2891
- y: t + i / 2
2892
- },
2893
- {
2894
- x: n,
2895
- y: r + i / 2
2896
- },
2897
- {
2898
- x: n,
2899
- y: r - i / 2
2900
- }
2901
- ];
2902
- }
2903
- e(zt, "lineToPolygon");
2904
- async function Bt(e, t, n, r, i = n.class.padding ?? 12) {
2905
- 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;
2906
- if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
2907
- let e = t.annotations[0];
2908
- await Vt(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
2909
- }
2910
- c = o.insert("g").attr("class", "label-group text"), await Vt(c, t, 0, ["font-weight: bolder"]);
2911
- let m = c.node().getBBox();
2912
- f = m.height, l = o.insert("g").attr("class", "members-group text");
2913
- let h = 0;
2914
- for (let e of t.members) {
2915
- let t = await Vt(l, e, h, [e.parseClassifier()]);
2916
- h += t + a;
2917
- }
2918
- p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
2919
- let g = 0;
2920
- for (let e of t.methods) {
2921
- let t = await Vt(u, e, g, [e.parseClassifier()]);
2922
- g += t + a;
2923
- }
2924
- let _ = o.node().getBBox();
2925
- if (s !== null) {
2926
- let e = s.node().getBBox();
2927
- s.attr("transform", `translate(${-e.width / 2})`);
2928
- }
2929
- 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(), {
2930
- shapeSvg: o,
2931
- bbox: _
2932
- };
2933
- }
2934
- e(Bt, "textHelper");
2935
- async function Vt(t, a, o, l = []) {
2936
- let u = t.insert("g").attr("class", "label").attr("style", l.join("; ")), p = s(), m = "useHtmlLabels" in a ? a.useHtmlLabels : c(p.htmlLabels) ?? !0, g = "";
2937
- g = "text" in a ? a.text : a.label, !m && g.startsWith("\\") && (g = g.substring(1)), r(g) && (m = !0);
2938
- let _ = await h(u, i(d(g)), {
2939
- width: f(g, p) + 50,
2940
- classes: "markdown-node-label",
2941
- useHtmlLabels: m
2942
- }, p), v, y = 1;
2943
- if (m) {
2944
- let t = _.children[0], r = n(_);
2945
- y = t.innerHTML.split("<br>").length, t.innerHTML.includes("</math>") && (y += t.innerHTML.split("<mrow>").length - 1);
2946
- let i = t.getElementsByTagName("img");
2947
- if (i) {
2948
- let t = g.replace(/<img[^>]*>/g, "").trim() === "";
2949
- await Promise.all([...i].map((n) => new Promise((r) => {
2950
- function i() {
2951
- if (n.style.display = "flex", n.style.flexDirection = "column", t) {
2952
- let e = p.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
2953
- n.style.minWidth = t, n.style.maxWidth = t;
2954
- } else n.style.width = "100%";
2955
- r(n);
2956
- }
2957
- e(i, "setupImage"), setTimeout(() => {
2958
- n.complete && i();
2959
- }), n.addEventListener("error", i), n.addEventListener("load", i);
2960
- })));
2961
- }
2962
- v = t.getBoundingClientRect(), r.attr("width", v.width), r.attr("height", v.height);
2963
- } else {
2964
- l.includes("font-weight: bolder") && n(_).selectAll("tspan").attr("font-weight", ""), y = _.children.length;
2965
- let e = _.children[0];
2966
- (_.textContent === "" || _.textContent.includes("&gt")) && (e.textContent = g[0] + g.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), g[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), v = _.getBBox();
2967
- }
2968
- return u.attr("transform", "translate(0," + (-v.height / (2 * y) + o) + ")"), v.height;
2969
- }
2970
- e(Vt, "addText");
2971
- async function Ht(e, t) {
2972
- let r = l(), { themeVariables: i } = r, { useGradient: a } = i, o = r.class.padding ?? 12, s = o, u = t.useHtmlLabels ?? c(r.htmlLabels) ?? !0, d = t;
2973
- d.annotations = d.annotations ?? [], d.members = d.members ?? [], d.methods = d.methods ?? [];
2974
- let { shapeSvg: f, bbox: p } = await Bt(e, t, r, u, s), { labelStyles: m, nodeStyles: h } = y(t);
2975
- t.labelStyle = m, t.cssStyles = d.styles || "";
2976
- let g = d.styles?.join(";") || h || "";
2977
- t.cssStyles ||= g.replaceAll("!important", "").split(";");
2978
- let _ = d.members.length === 0 && d.methods.length === 0 && !r.class?.hideEmptyMembersBox, b = S.svg(f), x = v(t, {});
2979
- t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2980
- let C = Math.max(t.width ?? 0, p.width), w = Math.max(t.height ?? 0, p.height), E = (t.height ?? 0) > p.height;
2981
- d.members.length === 0 && d.methods.length === 0 ? w += s : d.members.length > 0 && d.methods.length === 0 && (w += s * 2);
2982
- let D = -C / 2, O = -w / 2, k = _ ? o * 2 : d.members.length === 0 && d.methods.length === 0 ? -o : 0;
2983
- E && (k = o * 2);
2984
- let A = b.rectangle(D - o, O - o - (_ ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0), C + 2 * o, w + 2 * o + k, x), j = f.insert(() => A, ":first-child");
2985
- j.attr("class", "basic label-container outer-path");
2986
- let M = j.node().getBBox(), N = f.select(".annotation-group").node().getBBox().height - (_ ? o / 2 : 0) || 0, P = f.select(".label-group").node().getBBox().height - (_ ? o / 2 : 0) || 0, F = f.select(".members-group").node().getBBox().height - (_ ? o / 2 : 0) || 0, I = (N + P + O + o - (O - o - (_ ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0))) / 2;
2987
- if (f.selectAll(".text").each((e, t, i) => {
2988
- let a = n(i[t]), c = a.attr("transform"), l = 0;
2989
- if (c) {
2990
- let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);
2991
- e && (l = parseFloat(e[2]));
2992
- }
2993
- let p = l + O + o - (_ ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0);
2994
- if (a.attr("class").includes("methods-group")) {
2995
- let e = Math.max(F, s / 2);
2996
- p = E ? Math.max(I, N + P + e + O + s * 2 + o) + s * 2 : N + P + e + O + s * 4 + o;
2997
- }
2998
- d.members.length === 0 && d.methods.length === 0 && r.class?.hideEmptyMembersBox && (p = d.annotations.length > 0 ? l - s : l), u || (p -= 4);
2999
- let m = D;
3000
- (a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) && (m = -a.node()?.getBBox().width / 2 || 0, f.selectAll("text").each(function(e, t, n) {
3001
- window.getComputedStyle(n[t]).textAnchor === "middle" && (m = 0);
3002
- })), a.attr("transform", `translate(${m}, ${p})`);
3003
- }), d.members.length > 0 || d.methods.length > 0 || _) {
3004
- let e = N + P + O + o, n = b.line(M.x, e, M.x + M.width, e + .001, x);
3005
- f.insert(() => n).attr("class", `divider${t.look === "neo" && !a ? " neo-line" : ""}`).attr("style", g);
3006
- }
3007
- if (_ || d.members.length > 0 || d.methods.length > 0) {
3008
- let e = N + P + F + O + s * 2 + o, n = b.line(M.x, E ? Math.max(I, e) : e, M.x + M.width, (E ? Math.max(I, e) : e) + .001, x);
3009
- f.insert(() => n).attr("class", `divider${t.look === "neo" && !a ? " neo-line" : ""}`).attr("style", g);
3010
- }
3011
- if (d.look !== "handDrawn" && f.selectAll("path").attr("style", g), j.select(":nth-child(2)").attr("style", g), f.selectAll(".divider").select("path").attr("style", g), t.labelStyle ? f.selectAll("span").attr("style", t.labelStyle) : f.selectAll("span").attr("style", g), !u) {
3012
- let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(g);
3013
- if (t) {
3014
- let e = t[0].replace("color", "fill");
3015
- f.selectAll("tspan").attr("style", e);
3016
- } else if (m) {
3017
- let t = e.exec(m);
3018
- if (t) {
3019
- let e = t[0].replace("color", "fill");
3020
- f.selectAll("tspan").attr("style", e);
3021
- }
3022
- }
3023
- }
3024
- return T(t, j), t.intersect = function(e) {
3025
- return G.rect(t, e);
3026
- }, f;
3027
- }
3028
- e(Ht, "classBox");
3029
- async function Ut(e, t) {
3030
- let { labelStyles: r, nodeStyles: i } = y(t);
3031
- t.labelStyle = r;
3032
- let a = t, o = t, s = "verifyMethod" in t, c = E(t), { themeVariables: u } = l(), { borderColorArray: d, requirementEdgeLabelBackground: f } = u, p = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), m;
3033
- m = s ? await $(p, `&lt;&lt;${a.type}&gt;&gt;`, 0, t.labelStyle) : await $(p, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
3034
- let h = m, g = await $(p, a.name, h, t.labelStyle + "; font-weight: bold;");
3035
- if (h += g + 20, s) {
3036
- let e = await $(p, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, h, t.labelStyle);
3037
- h += e;
3038
- let n = await $(p, `${a.text ? `Text: ${a.text}` : ""}`, h, t.labelStyle);
3039
- h += n;
3040
- let r = await $(p, `${a.risk ? `Risk: ${a.risk}` : ""}`, h, t.labelStyle);
3041
- h += r, await $(p, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, h, t.labelStyle);
3042
- } else {
3043
- let e = await $(p, `${o.type ? `Type: ${o.type}` : ""}`, h, t.labelStyle);
3044
- h += e, await $(p, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, h, t.labelStyle);
3045
- }
3046
- let _ = (p.node()?.getBBox().width ?? 200) + 20, b = (p.node()?.getBBox().height ?? 200) + 20, x = -_ / 2, C = -b / 2, w = S.svg(p), D = v(t, {});
3047
- t.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
3048
- let O = w.rectangle(x, C, _, b, D), k = p.insert(() => O, ":first-child");
3049
- if (k.attr("class", "basic label-container outer-path").attr("style", i), d?.length) {
3050
- let e = t.colorIndex ?? 0;
3051
- p.attr("data-color-id", `color-${e % d.length}`);
3052
- }
3053
- if (p.selectAll(".label").each((e, t, r) => {
3054
- let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
3055
- if (a) {
3056
- let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
3057
- e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
3058
- }
3059
- let c = s - b / 2, l = x + 20 / 2;
3060
- (t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
3061
- }), h > m + g + 20) {
3062
- let e = C + m + g + 20, n;
3063
- if (t.look === "neo") {
3064
- let t = .001, r = [
3065
- [x, e],
3066
- [x + _, e],
3067
- [x + _, e + t],
3068
- [x, e + t]
3069
- ];
3070
- n = w.polygon(r, D);
3071
- } else n = w.line(x, e, x + _, e, D);
3072
- p.insert(() => n).attr("class", "divider");
3073
- }
3074
- return T(t, k), t.intersect = function(e) {
3075
- return G.rect(t, e);
3076
- }, i && t.look !== "handDrawn" && (f || d?.length) && p.selectAll("path").attr("style", i), p;
3077
- }
3078
- e(Ut, "requirementBox");
3079
- async function $(e, t, r, a = "") {
3080
- if (t === "") return 0;
3081
- let o = e.insert("g").attr("class", "label").attr("style", a), s = l(), c = s.htmlLabels ?? !0, u = await h(o, i(d(t)), {
3082
- width: f(t, s) + 50,
3083
- classes: "markdown-node-label",
3084
- useHtmlLabels: c,
3085
- style: a
3086
- }, s), p;
3087
- if (c) {
3088
- let e = u.children[0], t = n(u);
3089
- p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
3090
- } else {
3091
- let e = u.children[0];
3092
- for (let t of e.children) a && t.setAttribute("style", a);
3093
- p = u.getBBox(), p.height += 6;
3094
- }
3095
- return o.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + r})`), p.height;
3096
- }
3097
- e($, "addText");
3098
- var Wt = /* @__PURE__ */ e((e) => {
3099
- switch (e) {
3100
- case "Very High": return "red";
3101
- case "High": return "orange";
3102
- case "Medium": return null;
3103
- case "Low": return "blue";
3104
- case "Very Low": return "lightblue";
3105
- }
3106
- }, "colorFromPriority");
3107
- async function Gt(e, t, { config: n }) {
3108
- let { labelStyles: r, nodeStyles: i } = y(t);
3109
- t.labelStyle = r || "";
3110
- let a = t.width;
3111
- t.width = (t.width ?? 200) - 10;
3112
- let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = t.padding || 10, u = "", d;
3113
- "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"));
3114
- let f = {
3115
- useHtmlLabels: t.useHtmlLabels,
3116
- labelStyle: t.labelStyle || "",
3117
- width: t.width,
3118
- img: t.img,
3119
- padding: t.padding || 8,
3120
- centerLabel: !1
3121
- }, p, m;
3122
- 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);
3123
- let { label: h, bbox: g } = await w(o, "assigned" in t && t.assigned || "", f);
3124
- t.width = a;
3125
- let _ = t?.width || 0, b = Math.max(m.height, g.height) / 2, x = Math.max(s.height + 20, t?.height || 0) + b, D = -_ / 2, O = -x / 2;
3126
- c.attr("transform", "translate(" + (l - _ / 2) + ", " + (-b - s.height / 2) + ")"), p.attr("transform", "translate(" + (l - _ / 2) + ", " + (-b + s.height / 2) + ")"), h.attr("transform", "translate(" + (l + _ / 2 - g.width - 20) + ", " + (-b + s.height / 2) + ")");
3127
- let k, { rx: A, ry: j } = t, { cssStyles: M } = t;
3128
- if (t.look === "handDrawn") {
3129
- let e = S.svg(o), n = v(t, {}), r = A || j ? e.path(N(D, O, _, x, A || 0), n) : e.rectangle(D, O, _, x, n);
3130
- k = o.insert(() => r, ":first-child"), k.attr("class", "basic label-container").attr("style", M || null);
3131
- } else {
3132
- 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", _).attr("height", x);
3133
- let e = "priority" in t && t.priority;
3134
- if (e) {
3135
- let t = o.append("line"), n = D + 2, r = O + Math.floor((A ?? 0) / 2), i = O + x - Math.floor((A ?? 0) / 2);
3136
- t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Wt(e));
3137
- }
3138
- }
3139
- return T(t, k), t.height = x, t.intersect = function(e) {
3140
- return G.rect(t, e);
3141
- }, o;
3142
- }
3143
- e(Gt, "kanbanItem");
3144
- async function Kt(e, n) {
3145
- let { labelStyles: r, nodeStyles: i } = y(n);
3146
- n.labelStyle = r;
3147
- let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(e, n, E(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, m = o.width + 20, h = o.height + 20, g = Math.max(l, m), _ = Math.max(u, h);
3148
- c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
3149
- let b, x = `M0 0
3150
- a${d},${d} 1 0,0 ${g * .25},${-1 * _ * .1}
3151
- a${d},${d} 1 0,0 ${g * .25},0
3152
- a${d},${d} 1 0,0 ${g * .25},0
3153
- a${d},${d} 1 0,0 ${g * .25},${_ * .1}
3154
-
3155
- a${d},${d} 1 0,0 ${g * .15},${_ * .33}
3156
- a${d * .8},${d * .8} 1 0,0 0,${_ * .34}
3157
- a${d},${d} 1 0,0 ${-1 * g * .15},${_ * .33}
3158
-
3159
- a${d},${d} 1 0,0 ${-1 * g * .25},${_ * .15}
3160
- a${d},${d} 1 0,0 ${-1 * g * .25},0
3161
- a${d},${d} 1 0,0 ${-1 * g * .25},0
3162
- a${d},${d} 1 0,0 ${-1 * g * .25},${-1 * _ * .15}
3163
-
3164
- a${d},${d} 1 0,0 ${-1 * g * .1},${-1 * _ * .33}
3165
- a${d * .8},${d * .8} 1 0,0 0,${-1 * _ * .34}
3166
- a${d},${d} 1 0,0 ${g * .1},${-1 * _ * .33}
3167
- H0 V0 Z`;
3168
- if (n.look === "handDrawn") {
3169
- let e = S.svg(a), t = v(n, {}), r = e.path(x, t);
3170
- b = a.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", p(f));
3171
- } else b = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", x);
3172
- return b.attr("transform", `translate(${-g / 2}, ${-_ / 2})`), T(n, b), n.calcIntersect = function(e, t) {
3173
- return G.rect(e, t);
3174
- }, n.intersect = function(e) {
3175
- return t.info("Bang intersect", n, e), G.rect(n, e);
3176
- }, a;
3177
- }
3178
- e(Kt, "bang");
3179
- async function qt(e, n) {
3180
- let { labelStyles: r, nodeStyles: i } = y(n);
3181
- n.labelStyle = r;
3182
- let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(e, n, E(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: g } = n, _, b = `M0 0
3183
- a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3184
- a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
3185
- a${f},${f} 1 0,1 ${l * .35},${l * .2}
3186
-
3187
- a${d},${d} 1 0,1 ${l * .15},${u * .35}
3188
- a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
3189
-
3190
- a${f},${d} 1 0,1 ${-1 * l * .25},${l * .15}
3191
- a${m},${m} 1 0,1 ${-1 * l * .5},0
3192
- a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
3193
-
3194
- a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
3195
- a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
3196
- H0 V0 Z`;
3197
- if (n.look === "handDrawn") {
3198
- let e = S.svg(a), t = v(n, {}), r = e.path(b, t);
3199
- _ = a.insert(() => r, ":first-child"), _.attr("class", "basic label-container").attr("style", p(g));
3200
- } else _ = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", b);
3201
- return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), _.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(n, _), n.calcIntersect = function(e, t) {
3202
- return G.rect(e, t);
3203
- }, n.intersect = function(e) {
3204
- return t.info("Cloud intersect", n, e), G.rect(n, e);
3205
- }, a;
3206
- }
3207
- e(qt, "cloud");
3208
- async function Jt(e, t) {
3209
- let { labelStyles: n, nodeStyles: r } = y(t);
3210
- t.labelStyle = n;
3211
- 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" ? `
3212
- M${-c / 2} ${l / 2 - 5}
3213
- v${-l + 10}
3214
- q0,-5 5,-5
3215
- h${c - 10}
3216
- q5,0 5,5
3217
- v${l - 5}
3218
- H${-c / 2}
3219
- Z
3220
- ` : `
3221
- M${-c / 2} ${l / 2 - 5}
3222
- v${-l + 10}
3223
- q0,-5 5,-5
3224
- h${c - 10}
3225
- q5,0 5,5
3226
- v${l - 10}
3227
- q0,5 -5,5
3228
- h${-(c - 10)}
3229
- q-5,0 -5,-5
3230
- Z
3231
- `;
3232
- if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3233
- let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3234
- 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) {
3235
- return G.rect(e, t);
3236
- }, t.intersect = function(e) {
3237
- return G.rect(t, e);
3238
- }, i;
3239
- }
3240
- e(Jt, "defaultMindmapNode");
3241
- async function Yt(e, t) {
3242
- return de(e, t, { padding: t.padding ?? 0 });
3243
- }
3244
- e(Yt, "mindmapCircle");
3245
- var Xt = [
3246
- {
3247
- semanticName: "Process",
3248
- name: "Rectangle",
3249
- shortName: "rect",
3250
- description: "Standard process shape",
3251
- aliases: [
3252
- "proc",
3253
- "process",
3254
- "rectangle"
3255
- ],
3256
- internalAliases: ["squareRect"],
3257
- handler: ut
3258
- },
3259
- {
3260
- semanticName: "Event",
3261
- name: "Rounded Rectangle",
3262
- shortName: "rounded",
3263
- description: "Represents an event",
3264
- aliases: ["event"],
3265
- internalAliases: ["roundedRect"],
3266
- handler: st
3267
- },
3268
- {
3269
- semanticName: "Terminal Point",
3270
- name: "Stadium",
3271
- shortName: "stadium",
3272
- description: "Terminal point",
3273
- aliases: ["terminal", "pill"],
3274
- handler: dt
3275
- },
3276
- {
3277
- semanticName: "Subprocess",
3278
- name: "Framed Rectangle",
3279
- shortName: "fr-rect",
3280
- description: "Subprocess",
3281
- aliases: [
3282
- "subprocess",
3283
- "subproc",
3284
- "framed-rectangle",
3285
- "subroutine"
3286
- ],
3287
- handler: gt
3288
- },
3289
- {
3290
- semanticName: "Database",
3291
- name: "Cylinder",
3292
- shortName: "cyl",
3293
- description: "Database storage",
3294
- aliases: [
3295
- "db",
3296
- "database",
3297
- "cylinder"
3298
- ],
3299
- handler: Ce
3300
- },
3301
- {
3302
- semanticName: "Data Store",
3303
- name: "Data Store",
3304
- shortName: "datastore",
3305
- description: "Data flow diagram data store",
3306
- aliases: ["data-store"],
3307
- handler: Te
3308
- },
3309
- {
3310
- semanticName: "Start",
3311
- name: "Circle",
3312
- shortName: "circle",
3313
- description: "Starting point",
3314
- aliases: ["circ"],
3315
- handler: de
3316
- },
3317
- {
3318
- semanticName: "Bang",
3319
- name: "Bang",
3320
- shortName: "bang",
3321
- description: "Bang",
3322
- aliases: ["bang"],
3323
- handler: Kt
3324
- },
3325
- {
3326
- semanticName: "Cloud",
3327
- name: "Cloud",
3328
- shortName: "cloud",
3329
- description: "cloud",
3330
- aliases: ["cloud"],
3331
- handler: qt
3332
- },
3333
- {
3334
- semanticName: "Decision",
3335
- name: "Diamond",
3336
- shortName: "diam",
3337
- description: "Decision-making step",
3338
- aliases: [
3339
- "decision",
3340
- "diamond",
3341
- "question"
3342
- ],
3343
- handler: it
3344
- },
3345
- {
3346
- semanticName: "Prepare Conditional",
3347
- name: "Hexagon",
3348
- shortName: "hex",
3349
- description: "Preparation or condition step",
3350
- aliases: ["hexagon", "prepare"],
3351
- handler: Fe
3352
- },
3353
- {
3354
- semanticName: "Data Input/Output",
3355
- name: "Lean Right",
3356
- shortName: "lean-r",
3357
- description: "Represents input or output",
3358
- aliases: ["lean-right", "in-out"],
3359
- internalAliases: ["lean_right"],
3360
- handler: Ge
3361
- },
3362
- {
3363
- semanticName: "Data Input/Output",
3364
- name: "Lean Left",
3365
- shortName: "lean-l",
3366
- description: "Represents output or input",
3367
- aliases: ["lean-left", "out-in"],
3368
- internalAliases: ["lean_left"],
3369
- handler: We
3370
- },
3371
- {
3372
- semanticName: "Priority Action",
3373
- name: "Trapezoid Base Bottom",
3374
- shortName: "trap-b",
3375
- description: "Priority action",
3376
- aliases: [
3377
- "priority",
3378
- "trapezoid-bottom",
3379
- "trapezoid"
3380
- ],
3381
- handler: Dt
3382
- },
3383
- {
3384
- semanticName: "Manual Operation",
3385
- name: "Trapezoid Base Top",
3386
- shortName: "trap-t",
3387
- description: "Represents a manual task",
3388
- aliases: [
3389
- "manual",
3390
- "trapezoid-top",
3391
- "inv-trapezoid"
3392
- ],
3393
- internalAliases: ["inv_trapezoid"],
3394
- handler: He
3395
- },
3396
- {
3397
- semanticName: "Stop",
3398
- name: "Double Circle",
3399
- shortName: "dbl-circ",
3400
- description: "Represents a stop point",
3401
- aliases: ["double-circle"],
3402
- internalAliases: ["doublecircle"],
3403
- handler: De
3404
- },
3405
- {
3406
- semanticName: "Text Block",
3407
- name: "Text Block",
3408
- shortName: "text",
3409
- description: "Text block",
3410
- handler: bt
3411
- },
3412
- {
3413
- semanticName: "Card",
3414
- name: "Notched Rectangle",
3415
- shortName: "notch-rect",
3416
- description: "Represents a card",
3417
- aliases: ["card", "notched-rectangle"],
3418
- handler: le
3419
- },
3420
- {
3421
- semanticName: "Lined/Shaded Process",
3422
- name: "Lined Rectangle",
3423
- shortName: "lin-rect",
3424
- description: "Lined process shape",
3425
- aliases: [
3426
- "lined-rectangle",
3427
- "lined-process",
3428
- "lin-proc",
3429
- "shaded-process"
3430
- ],
3431
- handler: ct
3432
- },
3433
- {
3434
- semanticName: "Start",
3435
- name: "Small Circle",
3436
- shortName: "sm-circ",
3437
- description: "Small starting point",
3438
- aliases: ["start", "small-circle"],
3439
- internalAliases: ["stateStart"],
3440
- handler: mt
3441
- },
3442
- {
3443
- semanticName: "Stop",
3444
- name: "Framed Circle",
3445
- shortName: "fr-circ",
3446
- description: "Stop point",
3447
- aliases: ["stop", "framed-circle"],
3448
- internalAliases: ["stateEnd"],
3449
- handler: pt
3450
- },
3451
- {
3452
- semanticName: "Fork/Join",
3453
- name: "Filled Rectangle",
3454
- shortName: "fork",
3455
- description: "Fork or join in process flow",
3456
- aliases: ["join"],
3457
- internalAliases: ["forkJoin"],
3458
- handler: Me
3459
- },
3460
- {
3461
- semanticName: "Collate",
3462
- name: "Hourglass",
3463
- shortName: "hourglass",
3464
- description: "Represents a collate operation",
3465
- aliases: ["hourglass", "collate"],
3466
- handler: Ie
3467
- },
3468
- {
3469
- semanticName: "Comment",
3470
- name: "Curly Brace",
3471
- shortName: "brace",
3472
- description: "Adds a comment",
3473
- aliases: ["comment", "brace-l"],
3474
- handler: me
3475
- },
3476
- {
3477
- semanticName: "Comment Right",
3478
- name: "Curly Brace",
3479
- shortName: "brace-r",
3480
- description: "Adds a comment",
3481
- handler: he
3482
- },
3483
- {
3484
- semanticName: "Comment with braces on both sides",
3485
- name: "Curly Braces",
3486
- shortName: "braces",
3487
- description: "Adds a comment",
3488
- handler: ge
3489
- },
3490
- {
3491
- semanticName: "Com Link",
3492
- name: "Lightning Bolt",
3493
- shortName: "bolt",
3494
- description: "Communication link",
3495
- aliases: ["com-link", "lightning-bolt"],
3496
- handler: Ke
3497
- },
3498
- {
3499
- semanticName: "Document",
3500
- name: "Document",
3501
- shortName: "doc",
3502
- description: "Represents a document",
3503
- aliases: ["doc", "document"],
3504
- handler: Mt
3505
- },
3506
- {
3507
- semanticName: "Delay",
3508
- name: "Half-Rounded Rectangle",
3509
- shortName: "delay",
3510
- description: "Represents a delay",
3511
- aliases: ["half-rounded-rectangle"],
3512
- handler: Ne
3513
- },
3514
- {
3515
- semanticName: "Direct Access Storage",
3516
- name: "Horizontal Cylinder",
3517
- shortName: "h-cyl",
3518
- description: "Direct access storage",
3519
- aliases: ["das", "horizontal-cylinder"],
3520
- handler: Et
3521
- },
3522
- {
3523
- semanticName: "Disk Storage",
3524
- name: "Lined Cylinder",
3525
- shortName: "lin-cyl",
3526
- description: "Disk storage",
3527
- aliases: ["disk", "lined-cylinder"],
3528
- handler: Qe
3529
- },
3530
- {
3531
- semanticName: "Display",
3532
- name: "Curved Trapezoid",
3533
- shortName: "curv-trap",
3534
- description: "Represents a display",
3535
- aliases: ["curved-trapezoid", "display"],
3536
- handler: _e
3537
- },
3538
- {
3539
- semanticName: "Divided Process",
3540
- name: "Divided Rectangle",
3541
- shortName: "div-rect",
3542
- description: "Divided process shape",
3543
- aliases: [
3544
- "div-proc",
3545
- "divided-rectangle",
3546
- "divided-process"
3547
- ],
3548
- handler: Ee
3549
- },
3550
- {
3551
- semanticName: "Extract",
3552
- name: "Triangle",
3553
- shortName: "tri",
3554
- description: "Extraction process",
3555
- aliases: ["extract", "triangle"],
3556
- handler: jt
3557
- },
3558
- {
3559
- semanticName: "Internal Storage",
3560
- name: "Window Pane",
3561
- shortName: "win-pane",
3562
- description: "Internal storage",
3563
- aliases: ["internal-storage", "window-pane"],
3564
- handler: Pt
3565
- },
3566
- {
3567
- semanticName: "Junction",
3568
- name: "Filled Circle",
3569
- shortName: "f-circ",
3570
- description: "Junction point",
3571
- aliases: ["junction", "filled-circle"],
3572
- handler: Oe
3573
- },
3574
- {
3575
- semanticName: "Loop Limit",
3576
- name: "Trapezoidal Pentagon",
3577
- shortName: "notch-pent",
3578
- description: "Loop limit step",
3579
- aliases: ["loop-limit", "notched-pentagon"],
3580
- handler: Ot
3581
- },
3582
- {
3583
- semanticName: "Manual File",
3584
- name: "Flipped Triangle",
3585
- shortName: "flip-tri",
3586
- description: "Manual file operation",
3587
- aliases: ["manual-file", "flipped-triangle"],
3588
- handler: je
3589
- },
3590
- {
3591
- semanticName: "Manual Input",
3592
- name: "Sloped Rectangle",
3593
- shortName: "sl-rect",
3594
- description: "Manual input step",
3595
- aliases: ["manual-input", "sloped-rectangle"],
3596
- handler: lt
3597
- },
3598
- {
3599
- semanticName: "Multi-Document",
3600
- name: "Stacked Document",
3601
- shortName: "docs",
3602
- description: "Multiple documents",
3603
- aliases: [
3604
- "documents",
3605
- "st-doc",
3606
- "stacked-document"
3607
- ],
3608
- handler: tt
3609
- },
3610
- {
3611
- semanticName: "Multi-Process",
3612
- name: "Stacked Rectangle",
3613
- shortName: "st-rect",
3614
- description: "Multiple processes",
3615
- aliases: [
3616
- "procs",
3617
- "processes",
3618
- "stacked-rectangle"
3619
- ],
3620
- handler: et
3621
- },
3622
- {
3623
- semanticName: "Stored Data",
3624
- name: "Bow Tie Rectangle",
3625
- shortName: "bow-rect",
3626
- description: "Stored data",
3627
- aliases: ["stored-data", "bow-tie-rectangle"],
3628
- handler: se
3629
- },
3630
- {
3631
- semanticName: "Summary",
3632
- name: "Crossed Circle",
3633
- shortName: "cross-circ",
3634
- description: "Summary",
3635
- aliases: ["summary", "crossed-circle"],
3636
- handler: pe
3637
- },
3638
- {
3639
- semanticName: "Tagged Document",
3640
- name: "Tagged Document",
3641
- shortName: "tag-doc",
3642
- description: "Tagged document",
3643
- aliases: ["tag-doc", "tagged-document"],
3644
- handler: yt
3645
- },
3646
- {
3647
- semanticName: "Tagged Process",
3648
- name: "Tagged Rectangle",
3649
- shortName: "tag-rect",
3650
- description: "Tagged process",
3651
- aliases: [
3652
- "tagged-rectangle",
3653
- "tag-proc",
3654
- "tagged-process"
3655
- ],
3656
- handler: vt
3657
- },
3658
- {
3659
- semanticName: "Paper Tape",
3660
- name: "Flag",
3661
- shortName: "flag",
3662
- description: "Paper tape",
3663
- aliases: ["paper-tape"],
3664
- handler: Nt
3665
- },
3666
- {
3667
- semanticName: "Odd",
3668
- name: "Odd",
3669
- shortName: "odd",
3670
- description: "Odd shape",
3671
- internalAliases: ["rect_left_inv_arrow"],
3672
- handler: at
3673
- },
3674
- {
3675
- semanticName: "Lined Document",
3676
- name: "Lined Document",
3677
- shortName: "lin-doc",
3678
- description: "Lined document",
3679
- aliases: ["lined-document"],
3680
- handler: $e
3681
- }
3682
- ], Zt = (/* @__PURE__ */ e(() => {
3683
- let e = [...Object.entries({
3684
- state: ft,
3685
- choice: ue,
3686
- note: nt,
3687
- rectWithTitle: ot,
3688
- labelRect: Ue,
3689
- iconSquare: Be,
3690
- iconCircle: Re,
3691
- icon: Le,
3692
- iconRounded: ze,
3693
- imageSquare: Ve,
3694
- anchor: K,
3695
- kanbanItem: Gt,
3696
- mindmapCircle: Yt,
3697
- defaultMindmapNode: Jt,
3698
- classBox: Ht,
3699
- erBox: Lt,
3700
- requirementBox: Ut
3701
- }), ...Xt.flatMap((e) => [
3702
- e.shortName,
3703
- ..."aliases" in e ? e.aliases : [],
3704
- ..."internalAliases" in e ? e.internalAliases : []
3705
- ].map((t) => [t, e.handler]))];
3706
- return Object.fromEntries(e);
3707
- }, "generateShapeMap"))();
3708
- function Qt(e) {
3709
- return e in Zt;
3710
- }
3711
- e(Qt, "isValidShape");
3712
- var $t = /* @__PURE__ */ new Map();
3713
- async function en(e, t, n) {
3714
- let r, i;
3715
- t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
3716
- let a = t.shape ? Zt[t.shape] : void 0;
3717
- if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
3718
- if (t.link) {
3719
- let o;
3720
- 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);
3721
- } else i = await a(e, t, n), r = i;
3722
- return r.attr("data-look", p(t.look)), t.tooltip && i.attr("title", t.tooltip), $t.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
3723
- }
3724
- e(en, "insertNode");
3725
- var tn = /* @__PURE__ */ e((e, t) => {
3726
- $t.set(t.id, e);
3727
- }, "setNodeElem"), nn = /* @__PURE__ */ e(() => {
3728
- $t.clear();
3729
- }, "clear"), rn = /* @__PURE__ */ e((e) => {
3730
- let n = $t.get(e.id);
3731
- t.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3732
- let r = e.diff || 0;
3733
- return e.clusterNode ? n.attr("transform", "translate(" + (e.x + r - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : n.attr("transform", "translate(" + e.x + ", " + e.y + ")"), r;
3734
- }, "positionNode");
3735
- //#endregion
3736
- export { en as a, rn as c, ee as i, tn as l, nn as n, Qt as o, M as r, C as s, R as t, T as u };