mio-previewer 0.2.74 → 0.2.77

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 (277) hide show
  1. package/dist/_basePickBy-CXmXW7jd.js +166 -0
  2. package/dist/_basePickBy-CtuVwROD.cjs +1 -0
  3. package/dist/_baseUniq-CGoiOkSa.js +682 -0
  4. package/dist/_baseUniq-CYtOXxfV.cjs +1 -0
  5. package/dist/_createAssigner-DqH64jc7.cjs +1 -0
  6. package/dist/_createAssigner-IEX8lwxm.js +573 -0
  7. package/dist/arc-C78br9Yj.cjs +1 -0
  8. package/dist/arc-vLgDTVZZ.js +80 -0
  9. package/dist/architecture-O4VJ6CD3-B9qzjtV8.cjs +1 -0
  10. package/dist/architecture-O4VJ6CD3-wqAP4onK.js +2 -0
  11. package/dist/architectureDiagram-VXUJARFQ-CYbuyVAs.js +4039 -0
  12. package/dist/architectureDiagram-VXUJARFQ-DEGYSl1f.cjs +36 -0
  13. package/dist/array-CApNbSU9.js +6 -0
  14. package/dist/array-DZSRzHA_.cjs +1 -0
  15. package/dist/assets/parser.worker-Bzb1GItl.js +14 -0
  16. package/dist/blockDiagram-VD42YOAC-DaH3L5Ng.js +3009 -0
  17. package/dist/blockDiagram-VD42YOAC-DeX0dq72.cjs +122 -0
  18. package/dist/c4Diagram-YG6GDRKO-CIThIYo6.js +2959 -0
  19. package/dist/c4Diagram-YG6GDRKO-Dz6dif_9.cjs +10 -0
  20. package/dist/channel-BWHkpgVD.cjs +1 -0
  21. package/dist/channel-JT7eWw2w.js +5 -0
  22. package/dist/chunk-4BX2VUAB-BZTgbbzC.js +8 -0
  23. package/dist/chunk-4BX2VUAB-HXFjpyQg.cjs +1 -0
  24. package/dist/chunk-55IACEB6-DWUqxxdp.js +8 -0
  25. package/dist/chunk-55IACEB6-Hy_THNUs.cjs +1 -0
  26. package/dist/chunk-ABZYJK2D-CbIYYZa_.cjs +80 -0
  27. package/dist/chunk-ABZYJK2D-DDrmE3Q7.js +2518 -0
  28. package/dist/chunk-ATLVNIR6-DHlCNWnJ.js +67 -0
  29. package/dist/chunk-ATLVNIR6-shAOudT0.cjs +1 -0
  30. package/dist/chunk-B4BG7PRW-C67vroOS.cjs +165 -0
  31. package/dist/chunk-B4BG7PRW-DSYuK8dI.js +3116 -0
  32. package/dist/chunk-BNMv73og.cjs +1 -0
  33. package/dist/chunk-CVBHYZKI-CLVcv_xh.cjs +1 -0
  34. package/dist/chunk-CVBHYZKI-CiCGetln.js +12 -0
  35. package/dist/chunk-DI55MBZ5-BCvBgHrp.cjs +220 -0
  36. package/dist/chunk-DI55MBZ5-Clru0TyG.js +2000 -0
  37. package/dist/chunk-Dbv0sNQl.js +20 -0
  38. package/dist/chunk-FMBD7UC4-D4kohRVY.js +5 -0
  39. package/dist/{chunk-FMBD7UC4-DxkUZTpt.cjs → chunk-FMBD7UC4-DWMVCXKq.cjs} +2 -2
  40. package/dist/chunk-HN2XXSSU-BwmRMa2r.cjs +1 -0
  41. package/dist/chunk-HN2XXSSU-CJL8wAZ2.js +76 -0
  42. package/dist/chunk-JA3XYJ7Z-BaAdjYEy.cjs +70 -0
  43. package/dist/chunk-JA3XYJ7Z-CpKHrbOX.js +1849 -0
  44. package/dist/chunk-JZLCHNYA-CYo7ykJf.js +4863 -0
  45. package/dist/chunk-JZLCHNYA-CvPIQFXP.cjs +54 -0
  46. package/dist/chunk-QN33PNHL-BFbXAWI4.js +25 -0
  47. package/dist/chunk-QN33PNHL-Cu0FHarG.cjs +1 -0
  48. package/dist/chunk-QXUST7PY-CnnfdJrM.cjs +7 -0
  49. package/dist/chunk-QXUST7PY-CxCAwQqP.js +488 -0
  50. package/dist/chunk-QZHKN3VN-2e6nJr8c.cjs +1 -0
  51. package/dist/chunk-QZHKN3VN-Dal4kx9B.js +15 -0
  52. package/dist/chunk-S3R3BYOJ-B2ozcJNg.cjs +2 -0
  53. package/dist/chunk-S3R3BYOJ-CG6GoSCd.js +1119 -0
  54. package/dist/chunk-TZMSLE5B-CooeLs4Q.js +57 -0
  55. package/dist/chunk-TZMSLE5B-D92K1Ja5.cjs +1 -0
  56. package/dist/classDiagram-2ON5EDUG-Bv1XCvDZ.js +28 -0
  57. package/dist/classDiagram-2ON5EDUG-BzMV1CJW.cjs +1 -0
  58. package/dist/classDiagram-v2-WZHVMYZB-Bqxv5U7u.js +28 -0
  59. package/dist/classDiagram-v2-WZHVMYZB-BzMV1CJW.cjs +1 -0
  60. package/dist/clone-B0KDIkSS.js +8 -0
  61. package/dist/clone-wvtBTB6v.cjs +1 -0
  62. package/dist/cose-bilkent-S5V4N54A-DMHTv1aW.cjs +1 -0
  63. package/dist/cose-bilkent-S5V4N54A-bGPAcpg6.js +2250 -0
  64. package/dist/custom-Bl_fVJZ0.cjs +84 -0
  65. package/dist/custom-D-TzPpWT.js +5281 -0
  66. package/dist/cytoscape.esm-CElDUMAx.cjs +321 -0
  67. package/dist/cytoscape.esm-xf9dtmBj.js +18100 -0
  68. package/dist/dagre-6UL2VRFP-3bgUxzqG.js +294 -0
  69. package/dist/dagre-6UL2VRFP-B3NqmIxs.cjs +4 -0
  70. package/dist/dagre-BfAHSwtP.js +1472 -0
  71. package/dist/dagre-Buvkww-e.cjs +1 -0
  72. package/dist/defaultLocale-B5dSAwiC.js +201 -0
  73. package/dist/defaultLocale-G0HsdRIB.cjs +1 -0
  74. package/dist/diagram-PSM6KHXK-C4FjxUHt.cjs +24 -0
  75. package/dist/diagram-PSM6KHXK-CF8TkgzX.js +527 -0
  76. package/dist/diagram-QEK2KX5R-Dl3IHeA5.js +213 -0
  77. package/dist/diagram-QEK2KX5R-Z9DYjr44.cjs +43 -0
  78. package/dist/diagram-S2PKOQOG-Bib-zL2S.cjs +24 -0
  79. package/dist/diagram-S2PKOQOG-ZKvn7IEe.js +133 -0
  80. package/dist/dist-DC-lM4uX.cjs +1 -0
  81. package/dist/dist-zNcLEPGR.js +51 -0
  82. package/dist/erDiagram-Q2GNP2WA-DFMV9OUT.cjs +60 -0
  83. package/dist/erDiagram-Q2GNP2WA-DJYJEzEB.js +1600 -0
  84. package/dist/flowDiagram-NV44I4VS-7TxeawHS.cjs +162 -0
  85. package/dist/flowDiagram-NV44I4VS-CXa6ycqs.js +4128 -0
  86. package/dist/ganttDiagram-LVOFAZNH-DqT7pu4m.js +2869 -0
  87. package/dist/ganttDiagram-LVOFAZNH-iiExGpwF.cjs +267 -0
  88. package/dist/gitGraph-ZV4HHKMB-BjaEVcYh.cjs +1 -0
  89. package/dist/gitGraph-ZV4HHKMB-Cl2I6-l3.js +2 -0
  90. package/dist/gitGraphDiagram-NY62KEGX-Tphu_MeC.js +621 -0
  91. package/dist/gitGraphDiagram-NY62KEGX-k5xzXg7C.cjs +65 -0
  92. package/dist/graphlib-C3tPLMbC.js +225 -0
  93. package/dist/graphlib-Cdg0u3TT.cjs +1 -0
  94. package/dist/info-63CPKGFF-D2A5GDFo.js +2 -0
  95. package/dist/info-63CPKGFF-MRaucWlf.cjs +1 -0
  96. package/dist/infoDiagram-F6ZHWCRC-3Jwo4J0f.cjs +2 -0
  97. package/dist/infoDiagram-F6ZHWCRC-BUoruN76.js +19 -0
  98. package/dist/init-07zIhv_j.cjs +1 -0
  99. package/dist/init-Bwwdo3M6.js +15 -0
  100. package/dist/journeyDiagram-XKPGCS4Q-C_3oD9RV.cjs +139 -0
  101. package/dist/journeyDiagram-XKPGCS4Q-DB7INfrf.js +883 -0
  102. package/dist/kanban-definition-3W4ZIXB7-AVLIBuMF.js +968 -0
  103. package/dist/kanban-definition-3W4ZIXB7-txUXjKzB.cjs +89 -0
  104. package/dist/katex-6UpFeIdV.cjs +261 -0
  105. package/dist/katex-BHcJffnM.js +22112 -0
  106. package/dist/line-DYhVGH2B.js +34 -0
  107. package/dist/line-DdNAPGaw.cjs +1 -0
  108. package/dist/linear-n4_iirEu.js +289 -0
  109. package/dist/linear-rQLpRrSH.cjs +1 -0
  110. package/dist/loadCss-D6257oR0.js +8 -0
  111. package/dist/loadCss-DhrQh6-A.cjs +1 -0
  112. package/dist/markdown-it-Cz3KGZjR.cjs +2 -0
  113. package/dist/markdown-it-D-hH4G7k.js +173 -0
  114. package/dist/math-G8rF7UWn.cjs +1 -0
  115. package/dist/math-H49DsxYR.js +10 -0
  116. package/dist/mermaid-parser.core-B84fnaGG.js +11904 -0
  117. package/dist/mermaid-parser.core-C9EbhVVg.cjs +82 -0
  118. package/dist/mindmap-definition-VGOIOE7T-CXlyYsc6.cjs +68 -0
  119. package/dist/mindmap-definition-VGOIOE7T-VIt9sDN3.js +963 -0
  120. package/dist/mio-previewer.cjs.js +11 -21
  121. package/dist/mio-previewer.css +2 -9
  122. package/dist/mio-previewer.es.js +4915 -6147
  123. package/dist/ordinal-C55HfHHp.js +65 -0
  124. package/dist/ordinal-CUPR-p0T.cjs +1 -0
  125. package/dist/packet-HUATNLJX-CGNko_oS.cjs +1 -0
  126. package/dist/packet-HUATNLJX-CVx40lqO.js +2 -0
  127. package/dist/path-DNvJyUE8.js +85 -0
  128. package/dist/path-Kklx0M1v.cjs +1 -0
  129. package/dist/pie-WTHONI2E-BdPx0Cfg.cjs +1 -0
  130. package/dist/pie-WTHONI2E-DX5V8x0L.js +2 -0
  131. package/dist/pieDiagram-ADFJNKIX-BysReYfx.js +165 -0
  132. package/dist/pieDiagram-ADFJNKIX-CTT1YMsk.cjs +30 -0
  133. package/dist/plugins/custom.cjs.js +1 -1
  134. package/dist/plugins/custom.es.js +2 -85
  135. package/dist/plugins/markdown-it.cjs.js +1 -3
  136. package/dist/plugins/markdown-it.es.js +2 -173
  137. package/dist/quadrantDiagram-AYHSOK5B-8-V3cwsC.cjs +7 -0
  138. package/dist/quadrantDiagram-AYHSOK5B-DRutDK03.js +1974 -0
  139. package/dist/radar-NJJJXTRR-CTD6M8nl.js +2 -0
  140. package/dist/radar-NJJJXTRR-wJoTnQbj.cjs +1 -0
  141. package/dist/requirementDiagram-UZGBJVZJ-DFRpWnfW.cjs +64 -0
  142. package/dist/requirementDiagram-UZGBJVZJ-DNYoJyhG.js +2191 -0
  143. package/dist/sankeyDiagram-TZEHDZUN-B9fxDP0Q.cjs +10 -0
  144. package/dist/sankeyDiagram-TZEHDZUN-DD6bkI4Z.js +920 -0
  145. package/dist/sequenceDiagram-WL72ISMW-Bmptok1c.js +3562 -0
  146. package/dist/sequenceDiagram-WL72ISMW-D9sXtgAn.cjs +145 -0
  147. package/dist/src-BMjps4Ui.cjs +1 -0
  148. package/dist/src-BuisGndr.js +2149 -0
  149. package/dist/stateDiagram-FKZM4ZOC-Bmiw8fnW.js +217 -0
  150. package/dist/stateDiagram-FKZM4ZOC-DiD1WJPM.cjs +1 -0
  151. package/dist/stateDiagram-v2-4FDKWEC3-5ADhn1IF.js +27 -0
  152. package/dist/stateDiagram-v2-4FDKWEC3-BjhmCPL1.cjs +1 -0
  153. package/dist/timeline-definition-IT6M3QCI-C9VMls3W.js +830 -0
  154. package/dist/timeline-definition-IT6M3QCI-ZzbHXhNl.cjs +61 -0
  155. package/dist/treemap-75Q7IDZK-9TPMYr3R.cjs +1 -0
  156. package/dist/treemap-75Q7IDZK-u3p-cHDL.js +2 -0
  157. package/dist/types/plugins/custom/codeBlockPlugin.d.ts +8 -0
  158. package/dist/types/plugins/custom/mermaidPlugin.d.ts +4 -0
  159. package/dist/xychartDiagram-PRI3JC2R-BI6KuGZ2.cjs +7 -0
  160. package/dist/xychartDiagram-PRI3JC2R-BWabDL1u.js +2041 -0
  161. package/package.json +2 -2
  162. package/dist/_basePickBy-Be3yyf2d.js +0 -151
  163. package/dist/_basePickBy-Z0DtrAKQ.cjs +0 -1
  164. package/dist/_baseUniq-BXkA0Pgx.js +0 -614
  165. package/dist/_baseUniq-Dq2eV1vY.cjs +0 -1
  166. package/dist/arc-B-QGG8RZ.cjs +0 -1
  167. package/dist/arc-djW14lrn.js +0 -83
  168. package/dist/architecture-O4VJ6CD3-Cws_zM2K.cjs +0 -1
  169. package/dist/architecture-O4VJ6CD3-pdMXTCaT.js +0 -5
  170. package/dist/architectureDiagram-VXUJARFQ-BwchhvqL.js +0 -4661
  171. package/dist/architectureDiagram-VXUJARFQ-DxDLWGpO.cjs +0 -36
  172. package/dist/assets/parser.worker-67NQKZt5.js +0 -16
  173. package/dist/blockDiagram-VD42YOAC-B4Xc8gfX.cjs +0 -122
  174. package/dist/blockDiagram-VD42YOAC-DpPneP6J.js +0 -2261
  175. package/dist/c4Diagram-YG6GDRKO-695lQbrZ.cjs +0 -10
  176. package/dist/c4Diagram-YG6GDRKO-Cnlax2Xq.js +0 -1580
  177. package/dist/channel-D_ITz6Jy.cjs +0 -1
  178. package/dist/channel-sXy9EduO.js +0 -5
  179. package/dist/chunk-4BX2VUAB-Bdx3_f83.cjs +0 -1
  180. package/dist/chunk-4BX2VUAB-DRkGmgAZ.js +0 -8
  181. package/dist/chunk-55IACEB6-BB03hpRC.cjs +0 -1
  182. package/dist/chunk-55IACEB6-Ord5OQlh.js +0 -8
  183. package/dist/chunk-B4BG7PRW-Ca0fOgzA.cjs +0 -165
  184. package/dist/chunk-B4BG7PRW-D-cs8bDX.js +0 -1375
  185. package/dist/chunk-DI55MBZ5-BsRe2B2M.cjs +0 -220
  186. package/dist/chunk-DI55MBZ5-DSmlLD1s.js +0 -1370
  187. package/dist/chunk-FMBD7UC4-IYQmAMTo.js +0 -19
  188. package/dist/chunk-QN33PNHL-B7G6Qlf3.cjs +0 -1
  189. package/dist/chunk-QN33PNHL-EYMc4JVr.js +0 -19
  190. package/dist/chunk-QZHKN3VN-B8NJ6Ahx.cjs +0 -1
  191. package/dist/chunk-QZHKN3VN-C4WIG5z8.js +0 -15
  192. package/dist/chunk-TZMSLE5B-BoM53RHv.js +0 -64
  193. package/dist/chunk-TZMSLE5B-CgLDb48A.cjs +0 -1
  194. package/dist/classDiagram-2ON5EDUG-CxmdZvqc.js +0 -16
  195. package/dist/classDiagram-2ON5EDUG-DIRim8qa.cjs +0 -1
  196. package/dist/classDiagram-v2-WZHVMYZB-CxmdZvqc.js +0 -16
  197. package/dist/classDiagram-v2-WZHVMYZB-DIRim8qa.cjs +0 -1
  198. package/dist/clone-DOYxaT_d.js +0 -8
  199. package/dist/clone-DSlm33NG.cjs +0 -1
  200. package/dist/cose-bilkent-S5V4N54A-BD3p1OC_.cjs +0 -1
  201. package/dist/cose-bilkent-S5V4N54A-yLoaqH3G.js +0 -2608
  202. package/dist/cytoscape.esm-DHF7mANN.cjs +0 -331
  203. package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
  204. package/dist/dagre-6UL2VRFP-DG1oQ4B2.cjs +0 -4
  205. package/dist/dagre-6UL2VRFP-VjboDBbp.js +0 -444
  206. package/dist/defaultLocale-D7EN2tov.js +0 -171
  207. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
  208. package/dist/diagram-PSM6KHXK-C1p0l5TY.js +0 -531
  209. package/dist/diagram-PSM6KHXK-a4rni6rJ.cjs +0 -24
  210. package/dist/diagram-QEK2KX5R-CErKOsX1.cjs +0 -43
  211. package/dist/diagram-QEK2KX5R-CKmmuumX.js +0 -217
  212. package/dist/diagram-S2PKOQOG-B1M7qCNl.cjs +0 -24
  213. package/dist/diagram-S2PKOQOG-BMLCJExF.js +0 -142
  214. package/dist/erDiagram-Q2GNP2WA-BfuCa_Za.cjs +0 -60
  215. package/dist/erDiagram-Q2GNP2WA-fOTsQA-d.js +0 -841
  216. package/dist/flowDiagram-NV44I4VS-BEqeUuqz.cjs +0 -162
  217. package/dist/flowDiagram-NV44I4VS-DDwRAjVG.js +0 -1620
  218. package/dist/ganttDiagram-LVOFAZNH-BbuRS8g3.js +0 -2505
  219. package/dist/ganttDiagram-LVOFAZNH-BlVeWKRf.cjs +0 -267
  220. package/dist/gitGraph-ZV4HHKMB-Bmu8r_Iq.cjs +0 -1
  221. package/dist/gitGraph-ZV4HHKMB-DcQ2E4dF.js +0 -5
  222. package/dist/gitGraphDiagram-NY62KEGX-DcMEeNh7.cjs +0 -65
  223. package/dist/gitGraphDiagram-NY62KEGX-_sWVSKbL.js +0 -699
  224. package/dist/graph-DEnt0OtZ.js +0 -247
  225. package/dist/graph-Dgcjs2XL.cjs +0 -1
  226. package/dist/info-63CPKGFF-DVDDcoHy.js +0 -5
  227. package/dist/info-63CPKGFF-Dc3cWL0G.cjs +0 -1
  228. package/dist/infoDiagram-F6ZHWCRC-DoUSS0kC.js +0 -24
  229. package/dist/infoDiagram-F6ZHWCRC-ZeTrjgaE.cjs +0 -2
  230. package/dist/init-CHZsXQcr.cjs +0 -1
  231. package/dist/init-DjUOC4st.js +0 -16
  232. package/dist/journeyDiagram-XKPGCS4Q-DGe13iBu.js +0 -834
  233. package/dist/journeyDiagram-XKPGCS4Q-Ihl9g4mY.cjs +0 -139
  234. package/dist/kanban-definition-3W4ZIXB7-2qkrkVLK.cjs +0 -89
  235. package/dist/kanban-definition-3W4ZIXB7-BhWe5nMU.js +0 -719
  236. package/dist/katex-CmGeg_OO.js +0 -11692
  237. package/dist/katex-DEiiRhcn.cjs +0 -261
  238. package/dist/layout-BDNzBIaA.cjs +0 -1
  239. package/dist/layout-DTBfbHzy.js +0 -1324
  240. package/dist/linear-BRl2UYUr.cjs +0 -1
  241. package/dist/linear-CwbXkgvF.js +0 -259
  242. package/dist/loadCss-BbD6mdv-.cjs +0 -1
  243. package/dist/loadCss-DS0Fuaxe.js +0 -8
  244. package/dist/mermaid-parser.core-CJ1yJm0s.js +0 -12966
  245. package/dist/mermaid-parser.core-CxTcWSA2.cjs +0 -128
  246. package/dist/mindmap-definition-VGOIOE7T-BPUEmP7g.cjs +0 -68
  247. package/dist/mindmap-definition-VGOIOE7T-DSqZBgzR.js +0 -784
  248. package/dist/ordinal-CagbB1m8.cjs +0 -1
  249. package/dist/ordinal-DfAQgscy.js +0 -61
  250. package/dist/packet-HUATNLJX-B-qfkr5X.cjs +0 -1
  251. package/dist/packet-HUATNLJX-Dxob_meO.js +0 -5
  252. package/dist/pie-WTHONI2E-BRtdTGWt.js +0 -5
  253. package/dist/pie-WTHONI2E-DK7f6qJw.cjs +0 -1
  254. package/dist/pieDiagram-ADFJNKIX-Dhq_bEzm.js +0 -161
  255. package/dist/pieDiagram-ADFJNKIX-V04ms3gr.cjs +0 -30
  256. package/dist/quadrantDiagram-AYHSOK5B-C97bOmUE.js +0 -1022
  257. package/dist/quadrantDiagram-AYHSOK5B-DlqFPVhi.cjs +0 -7
  258. package/dist/radar-NJJJXTRR-B9jT3LP3.cjs +0 -1
  259. package/dist/radar-NJJJXTRR-D8plmle3.js +0 -5
  260. package/dist/requirementDiagram-UZGBJVZJ-BxVMLKfQ.js +0 -850
  261. package/dist/requirementDiagram-UZGBJVZJ-DENJ74Ew.cjs +0 -64
  262. package/dist/sankeyDiagram-TZEHDZUN-DwgW7Suq.js +0 -810
  263. package/dist/sankeyDiagram-TZEHDZUN-lTBLhaSq.cjs +0 -10
  264. package/dist/sequenceDiagram-WL72ISMW-BAOeX1dA.js +0 -2511
  265. package/dist/sequenceDiagram-WL72ISMW-BRVvH1X4.cjs +0 -145
  266. package/dist/stateDiagram-FKZM4ZOC-BrFQE7Gl.js +0 -263
  267. package/dist/stateDiagram-FKZM4ZOC-D8GjooGL.cjs +0 -1
  268. package/dist/stateDiagram-v2-4FDKWEC3-4VRIY-eH.cjs +0 -1
  269. package/dist/stateDiagram-v2-4FDKWEC3-DnrWD6a3.js +0 -16
  270. package/dist/timeline-definition-IT6M3QCI-BJMIlueb.js +0 -795
  271. package/dist/timeline-definition-IT6M3QCI-BQFGUuGP.cjs +0 -61
  272. package/dist/treemap-75Q7IDZK-BX1vBFWf.cjs +0 -1
  273. package/dist/treemap-75Q7IDZK-CMTkunTV.js +0 -5
  274. package/dist/viewer-CZUSHxhf.js +0 -19131
  275. package/dist/viewer-Canph5Zx.cjs +0 -305
  276. package/dist/xychartDiagram-PRI3JC2R-Sl8WX8wc.cjs +0 -7
  277. package/dist/xychartDiagram-PRI3JC2R-WnFI7Ezu.js +0 -1340
@@ -0,0 +1,54 @@
1
+ const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),n=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),r=require("./chunk-CVBHYZKI-CLVcv_xh.cjs"),i=require("./chunk-ATLVNIR6-shAOudT0.cjs"),a=require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs");function o(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function s(e,t){return e[0]===t[0]&&e[1]===t[1]}function c(e,t,n,r=1){let i=n,a=Math.max(t,.1),c=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,l=[0,0];if(i)for(let e of c)o(e,l,i);let u=function(e,t,n){let r=[];for(let t of e){let e=[...t];s(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],c=a[0].ymin,l=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>c);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s:c,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=c))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||l%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),c],[Math.round(r.x),c]])}c+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),l++}return i}(c,a,r);if(i){for(let e of c)o(e,l,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),o(r,t,n)})(u,l,-i)}return u}function l(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),c(e,r,n,i||1)}var u=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=l(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function d(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var f=class extends u{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=l(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)d([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},p=class extends u{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},m=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=l(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=d(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,f=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=f+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,d=this.helper.ellipse(s,c,i,i,t);n.push(...d.ops)}}return{type:`fillSketch`,ops:n}}},h=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=l(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=d(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},g=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=l(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=d(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},_={},v=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},y=0,b=1,x=2,S={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function C(e,t){return e.type===t}function w(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:y,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:b,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:x,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!C(a,x);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return w(`M0,0`+e);i++,o=S[a.text],r=a.text}else C(a,b)?o=S[r]:(i++,o=S[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!C(t,b))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof S[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function T(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function E(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(O(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function D(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function O(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=D(e,t,-u),[n,r]=D(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=O(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),S=Math.tan(_/4),C=4/3*i*S,w=4/3*a*S,T=[e,t],E=[e+C*y,t-w*v],k=[n+C*x,r-w*b],A=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],l)return[E,k,A].concat(f);{f=[E,k,A].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=D(f[t][0],f[t][1],u),r=D(f[t+1][0],f[t+1][1],u),i=D(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var k={randOffset:function(e,t){return L(e,t)},randOffsetWithRange:function(e,t,n){return ae(e,t,n)},ellipse:function(e,t,n,r,i){return ee(e,t,i,P(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return R(e,t,n,r,i,!0)}};function A(e,t,n,r,i){return{type:`path`,ops:R(e,t,n,r,i)}}function j(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...R(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...R(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?A(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function M(e,t,n,r,i){return function(e,t){return j(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function N(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=se(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:se(n[0],1.5*(1+.22*t.roughness),ie(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=se(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:se(a,1.5*(1+.22*t.roughness),ie(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function P(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=L(o*c,n),s+=L(s*c,n),{increment:a,rx:o,ry:s}}function ee(e,t,n,r){let[i,a]=le(r.increment,e,t,r.rx,r.ry,1,r.increment*ae(.1,ae(.4,1,n),n),n),o=ce(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=le(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=ce(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function te(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=L(.01*d,c),f+=L(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=ue(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=ue(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...R(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...R(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function ne(e,t){let n=E(T(w(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...R(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...de(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...R(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function re(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+L(e,t),r[0][1]+L(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+L(e,t),r[a][1]+L(e,t)]})}}return{type:`fillPath`,ops:n}}function F(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!_[n])switch(n){case`zigzag`:_[n]||(_[n]=new f(t));break;case`cross-hatch`:_[n]||(_[n]=new p(t));break;case`dots`:_[n]||(_[n]=new m(t));break;case`dashed`:_[n]||(_[n]=new h(t));break;case`zigzag-line`:_[n]||(_[n]=new g(t));break;default:n=`hachure`,_[n]||(_[n]=new u(t))}return _[n]}(t,k).fillPolygons(e,t)}function ie(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function I(e){return e.randomizer||=new v(e.seed||0),e.randomizer.next()}function ae(e,t,n,r=1){return n.roughness*r*(I(n)*(t-e)+e)}function L(e,t,n=1){return ae(-e,e,t,n)}function R(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=oe(e,t,n,r,i,!0,!1);if(o)return s;let c=oe(e,t,n,r,i,!0,!0);return s.concat(c)}function oe(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*I(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=L(p,i,l),m=L(m,i,l);let h=[],g=()=>L(d,i,l),_=()=>L(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:L(u,i,l)),t+(v?0:L(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function se(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]),r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+L(t,n),e[i][1]+L(t,n)]),i===e.length-1&&r.push([e[i][0]+L(t,n),e[i][1]+L(t,n)]);return ce(r,null,n)}function ce(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+L(e,n),t[1]+L(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...oe(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function le(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=L(.5,s)-Math.PI/2;l.push([L(a,s)+t+.9*r*Math.cos(u-e),L(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[L(a,s)+t+r*Math.cos(o),L(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([L(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),L(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([L(a,s)+t+.98*r*Math.cos(u+o),L(a,s)+n+.98*i*Math.sin(u+o)]),l.push([L(a,s)+t+.9*r*Math.cos(u+.5*o),L(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function ue(e,t,n,r,i,a,o,s,c){let l=a+L(.1,c),u=[];u.push([L(s,c)+t+.9*r*Math.cos(l-e),L(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([L(s,c)+t+r*Math.cos(a),L(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),ce(u,null,c)}function de(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:L(l[0],s)),o[1]+(f?0:L(l[0],s))]}),u=f?[i,a]:[i+L(l[p],s),a+L(l[p],s)],c.push({op:`bcurveTo`,data:[e+L(l[p],s),t+L(l[p],s),n+L(l[p],s),r+L(l[p],s),u[0],u[1]]});return c}function fe(e){return[...e]}function pe(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(fe(e[0]),fe(e[1]),fe(e[2]),fe(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(fe(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function me(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function he(e,t,n){let r=me(t,n);if(r===0)return me(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),me(e,z(t,n,i))}function z(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function ge(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(me(a,o)))>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=z(a,o,r),u=z(o,s,r),d=z(s,c,r),f=z(l,u,r),p=z(u,d,r),m=z(f,p,r);ge([a,l,f,m],0,n,i),ge([m,p,d,c],0,n,i)}var a,o;return i}function _e(e,t){return ve(e,0,e.length,t)}function ve(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=he(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(ve(e,t,l+1,r,a),ve(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function ye(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)ge(e,3*n,t,r);return n&&n>0?ve(r,0,r.length,n):r}var B=`none`,be=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[A(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=M(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(re([i],a)):o.push(F([i],a))}return a.stroke!==B&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=P(n,r,a),c=ee(e,t,a,s);if(a.fill)if(a.fillStyle===`solid`){let n=ee(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(F([c.estimatedPoints],a));return a.stroke!==B&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[j(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=te(e,t,n,r,i,a,o,!0,c);if(o&&c.fill)if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=te(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=L(.01*l,o),u+=L(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),F([m],o)}(e,t,n,r,i,a,c));return c.stroke!==B&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=N(e,n);if(n.fill&&n.fill!==B)if(n.fillStyle===`solid`){let t=N(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...ye(pe([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...ye(pe(r),10,(1+n.roughness)/2))}t.length&&r.push(F([t],n))}return n.stroke!==B&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=j(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(re([e],n)):r.push(F([e],n))),n.stroke!==B&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==B,a=n.stroke!==B,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=E(T(w(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...ye(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=_e(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=ne(e,n);if(i)if(n.fillStyle===`solid`)if(s.length===1){let t=ne(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(re(s,n));else r.push(F(s,n));return a&&(o?s.forEach((e=>{r.push(j(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:B};break;case`fillPath`:t={d:this.opsToPath(e),stroke:B,strokeWidth:0,fill:n.fill||B};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||B,strokeWidth:n,fill:B}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},xe=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new be(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},Se=`http://www.w3.org/2000/svg`,Ce=class{constructor(e,t){this.svg=e,this.gen=new be(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(Se,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(Se,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(Se,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(Se,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},V={canvas:(e,t)=>new xe(e,t),svg:(e,t)=>new Ce(e,t),generator:e=>new be(e),newSeed:()=>be.newSeed()},H=e.h(async(r,i,o)=>{let s,c=i.useHtmlLabels||t.h(t.b()?.htmlLabels);s=o||`node default`;let l=r.insert(`g`).attr(`class`,s).attr(`id`,i.domId||i.id),u=l.insert(`g`).attr(`class`,`label`).attr(`style`,n.l(i.labelStyle)),d;d=i.label===void 0?``:typeof i.label==`string`?i.label:i.label[0];let f=await a.n(u,t.I(n.i(d),t.b()),{useHtmlLabels:c,width:i.width||t.b().flowchart?.wrappingWidth,cssClasses:`markdown-node-label`,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),p=f.getBBox(),m=(i?.padding??0)/2;if(c){let r=f.children[0],i=e.p(f),a=r.getElementsByTagName(`img`);if(a){let r=d.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...a].map(i=>new Promise(a=>{function o(){if(i.style.display=`flex`,i.style.flexDirection=`column`,r){let e=t.b().fontSize?t.b().fontSize:window.getComputedStyle(document.body).fontSize,[r=t.d.fontSize]=n.f(e),a=r*5+`px`;i.style.minWidth=a,i.style.maxWidth=a}else i.style.width=`100%`;a(i)}e.h(o,`setupImage`),setTimeout(()=>{i.complete&&o()}),i.addEventListener(`error`,o),i.addEventListener(`load`,o)})))}p=r.getBoundingClientRect(),i.attr(`width`,p.width),i.attr(`height`,p.height)}return c?u.attr(`transform`,`translate(`+-p.width/2+`, `+-p.height/2+`)`):u.attr(`transform`,`translate(0, `+-p.height/2+`)`),i.centerLabel&&u.attr(`transform`,`translate(`+-p.width/2+`, `+-p.height/2+`)`),u.insert(`rect`,`:first-child`),{shapeSvg:l,bbox:p,halfPadding:m,label:u}},`labelHelper`),we=e.h(async(r,i,o)=>{let s=o.useHtmlLabels||t.h(t.b()?.flowchart?.htmlLabels),c=r.insert(`g`).attr(`class`,`label`).attr(`style`,o.labelStyle||``),l=await a.n(c,t.I(n.i(i),t.b()),{useHtmlLabels:s,width:o.width||t.b()?.flowchart?.wrappingWidth,style:o.labelStyle,addSvgBackground:!!o.icon||!!o.img}),u=l.getBBox(),d=o.padding/2;if(t.h(t.b()?.flowchart?.htmlLabels)){let t=l.children[0],n=e.p(l);u=t.getBoundingClientRect(),n.attr(`width`,u.width),n.attr(`height`,u.height)}return s?c.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`):c.attr(`transform`,`translate(0, `+-u.height/2+`)`),o.centerLabel&&c.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`),c.insert(`rect`,`:first-child`),{shapeSvg:r,bbox:u,halfPadding:d,label:c}},`insertLabel`),U=e.h((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),W=e.h((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function G(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e.h(G,`createPathFromPoints`);function K(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e.h(K,`generateFullSineWavePoints`);function Te(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e.h(Te,`generateCirclePoints`);var Ee=e.h((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;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),{x:n+c,y:r+l}},`intersectRect`);function De(e,t){t&&e.attr(`style`,t)}e.h(De,`applyStyle`);async function Oe(n){let r=e.p(document.createElementNS(`http://www.w3.org/2000/svg`,`foreignObject`)),i=r.append(`xhtml:div`),a=t.b(),o=n.label;n.label&&t.O(n.label)&&(o=await t.N(n.label.replace(t.s.lineBreakRegex,`
2
+ `),a));let s=`<span class="`+(n.isNode?`nodeLabel`:`edgeLabel`)+`" `+(n.labelStyle?`style="`+n.labelStyle+`"`:``)+`>`+o+`</span>`;return i.html(t.I(s,a)),De(i,n.labelStyle),i.style(`display`,`inline-block`),i.style(`padding-right`,`1px`),i.style(`white-space`,`nowrap`),i.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),r.node()}e.h(Oe,`addHtmlLabel`);var ke=e.h(async(r,i,a,o)=>{let s=r||``;if(typeof s==`object`&&(s=s[0]),t.h(t.b().flowchart.htmlLabels))return s=s.replace(/\\n|\n/g,`<br />`),e.g.info(`vertexText`+s),await Oe({isNode:o,label:n.i(s).replace(/fa[blrs]?:fa-[\w-]+/g,e=>`<i class='${e.replace(`:`,` `)}'></i>`),labelStyle:i&&i.replace(`fill:`,`color:`)});{let e=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);e.setAttribute(`style`,i.replace(`color:`,`fill:`));let t=[];t=typeof s==`string`?s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?s:[];for(let n of t){let t=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);t.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),t.setAttribute(`dy`,`1em`),t.setAttribute(`x`,`0`),a?t.setAttribute(`class`,`title-row`):t.setAttribute(`class`,`row`),t.textContent=n.trim(),e.appendChild(t)}return e}},`createLabel`),q=e.h((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),Ae=e.h(async(n,o)=>{e.g.info(`Creating subgraph rect for `,o.id,o);let s=t.b(),{themeVariables:c,handDrawnSeed:l}=s,{clusterBkg:u,clusterBorder:d}=c,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:h}=i.i(o),g=n.insert(`g`).attr(`class`,`cluster `+o.cssClasses).attr(`id`,o.id).attr(`data-look`,o.look),_=t.h(s.flowchart.htmlLabels),v=g.insert(`g`).attr(`class`,`cluster-label `),y=await a.n(v,o.label,{style:o.labelStyle,useHtmlLabels:_,isNode:!0}),b=y.getBBox();if(t.h(s.flowchart.htmlLabels)){let t=y.children[0],n=e.p(y);b=t.getBoundingClientRect(),n.attr(`width`,b.width),n.attr(`height`,b.height)}let x=o.width<=b.width+o.padding?b.width+o.padding:o.width;o.width<=b.width+o.padding?o.diff=(x-o.width)/2-o.padding:o.diff=-o.padding;let S=o.height,C=o.x-x/2,w=o.y-S/2;e.g.trace(`Data `,o,JSON.stringify(o));let T;if(o.look===`handDrawn`){let t=V.svg(g),n=i.a(o,{roughness:.7,fill:u,stroke:d,fillWeight:3,seed:l}),r=t.path(q(C,w,x,S,0),n);T=g.insert(()=>(e.g.debug(`Rough node insert CXC`,r),r),`:first-child`),T.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),T.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else T=g.insert(`rect`,`:first-child`),T.attr(`style`,p).attr(`rx`,o.rx).attr(`ry`,o.ry).attr(`x`,C).attr(`y`,w).attr(`width`,x).attr(`height`,S);let{subGraphTitleTopMargin:E}=r.t(s);if(v.attr(`transform`,`translate(${o.x-b.width/2}, ${o.y-o.height/2+E})`),f){let e=v.select(`span`);e&&e.attr(`style`,f)}let D=T.node().getBBox();return o.offsetX=0,o.width=D.width,o.height=D.height,o.offsetY=b.height-o.padding/2,o.intersect=function(e){return Ee(o,e)},{cluster:g,labelBBox:b}},`rect`),je={rect:Ae,squareRect:Ae,roundedWithTitle:e.h(async(n,r)=>{let i=t.b(),{themeVariables:a,handDrawnSeed:o}=i,{altBackground:s,compositeBackground:c,compositeTitleBackground:l,nodeBorder:u}=a,d=n.insert(`g`).attr(`class`,r.cssClasses).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-look`,r.look),f=d.insert(`g`,`:first-child`),p=d.insert(`g`).attr(`class`,`cluster-label`),m=d.append(`rect`),h=p.node().appendChild(await ke(r.label,r.labelStyle,void 0,!0)),g=h.getBBox();if(t.h(i.flowchart.htmlLabels)){let t=h.children[0],n=e.p(h);g=t.getBoundingClientRect(),n.attr(`width`,g.width),n.attr(`height`,g.height)}let _=0*r.padding,v=_/2,y=(r.width<=g.width+r.padding?g.width+r.padding:r.width)+_;r.width<=g.width+r.padding?r.diff=(y-r.width)/2-r.padding:r.diff=-r.padding;let b=r.height+_,x=r.height+_-g.height-6,S=r.x-y/2,C=r.y-b/2;r.width=y;let w=r.y-r.height/2-v+g.height+2,T;if(r.look===`handDrawn`){let e=r.cssClasses.includes(`statediagram-cluster-alt`),t=V.svg(d),n=r.rx||r.ry?t.path(q(S,C,y,b,10),{roughness:.7,fill:l,fillStyle:`solid`,stroke:u,seed:o}):t.rectangle(S,C,y,b,{seed:o});T=d.insert(()=>n,`:first-child`);let i=t.rectangle(S,w,y,x,{fill:e?s:c,fillStyle:e?`hachure`:`solid`,stroke:u,seed:o});T=d.insert(()=>n,`:first-child`),m=d.insert(()=>i)}else T=f.insert(`rect`,`:first-child`),T.attr(`class`,`outer`).attr(`x`,S).attr(`y`,C).attr(`width`,y).attr(`height`,b).attr(`data-look`,r.look),m.attr(`class`,`inner`).attr(`x`,S).attr(`y`,w).attr(`width`,y).attr(`height`,x);return p.attr(`transform`,`translate(${r.x-g.width/2}, ${C+1-(t.h(i.flowchart.htmlLabels)?0:3)})`),r.height=T.node().getBBox().height,r.offsetX=0,r.offsetY=g.height-r.padding/2,r.labelBBox=g,r.intersect=function(e){return Ee(r,e)},{cluster:d,labelBBox:g}},`roundedWithTitle`),noteGroup:e.h((e,t)=>{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;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`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return Ee(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e.h((e,n)=>{let{themeVariables:r,handDrawnSeed:i}=t.b(),{nodeBorder:a}=r,o=e.insert(`g`).attr(`class`,n.cssClasses).attr(`id`,n.id).attr(`data-look`,n.look),s=o.insert(`g`,`:first-child`),c=0*n.padding,l=n.width+c;n.diff=-n.padding;let u=n.height+c,d=n.x-l/2,f=n.y-u/2;n.width=l;let p;if(n.look===`handDrawn`){let e=V.svg(o).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=o.insert(()=>e,`:first-child`)}else p=s.insert(`rect`,`:first-child`),p.attr(`class`,`divider`).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,n.look);return n.height=p.node().getBBox().height,n.offsetX=0,n.offsetY=0,n.intersect=function(e){return Ee(n,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:e.h(async(n,o)=>{e.g.info(`Creating subgraph rect for `,o.id,o);let s=t.b(),{themeVariables:c,handDrawnSeed:l}=s,{clusterBkg:u,clusterBorder:d}=c,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:h}=i.i(o),g=n.insert(`g`).attr(`class`,`cluster `+o.cssClasses).attr(`id`,o.id).attr(`data-look`,o.look),_=t.h(s.flowchart.htmlLabels),v=g.insert(`g`).attr(`class`,`cluster-label `),y=await a.n(v,o.label,{style:o.labelStyle,useHtmlLabels:_,isNode:!0,width:o.width}),b=y.getBBox();if(t.h(s.flowchart.htmlLabels)){let t=y.children[0],n=e.p(y);b=t.getBoundingClientRect(),n.attr(`width`,b.width),n.attr(`height`,b.height)}let x=o.width<=b.width+o.padding?b.width+o.padding:o.width;o.width<=b.width+o.padding?o.diff=(x-o.width)/2-o.padding:o.diff=-o.padding;let S=o.height,C=o.x-x/2,w=o.y-S/2;e.g.trace(`Data `,o,JSON.stringify(o));let T;if(o.look===`handDrawn`){let t=V.svg(g),n=i.a(o,{roughness:.7,fill:u,stroke:d,fillWeight:4,seed:l}),r=t.path(q(C,w,x,S,o.rx),n);T=g.insert(()=>(e.g.debug(`Rough node insert CXC`,r),r),`:first-child`),T.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),T.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else T=g.insert(`rect`,`:first-child`),T.attr(`style`,p).attr(`rx`,o.rx).attr(`ry`,o.ry).attr(`x`,C).attr(`y`,w).attr(`width`,x).attr(`height`,S);let{subGraphTitleTopMargin:E}=r.t(s);if(v.attr(`transform`,`translate(${o.x-b.width/2}, ${o.y-o.height/2+E})`),f){let e=v.select(`span`);e&&e.attr(`style`,f)}let D=T.node().getBBox();return o.offsetX=0,o.width=D.width,o.height=D.height,o.offsetY=b.height-o.padding/2,o.intersect=function(e){return Ee(o,e)},{cluster:g,labelBBox:b}},`kanbanSection`)},Me=new Map,Ne=e.h(async(e,t)=>{let n=await je[t.shape||`rect`](e,t);return Me.set(t.id,n),n},`insertCluster`),Pe=e.h(()=>{Me=new Map},`clear`);function Fe(e,t){return e.intersect(t)}e.h(Fe,`intersectNode`);var Ie=Fe;function Le(e,t,n,r){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);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}e.h(Le,`intersectEllipse`);var Re=Le;function ze(e,t,n){return Re(e,t,t,n)}e.h(ze,`intersectCircle`);var Be=ze;function Ve(e,t,n,r){{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;if(s!==0&&c!==0&&He(s,c))return;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;if(Math.abs(p)<l&&Math.abs(m)<l&&He(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e.h(Ve,`intersectLine`);function He(e,t){return e*t>0}e.h(He,`sameSign`);var Ue=Ve;function We(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=Ue(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){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);return a<c?-1:a===c?0:1}),a[0]):e}e.h(We,`intersectPolygon`);var J={node:Ie,circle:Be,ellipse:Re,polygon:We,rect:Ee};function Ge(t,r){let{labelStyles:a}=i.i(r);r.labelStyle=a;let o=W(r),s=o;o||(s=`anchor`);let c=t.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),{cssStyles:l}=r,u=V.svg(c),d=i.a(r,{fill:`black`,stroke:`none`,fillStyle:`solid`});r.look!==`handDrawn`&&(d.roughness=0);let f=u.circle(0,0,2,d),p=c.insert(()=>f,`:first-child`);return p.attr(`class`,`anchor`).attr(`style`,n.l(l)),U(r,p),r.intersect=function(t){return e.g.info(`Circle intersect`,r,1,t),J.circle(r,1,t)},c}e.h(Ge,`anchor`);function Ke(e,t,n,r,i,a,o){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);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);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;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e.h(Ke,`generateArcPoints`);async function qe(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=o.width+t.padding+20,c=o.height+t.padding,l=c/2,u=l/(2.5+c/50),{cssStyles:d}=t,f=[{x:s/2,y:-c/2},{x:-s/2,y:-c/2},...Ke(-s/2,-c/2,-s/2,c/2,u,l,!1),{x:s/2,y:c/2},...Ke(s/2,c/2,s/2,-c/2,u,l,!0)],p=V.svg(a),m=i.a(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=G(f),g=p.path(h,m),_=a.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container`),d&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,r),_.attr(`transform`,`translate(${u/2}, 0)`),U(t,_),t.intersect=function(e){return J.polygon(t,f,e)},a}e.h(qe,`bowTieRect`);function Y(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e.h(Y,`insertPolygonShape`);async function Je(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=o.height+t.padding,c=o.width+t.padding+12,l=c,u=-s,d=[{x:12,y:u},{x:l,y:u},{x:l,y:0},{x:0,y:0},{x:0,y:u+12},{x:12,y:u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=V.svg(a),n=i.a(t,{}),r=G(d),o=e.path(r,n);f=a.insert(()=>o,`:first-child`).attr(`transform`,`translate(${-c/2}, ${s/2})`),p&&f.attr(`style`,p)}else f=Y(a,c,s,d);return r&&f.attr(`style`,r),U(t,f),t.intersect=function(e){return J.polygon(t,d,e)},a}e.h(Je,`card`);function Ye(e,t){let{nodeStyles:n}=i.i(t);t.label=``;let r=e.insert(`g`).attr(`class`,W(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],c=V.svg(r),l=i.a(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=G(s),d=c.path(u,l),f=r.insert(()=>d,`:first-child`);return a&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),n&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return J.polygon(t,s,e)},r}e.h(Ye,`choice`);async function Xe(t,r,a){let{labelStyles:o,nodeStyles:s}=i.i(r);r.labelStyle=o;let{shapeSvg:c,bbox:l,halfPadding:u}=await H(t,r,W(r)),d=a?.padding??u,f=l.width/2+d,p,{cssStyles:m}=r;if(r.look===`handDrawn`){let e=V.svg(c),t=i.a(r,{}),a=e.circle(0,0,f*2,t);p=c.insert(()=>a,`:first-child`),p.attr(`class`,`basic label-container`).attr(`style`,n.l(m))}else p=c.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,s).attr(`r`,f).attr(`cx`,0).attr(`cy`,0);return U(r,p),r.calcIntersect=function(e,t){let n=e.width/2;return J.circle(e,n,t)},r.intersect=function(t){return e.g.info(`Circle intersect`,r,f,t),J.circle(r,f,t)},c}e.h(Xe,`circle`);function Ze(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
3
+ M ${i.x},${i.y} L ${o.x},${o.y}`}e.h(Ze,`createLine`);function Qe(t,n){let{labelStyles:r,nodeStyles:a}=i.i(n);n.labelStyle=r,n.label=``;let o=t.insert(`g`).attr(`class`,W(n)).attr(`id`,n.domId??n.id),s=Math.max(30,n?.width??0),{cssStyles:c}=n,l=V.svg(o),u=i.a(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=l.circle(0,0,s*2,u),f=Ze(s),p=l.path(f,u),m=o.insert(()=>d,`:first-child`);return m.insert(()=>p),c&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,c),a&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),U(n,m),n.intersect=function(t){return e.g.info(`crossedCircle intersect`,n,{radius:s,point:t}),J.circle(n,s,t)},o}e.h(Qe,`crossedCircle`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e.h(X,`generateCirclePoints`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(t)),c=o.width+(t.padding??0),l=o.height+(t.padding??0),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...X(c/2,-l/2,u,30,-90,0),{x:-c/2-u,y:u},...X(c/2+u*2,-u,u,20,-180,-270),...X(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-l/2},...X(c/2,l/2,u,20,0,90)],p=[{x:c/2,y:-l/2-u},{x:-c/2,y:-l/2-u},...X(c/2,-l/2,u,20,-90,0),{x:-c/2-u,y:-u},...X(c/2+c*.1,-u,u,20,-180,-270),...X(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:l/2},...X(c/2,l/2,u,20,0,90),{x:-c/2,y:l/2+u},{x:c/2,y:l/2+u}],m=V.svg(a),h=i.a(t,{fill:`none`});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=G(f).replace(`Z`,``),_=m.path(g,h),v=G(p),y=m.path(v,{...h}),b=a.insert(`g`,`:first-child`);return b.insert(()=>y,`:first-child`).attr(`stroke-opacity`,0),b.insert(()=>_,`:first-child`),b.attr(`class`,`text`),d&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),b.attr(`transform`,`translate(${u}, 0)`),s.attr(`transform`,`translate(${-c/2+u-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(e){return J.polygon(t,p,e)},a}e.h($e,`curlyBraceLeft`);function Z(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}e.h(Z,`generateCirclePoints`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(t)),c=o.width+(t.padding??0),l=o.height+(t.padding??0),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...Z(c/2,-l/2,u,20,-90,0),{x:c/2+u,y:-u},...Z(c/2+u*2,-u,u,20,-180,-270),...Z(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:l/2},...Z(c/2,l/2,u,20,0,90)],p=[{x:-c/2,y:-l/2-u},{x:c/2,y:-l/2-u},...Z(c/2,-l/2,u,20,-90,0),{x:c/2+u,y:-u},...Z(c/2+u*2,-u,u,20,-180,-270),...Z(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:l/2},...Z(c/2,l/2,u,20,0,90),{x:c/2,y:l/2+u},{x:-c/2,y:l/2+u}],m=V.svg(a),h=i.a(t,{fill:`none`});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=G(f).replace(`Z`,``),_=m.path(g,h),v=G(p),y=m.path(v,{...h}),b=a.insert(`g`,`:first-child`);return b.insert(()=>y,`:first-child`).attr(`stroke-opacity`,0),b.insert(()=>_,`:first-child`),b.attr(`class`,`text`),d&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),b.attr(`transform`,`translate(${-u}, 0)`),s.attr(`transform`,`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(e){return J.polygon(t,p,e)},a}e.h(et,`curlyBraceRight`);function Q(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e.h(Q,`generateCirclePoints`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(t)),c=o.width+(t.padding??0),l=o.height+(t.padding??0),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...Q(c/2,-l/2,u,30,-90,0),{x:-c/2-u,y:u},...Q(c/2+u*2,-u,u,20,-180,-270),...Q(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-l/2},...Q(c/2,l/2,u,20,0,90)],p=[...Q(-c/2+u+u/2,-l/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Q(-c/2-u/2,-u,u,20,0,90),...Q(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Q(-c/2+u+u/2,l/2,u,30,-180,-270)],m=[{x:c/2,y:-l/2-u},{x:-c/2,y:-l/2-u},...Q(c/2,-l/2,u,20,-90,0),{x:-c/2-u,y:-u},...Q(c/2+u*2,-u,u,20,-180,-270),...Q(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:l/2},...Q(c/2,l/2,u,20,0,90),{x:-c/2,y:l/2+u},{x:c/2-u-u/2,y:l/2+u},...Q(-c/2+u+u/2,-l/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Q(-c/2-u/2,-u,u,20,0,90),...Q(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Q(-c/2+u+u/2,l/2,u,30,-180,-270)],h=V.svg(a),g=i.a(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=G(f).replace(`Z`,``),v=h.path(_,g),y=G(p).replace(`Z`,``),b=h.path(y,g),x=G(m),S=h.path(x,{...g}),C=a.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.insert(()=>b,`:first-child`),C.attr(`class`,`text`),d&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${u-u/4}, 0)`),s.attr(`transform`,`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,C),t.intersect=function(e){return J.polygon(t,m,e)},a}e.h(tt,`curlyBraces`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(80,(o.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(20,o.height+(t.padding??0)*2,t?.height??0),l=c/2,{cssStyles:u}=t,d=V.svg(a),f=i.a(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=s,m=c,h=p-l,g=m/4,_=[{x:h,y:0},{x:g,y:0},{x:0,y:m/2},{x:g,y:m},{x:h,y:m},...Te(-h,-m/2,l,50,270,90)],v=G(_),y=d.path(v,f),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container`),u&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,u),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),b.attr(`transform`,`translate(${-s/2}, ${-c/2})`),U(t,b),t.intersect=function(e){return J.polygon(t,_,e)},a}e.h(nt,`curvedTrapezoid`);var rt=e.h((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),it=e.h((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),at=e.h((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`);async function ot(e,t){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await H(e,t,W(t)),l=Math.max(s.width+t.padding,t.width??0),u=l/2,d=u/(2.5+l/50),f=Math.max(s.height+d+t.padding,t.height??0),p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=V.svg(o),n=it(0,0,l,f,u,d),r=at(0,d,l,f,u,d),a=e.path(n,i.a(t,{})),s=e.path(r,i.a(t,{fill:`none`}));p=o.insert(()=>s,`:first-child`),p=o.insert(()=>a,`:first-child`),p.attr(`class`,`basic label-container`),m&&p.attr(`style`,m)}else{let e=rt(0,0,l,f,u,d);p=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,n.l(m)).attr(`style`,a)}return p.attr(`label-offset-y`,d),p.attr(`transform`,`translate(${-l/2}, ${-(f/2+d)})`),U(t,p),c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(e){let n=J.rect(t,e),r=n.x-(t.x??0);if(u!=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-d)){let i=d*d*(1-r*r/(u*u));i>0&&(i=Math.sqrt(i)),i=d-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},o}e.h(ot,`cylinder`);async function st(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(t)),c=o.width+t.padding,l=o.height+t.padding,u=l*.2,d=-c/2,f=-l/2-u/2,{cssStyles:p}=t,m=V.svg(a),h=i.a(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],_=m.polygon(g.map(e=>[e.x,e.y]),h),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,r),s.attr(`transform`,`translate(${d+(t.padding??0)/2-(o.x-(o.left??0))}, ${f+u+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,v),t.intersect=function(e){return J.rect(t,e)},a}e.h(st,`dividedRectangle`);async function ct(t,r){let{labelStyles:a,nodeStyles:o}=i.i(r);r.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l}=await H(t,r,W(r)),u=c.width/2+l+5,d=c.width/2+l,f,{cssStyles:p}=r;if(r.look===`handDrawn`){let e=V.svg(s),t=i.a(r,{roughness:.2,strokeWidth:2.5}),a=i.a(r,{roughness:.2,strokeWidth:1.5}),o=e.circle(0,0,u*2,t),c=e.circle(0,0,d*2,a);f=s.insert(`g`,`:first-child`),f.attr(`class`,n.l(r.cssClasses)).attr(`style`,n.l(p)),f.node()?.appendChild(o),f.node()?.appendChild(c)}else{f=s.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,o),e.attr(`class`,`outer-circle`).attr(`style`,o).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return U(r,f),r.intersect=function(t){return e.g.info(`DoubleCircle intersect`,r,u,t),J.circle(r,u,t)},s}e.h(ct,`doublecircle`);function lt(t,n,{config:{themeVariables:r}}){let{labelStyles:a,nodeStyles:o}=i.i(n);n.label=``,n.labelStyle=a;let s=t.insert(`g`).attr(`class`,W(n)).attr(`id`,n.domId??n.id),{cssStyles:c}=n,l=V.svg(s),{nodeBorder:u}=r,d=i.a(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(d.roughness=0);let f=l.circle(0,0,14,d),p=s.insert(()=>f,`:first-child`);return p.selectAll(`path`).attr(`style`,`fill: ${u} !important;`),c&&c.length>0&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,c),o&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),U(n,p),n.intersect=function(t){return e.g.info(`filledCircle intersect`,n,{radius:7,point:t}),J.circle(n,7,t)},s}e.h(lt,`filledCircle`);async function ut(t,n){let{labelStyles:r,nodeStyles:a}=i.i(n);n.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await H(t,n,W(n)),l=s.width+(n.padding??0),u=l+s.height,d=l+s.height,f=[{x:0,y:-u},{x:d,y:-u},{x:d/2,y:0}],{cssStyles:p}=n,m=V.svg(o),h=i.a(n,{});n.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=G(f),_=m.path(g,h),v=o.insert(()=>_,`:first-child`).attr(`transform`,`translate(${-u/2}, ${u/2})`);return p&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,p),a&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,a),n.width=l,n.height=u,U(n,v),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-u/2+(n.padding??0)/2+(s.y-(s.top??0))})`),n.intersect=function(t){return e.g.info(`Triangle intersect`,n,f,t),J.polygon(n,f,t)},o}e.h(ut,`flippedTriangle`);function dt(e,t,{dir:n,config:{state:r,themeVariables:a}}){let{nodeStyles:o}=i.i(t);t.label=``;let s=e.insert(`g`).attr(`class`,W(t)).attr(`id`,t.domId??t.id),{cssStyles:c}=t,l=Math.max(70,t?.width??0),u=Math.max(10,t?.height??0);n===`LR`&&(l=Math.max(10,t?.width??0),u=Math.max(70,t?.height??0));let d=-1*l/2,f=-1*u/2,p=V.svg(s),m=i.a(t,{stroke:a.lineColor,fill:a.lineColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(d,f,l,u,m),g=s.insert(()=>h,`:first-child`);c&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,c),o&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,o),U(t,g);let _=r?.padding??0;return t.width&&t.height&&(t.width+=_/2||0,t.height+=_/2||0),t.intersect=function(e){return J.rect(t,e)},s}e.h(dt,`forkJoin`);async function ft(t,n){let{labelStyles:r,nodeStyles:a}=i.i(n);n.labelStyle=r;let{shapeSvg:o,bbox:s}=await H(t,n,W(n)),c=Math.max(80,s.width+(n.padding??0)*2,n?.width??0),l=Math.max(50,s.height+(n.padding??0)*2,n?.height??0),u=l/2,{cssStyles:d}=n,f=V.svg(o),p=i.a(n,{});n.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-c/2,y:-l/2},{x:c/2-u,y:-l/2},...Te(-c/2+u,0,u,50,90,270),{x:c/2-u,y:l/2},{x:-c/2,y:l/2}],h=G(m),g=f.path(h,p),_=o.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container`),d&&n.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),a&&n.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,a),U(n,_),n.intersect=function(t){return e.g.info(`Pill intersect`,n,{radius:u,point:t}),J.polygon(n,m,t)},o}e.h(ft,`halfRoundedRectangle`);async function pt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=o.height+(t.padding??0),c=o.width+(t.padding??0)*2.5,{cssStyles:l}=t,u=V.svg(a),d=i.a(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=c/2,p=f/6;f+=p;let m=s/2,h=m/2,g=f-h,_=[{x:-g,y:-m},{x:0,y:-m},{x:g,y:-m},{x:f,y:0},{x:g,y:m},{x:0,y:m},{x:-g,y:m},{x:-f,y:0}],v=G(_),y=u.path(v,d),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container`),l&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,l),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),t.width=c,t.height=s,U(t,b),t.intersect=function(e){return J.polygon(t,_,e)},a}e.h(pt,`hexagon`);async function mt(t,n){let{labelStyles:r,nodeStyles:a}=i.i(n);n.label=``,n.labelStyle=r;let{shapeSvg:o}=await H(t,n,W(n)),s=Math.max(30,n?.width??0),c=Math.max(30,n?.height??0),{cssStyles:l}=n,u=V.svg(o),d=i.a(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=[{x:0,y:0},{x:s,y:0},{x:0,y:c},{x:s,y:c}],p=G(f),m=u.path(p,d),h=o.insert(()=>m,`:first-child`);return h.attr(`class`,`basic label-container`),l&&n.look!==`handDrawn`&&h.selectChildren(`path`).attr(`style`,l),a&&n.look!==`handDrawn`&&h.selectChildren(`path`).attr(`style`,a),h.attr(`transform`,`translate(${-s/2}, ${-c/2})`),U(n,h),n.intersect=function(t){return e.g.info(`Pill intersect`,n,{points:f}),J.polygon(n,f,t)},o}e.h(mt,`hourglass`);async function ht(t,n,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=i.i(n);n.labelStyle=s;let c=n.assetHeight??48,l=n.assetWidth??48,u=Math.max(c,l),d=o?.wrappingWidth;n.width=Math.max(u,d??0);let{shapeSvg:f,bbox:p,label:m}=await H(t,n,`icon-shape default`),h=n.pos===`t`,g=u,_=u,{nodeBorder:v}=r,{stylesMap:y}=i.t(n),b=-_/2,x=-g/2,S=n.label?8:0,C=V.svg(f),w=i.a(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=C.rectangle(b,x,_,g,w),E=Math.max(_,p.width),D=g+p.height+S,O=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),k=f.insert(()=>T,`:first-child`),A=f.insert(()=>O);if(n.icon){let e=f.append(`g`);e.html(`<g>${await a.r(n.icon,{height:u,width:u,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,o=t.x,s=t.y;e.attr(`transform`,`translate(${-r/2-o},${h?p.height/2+S/2-i/2-s:-p.height/2-S/2-i/2-s})`),e.attr(`style`,`color: ${y.get(`stroke`)??v};`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-D/2:D/2-p.height})`),k.attr(`transform`,`translate(0,${h?p.height/2+S/2:-p.height/2-S/2})`),U(n,A),n.intersect=function(t){if(e.g.info(`iconSquare intersect`,n,t),!n.label)return J.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+S},{x:r+_/2,y:i-a/2+p.height+S},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+p.height+S},{x:r-p.width/2,y:i-a/2+p.height+S}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+p.width/2,y:i-a/2+g},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],J.polygon(n,o,t)},f}e.h(ht,`icon`);async function gt(t,n,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=i.i(n);n.labelStyle=s;let c=n.assetHeight??48,l=n.assetWidth??48,u=Math.max(c,l),d=o?.wrappingWidth;n.width=Math.max(u,d??0);let{shapeSvg:f,bbox:p,label:m}=await H(t,n,`icon-shape default`),h=n.label?8:0,g=n.pos===`t`,{nodeBorder:_,mainBkg:v}=r,{stylesMap:y}=i.t(n),b=V.svg(f),x=i.a(n,{});n.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`),x.stroke=y.get(`fill`)??v;let S=f.append(`g`);n.icon&&S.html(`<g>${await a.r(n.icon,{height:u,width:u,fallbackPrefix:``})}</g>`);let C=S.node().getBBox(),w=C.width,T=C.height,E=C.x,D=C.y,O=Math.max(w,T)*Math.SQRT2+40,k=b.circle(0,0,O,x),A=Math.max(O,p.width),j=O+p.height+h,M=b.rectangle(-A/2,-j/2,A,j,{...x,fill:`transparent`,stroke:`none`}),N=f.insert(()=>k,`:first-child`),P=f.insert(()=>M);return S.attr(`transform`,`translate(${-w/2-E},${g?p.height/2+h/2-T/2-D:-p.height/2-h/2-T/2-D})`),S.attr(`style`,`color: ${y.get(`stroke`)??_};`),m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${g?-j/2:j/2-p.height})`),N.attr(`transform`,`translate(0,${g?p.height/2+h/2:-p.height/2-h/2})`),U(n,P),n.intersect=function(t){return e.g.info(`iconSquare intersect`,n,t),J.rect(n,t)},f}e.h(gt,`iconCircle`);async function _t(t,n,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=i.i(n);n.labelStyle=s;let c=n.assetHeight??48,l=n.assetWidth??48,u=Math.max(c,l),d=o?.wrappingWidth;n.width=Math.max(u,d??0);let{shapeSvg:f,bbox:p,halfPadding:m,label:h}=await H(t,n,`icon-shape default`),g=n.pos===`t`,_=u+m*2,v=u+m*2,{nodeBorder:y,mainBkg:b}=r,{stylesMap:x}=i.t(n),S=-v/2,C=-_/2,w=n.label?8:0,T=V.svg(f),E=i.a(n,{});n.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=x.get(`fill`)??b;let D=T.path(q(S,C,v,_,5),E),O=Math.max(v,p.width),k=_+p.height+w,A=T.rectangle(-O/2,-k/2,O,k,{...E,fill:`transparent`,stroke:`none`}),j=f.insert(()=>D,`:first-child`).attr(`class`,`icon-shape2`),M=f.insert(()=>A);if(n.icon){let e=f.append(`g`);e.html(`<g>${await a.r(n.icon,{height:u,width:u,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,o=t.x,s=t.y;e.attr(`transform`,`translate(${-r/2-o},${g?p.height/2+w/2-i/2-s:-p.height/2-w/2-i/2-s})`),e.attr(`style`,`color: ${x.get(`stroke`)??y};`)}return h.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${g?-k/2:k/2-p.height})`),j.attr(`transform`,`translate(0,${g?p.height/2+w/2:-p.height/2-w/2})`),U(n,M),n.intersect=function(t){if(e.g.info(`iconSquare intersect`,n,t),!n.label)return J.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=g?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+w},{x:r+v/2,y:i-a/2+p.height+w},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+p.height+w},{x:r-p.width/2,y:i-a/2+p.height+w}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+_},{x:r+p.width/2,y:i-a/2+_},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+_},{x:r-v/2,y:i-a/2+_}],J.polygon(n,o,t)},f}e.h(_t,`iconRounded`);async function vt(t,n,{config:{themeVariables:r,flowchart:o}}){let{labelStyles:s}=i.i(n);n.labelStyle=s;let c=n.assetHeight??48,l=n.assetWidth??48,u=Math.max(c,l),d=o?.wrappingWidth;n.width=Math.max(u,d??0);let{shapeSvg:f,bbox:p,halfPadding:m,label:h}=await H(t,n,`icon-shape default`),g=n.pos===`t`,_=u+m*2,v=u+m*2,{nodeBorder:y,mainBkg:b}=r,{stylesMap:x}=i.t(n),S=-v/2,C=-_/2,w=n.label?8:0,T=V.svg(f),E=i.a(n,{});n.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=x.get(`fill`)??b;let D=T.path(q(S,C,v,_,.1),E),O=Math.max(v,p.width),k=_+p.height+w,A=T.rectangle(-O/2,-k/2,O,k,{...E,fill:`transparent`,stroke:`none`}),j=f.insert(()=>D,`:first-child`),M=f.insert(()=>A);if(n.icon){let e=f.append(`g`);e.html(`<g>${await a.r(n.icon,{height:u,width:u,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,o=t.x,s=t.y;e.attr(`transform`,`translate(${-r/2-o},${g?p.height/2+w/2-i/2-s:-p.height/2-w/2-i/2-s})`),e.attr(`style`,`color: ${x.get(`stroke`)??y};`)}return h.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${g?-k/2:k/2-p.height})`),j.attr(`transform`,`translate(0,${g?p.height/2+w/2:-p.height/2-w/2})`),U(n,M),n.intersect=function(t){if(e.g.info(`iconSquare intersect`,n,t),!n.label)return J.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=g?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+w},{x:r+v/2,y:i-a/2+p.height+w},{x:r+v/2,y:i+a/2},{x:r-v/2,y:i+a/2},{x:r-v/2,y:i-a/2+p.height+w},{x:r-p.width/2,y:i-a/2+p.height+w}]:[{x:r-v/2,y:i-a/2},{x:r+v/2,y:i-a/2},{x:r+v/2,y:i-a/2+_},{x:r+p.width/2,y:i-a/2+_},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+_},{x:r-v/2,y:i-a/2+_}],J.polygon(n,o,t)},f}e.h(vt,`iconSquare`);async function yt(t,n,{config:{flowchart:r}}){let a=new Image;a.src=n?.img??``,await a.decode();let o=Number(a.naturalWidth.toString().replace(`px`,``)),s=Number(a.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=o/s;let{labelStyles:c}=i.i(n);n.labelStyle=c;let l=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let u=Math.max(n.label?l??0:0,n?.assetWidth??o),d=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:u,f=n.constraint===`on`?d/n.imageAspectRatio:n?.assetHeight??s;n.width=Math.max(d,l??0);let{shapeSvg:p,bbox:m,label:h}=await H(t,n,`image-shape default`),g=n.pos===`t`,_=-d/2,v=-f/2,y=n.label?8:0,b=V.svg(p),x=i.a(n,{});n.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=b.rectangle(_,v,d,f,x),C=Math.max(d,m.width),w=f+m.height+y,T=b.rectangle(-C/2,-w/2,C,w,{...x,fill:`none`,stroke:`none`}),E=p.insert(()=>S,`:first-child`),D=p.insert(()=>T);if(n.img){let e=p.append(`image`);e.attr(`href`,n.img),e.attr(`width`,d),e.attr(`height`,f),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-d/2},${g?w/2-f:-w/2})`)}return h.attr(`transform`,`translate(${-m.width/2-(m.x-(m.left??0))},${g?-f/2-m.height/2-y/2:f/2-m.height/2+y/2})`),E.attr(`transform`,`translate(0,${g?m.height/2+y/2:-m.height/2-y/2})`),U(n,D),n.intersect=function(t){if(e.g.info(`iconSquare intersect`,n,t),!n.label)return J.rect(n,t);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=g?[{x:r-m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2},{x:r+m.width/2,y:i-a/2+m.height+y},{x:r+d/2,y:i-a/2+m.height+y},{x:r+d/2,y:i+a/2},{x:r-d/2,y:i+a/2},{x:r-d/2,y:i-a/2+m.height+y},{x:r-m.width/2,y:i-a/2+m.height+y}]:[{x:r-d/2,y:i-a/2},{x:r+d/2,y:i-a/2},{x:r+d/2,y:i-a/2+f},{x:r+m.width/2,y:i-a/2+f},{x:r+m.width/2/2,y:i+a/2},{x:r-m.width/2,y:i+a/2},{x:r-m.width/2,y:i-a/2+f},{x:r-d/2,y:i-a/2+f}],J.polygon(n,o,t)},p}e.h(yt,`imageSquare`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(o.width+(t.padding??0)*2,t?.width??0),c=Math.max(o.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*c/6,y:-c},{x:-3*c/6,y:-c}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=V.svg(a),n=i.a(t,{}),r=G(l),o=e.path(r,n);u=a.insert(()=>o,`:first-child`).attr(`transform`,`translate(${-s/2}, ${c/2})`),d&&u.attr(`style`,d)}else u=Y(a,s,c,l);return r&&u.attr(`style`,r),t.width=s,t.height=c,U(t,u),t.intersect=function(e){return J.polygon(t,l,e)},a}e.h(bt,`inv_trapezoid`);async function xt(e,t,r){let{labelStyles:a,nodeStyles:o}=i.i(t);t.labelStyle=a;let{shapeSvg:s,bbox:c}=await H(e,t,W(t)),l=Math.max(c.width+r.labelPaddingX*2,t?.width||0),u=Math.max(c.height+r.labelPaddingY*2,t?.height||0),d=-l/2,f=-u/2,p,{rx:m,ry:h}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(m=r.rx,h=r.ry),t.look===`handDrawn`){let e=V.svg(s),r=i.a(t,{}),a=m||h?e.path(q(d,f,l,u,m||0),r):e.rectangle(d,f,l,u,r);p=s.insert(()=>a,`:first-child`),p.attr(`class`,`basic label-container`).attr(`style`,n.l(g))}else p=s.insert(`rect`,`:first-child`),p.attr(`class`,`basic label-container`).attr(`style`,o).attr(`rx`,n.l(m)).attr(`ry`,n.l(h)).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u);return U(t,p),t.calcIntersect=function(e,t){return J.rect(e,t)},t.intersect=function(e){return J.rect(t,e)},s}e.h(xt,`drawRect`);async function St(e,t){let{shapeSvg:n,bbox:r,label:i}=await H(e,t,`label`),a=n.insert(`rect`,`:first-child`);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))})`),U(t,a),t.intersect=function(e){return J.rect(t,e)},n}e.h(St,`labelRect`);async function Ct(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(o.width+(t.padding??0),t?.width??0),c=Math.max(o.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*c/6,y:0},{x:s,y:-c},{x:-(3*c)/6,y:-c}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=V.svg(a),n=i.a(t,{}),r=G(l),o=e.path(r,n);u=a.insert(()=>o,`:first-child`).attr(`transform`,`translate(${-s/2}, ${c/2})`),d&&u.attr(`style`,d)}else u=Y(a,s,c,l);return r&&u.attr(`style`,r),t.width=s,t.height=c,U(t,u),t.intersect=function(e){return J.polygon(t,l,e)},a}e.h(Ct,`lean_left`);async function wt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(o.width+(t.padding??0),t?.width??0),c=Math.max(o.height+(t.padding??0),t?.height??0),l=[{x:-3*c/6,y:0},{x:s,y:0},{x:s+3*c/6,y:-c},{x:0,y:-c}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=V.svg(a),n=i.a(t,{}),r=G(l),o=e.path(r,n);u=a.insert(()=>o,`:first-child`).attr(`transform`,`translate(${-s/2}, ${c/2})`),d&&u.attr(`style`,d)}else u=Y(a,s,c,l);return r&&u.attr(`style`,r),t.width=s,t.height=c,U(t,u),t.intersect=function(e){return J.polygon(t,l,e)},a}e.h(wt,`lean_right`);function Tt(t,n){let{labelStyles:r,nodeStyles:a}=i.i(n);n.label=``,n.labelStyle=r;let o=t.insert(`g`).attr(`class`,W(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=Math.max(35,n?.width??0),l=Math.max(35,n?.height??0),u=[{x:c,y:0},{x:0,y:l+7/2},{x:c-14,y:l+7/2},{x:0,y:2*l},{x:c,y:l-7/2},{x:14,y:l-7/2}],d=V.svg(o),f=i.a(n,{});n.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=G(u),m=d.path(p,f),h=o.insert(()=>m,`:first-child`);return s&&n.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),h.attr(`transform`,`translate(-${c/2},${-l})`),U(n,h),n.intersect=function(t){return e.g.info(`lightningBolt intersect`,n,t),J.polygon(n,u,t)},o}e.h(Tt,`lightningBolt`);var Et=e.h((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Dt=e.h((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ot=e.h((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`);async function kt(e,t){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await H(e,t,W(t)),l=Math.max(s.width+(t.padding??0),t.width??0),u=l/2,d=u/(2.5+l/50),f=Math.max(s.height+d+(t.padding??0),t.height??0),p=f*.1,m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=V.svg(o),n=Dt(0,0,l,f,u,d,p),r=Ot(0,d,l,f,u,d),a=i.a(t,{}),s=e.path(n,a),c=e.path(r,a);o.insert(()=>c,`:first-child`).attr(`class`,`line`),m=o.insert(()=>s,`:first-child`),m.attr(`class`,`basic label-container`),h&&m.attr(`style`,h)}else{let e=Et(0,0,l,f,u,d,p);m=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,n.l(h)).attr(`style`,a)}return m.attr(`label-offset-y`,d),m.attr(`transform`,`translate(${-l/2}, ${-(f/2+d)})`),U(t,m),c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+d-(s.y-(s.top??0))})`),t.intersect=function(e){let n=J.rect(t,e),r=n.x-(t.x??0);if(u!=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-d)){let i=d*d*(1-r*r/(u*u));i>0&&(i=Math.sqrt(i)),i=d-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},o}e.h(kt,`linedCylinder`);async function At(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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=l/4,d=l+u,{cssStyles:f}=t,p=V.svg(a),m=i.a(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...K(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,u,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],g=p.polygon(h.map(e=>[e.x,e.y]),m),_=a.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,r),_.attr(`transform`,`translate(0,${-u/2})`),s.attr(`transform`,`translate(${-c/2+(t.padding??0)+c/2*.1/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)-u/2-(o.y-(o.top??0))})`),U(t,_),t.intersect=function(e){return J.polygon(t,h,e)},a}e.h(At,`linedWaveEdgedRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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:f}=t,p=V.svg(a),m=i.a(t,{}),h=[{x:u-5,y:d+5},{x:u-5,y:d+l+5},{x:u+c-5,y:d+l+5},{x:u+c-5,y:d+l},{x:u+c,y:d+l},{x:u+c,y:d+l-5},{x:u+c+5,y:d+l-5},{x:u+c+5,y:d-5},{x:u+5,y:d-5},{x:u+5,y:d},{x:u,y:d},{x:u,y:d+5}],g=[{x:u,y:d+5},{x:u+c-5,y:d+5},{x:u+c-5,y:d+l},{x:u+c,y:d+l},{x:u+c,y:d},{x:u,y:d}];t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let _=G(h),v=p.path(_,m),y=G(g),b=p.path(y,{...m,fill:`none`}),x=a.insert(()=>b,`:first-child`);return x.insert(()=>v,`:first-child`),x.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),s.attr(`transform`,`translate(${-(o.width/2)-5-(o.x-(o.left??0))}, ${-(o.height/2)+5-(o.y-(o.top??0))})`),U(t,x),t.intersect=function(e){return J.polygon(t,h,e)},a}e.h(jt,`multiRect`);async function Mt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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=l/4,d=l+u,f=-c/2,p=-d/2,{cssStyles:m}=t,h=K(f-5,p+d+5,f+c-5,p+d+5,u,.8),g=h?.[h.length-1],_=[{x:f-5,y:p+5},{x:f-5,y:p+d+5},...h,{x:f+c-5,y:g.y-5},{x:f+c,y:g.y-5},{x:f+c,y:g.y-10},{x:f+c+5,y:g.y-10},{x:f+c+5,y:p-5},{x:f+5,y:p-5},{x:f+5,y:p},{x:f,y:p},{x:f,y:p+5}],v=[{x:f,y:p+5},{x:f+c-5,y:p+5},{x:f+c-5,y:g.y-5},{x:f+c,y:g.y-5},{x:f+c,y:p},{x:f,y:p}],y=V.svg(a),b=i.a(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=G(_),S=y.path(x,b),C=G(v),w=y.path(C,b),T=a.insert(()=>S,`:first-child`);return T.insert(()=>w),T.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(0,${-u/2})`),s.attr(`transform`,`translate(${-(o.width/2)-5-(o.x-(o.left??0))}, ${-(o.height/2)+5-u/2-(o.y-(o.top??0))})`),U(t,T),t.intersect=function(e){return J.polygon(t,_,e)},a}e.h(Mt,`multiWaveEdgedRectangle`);async function Nt(e,n,{config:{themeVariables:r}}){let{labelStyles:a,nodeStyles:o}=i.i(n);n.labelStyle=a,n.useHtmlLabels||t.y().flowchart?.htmlLabels!==!1||(n.centerLabel=!0);let{shapeSvg:s,bbox:c,label:l}=await H(e,n,W(n)),u=Math.max(c.width+(n.padding??0)*2,n?.width??0),d=Math.max(c.height+(n.padding??0)*2,n?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=n,h=V.svg(s),g=i.a(n,{fill:r.noteBkgColor,stroke:r.noteBorderColor});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container`),m&&n.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),o&&n.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,o),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),U(n,v),n.intersect=function(e){return J.rect(n,e)},s}e.h(Nt,`note`);var Pt=e.h((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function Ft(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=o.width+t.padding+(o.height+t.padding),c=.5,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=V.svg(a),n=i.a(t,{}),r=Pt(0,0,s),o=e.path(r,n);u=a.insert(()=>o,`:first-child`).attr(`transform`,`translate(${-s/2+c}, ${s/2})`),d&&u.attr(`style`,d)}else u=Y(a,s,s,l),u.attr(`transform`,`translate(${-s/2+c}, ${s/2})`);return r&&u.attr(`style`,r),U(t,u),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=J.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},a}e.h(Ft,`question`);async function It(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(t)),c=Math.max(o.width+(t.padding??0),t?.width??0),l=Math.max(o.height+(t.padding??0),t?.height??0),u=-c/2,d=-l/2,f=d/2,p=[{x:u+f,y:d},{x:u,y:0},{x:u+f,y:-d},{x:-u,y:-d},{x:-u,y:d}],{cssStyles:m}=t,h=V.svg(a),g=i.a(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=G(p),v=h.path(_,g),y=a.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(${-f/2},0)`),s.attr(`transform`,`translate(${-f/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(e){return J.polygon(t,p,e)},a}e.h(It,`rect_left_inv_arrow`);async function Lt(n,r){let{labelStyles:a,nodeStyles:o}=i.i(r);r.labelStyle=a;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=n.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),u=c.insert(`g`).attr(`class`,`label`).attr(`style`,o),d=r.description,f=r.label,p=u.node().appendChild(await ke(f,r.labelStyle,!0,!0)),m={width:0,height:0};if(t.h(t.b()?.flowchart?.htmlLabels)){let t=p.children[0],n=e.p(p);m=t.getBoundingClientRect(),n.attr(`width`,m.width),n.attr(`height`,m.height)}e.g.info(`Text 2`,d);let h=d||[],g=p.getBBox(),_=u.node().appendChild(await ke(h.join?h.join(`<br/>`):h,r.labelStyle,!0,!0)),v=_.children[0],y=e.p(_);m=v.getBoundingClientRect(),y.attr(`width`,m.width),y.attr(`height`,m.height);let b=(r.padding||0)/2;e.p(_).attr(`transform`,`translate( `+(m.width>g.width?0:(g.width-m.width)/2)+`, `+(g.height+b+5)+`)`),e.p(p).attr(`transform`,`translate( `+(m.width<g.width?0:-(g.width-m.width)/2)+`, 0)`),m=u.node().getBBox(),u.attr(`transform`,`translate(`+-m.width/2+`, `+(-m.height/2-b+3)+`)`);let x=m.width+(r.padding||0),S=m.height+(r.padding||0),C=-m.width/2-b,w=-m.height/2-b,T,E;if(r.look===`handDrawn`){let t=V.svg(c),n=i.a(r,{}),a=t.path(q(C,w,x,S,r.rx||0),n),o=t.line(-m.width/2-b,-m.height/2-b+g.height+b,m.width/2+b,-m.height/2-b+g.height+b,n);E=c.insert(()=>(e.g.debug(`Rough node insert CXC`,a),o),`:first-child`),T=c.insert(()=>(e.g.debug(`Rough node insert CXC`,a),a),`:first-child`)}else T=l.insert(`rect`,`:first-child`),E=l.insert(`line`),T.attr(`class`,`outer title-state`).attr(`style`,o).attr(`x`,-m.width/2-b).attr(`y`,-m.height/2-b).attr(`width`,m.width+(r.padding||0)).attr(`height`,m.height+(r.padding||0)),E.attr(`class`,`divider`).attr(`x1`,-m.width/2-b).attr(`x2`,m.width/2+b).attr(`y1`,-m.height/2-b+g.height+b).attr(`y2`,-m.height/2-b+g.height+b);return U(r,T),r.intersect=function(e){return J.rect(r,e)},c}e.h(Lt,`rectWithTitle`);function Rt(e,t,n,r,i,a,o){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);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);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;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e.h(Rt,`generateArcPoints`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=t?.padding??0,c=t?.padding??0,l=(t?.width?t?.width:o.width)+s*2,u=(t?.height?t?.height:o.height)+c*2,d=t.radius||5,f=t.taper||5,{cssStyles:p}=t,m=V.svg(a),h=i.a(t,{});t.stroke&&(h.stroke=t.stroke),t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2+f,y:-u/2},{x:l/2-f,y:-u/2},...Rt(l/2-f,-u/2,l/2,-u/2+f,d,d,!0),{x:l/2,y:-u/2+f},{x:l/2,y:u/2-f},...Rt(l/2,u/2-f,l/2-f,u/2,d,d,!0),{x:l/2-f,y:u/2},{x:-l/2+f,y:u/2},...Rt(-l/2+f,u/2,-l/2,u/2-f,d,d,!0),{x:-l/2,y:u/2-f},{x:-l/2,y:-u/2+f},...Rt(-l/2,-u/2+f,-l/2+f,-u/2,d,d,!0)],_=G(g),v=m.path(_,h),y=a.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),U(t,y),t.intersect=function(e){return J.polygon(t,g,e)},a}e.h(zt,`roundedRect`);async function Bt(e,t){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c}=await H(e,t,W(t)),l=t?.padding??0,u=Math.max(s.width+(t.padding??0)*2,t?.width??0),d=Math.max(s.height+(t.padding??0)*2,t?.height??0),f=-s.width/2-l,p=-s.height/2-l,{cssStyles:m}=t,h=V.svg(o),g=i.a(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p},{x:f+u+8,y:p},{x:f+u+8,y:p+d},{x:f-8,y:p+d},{x:f-8,y:p},{x:f,y:p},{x:f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`).attr(`style`,n.l(m)),a&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,a),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,a),c.attr(`transform`,`translate(${-u/2+4+(t.padding??0)-(s.x-(s.left??0))},${-d/2+(t.padding??0)-(s.y-(s.top??0))})`),U(t,y),t.intersect=function(e){return J.rect(t,e)},o}e.h(Bt,`shadedProcess`);async function Vt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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:f}=t,p=V.svg(a),m=i.a(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:u,y:d},{x:u,y:d+l},{x:u+c,y:d+l},{x:u+c,y:d-l/2}],g=G(h),_=p.path(g,m),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),v.attr(`transform`,`translate(0, ${l/4})`),s.attr(`transform`,`translate(${-c/2+(t.padding??0)-(o.x-(o.left??0))}, ${-l/4+(t.padding??0)-(o.y-(o.top??0))})`),U(t,v),t.intersect=function(e){return J.polygon(t,h,e)},a}e.h(Vt,`slopedRect`);async function Ht(e,t){return xt(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1})}e.h(Ht,`squareRect`);async function Ut(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=o.height+t.padding,c=o.width+s/4+t.padding,l=s/2,{cssStyles:u}=t,d=V.svg(a),f=i.a(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=[{x:-c/2+l,y:-s/2},{x:c/2-l,y:-s/2},...Te(-c/2+l,0,l,50,90,270),{x:c/2-l,y:s/2},...Te(c/2-l,0,l,50,270,450)],m=G(p),h=d.path(m,f),g=a.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container outer-path`),u&&t.look!==`handDrawn`&&g.selectChildren(`path`).attr(`style`,u),r&&t.look!==`handDrawn`&&g.selectChildren(`path`).attr(`style`,r),U(t,g),t.intersect=function(e){return J.polygon(t,p,e)},a}e.h(Ut,`stadium`);async function Wt(e,t){return xt(e,t,{rx:5,ry:5,classes:`flowchart-node`})}e.h(Wt,`state`);function Gt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r;let{cssStyles:o}=t,{lineColor:s,stateBorder:c,nodeBorder:l}=n,u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),d=V.svg(u),f=i.a(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),m=c??l,h=d.circle(0,0,5,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),g=u.insert(()=>p,`:first-child`);return g.insert(()=>h),o&&g.selectAll(`path`).attr(`style`,o),a&&g.selectAll(`path`).attr(`style`,a),U(t,g),t.intersect=function(e){return J.circle(t,7,e)},u}e.h(Gt,`stateEnd`);function Kt(e,t,{config:{themeVariables:n}}){let{lineColor:r}=n,a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=V.svg(a).circle(0,0,14,i.r(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14);return U(t,o),t.intersect=function(e){return J.circle(t,7,e)},a}e.h(Kt,`stateStart`);async function qt(e,t){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r;let{shapeSvg:o,bbox:s}=await H(e,t,W(t)),c=(t?.padding||0)/2,l=s.width+t.padding,u=s.height+t.padding,d=-s.width/2-c,f=-s.height/2-c,p=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look===`handDrawn`){let e=V.svg(o),r=i.a(t,{}),a=e.rectangle(d-8,f,l+16,u,r),s=e.line(d,f,d,f+u,r),c=e.line(d+l,f,d+l,f+u,r);o.insert(()=>s,`:first-child`),o.insert(()=>c,`:first-child`);let p=o.insert(()=>a,`:first-child`),{cssStyles:m}=t;p.attr(`class`,`basic label-container`).attr(`style`,n.l(m)),U(t,p)}else{let e=Y(o,l,u,p);a&&e.attr(`style`,a),U(t,e)}return t.intersect=function(e){return J.polygon(t,p,e)},o}e.h(qt,`subroutine`);async function Jt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(o.width+(t.padding??0)*2,t?.width??0),c=Math.max(o.height+(t.padding??0)*2,t?.height??0),l=-s/2,u=-c/2,d=.2*c,f=.2*c,{cssStyles:p}=t,m=V.svg(a),h=i.a(t,{}),g=[{x:l-d/2,y:u},{x:l+s+d/2,y:u},{x:l+s+d/2,y:u+c},{x:l-d/2,y:u+c}],_=[{x:l+s-d/2,y:u+c},{x:l+s+d/2,y:u+c},{x:l+s+d/2,y:u+c-f}];t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=G(g),y=m.path(v,h),b=G(_),x=m.path(b,{...h,fillStyle:`solid`}),S=a.insert(()=>x,`:first-child`);return S.insert(()=>y,`:first-child`),S.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),U(t,S),t.intersect=function(e){return J.polygon(t,g,e)},a}e.h(Jt,`taggedRect`);async function Yt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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=l/4,d=.2*c,f=.2*l,p=l+u,{cssStyles:m}=t,h=V.svg(a),g=i.a(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-c/2-c/2*.1,y:p/2},...K(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2}],v=-c/2+c/2*.1,y=-p/2-f*.4,b=[{x:v+c-d,y:(y+l)*1.4},{x:v+c,y:y+l-f},{x:v+c,y:(y+l)*.9},...K(v+c,(y+l)*1.3,v+c-d,(y+l)*1.5,-l*.03,.5)],x=G(_),S=h.path(x,g),C=G(b),w=h.path(C,{...g,fillStyle:`solid`}),T=a.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(0,${-u/2})`),s.attr(`transform`,`translate(${-c/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-u/2-(o.y-(o.top??0))})`),U(t,T),t.intersect=function(e){return J.polygon(t,_,e)},a}e.h(Yt,`taggedWaveEdgedRectangle`);async function Xt(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(o.width+t.padding,t?.width||0),c=Math.max(o.height+t.padding,t?.height||0),l=-s/2,u=-c/2,d=a.insert(`rect`,`:first-child`);return d.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),U(t,d),t.intersect=function(e){return J.rect(t,e)},a}e.h(Xt,`text`);var Zt=e.h((e,t,n,r,i,a)=>`M${e},${t}
4
+ a${i},${a} 0,0,1 0,${-r}
5
+ l${n},0
6
+ a${i},${a} 0,0,1 0,${r}
7
+ M${n},${-r}
8
+ a${i},${a} 0,0,0 0,${r}
9
+ l${-n},0`,`createCylinderPathD`),Qt=e.h((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),$t=e.h((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`);async function en(e,t){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,label:c,halfPadding:l}=await H(e,t,W(t)),u=t.look===`neo`?l*2:l,d=s.height+u,f=d/2,p=f/(2.5+d/50),m=s.width+p+u,{cssStyles:h}=t,g;if(t.look===`handDrawn`){let e=V.svg(o),n=Qt(0,0,m,d,p,f),r=$t(0,0,m,d,p,f),a=e.path(n,i.a(t,{})),s=e.path(r,i.a(t,{fill:`none`}));g=o.insert(()=>s,`:first-child`),g=o.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),h&&g.attr(`style`,h)}else{let e=Zt(0,0,m,d,p,f);g=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,n.l(h)).attr(`style`,a),g.attr(`class`,`basic label-container`),h&&g.selectAll(`path`).attr(`style`,h),a&&g.selectAll(`path`).attr(`style`,a)}return g.attr(`label-offset-x`,p),g.attr(`transform`,`translate(${-m/2}, ${d/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-p-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),U(t,g),t.intersect=function(e){let n=J.rect(t,e),r=n.y-(t.y??0);if(f!=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-p)){let i=p*p*(1-r*r/(f*f));i!=0&&(i=Math.sqrt(Math.abs(i))),i=p-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}e.h(en,`tiltedCylinder`);async function tn(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=o.width+t.padding,c=o.height+t.padding,l=[{x:-3*c/6,y:0},{x:s+3*c/6,y:0},{x:s,y:-c},{x:0,y:-c}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=V.svg(a),n=i.a(t,{}),r=G(l),o=e.path(r,n);u=a.insert(()=>o,`:first-child`).attr(`transform`,`translate(${-s/2}, ${c/2})`),d&&u.attr(`style`,d)}else u=Y(a,s,c,l);return r&&u.attr(`style`,r),t.width=s,t.height=c,U(t,u),t.intersect=function(e){return J.polygon(t,l,e)},a}e.h(tn,`trapezoid`);async function nn(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(60,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(20,o.height+(t.padding??0)*2,t?.height??0),{cssStyles:l}=t,u=V.svg(a),d=i.a(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=[{x:-s/2*.8,y:-c/2},{x:s/2*.8,y:-c/2},{x:s/2,y:-c/2*.6},{x:s/2,y:c/2},{x:-s/2,y:c/2},{x:-s/2,y:-c/2*.6}],p=G(f),m=u.path(p,d),h=a.insert(()=>m,`:first-child`);return h.attr(`class`,`basic label-container`),l&&t.look!==`handDrawn`&&h.selectChildren(`path`).attr(`style`,l),r&&t.look!==`handDrawn`&&h.selectChildren(`path`).attr(`style`,r),U(t,h),t.intersect=function(e){return J.polygon(t,f,e)},a}e.h(nn,`trapezoidalPentagon`);async function rn(n,r){let{labelStyles:a,nodeStyles:o}=i.i(r);r.labelStyle=a;let{shapeSvg:s,bbox:c,label:l}=await H(n,r,W(r)),u=t.h(t.b().flowchart?.htmlLabels),d=c.width+(r.padding??0),f=d+c.height,p=d+c.height,m=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:h}=r,g=V.svg(s),_=i.a(r,{});r.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=G(m),y=g.path(v,_),b=s.insert(()=>y,`:first-child`).attr(`transform`,`translate(${-f/2}, ${f/2})`);return h&&r.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,h),o&&r.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,o),r.width=d,r.height=f,U(r,b),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${f/2-(c.height+(r.padding??0)/(u?2:1)-(c.y-(c.top??0)))})`),r.intersect=function(t){return e.g.info(`Triangle intersect`,r,m,t),J.polygon(r,m,t)},s}e.h(rn,`triangle`);async function an(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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=l/8,d=l+u,{cssStyles:f}=t,p=70-c,m=p>0?p/2:0,h=V.svg(a),g=i.a(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-c/2-m,y:d/2},...K(-c/2-m,d/2,c/2+m,d/2,u,.8),{x:c/2+m,y:-d/2},{x:-c/2-m,y:-d/2}],v=G(_),y=h.path(v,g),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),b.attr(`transform`,`translate(0,${-u/2})`),s.attr(`transform`,`translate(${-c/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-u-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(e){return J.polygon(t,_,e)},a}e.h(an,`waveEdgedRectangle`);async function on(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await H(e,t,W(t)),s=Math.max(o.width+(t.padding??0)*2,t?.width??0),c=Math.max(o.height+(t.padding??0)*2,t?.height??0),l=s/c,u=s,d=c;u>d*l?d=u/l:u=d*l,u=Math.max(u,100),d=Math.max(d,50);let f=Math.min(d*.2,d/4),p=d+f*2,{cssStyles:m}=t,h=V.svg(a),g=i.a(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2,y:p/2},...K(-u/2,p/2,u/2,p/2,f,1),{x:u/2,y:-p/2},...K(u/2,-p/2,-u/2,-p/2,f,-1)],v=G(_),y=h.path(v,g),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),U(t,b),t.intersect=function(e){return J.polygon(t,_,e)},a}e.h(on,`waveRectangle`);async function sn(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,label:s}=await H(e,t,W(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:f}=t,p=V.svg(a),m=i.a(t,{}),h=[{x:u-5,y:d-5},{x:u-5,y:d+l},{x:u+c,y:d+l},{x:u+c,y:d-5}],g=`M${u-5},${d-5} L${u+c},${d-5} L${u+c},${d+l} L${u-5},${d+l} L${u-5},${d-5}
10
+ M${u-5},${d} L${u+c},${d}
11
+ M${u},${d-5} L${u},${d+l}`;t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let _=p.path(g,m),v=a.insert(()=>_,`:first-child`);return v.attr(`transform`,`translate(${5/2}, ${5/2})`),v.attr(`class`,`basic label-container`),f&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,r),s.attr(`transform`,`translate(${-(o.width/2)+5/2-(o.x-(o.left??0))}, ${-(o.height/2)+5/2-(o.y-(o.top??0))})`),U(t,v),t.intersect=function(e){return J.polygon(t,h,e)},a}e.h(sn,`windowPane`);async function cn(r,a){let o=a;if(o.alias&&(a.label=o.alias),a.look===`handDrawn`){let{themeVariables:e}=t.y(),{background:n}=e;await cn(r,{...a,id:a.id+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${n}`]})}let s=t.y();a.useHtmlLabels=s.htmlLabels;let c=s.er?.diagramPadding??10,l=s.er?.entityPadding??6,{cssStyles:u}=a,{labelStyles:d,nodeStyles:f}=i.i(a);if(o.attributes.length===0&&a.label){let e={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5,classes:``};n.n(a.label,s)+e.labelPaddingX*2<s.er.minEntityWidth&&(a.width=s.er.minEntityWidth);let i=await xt(r,a,e);if(!t.h(s.htmlLabels)){let e=i.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return i}s.htmlLabels||(c*=1.25,l*=1.25);let p=W(a);p||=`node default`;let m=r.insert(`g`).attr(`class`,p).attr(`id`,a.domId||a.id),h=await ln(m,a.label??``,s,0,0,[`name`],d);h.height+=l;let g=0,_=[],v=[],y=0,b=0,x=0,S=0,C=!0,w=!0;for(let e of o.attributes){let t=await ln(m,e.type,s,0,g,[`attribute-type`],d);y=Math.max(y,t.width+c);let n=await ln(m,e.name,s,0,g,[`attribute-name`],d);b=Math.max(b,n.width+c);let r=await ln(m,e.keys.join(),s,0,g,[`attribute-keys`],d);x=Math.max(x,r.width+c);let i=await ln(m,e.comment,s,0,g,[`attribute-comment`],d);S=Math.max(S,i.width+c);let a=Math.max(t.height,n.height,r.height,i.height)+l;v.push({yOffset:g,rowHeight:a}),g+=a}let T=4;x<=c&&(C=!1,x=0,T--),S<=c&&(w=!1,S=0,T--);let E=m.node().getBBox();if(h.width+c*2-(y+b+x+S)>0){let e=h.width+c*2-(y+b+x+S);y+=e/T,b+=e/T,x>0&&(x+=e/T),S>0&&(S+=e/T)}let D=y+b+x+S,O=V.svg(m),k=i.a(a,{});a.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=0;v.length>0&&(A=v.reduce((e,t)=>e+(t?.rowHeight??0),0));let j=Math.max(E.width+c*2,a?.width||0,D),M=Math.max((A??0)+h.height,a?.height||0),N=-j/2,P=-M/2;m.selectAll(`g:not(:first-child)`).each((t,n,r)=>{let i=e.p(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=y:i.attr(`class`).includes(`attribute-keys`)?o+=y+b:i.attr(`class`).includes(`attribute-comment`)&&(o+=y+b+x))}i.attr(`transform`,`translate(${N+c/2+o}, ${s+P+h.height+l/2})`)}),m.select(`.name`).attr(`transform`,`translate(`+-h.width/2+`, `+(P+l/2)+`)`);let ee=O.rectangle(N,P,j,M,k),te=m.insert(()=>ee,`:first-child`).attr(`style`,u.join(``)),{themeVariables:ne}=t.y(),{rowEven:re,rowOdd:F,nodeBorder:ie}=ne;_.push(0);for(let[e,t]of v.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=O.rectangle(N,h.height+P+t?.yOffset,j,t?.rowHeight,{...k,fill:n?re:F,stroke:ie});m.insert(()=>r,`g.label`).attr(`style`,u.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let I=O.line(N,h.height+P,j+N,h.height+P,k);m.insert(()=>I).attr(`class`,`divider`),I=O.line(y+N,h.height+P,y+N,M+P,k),m.insert(()=>I).attr(`class`,`divider`),C&&(I=O.line(y+b+N,h.height+P,y+b+N,M+P,k),m.insert(()=>I).attr(`class`,`divider`)),w&&(I=O.line(y+b+x+N,h.height+P,y+b+x+N,M+P,k),m.insert(()=>I).attr(`class`,`divider`));for(let e of _)I=O.line(N,h.height+P+e,j+N,h.height+P+e,k),m.insert(()=>I).attr(`class`,`divider`);if(U(a,te),f&&a.look!==`handDrawn`){let e=f.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);m.selectAll(`path`).attr(`style`,e??``),m.selectAll(`.row-rect-even path`).attr(`style`,f)}return a.intersect=function(e){return J.rect(a,e)},m}e.h(cn,`erBox`);async function ln(r,i,o,s=0,c=0,l=[],u=``){let d=r.insert(`g`).attr(`class`,`label ${l.join(` `)}`).attr(`transform`,`translate(${s}, ${c})`).attr(`style`,u);i!==t.A(i)&&(i=t.A(i),i=i.replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`));let f=d.node().appendChild(await a.n(d,i,{width:n.n(i,o)+100,style:u,useHtmlLabels:o.htmlLabels},o));if(i.includes(`&lt;`)||i.includes(`&gt;`)){let e=f.children[0];for(e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`)}let p=f.getBBox();if(t.h(o.htmlLabels)){let t=f.children[0];t.style.textAlign=`start`;let n=e.p(f);p=t.getBoundingClientRect(),n.attr(`width`,p.width),n.attr(`height`,p.height)}return p}e.h(ln,`addText`);async function un(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,W(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await dn(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await dn(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await dn(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await dn(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}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(),{shapeSvg:o,bbox:_}}e.h(un,`textHelper`);async function dn(r,i,o,s=[]){let c=r.insert(`g`).attr(`class`,`label`).attr(`style`,s.join(`; `)),l=t.y(),u=`useHtmlLabels`in i?i.useHtmlLabels:t.h(l.htmlLabels)??!0,d=``;d=`text`in i?i.text:i.label,!u&&d.startsWith(`\\`)&&(d=d.substring(1)),t.O(d)&&(u=!0);let f=await a.n(c,t.L(n.i(d)),{width:n.n(d,l)+50,classes:`markdown-node-label`,useHtmlLabels:u},l),p,m=1;if(u){let t=f.children[0],n=e.p(f);m=t.innerHTML.split(`<br>`).length,t.innerHTML.includes(`</math>`)&&(m+=t.innerHTML.split(`<mrow>`).length-1);let r=t.getElementsByTagName(`img`);if(r){let t=d.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...r].map(n=>new Promise(r=>{function i(){if(n.style.display=`flex`,n.style.flexDirection=`column`,t){let e=l.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=parseInt(e,10)*5+`px`;n.style.minWidth=t,n.style.maxWidth=t}else n.style.width=`100%`;r(n)}e.h(i,`setupImage`),setTimeout(()=>{n.complete&&i()}),n.addEventListener(`error`,i),n.addEventListener(`load`,i)})))}p=t.getBoundingClientRect(),n.attr(`width`,p.width),n.attr(`height`,p.height)}else{s.includes(`font-weight: bolder`)&&e.p(f).selectAll(`tspan`).attr(`font-weight`,``),m=f.children.length;let t=f.children[0];(f.textContent===``||f.textContent.includes(`&gt`))&&(t.textContent=d[0]+d.substring(1).replaceAll(`&gt;`,`>`).replaceAll(`&lt;`,`<`).trim(),d[1]===` `&&(t.textContent=t.textContent[0]+` `+t.textContent.substring(1))),t.textContent===`undefined`&&(t.textContent=``),p=f.getBBox()}return c.attr(`transform`,`translate(0,`+(-p.height/(2*m)+o)+`)`),p.height}e.h(dn,`addText`);async function fn(n,r){let a=t.b(),o=a.class.padding??12,s=o,c=r.useHtmlLabels??t.h(a.htmlLabels)??!0,l=r;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];let{shapeSvg:u,bbox:d}=await un(n,r,a,c,s),{labelStyles:f,nodeStyles:p}=i.i(r);r.labelStyle=f,r.cssStyles=l.styles||``;let m=l.styles?.join(`;`)||p||``;r.cssStyles||=m.replaceAll(`!important`,``).split(`;`);let h=l.members.length===0&&l.methods.length===0&&!a.class?.hideEmptyMembersBox,g=V.svg(u),_=i.a(r,{});r.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=d.width,y=d.height;l.members.length===0&&l.methods.length===0?y+=s:l.members.length>0&&l.methods.length===0&&(y+=s*2);let b=-v/2,x=-y/2,S=g.rectangle(b-o,x-o-(h?o:l.members.length===0&&l.methods.length===0?-o/2:0),v+2*o,y+2*o+(h?o*2:l.members.length===0&&l.methods.length===0?-o:0),_),C=u.insert(()=>S,`:first-child`);C.attr(`class`,`basic label-container`);let w=C.node().getBBox();u.selectAll(`.text`).each((t,n,r)=>{let i=e.p(r[n]),a=i.attr(`transform`),s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(s=parseFloat(e[2]))}let d=s+x+o-(h?o:l.members.length===0&&l.methods.length===0?-o/2:0);c||(d-=4);let f=b;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(f=-i.node()?.getBBox().width/2||0,u.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(f=0)})),i.attr(`transform`,`translate(${f}, ${d})`)});let T=u.select(`.annotation-group`).node().getBBox().height-(h?o/2:0)||0,E=u.select(`.label-group`).node().getBBox().height-(h?o/2:0)||0,D=u.select(`.members-group`).node().getBBox().height-(h?o/2:0)||0;if(l.members.length>0||l.methods.length>0||h){let e=g.line(w.x,T+E+x+o,w.x+w.width,T+E+x+o,_);u.insert(()=>e).attr(`class`,`divider`).attr(`style`,m)}if(h||l.members.length>0||l.methods.length>0){let e=g.line(w.x,T+E+D+x+s*2+o,w.x+w.width,T+E+D+x+o+s*2,_);u.insert(()=>e).attr(`class`,`divider`).attr(`style`,m)}if(l.look!==`handDrawn`&&u.selectAll(`path`).attr(`style`,m),C.select(`:nth-child(2)`).attr(`style`,m),u.selectAll(`.divider`).select(`path`).attr(`style`,m),r.labelStyle?u.selectAll(`span`).attr(`style`,r.labelStyle):u.selectAll(`span`).attr(`style`,m),!c){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(m);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}else if(f){let t=e.exec(f);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}}}return U(r,C),r.intersect=function(e){return J.rect(r,e)},u}e.h(fn,`classBox`);async function pn(t,n){let{labelStyles:r,nodeStyles:a}=i.i(n);n.labelStyle=r;let o=n,s=n,c=`verifyMethod`in n,l=W(n),u=t.insert(`g`).attr(`class`,l).attr(`id`,n.domId??n.id),d;d=c?await $(u,`&lt;&lt;${o.type}&gt;&gt;`,0,n.labelStyle):await $(u,`&lt;&lt;Element&gt;&gt;`,0,n.labelStyle);let f=d,p=await $(u,o.name,f,n.labelStyle+`; font-weight: bold;`);if(f+=p+20,c){let e=await $(u,`${o.requirementId?`ID: ${o.requirementId}`:``}`,f,n.labelStyle);f+=e;let t=await $(u,`${o.text?`Text: ${o.text}`:``}`,f,n.labelStyle);f+=t;let r=await $(u,`${o.risk?`Risk: ${o.risk}`:``}`,f,n.labelStyle);f+=r,await $(u,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:``}`,f,n.labelStyle)}else{let e=await $(u,`${s.type?`Type: ${s.type}`:``}`,f,n.labelStyle);f+=e,await $(u,`${s.docRef?`Doc Ref: ${s.docRef}`:``}`,f,n.labelStyle)}let m=(u.node()?.getBBox().width??200)+20,h=(u.node()?.getBBox().height??200)+20,g=-m/2,_=-h/2,v=V.svg(u),y=i.a(n,{});n.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=v.rectangle(g,_,m,h,y),x=u.insert(()=>b,`:first-child`);if(x.attr(`class`,`basic label-container`).attr(`style`,a),u.selectAll(`.label`).each((t,n,r)=>{let i=e.p(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-h/2,l=g+20/2;(n===0||n===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),f>d+p+20){let e=v.line(g,_+d+p+20,g+m,_+d+p+20,y);u.insert(()=>e).attr(`style`,a)}return U(n,x),n.intersect=function(e){return J.rect(n,e)},u}e.h(pn,`requirementBox`);async function $(r,i,o,s=``){if(i===``)return 0;let c=r.insert(`g`).attr(`class`,`label`).attr(`style`,s),l=t.b(),u=l.htmlLabels??!0,d=await a.n(c,t.L(n.i(i)),{width:n.n(i,l)+50,classes:`markdown-node-label`,useHtmlLabels:u,style:s},l),f;if(u){let t=d.children[0],n=e.p(d);f=t.getBoundingClientRect(),n.attr(`width`,f.width),n.attr(`height`,f.height)}else{let e=d.children[0];for(let t of e.children)t.textContent=t.textContent.replaceAll(`&gt;`,`>`).replaceAll(`&lt;`,`<`),s&&t.setAttribute(`style`,s);f=d.getBBox(),f.height+=6}return c.attr(`transform`,`translate(${-f.width/2},${-f.height/2+o})`),f.height}e.h($,`addText`);var mn=e.h(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`);async function hn(e,t,{config:n}){let{labelStyles:r,nodeStyles:a}=i.i(t);t.labelStyle=r||``;let o=t.width;t.width=(t.width??200)-10;let{shapeSvg:s,bbox:c,label:l}=await H(e,t,W(t)),u=t.padding||10,d=``,f;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(d=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),f=s.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,d).attr(`target`,`_blank`));let p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},m,h;f?{label:m,bbox:h}=await we(f,`ticket`in t&&t.ticket||``,p):{label:m,bbox:h}=await we(s,`ticket`in t&&t.ticket||``,p);let{label:g,bbox:_}=await we(s,`assigned`in t&&t.assigned||``,p);t.width=o;let v=t?.width||0,y=Math.max(h.height,_.height)/2,b=Math.max(c.height+20,t?.height||0)+y,x=-v/2,S=-b/2;l.attr(`transform`,`translate(`+(u-v/2)+`, `+(-y-c.height/2)+`)`),m.attr(`transform`,`translate(`+(u-v/2)+`, `+(-y+c.height/2)+`)`),g.attr(`transform`,`translate(`+(u+v/2-_.width-20)+`, `+(-y+c.height/2)+`)`);let C,{rx:w,ry:T}=t,{cssStyles:E}=t;if(t.look===`handDrawn`){let e=V.svg(s),n=i.a(t,{}),r=w||T?e.path(q(x,S,v,b,w||0),n):e.rectangle(x,S,v,b,n);C=s.insert(()=>r,`:first-child`),C.attr(`class`,`basic label-container`).attr(`style`,E||null)}else{C=s.insert(`rect`,`:first-child`),C.attr(`class`,`basic label-container __APA__`).attr(`style`,a).attr(`rx`,w??5).attr(`ry`,T??5).attr(`x`,x).attr(`y`,S).attr(`width`,v).attr(`height`,b);let e=`priority`in t&&t.priority;if(e){let t=s.append(`line`),n=x+2,r=S+Math.floor((w??0)/2),i=S+b-Math.floor((w??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,mn(e))}}return U(t,C),t.height=b,t.intersect=function(e){return J.rect(t,e)},s}e.h(hn,`kanbanItem`);async function gn(t,r){let{labelStyles:a,nodeStyles:o}=i.i(r);r.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l,label:u}=await H(t,r,W(r)),d=c.width+10*l,f=c.height+8*l,p=.15*d,{cssStyles:m}=r,h=c.width+20,g=c.height+20,_=Math.max(d,h),v=Math.max(f,g);u.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2})`);let y,b=`M0 0
12
+ a${p},${p} 1 0,0 ${_*.25},${-1*v*.1}
13
+ a${p},${p} 1 0,0 ${_*.25},0
14
+ a${p},${p} 1 0,0 ${_*.25},0
15
+ a${p},${p} 1 0,0 ${_*.25},${v*.1}
16
+
17
+ a${p},${p} 1 0,0 ${_*.15},${v*.33}
18
+ a${p*.8},${p*.8} 1 0,0 0,${v*.34}
19
+ a${p},${p} 1 0,0 ${-1*_*.15},${v*.33}
20
+
21
+ a${p},${p} 1 0,0 ${-1*_*.25},${v*.15}
22
+ a${p},${p} 1 0,0 ${-1*_*.25},0
23
+ a${p},${p} 1 0,0 ${-1*_*.25},0
24
+ a${p},${p} 1 0,0 ${-1*_*.25},${-1*v*.15}
25
+
26
+ a${p},${p} 1 0,0 ${-1*_*.1},${-1*v*.33}
27
+ a${p*.8},${p*.8} 1 0,0 0,${-1*v*.34}
28
+ a${p},${p} 1 0,0 ${_*.1},${-1*v*.33}
29
+ H0 V0 Z`;if(r.look===`handDrawn`){let e=V.svg(s),t=i.a(r,{}),a=e.path(b,t);y=s.insert(()=>a,`:first-child`),y.attr(`class`,`basic label-container`).attr(`style`,n.l(m))}else y=s.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`d`,b);return y.attr(`transform`,`translate(${-_/2}, ${-v/2})`),U(r,y),r.calcIntersect=function(e,t){return J.rect(e,t)},r.intersect=function(t){return e.g.info(`Bang intersect`,r,t),J.rect(r,t)},s}e.h(gn,`bang`);async function _n(t,r){let{labelStyles:a,nodeStyles:o}=i.i(r);r.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l,label:u}=await H(t,r,W(r)),d=c.width+2*l,f=c.height+2*l,p=.15*d,m=.25*d,h=.35*d,g=.2*d,{cssStyles:_}=r,v,y=`M0 0
30
+ a${p},${p} 0 0,1 ${d*.25},${-1*d*.1}
31
+ a${h},${h} 1 0,1 ${d*.4},${-1*d*.1}
32
+ a${m},${m} 1 0,1 ${d*.35},${d*.2}
33
+
34
+ a${p},${p} 1 0,1 ${d*.15},${f*.35}
35
+ a${g},${g} 1 0,1 ${-1*d*.15},${f*.65}
36
+
37
+ a${m},${p} 1 0,1 ${-1*d*.25},${d*.15}
38
+ a${h},${h} 1 0,1 ${-1*d*.5},0
39
+ a${p},${p} 1 0,1 ${-1*d*.25},${-1*d*.15}
40
+
41
+ a${p},${p} 1 0,1 ${-1*d*.1},${-1*f*.35}
42
+ a${g},${g} 1 0,1 ${d*.1},${-1*f*.65}
43
+ H0 V0 Z`;if(r.look===`handDrawn`){let e=V.svg(s),t=i.a(r,{}),a=e.path(y,t);v=s.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`).attr(`style`,n.l(_))}else v=s.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`d`,y);return u.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2})`),v.attr(`transform`,`translate(${-d/2}, ${-f/2})`),U(r,v),r.calcIntersect=function(e,t){return J.rect(e,t)},r.intersect=function(t){return e.g.info(`Cloud intersect`,r,t),J.rect(r,t)},s}e.h(_n,`cloud`);async function vn(e,t){let{labelStyles:n,nodeStyles:r}=i.i(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await H(e,t,W(t)),l=o.width+8*s,u=o.height+2*s,d=`
44
+ M${-l/2} ${u/2-5}
45
+ v${-u+10}
46
+ q0,-5 5,-5
47
+ h${l-10}
48
+ q5,0 5,5
49
+ v${u-10}
50
+ q0,5 -5,5
51
+ h${-l+10}
52
+ q-5,0 -5,-5
53
+ Z
54
+ `,f=a.append(`path`).attr(`id`,`node-`+t.id).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,d);return a.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-l/2).attr(`y1`,u/2).attr(`x2`,l/2).attr(`y2`,u/2),c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>c.node()),U(t,f),t.calcIntersect=function(e,t){return J.rect(e,t)},t.intersect=function(e){return J.rect(t,e)},a}e.h(vn,`defaultMindmapNode`);async function yn(e,t){return Xe(e,t,{padding:t.padding??0})}e.h(yn,`mindmapCircle`);var bn=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:Ht},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:zt},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:Ut},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:qt},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:ot},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:Xe},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:gn},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:_n},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:Ft},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:pt},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:wt},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:Ct},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:tn},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:bt},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:ct},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:Xt},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:Je},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:Bt},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:Kt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:Gt},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:dt},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:mt},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:$e},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:et},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:tt},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Tt},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:an},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:ft},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:en},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:kt},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:nt},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:st},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:rn},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:sn},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:lt},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:nn},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:ut},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:Vt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:Mt},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:jt},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:qe},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:Qe},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:Yt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:Jt},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:on},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:It},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:At}],xn=e.h(()=>{let e=[...Object.entries({state:Wt,choice:Ye,note:Nt,rectWithTitle:Lt,labelRect:St,iconSquare:vt,iconCircle:gt,icon:ht,iconRounded:_t,imageSquare:yt,anchor:Ge,kanbanItem:hn,mindmapCircle:yn,defaultMindmapNode:vn,classBox:fn,erBox:cn,requirementBox:pn}),...bn.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function Sn(e){return e in xn}e.h(Sn,`isValidShape`);var Cn=new Map;async function wn(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?xn[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;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)}else i=await a(e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),Cn.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}e.h(wn,`insertNode`);var Tn=e.h((e,t)=>{Cn.set(t.id,e)},`setNodeElem`),En=e.h(()=>{Cn.clear()},`clear`),Dn=e.h(t=>{let n=Cn.get(t.id);e.g.trace(`Transforming node`,t.diff,t,`translate(`+(t.x-t.width/2-5)+`, `+t.width/2+`)`);let r=t.diff||0;return t.clusterNode?n.attr(`transform`,`translate(`+(t.x+r-t.width/2)+`, `+(t.y-t.height/2-8)+`)`):n.attr(`transform`,`translate(`+t.x+`, `+t.y+`)`),r},`positionNode`);Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return wn}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Dn}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Tn}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return En}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Sn}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return U}});
@@ -0,0 +1,25 @@
1
+ import { g as e, h as t } from "./src-BuisGndr.js";
2
+ import { c as n } from "./chunk-ABZYJK2D-DDrmE3Q7.js";
3
+ //#region node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.mjs
4
+ var r = /* @__PURE__ */ t((t, r, o, s) => {
5
+ t.attr("class", o);
6
+ let { width: c, height: l, x: u, y: d } = i(t, r);
7
+ n(t, l, c, s);
8
+ let f = a(u, d, c, l, r);
9
+ t.attr("viewBox", f), e.debug(`viewBox configured: ${f} with padding: ${r}`);
10
+ }, "setupViewPortForSVG"), i = /* @__PURE__ */ t((e, t) => {
11
+ let n = e.node()?.getBBox() || {
12
+ width: 0,
13
+ height: 0,
14
+ x: 0,
15
+ y: 0
16
+ };
17
+ return {
18
+ width: n.width + t * 2,
19
+ height: n.height + t * 2,
20
+ x: n.x,
21
+ y: n.y
22
+ };
23
+ }, "calculateDimensionsWithPadding"), a = /* @__PURE__ */ t((e, t, n, r, i) => `${e - i} ${t - i} ${n} ${r}`, "createViewBox");
24
+ //#endregion
25
+ export { r as t };
@@ -0,0 +1 @@
1
+ const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs");var n=e.h((n,a,o,s)=>{n.attr(`class`,o);let{width:c,height:l,x:u,y:d}=r(n,a);t.c(n,l,c,s);let f=i(u,d,c,l,a);n.attr(`viewBox`,f),e.g.debug(`viewBox configured: ${f} with padding: ${a}`)},`setupViewPortForSVG`),r=e.h((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),i=e.h((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
@@ -0,0 +1,7 @@
1
+ const e=require("./src-BMjps4Ui.cjs"),t=require("./chunk-ABZYJK2D-CbIYYZa_.cjs"),n=require("./chunk-S3R3BYOJ-B2ozcJNg.cjs"),r=require("./line-DdNAPGaw.cjs"),i=require("./chunk-HN2XXSSU-BwmRMa2r.cjs"),a=require("./chunk-CVBHYZKI-CLVcv_xh.cjs"),o=require("./chunk-ATLVNIR6-shAOudT0.cjs"),s=require("./chunk-JA3XYJ7Z-BaAdjYEy.cjs"),c=require("./chunk-JZLCHNYA-CvPIQFXP.cjs");var l=e.h((e,t,n,r,i,a)=>{t.arrowTypeStart&&d(e,`start`,t.arrowTypeStart,n,r,i,a),t.arrowTypeEnd&&d(e,`end`,t.arrowTypeEnd,n,r,i,a)},`addEdgeMarkers`),u={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},d=e.h((t,n,r,i,a,o,s)=>{let c=u[r];if(!c){e.g.warn(`Unknown arrow type: ${r}`);return}let l=`${a}_${o}-${c.type}${n===`start`?`Start`:`End`}`;if(s&&s.trim()!==``){let e=`${l}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(e)){let t=document.getElementById(l);if(t){let n=t.cloneNode(!0);n.id=e,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),t.parentNode?.appendChild(n)}}t.attr(`marker-${n}`,`url(${i}#${e})`)}else t.attr(`marker-${n}`,`url(${i}#${l})`)},`addEdgeMarker`),f=new Map,p=new Map,m=e.h(()=>{f.clear(),p.clear()},`clear`),h=e.h(e=>e?e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),g=e.h(async(n,r)=>{let i=t.h(t.b().flowchart.htmlLabels),{labelStyles:a}=o.i(r);r.labelStyle=a;let l=await s.n(n,r.label,{style:r.labelStyle,useHtmlLabels:i,addSvgBackground:!0,isNode:!1});e.g.info(`abc82`,r,r.labelType);let u=n.insert(`g`).attr(`class`,`edgeLabel`),d=u.insert(`g`).attr(`class`,`label`).attr(`data-id`,r.id);d.node().appendChild(l);let m=l.getBBox();if(i){let t=l.children[0],n=e.p(l);m=t.getBoundingClientRect(),n.attr(`width`,m.width),n.attr(`height`,m.height)}d.attr(`transform`,`translate(`+-m.width/2+`, `+-m.height/2+`)`),f.set(r.id,u),r.width=m.width,r.height=m.height;let g;if(r.startLabelLeft){let e=await c.r(r.startLabelLeft,h(r.labelStyle)),t=n.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`);g=i.node().appendChild(e);let a=e.getBBox();i.attr(`transform`,`translate(`+-a.width/2+`, `+-a.height/2+`)`),p.get(r.id)||p.set(r.id,{}),p.get(r.id).startLeft=t,_(g,r.startLabelLeft)}if(r.startLabelRight){let e=await c.r(r.startLabelRight,h(r.labelStyle)),t=n.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`);g=t.node().appendChild(e),i.node().appendChild(e);let a=e.getBBox();i.attr(`transform`,`translate(`+-a.width/2+`, `+-a.height/2+`)`),p.get(r.id)||p.set(r.id,{}),p.get(r.id).startRight=t,_(g,r.startLabelRight)}if(r.endLabelLeft){let e=await c.r(r.endLabelLeft,h(r.labelStyle)),t=n.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`);g=i.node().appendChild(e);let a=e.getBBox();i.attr(`transform`,`translate(`+-a.width/2+`, `+-a.height/2+`)`),t.node().appendChild(e),p.get(r.id)||p.set(r.id,{}),p.get(r.id).endLeft=t,_(g,r.endLabelLeft)}if(r.endLabelRight){let e=await c.r(r.endLabelRight,h(r.labelStyle)),t=n.insert(`g`).attr(`class`,`edgeTerminals`),i=t.insert(`g`).attr(`class`,`inner`);g=i.node().appendChild(e);let a=e.getBBox();i.attr(`transform`,`translate(`+-a.width/2+`, `+-a.height/2+`)`),t.node().appendChild(e),p.get(r.id)||p.set(r.id,{}),p.get(r.id).endRight=t,_(g,r.endLabelRight)}return l},`insertEdgeLabel`);function _(e,n){t.b().flowchart.htmlLabels&&e&&(e.style.width=n.length*9+`px`,e.style.height=`12px`)}e.h(_,`setTerminalWidth`);var v=e.h((r,i)=>{e.g.debug(`Moving label abc88 `,r.id,r.label,f.get(r.id),i);let o=i.updatedPath?i.updatedPath:i.originalPath,{subGraphTitleTotalMargin:s}=a.t(t.b());if(r.label){let t=f.get(r.id),a=r.x,c=r.y;if(o){let t=n.h.calcLabelPosition(o);e.g.debug(`Moving label `+r.label+` from (`,a,`,`,c,`) to (`,t.x,`,`,t.y,`) abc88`),i.updatedPath&&(a=t.x,c=t.y)}t.attr(`transform`,`translate(${a}, ${c+s/2})`)}if(r.startLabelLeft){let e=p.get(r.id).startLeft,t=r.x,i=r.y;if(o){let e=n.h.calcTerminalLabelPosition(r.arrowTypeStart?10:0,`start_left`,o);t=e.x,i=e.y}e.attr(`transform`,`translate(${t}, ${i})`)}if(r.startLabelRight){let e=p.get(r.id).startRight,t=r.x,i=r.y;if(o){let e=n.h.calcTerminalLabelPosition(r.arrowTypeStart?10:0,`start_right`,o);t=e.x,i=e.y}e.attr(`transform`,`translate(${t}, ${i})`)}if(r.endLabelLeft){let e=p.get(r.id).endLeft,t=r.x,i=r.y;if(o){let e=n.h.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,`end_left`,o);t=e.x,i=e.y}e.attr(`transform`,`translate(${t}, ${i})`)}if(r.endLabelRight){let e=p.get(r.id).endRight,t=r.x,i=r.y;if(o){let e=n.h.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,`end_right`,o);t=e.x,i=e.y}e.attr(`transform`,`translate(${t}, ${i})`)}},`positionEdgeLabel`),y=e.h((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),b=e.h((t,n,r)=>{e.g.debug(`intersection calc abc89:
2
+ outsidePoint: ${JSON.stringify(n)}
3
+ insidePoint : ${JSON.stringify(r)}
4
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,a=t.y,o=Math.abs(i-r.x),s=t.width/2,c=r.x<n.x?s-o:s+o,l=t.height/2,u=Math.abs(n.y-r.y),d=Math.abs(n.x-r.x);if(Math.abs(a-n.y)*s>Math.abs(i-n.x)*l){let t=r.y<n.y?n.y-l-a:a-l-n.y;c=d*t/u;let i={x:r.x<n.x?r.x+c:r.x-d+c,y:r.y<n.y?r.y+u-t:r.y-u+t};return c===0&&(i.x=n.x,i.y=n.y),d===0&&(i.x=n.x),u===0&&(i.y=n.y),e.g.debug(`abc89 top/bottom calc, Q ${u}, q ${t}, R ${d}, r ${c}`,i),i}else{c=r.x<n.x?n.x-s-i:i-s-n.x;let t=u*c/d,a=r.x<n.x?r.x+d-c:r.x-d+c,o=r.y<n.y?r.y+t:r.y-t;return e.g.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`,{_x:a,_y:o}),c===0&&(a=n.x,o=n.y),d===0&&(a=n.x),u===0&&(o=n.y),{x:a,y:o}}},`intersection`),x=e.h((t,n)=>{e.g.warn(`abc88 cutPathAtIntersect`,t,n);let r=[],i=t[0],a=!1;return t.forEach(t=>{if(e.g.info(`abc88 checking point`,t,n),!y(n,t)&&!a){let o=b(n,i,t);e.g.debug(`abc88 inside`,t,i,o),e.g.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?e.g.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else e.g.warn(`abc88 outside`,t,i),i=t,a||r.push(t)}),e.g.debug(`returning points`,r),r},`cutPathAtIntersect`);function S(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}e.h(S,`extractCornerPoints`);var C=e.h(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),w=e.h(function(t){let{cornerPointPositions:n}=S(t),r=[];for(let i=0;i<t.length;i++)if(n.includes(i)){let n=t[i-1],a=t[i+1],o=t[i],s=C(n,o,5),c=C(a,o,5),l=c.x-s.x,u=c.y-s.y;r.push(s);let d=Math.sqrt(2)*2,f={x:o.x,y:o.y};Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10?(e.g.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):e.g.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(t[i]);return r},`fixCorners`),T=e.h((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),E=e.h(function(a,s,u,d,f,p,m,h=!1){let{handDrawnSeed:g}=t.b(),_=s.points,v=!1,y=f;var b=p;let S=[];for(let e in s.cssCompiledStyles)o.n(e)||S.push(s.cssCompiledStyles[e]);e.g.debug(`UIO intersect check`,s.points,b.x,y.x),b.intersect&&y.intersect&&!h&&(_=_.slice(1,s.points.length-1),_.unshift(y.intersect(_[0])),e.g.debug(`Last point UIO`,s.start,`-->`,s.end,_[_.length-1],b,b.intersect(_[_.length-1])),_.push(b.intersect(_[_.length-1])));let C=btoa(JSON.stringify(_));s.toCluster&&(e.g.info(`to cluster abc88`,u.get(s.toCluster)),_=x(s.points,u.get(s.toCluster).node),v=!0),s.fromCluster&&(e.g.debug(`from cluster abc88`,u.get(s.fromCluster),JSON.stringify(_,null,2)),_=x(_.reverse(),u.get(s.fromCluster).node).reverse(),v=!0);let E=_.filter(e=>!Number.isNaN(e.y));E=w(E);let O=n.E;switch(O=n.k,s.curve){case`linear`:O=n.k;break;case`basis`:O=n.E;break;case`cardinal`:O=n.T;break;case`bumpX`:O=n.D;break;case`bumpY`:O=n.O;break;case`catmullRom`:O=n.w;break;case`monotoneX`:O=n.S;break;case`monotoneY`:O=n.C;break;case`natural`:O=n.x;break;case`step`:O=n.b;break;case`stepAfter`:O=n.v;break;case`stepBefore`:O=n.y;break;default:O=n.E}let{x:A,y:j}=i.t(s),M=r.t().x(A).y(j).curve(O),N;switch(s.thickness){case`normal`:N=`edge-thickness-normal`;break;case`thick`:N=`edge-thickness-thick`;break;case`invisible`:N=`edge-thickness-invisible`;break;default:N=`edge-thickness-normal`}switch(s.pattern){case`solid`:N+=` edge-pattern-solid`;break;case`dotted`:N+=` edge-pattern-dotted`;break;case`dashed`:N+=` edge-pattern-dashed`;break;default:N+=` edge-pattern-solid`}let P,F=s.curve===`rounded`?D(k(E,s),5):M(E),I=Array.isArray(s.style)?s.style:[s.style],L=I.find(e=>e?.startsWith(`stroke:`)),R=!1;if(s.look===`handDrawn`){let t=c.d.svg(a);Object.assign([],E);let n=t.path(F,{roughness:.3,seed:g});N+=` transition`,P=e.p(n).select(`path`).attr(`id`,s.id).attr(`class`,` `+N+(s.classes?` `+s.classes:``)).attr(`style`,I?I.reduce((e,t)=>e+`;`+t,``):``);let r=P.attr(`d`);P.attr(`d`,r),a.node().appendChild(P.node())}else{let e=S.join(`;`),t=I?I.reduce((e,t)=>e+t+`;`,``):``,n=``;s.animate&&(n=` edge-animation-fast`),s.animation&&(n=` edge-animation-`+s.animation);let r=(e?e+`;`+t+`;`:t)+`;`+(I?I.reduce((e,t)=>e+`;`+t,``):``);P=a.append(`path`).attr(`d`,F).attr(`id`,s.id).attr(`class`,` `+N+(s.classes?` `+s.classes:``)+(n??``)).attr(`style`,r),L=r.match(/stroke:([^;]+)/)?.[1],R=s.animate===!0||!!s.animation||e.includes(`animation`);let o=P.node(),c=typeof o.getTotalLength==`function`?o.getTotalLength():0,l=i.r[s.arrowTypeStart]||0,u=i.r[s.arrowTypeEnd]||0;if(s.look===`neo`&&!R){let e=`stroke-dasharray: ${s.pattern===`dotted`||s.pattern===`dashed`?T(c,l,u):`0 ${l} ${c-l-u} ${u}`}; stroke-dashoffset: 0;`;P.attr(`style`,e+P.attr(`style`))}}P.attr(`data-edge`,!0),P.attr(`data-et`,`edge`),P.attr(`data-id`,s.id),P.attr(`data-points`,C),s.showPoints&&E.forEach(e=>{a.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,e.x).attr(`cy`,e.y)});let z=``;(t.b().flowchart.arrowMarkerAbsolute||t.b().state.arrowMarkerAbsolute)&&(z=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,z=z.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),e.g.info(`arrowTypeStart`,s.arrowTypeStart),e.g.info(`arrowTypeEnd`,s.arrowTypeEnd),l(P,s,z,m,d,L);let B=Math.floor(_.length/2),V=_[B];n.h.isLabelCoordinateInPath(V,P.attr(`d`))||(v=!0);let H={};return v&&(H.updatedPath=_),H.originalPath=s.points,H},`insertEdge`);function D(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}e.h(D,`generateRoundedPath`);function O(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}e.h(O,`calculateDeltaAndAngle`);function k(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&i.n[t.arrowTypeStart]){let r=i.n[t.arrowTypeStart],a=e[0],o=e[1],{angle:s}=O(a,o),c=r*Math.cos(s),l=r*Math.sin(s);n[0].x=a.x+c,n[0].y=a.y+l}let r=e.length;if(r>=2&&i.n[t.arrowTypeEnd]){let a=i.n[t.arrowTypeEnd],o=e[r-1],s=e[r-2],{angle:c}=O(s,o),l=a*Math.cos(c),u=a*Math.sin(c);n[r-1].x=o.x-l,n[r-1].y=o.y-u}return n}e.h(k,`applyMarkerOffsetsToPoints`);var A=e.h((e,t,n,r)=>{t.forEach(t=>{j[t](e,n,r)})},`insertMarkers`),j={extension:e.h((t,n,r)=>{e.g.trace(`Making markers for `,r),t.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),t.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`)},`extension`),composition:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6)},`lollipop`),point:e.h((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`point`),circle:e.h((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`circle`),cross:e.h((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`)},`cross`),barb:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),only_one:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:e.h((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:e.h((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),requirement_arrow:e.h((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
5
+ L20,10
6
+ M20,10
7
+ L0,20`)},`requirement_arrow`),requirement_contains:e.h((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`)},M=A;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return m}});