@countermeasure-platform/web-components 1.2.1 → 1.2.2-dev.7.1

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