ranui 0.2.0-alpha.7 → 0.2.1-alpha.3

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 (331) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  5. package/dist/arc-D25LhgTs.cjs +1 -0
  6. package/dist/arc-DRPGof21.js +82 -0
  7. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  11. package/dist/array-By5736M5.js +7 -0
  12. package/dist/array-C3cbN3GY.cjs +1 -0
  13. package/dist/arrow-down-Bi5kqUrX.js +12 -0
  14. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  15. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  16. package/dist/builder.d.ts +4 -4
  17. package/dist/builder.js +39 -30
  18. package/dist/builtin-BkM0LLof.js +416 -0
  19. package/dist/button-D0zcnKnG.js +117 -0
  20. package/dist/button.js +1 -1
  21. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  22. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  23. package/dist/{card-BVvXX6KM.js → card-CygMndQS.js} +2 -2
  24. package/dist/card.js +1 -1
  25. package/dist/channel-C9WSNwcS.cjs +1 -0
  26. package/dist/channel-k5-UxdcV.js +5 -0
  27. package/dist/{checkbox-BtoX9X2Z.js → checkbox-D5om9aJO.js} +10 -10
  28. package/dist/checkbox.js +1 -1
  29. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  30. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  31. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  32. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  33. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  34. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  35. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  36. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  37. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  38. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  39. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  40. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  41. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  42. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  43. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  44. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  45. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  46. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  47. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  48. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  49. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  50. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  51. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  52. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  53. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  54. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  55. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  56. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  57. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  58. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  59. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  60. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  61. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  62. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  63. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  64. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  65. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  66. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  67. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  68. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  69. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  70. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  71. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  72. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  73. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  74. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  75. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  76. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  77. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  78. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  79. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  80. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  81. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  82. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  83. package/dist/{colorpicker-Dukms7ET.js → colorpicker-qWnaTlYX.js} +9 -10
  84. package/dist/colorpicker.js +1 -1
  85. package/dist/components/colorpicker/index.d.ts +3 -3
  86. package/dist/components/glass/index.d.ts +52 -0
  87. package/dist/components/icon/builtin.d.ts +9 -0
  88. package/dist/components/icon/core-icons.d.ts +13 -0
  89. package/dist/components/icon/index.d.ts +8 -0
  90. package/dist/components/mermaid/index.d.ts +52 -0
  91. package/dist/components/modal/index.d.ts +9 -0
  92. package/dist/components/route/index.d.ts +10 -4
  93. package/dist/components/router/index.d.ts +3 -0
  94. package/dist/content-Rry-U6ir.js +39 -0
  95. package/dist/content.js +5 -0
  96. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  97. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  98. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  99. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  100. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  101. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  102. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  103. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  104. package/dist/dagre-D1-W1tt6.cjs +1 -0
  105. package/dist/dagre-D8GLTwuf.js +1578 -0
  106. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  107. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  108. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  109. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  110. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  111. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  112. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  113. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  114. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  115. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  116. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  117. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  118. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  119. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  120. package/dist/dist-C0Fwsvsq.js +70 -0
  121. package/dist/dist-C20XxSsP.cjs +1 -0
  122. package/dist/{dropdown-BYS1Trdu.js → dropdown-DzdAR1nI.js} +4 -4
  123. package/dist/dropdown.js +1 -1
  124. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  125. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  126. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  127. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  128. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  129. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  130. package/dist/factory-BkvRcCOx.js +482 -0
  131. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  132. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  133. package/dist/{form-BsB5JhS4.js → form-CUJpeQ7Q.js} +5 -5
  134. package/dist/form.js +1 -1
  135. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  136. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  137. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  138. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  139. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  140. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  141. package/dist/glass-Bj1Zf8Hy.js +115 -0
  142. package/dist/glass.js +5 -0
  143. package/dist/graphlib-CCKThIKP.js +1104 -0
  144. package/dist/graphlib-Du-578Js.cjs +1 -0
  145. package/dist/{icon-pfolda2m.js → icon-CtlZJISZ.js} +110 -21
  146. package/dist/icon.js +4 -3
  147. package/dist/icons.js +5 -0
  148. package/dist/iife/button.iife.js +1 -1
  149. package/dist/iife/card.iife.js +1 -1
  150. package/dist/iife/checkbox.iife.js +1 -1
  151. package/dist/iife/colorpicker.iife.js +2 -2
  152. package/dist/iife/content.iife.js +1 -0
  153. package/dist/iife/dropdown.iife.js +1 -1
  154. package/dist/iife/form.iife.js +1 -1
  155. package/dist/iife/glass.iife.js +1 -0
  156. package/dist/iife/icon.iife.js +1 -1
  157. package/dist/iife/image.iife.js +1 -1
  158. package/dist/iife/input.iife.js +1 -1
  159. package/dist/iife/loading.iife.js +1 -1
  160. package/dist/iife/math.iife.js +14 -14
  161. package/dist/iife/mermaid.iife.js +3535 -0
  162. package/dist/iife/message.iife.js +1 -1
  163. package/dist/iife/modal.iife.js +1 -1
  164. package/dist/iife/player.iife.js +8 -8
  165. package/dist/iife/popover.iife.js +1 -1
  166. package/dist/iife/progress.iife.js +1 -1
  167. package/dist/iife/radar.iife.js +1 -1
  168. package/dist/iife/route.iife.js +1 -1
  169. package/dist/iife/router.iife.js +1 -1
  170. package/dist/iife/scratch.iife.js +1 -1
  171. package/dist/iife/section.iife.js +1 -1
  172. package/dist/iife/select.iife.js +2 -2
  173. package/dist/iife/skeleton.iife.js +1 -1
  174. package/dist/iife/tab.iife.js +1 -1
  175. package/dist/iife/tabpane.iife.js +1 -1
  176. package/dist/{image-BXpKQ9sU.js → image-ILZNlaGc.js} +4 -4
  177. package/dist/image.js +1 -1
  178. package/dist/index.cjs +257 -23
  179. package/dist/index.d.ts +11 -1
  180. package/dist/index.iife.js +3842 -74
  181. package/dist/index.js +86 -78
  182. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  183. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  184. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  185. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  186. package/dist/init-1VpIn1S3.js +16 -0
  187. package/dist/init-CbDwVtpO.cjs +1 -0
  188. package/dist/{input-BMMM60e6.js → input-CDH6zY9I.js} +6 -6
  189. package/dist/input.js +1 -1
  190. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  191. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  192. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  193. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  194. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  195. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  196. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  197. package/dist/katex-Pg2EqTH0.js +23485 -0
  198. package/dist/line-BIPmUVxO.js +33 -0
  199. package/dist/line-CAB5QHC6.cjs +1 -0
  200. package/dist/linear-B2AM4ZBe.js +259 -0
  201. package/dist/linear-CSAfNEpl.cjs +1 -0
  202. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  203. package/dist/link.js +1 -1
  204. package/dist/{loading-BScjyeVm.js → loading-DJWGih1g.js} +4 -4
  205. package/dist/loading.js +1 -1
  206. package/dist/map-BC2bk_rV.cjs +1 -0
  207. package/dist/map-DMSWkcq6.js +208 -0
  208. package/dist/{math-IjzOAwnA.js → math-DRmkEDSQ.js} +4 -4
  209. package/dist/math.js +1 -1
  210. package/dist/mermaid-CMhm7npE.js +261 -0
  211. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  212. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  213. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  214. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  215. package/dist/mermaid.js +5 -0
  216. package/dist/{message-CLpuP8HY.js → message-BpYJBvYn.js} +36 -51
  217. package/dist/message.js +1 -1
  218. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  219. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  220. package/dist/{modal-DOTpABRe.js → modal-BeQlDYDP.js} +40 -24
  221. package/dist/modal.js +1 -1
  222. package/dist/ordinal-BMN81JG2.js +64 -0
  223. package/dist/ordinal-BplLHIij.cjs +1 -0
  224. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  225. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  226. package/dist/path-Bja5PoYn.js +82 -0
  227. package/dist/path-DmfWsuKi.cjs +1 -0
  228. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  229. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  230. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  231. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  232. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  233. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  234. package/dist/{player-5olrw-qB.js → player-CQ4e3Yeo.js} +196 -195
  235. package/dist/player.js +1 -1
  236. package/dist/{popover-DRUQjdPs.js → popover-eZMnL1F3.js} +22 -54
  237. package/dist/popover.js +1 -1
  238. package/dist/{progress-BIEXYYd2.js → progress-DyHgW4Ep.js} +5 -5
  239. package/dist/progress.js +1 -1
  240. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  241. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  242. package/dist/{radar-DAF95_Mj.js → radar-D21Rccap.js} +5 -5
  243. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  244. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  245. package/dist/radar.js +1 -1
  246. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  247. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  248. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  249. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  250. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  251. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  252. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  253. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  254. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  255. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  256. package/dist/ranui.css +1 -1
  257. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  258. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  259. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  260. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  261. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  262. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  263. package/dist/route-pR5P4ann.js +116 -0
  264. package/dist/route.js +1 -1
  265. package/dist/{router-B9rCrWXm.js → router-CewzSH7O.js} +23 -18
  266. package/dist/router.js +1 -1
  267. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  268. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  269. package/dist/{scratch-QlPyy1f4.js → scratch-BFVsgl-7.js} +2 -2
  270. package/dist/scratch.js +1 -1
  271. package/dist/{section-D0qMm9KM.js → section-DSPCsIxv.js} +2 -2
  272. package/dist/section.js +1 -1
  273. package/dist/{select-aAaWoveE.js → select-B58nMfB1.js} +16 -23
  274. package/dist/select.js +1 -1
  275. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  276. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  277. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  278. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  279. package/dist/{skeleton-CFqQmKyt.js → skeleton-DoHYMsTn.js} +5 -5
  280. package/dist/skeleton.js +1 -1
  281. package/dist/src-C9EhKhbk.cjs +1 -0
  282. package/dist/src-DtRLxcYO.js +2104 -0
  283. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  284. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  285. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  286. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  287. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  288. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  289. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  290. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  291. package/dist/{tab-CiF2YPck.js → tab-BRPdZ9Ws.js} +5 -5
  292. package/dist/tab.js +1 -1
  293. package/dist/{tabpane-B-m3xwqu.js → tabpane-Owf72hw_.js} +5 -5
  294. package/dist/tabpane.js +1 -1
  295. package/dist/test/unit/icon.builtin.test.d.ts +1 -0
  296. package/dist/test/unit/utils.colorpicker.reconnect.test.d.ts +1 -0
  297. package/dist/test/unit/utils.route.lazy.test.d.ts +1 -0
  298. package/dist/test/unit/utils.router.match.test.d.ts +1 -0
  299. package/dist/test/unit/utils.signal.owner.test.d.ts +1 -0
  300. package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
  301. package/dist/theme-switch.js +1 -1
  302. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  303. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  304. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  305. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  306. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  307. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  308. package/dist/utils/builder/core.d.ts +153 -16
  309. package/dist/utils/builder/factory.d.ts +1 -1
  310. package/dist/utils/builder/index.d.ts +3 -3
  311. package/dist/utils/builder/signal.d.ts +93 -64
  312. package/dist/utils/router/index.d.ts +13 -3
  313. package/dist/utils/router.js +95 -54
  314. package/dist/utils/theme.d.ts +1 -1
  315. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  316. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  317. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  318. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  319. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  320. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  321. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  322. package/dist/warning-circle-fill-Cz0qu7AH.js +23 -0
  323. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  324. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  325. package/docs/BUILDER.md +383 -0
  326. package/docs/COMPONENTS.md +21 -3
  327. package/package.json +31 -3
  328. package/dist/button-Be_uHDZG.js +0 -117
  329. package/dist/factory-BdsO0dEW.js +0 -165
  330. package/dist/route-MQZpn2BP.js +0 -88
  331. package/dist/signal-CSSZxlK5.js +0 -57
@@ -0,0 +1,132 @@
1
+ const u=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),_=require("./src-C9EhKhbk.cjs"),v=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),oe=require("./channel-C9WSNwcS.cjs"),D=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),he=require("./line-CAB5QHC6.cjs");require("./chunk-HOUHSVGY-BGB3dOvI.cjs");const Lt=require("./chunk-Q4XR5HBZ-aBnPq509.cjs"),ge=require("./chunk-5VM5RSS4-DudUFQ_Z.cjs"),G=require("./chunk-7BUUIJ7U-DMv_UkjI.cjs"),Ft=require("./chunk-OGEWGWER-DX8sW1dT.cjs"),ue=require("./graphlib-Du-578Js.cjs");function de(e){return Array.isArray(e)}function fe(e){if(D.isPrimitive(e))return e;const t=D.getTag(e);if(!pe(e))return{};if(de(e)){const n=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(n.index=e.index,n.input=e.input),n}if(D.isTypedArray(e)){const n=e,s=n.constructor;return new s(n.buffer,n.byteOffset,n.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const n=e,s=n.buffer,i=n.byteOffset,a=n.byteLength,l=new ArrayBuffer(a),c=new Uint8Array(s,i,a);return new Uint8Array(l).set(c),new DataView(l)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const n=e.constructor,s=new n(e.valueOf());return t==="[object String]"?ye(s,e):ft(s,e),s}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const n=e,s=new RegExp(n.source,n.flags);return s.lastIndex=n.lastIndex,s}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const n=e,s=new Map;return n.forEach((i,a)=>{s.set(a,i)}),s}if(t==="[object Set]"){const n=e,s=new Set;return n.forEach(i=>{s.add(i)}),s}if(t==="[object Arguments]"){const n=e,s={};return ft(s,n),s.length=n.length,s[Symbol.iterator]=n[Symbol.iterator],s}const r={};return be(r,e),ft(r,e),xe(r,e),r}function pe(e){switch(D.getTag(e)){case D.argumentsTag:case D.arrayTag:case D.arrayBufferTag:case D.dataViewTag:case D.booleanTag:case D.dateTag:case D.float32ArrayTag:case D.float64ArrayTag:case D.int8ArrayTag:case D.int16ArrayTag:case D.int32ArrayTag:case D.mapTag:case D.numberTag:case D.objectTag:case D.regexpTag:case D.setTag:case D.stringTag:case D.symbolTag:case D.uint8ArrayTag:case D.uint8ClampedArrayTag:case D.uint16ArrayTag:case D.uint32ArrayTag:return!0;default:return!1}}function ft(e,t){for(const r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function xe(e,t){const r=Object.getOwnPropertySymbols(t);for(let n=0;n<r.length;n++){const s=r[n];Object.prototype.propertyIsEnumerable.call(t,s)&&(e[s]=t[s])}}function ye(e,t){const r=t.valueOf().length;for(const n in t)Object.hasOwn(t,n)&&(Number.isNaN(Number(n))||Number(n)>=r)&&(e[n]=t[n])}function be(e,t){const r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}var xt=(function(){var e=u.__name(function(w,f,b,E){for(b=b||{},E=w.length;E--;b[w[E]]=f);return b},"o"),t=[1,15],r=[1,7],n=[1,13],s=[1,14],i=[1,19],a=[1,16],l=[1,17],c=[1,18],g=[8,30],o=[8,10,21,28,29,30,31,39,43,46],d=[1,23],x=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],k=[1,49],S={trace:u.__name(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u.__name(function(f,b,E,L,T,h,M){var p=h.length-1;switch(T){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",h[p-1]),L.setHierarchy(h[p-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:L.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:L.getLogger().debug("Rule: link: ",h[p],f),this.$={edgeTypeStr:h[p],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const B=parseInt(h[p]),q=L.generateId();this.$={id:q,type:"space",label:"",width:B,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const U=L.edgeStrToEdgeData(h[p-1].edgeTypeStr),lt=L.edgeStrToEdgeStartData(h[p-1].edgeTypeStr),$=L.edgeStrToThickness(h[p-1].edgeTypeStr),ct=L.edgeStrToPattern(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",thickness:$,pattern:ct,directions:h[p].directions,arrowTypeEnd:U,arrowTypeStart:lt},{id:h[p].id,label:h[p].label,type:L.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:L.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:L.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),L.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const O=L.generateId();this.$={id:O,type:"composite",label:"",children:h[p-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:L.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:i,39:a,43:l,46:c},{8:[1,20]},e(g,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:n,29:s,31:i,39:a,43:l,46:c}),e(o,[2,16],{14:22,15:d,16:x}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(m,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:i},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:i,39:a,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(g,[2,13]),{26:35,31:i},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:x,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:i,39:a,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:k},{15:[1,50]},e(o,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:k,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u.__name(function(f,b){if(b.recoverable)this.trace(f);else{var E=new Error(f);throw E.hash=b,E}},"parseError"),parse:u.__name(function(f){var b=this,E=[0],L=[],T=[null],h=[],M=this.table,p="",B=0,q=0,U=0,lt=2,$=1,ct=h.slice.call(arguments,1),O=Object.create(this.lexer),V={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(V.yy[ot]=this.yy[ot]);O.setInput(f,V.yy),V.yy.lexer=O,V.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var ht=O.yylloc;h.push(ht);var le=O.options&&O.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(H){E.length=E.length-2*H,T.length=T.length-H,h.length=h.length-H}u.__name(ce,"popStack");function Dt(){var H=L.pop()||O.lex()||$;return typeof H!="number"&&(H instanceof Array&&(L=H,H=L.pop()),H=b.symbols_[H]||H),H}u.__name(Dt,"lex");for(var z,gt,j,F,ut,Z={},tt,X,Ct,et;;){if(j=E[E.length-1],this.defaultActions[j]?F=this.defaultActions[j]:((z===null||typeof z>"u")&&(z=Dt()),F=M[j]&&M[j][z]),typeof F>"u"||!F.length||!F[0]){var dt="";et=[];for(tt in M[j])this.terminals_[tt]&&tt>lt&&et.push("'"+this.terminals_[tt]+"'");O.showPosition?dt="Parse error on line "+(B+1)+`:
2
+ `+O.showPosition()+`
3
+ Expecting `+et.join(", ")+", got '"+(this.terminals_[z]||z)+"'":dt="Parse error on line "+(B+1)+": Unexpected "+(z==$?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(dt,{text:O.match,token:this.terminals_[z]||z,line:O.yylineno,loc:ht,expected:et})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+z);switch(F[0]){case 1:E.push(z),T.push(O.yytext),h.push(O.yylloc),E.push(F[1]),z=null,gt?(z=gt,gt=null):(q=O.yyleng,p=O.yytext,B=O.yylineno,ht=O.yylloc,U>0&&U--);break;case 2:if(X=this.productions_[F[1]][1],Z.$=T[T.length-X],Z._$={first_line:h[h.length-(X||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(X||1)].first_column,last_column:h[h.length-1].last_column},le&&(Z._$.range=[h[h.length-(X||1)].range[0],h[h.length-1].range[1]]),ut=this.performAction.apply(Z,[p,q,B,V.yy,F[1],T,h].concat(ct)),typeof ut<"u")return ut;X&&(E=E.slice(0,-1*X*2),T=T.slice(0,-1*X),h=h.slice(0,-1*X)),E.push(this.productions_[F[1]][0]),T.push(Z.$),h.push(Z._$),Ct=M[E[E.length-2]][E[E.length-1]],E.push(Ct);break;case 3:return!0}}return!0},"parse")};S.lexer=(function(){return{EOF:1,parseError:u.__name(function(f,b){if(this.yy.parser)this.yy.parser.parseError(f,b);else throw new Error(f)},"parseError"),setInput:u.__name(function(w,f){return this.yy=f||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u.__name(function(){var w=this._input[0];return this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w,w.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:u.__name(function(w){var f=w.length,b=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===E.length?this.yylloc.first_column:0)+E[E.length-b.length].length-b[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:u.__name(function(){return this._more=!0,this},"more"),reject:u.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u.__name(function(w){this.unput(this.match.slice(w))},"less"),pastInput:u.__name(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u.__name(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u.__name(function(){var w=this.pastInput(),f=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
5
+ `+f+"^"},"showPosition"),test_match:u.__name(function(w,f){var b,E,L;if(this.options.backtrack_lexer&&(L={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(L.yylloc.range=this.yylloc.range.slice(0))),E=w[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],b=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var T in L)this[T]=L[T];return!1}return!1},"test_match"),next:u.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,f,b,E;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),T=0;T<L.length;T++)if(b=this._input.match(this.rules[L[T]]),b&&(!f||b[0].length>f[0].length)){if(f=b,E=T,this.options.backtrack_lexer){if(w=this.test_match(b,L[T]),w!==!1)return w;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(w=this.test_match(f,L[E]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u.__name(function(){var f=this.next();return f||this.lex()},"lex"),begin:u.__name(function(f){this.conditionStack.push(f)},"begin"),popState:u.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u.__name(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:u.__name(function(f){this.begin(f)},"pushState"),stateStackSize:u.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:u.__name(function(f,b,E,L){switch(E){case 0:return f.getLogger().debug("Found block-beta"),10;case 1:return f.getLogger().debug("Found id-block"),29;case 2:return f.getLogger().debug("Found block"),10;case 3:f.getLogger().debug(".",b.yytext);break;case 4:f.getLogger().debug("_",b.yytext);break;case 5:return 5;case 6:return b.yytext=-1,28;case 7:return b.yytext=b.yytext.replace(/columns\s+/,""),f.getLogger().debug("COLUMNS (LEX)",b.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:f.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 13:return f.getLogger().debug("LEX: STR end:",b.yytext),"STR";case 14:return b.yytext=b.yytext.replace(/space\:/,""),f.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;case 15:return b.yytext="1",f.getLogger().debug("COLUMNS (LEX)",b.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),f.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),f.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),f.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),f.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),f.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),f.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),f.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),f.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),f.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),f.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),f.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),f.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return f.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return f.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return f.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return f.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return f.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return f.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return f.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),f.getLogger().debug("LEX ARR START"),37;case 74:return f.getLogger().debug("Lex: NODE_ID",b.yytext),31;case 75:return f.getLogger().debug("Lex: EOF",b.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:f.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:f.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return f.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";case 83:f.getLogger().debug("LEX POPPING"),this.popState();break;case 84:f.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return b.yytext=b.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (left):",b.yytext),"DIR";case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (x):",b.yytext),"DIR";case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (y):",b.yytext),"DIR";case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (up):",b.yytext),"DIR";case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (down):",b.yytext),"DIR";case 91:return b.yytext="]>",f.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return f.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 93:return f.getLogger().debug("Lex: LINK",b.yytext),15;case 94:return f.getLogger().debug("Lex: LINK",b.yytext),15;case 95:return f.getLogger().debug("Lex: LINK",b.yytext),15;case 96:return f.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 97:return f.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 98:return f.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return f.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),f.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 102:return this.popState(),f.getLogger().debug("Lex: LINK",b.yytext),15;case 103:return this.popState(),f.getLogger().debug("Lex: LINK",b.yytext),15;case 104:return f.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function I(){this.yy={}}return u.__name(I,"Parser"),I.prototype=S,S.Parser=I,new I})();xt.parser=xt;var me=xt,W=new Map,kt=[],yt=new Map,It="color",Nt="fill",_e="bgFill",Ht=",",at=new Map,bt="",we=u.__name(e=>v.common_default.sanitizeText(e,v.getConfig2()),"sanitizeText"),Se=u.__name(function(e,t=""){let r=at.get(e);r||(r={id:e,styles:[],textStyles:[]},at.set(e,r)),t?.split(Ht).forEach(n=>{const s=n.replace(/([^;]*);/,"$1").trim();if(RegExp(It).exec(n)){const i=s.replace(Nt,_e).replace(It,Nt);r.textStyles.push(i)}r.styles.push(s)})},"addStyleClass"),Le=u.__name(function(e,t=""){const r=W.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),ke=u.__name(function(e,t){e.split(",").forEach(function(r){let n=W.get(r);if(n===void 0){const s=r.trim();n={id:s,type:"na",children:[]},W.set(s,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Wt=u.__name((e,t)=>{const r=e.flat(),n=[],s=r.find(i=>i?.type==="column-setting")?.columns??-1;for(const i of r){if(typeof s=="number"&&s>0&&i.type!=="column-setting"&&typeof i.widthInColumns=="number"&&i.widthInColumns>s&&_.log.warn(`Block ${i.id} width ${i.widthInColumns} exceeds configured column width ${s}`),i.label&&(i.label=we(i.label)),i.type==="classDef"){Se(i.id,i.css);continue}if(i.type==="applyClass"){ke(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&Le(i.id,i?.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(yt.get(i.id)??0)+1;yt.set(i.id,a),i.id=a+"-"+i.id,kt.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=W.get(i.id);if(a===void 0?W.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Wt(i.children,i),i.type==="space"){const l=i.width??1;for(let c=0;c<l;c++){const g=fe(i);g.id=g.id+"-"+c,W.set(g.id,g),n.push(g)}}else a===void 0&&n.push(i)}}t.children=n},"populateBlockDatabase"),mt=[],Q={id:"root",type:"composite",children:[],columns:-1},ve=u.__name(()=>{_.log.debug("Clear called"),v.clear(),Q={id:"root",type:"composite",children:[],columns:-1},W=new Map([["root",Q]]),mt=[],at=new Map,kt=[],yt=new Map,bt=""},"clear");function Yt(e){switch(_.log.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return _.log.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}u.__name(Yt,"typeStr2Type");function Kt(e){return _.log.debug("typeStr2Type",e),e==="=="?"thick":"normal"}u.__name(Kt,"edgeTypeStr2Type");function Ut(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}u.__name(Ut,"edgeStrToEdgeData");function Xt(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}u.__name(Xt,"edgeStrToEdgeStartData");function qt(e){return e.includes("==")?"thick":"normal"}u.__name(qt,"edgeStrToThickness");function Vt(e){return e.includes(".-")?"dotted":"solid"}u.__name(Vt,"edgeStrToPattern");var Bt=0,Ee={getConfig:u.__name(()=>v.getConfig().block,"getConfig"),typeStr2Type:Yt,edgeTypeStr2Type:Kt,edgeStrToEdgeData:Ut,edgeStrToEdgeStartData:Xt,edgeStrToThickness:qt,edgeStrToPattern:Vt,getLogger:u.__name(()=>_.log,"getLogger"),getBlocksFlat:u.__name(()=>[...W.values()],"getBlocksFlat"),getBlocks:u.__name(()=>mt||[],"getBlocks"),getEdges:u.__name(()=>kt,"getEdges"),setHierarchy:u.__name(e=>{Q.children=e,Wt(e,Q),mt=Q.children},"setHierarchy"),getBlock:u.__name(e=>W.get(e),"getBlock"),setBlock:u.__name(e=>{W.set(e.id,e)},"setBlock"),getColumns:u.__name(e=>{const t=W.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),getClasses:u.__name(function(){return at},"getClasses"),clear:ve,generateId:u.__name(()=>(Bt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Bt),"generateId"),setDiagramId:u.__name(e=>{bt=e},"setDiagramId"),getDiagramId:u.__name(()=>bt,"getDiagramId")},pt=u.__name((e,t)=>{const r=oe.channel,n=r(e,"r"),s=r(e,"g"),i=r(e,"b");return v.rgba(n,s,i,t)},"fade"),Te=u.__name(e=>`.label {
7
+ font-family: ${e.fontFamily};
8
+ color: ${e.nodeTextColor||e.textColor};
9
+ }
10
+ .cluster-label text {
11
+ fill: ${e.titleColor};
12
+ }
13
+ .cluster-label span,p {
14
+ color: ${e.titleColor};
15
+ }
16
+
17
+
18
+
19
+ .label text,span,p {
20
+ fill: ${e.nodeTextColor||e.textColor};
21
+ color: ${e.nodeTextColor||e.textColor};
22
+ }
23
+
24
+ .node rect,
25
+ .node circle,
26
+ .node ellipse,
27
+ .node polygon,
28
+ .node path {
29
+ fill: ${e.mainBkg};
30
+ stroke: ${e.nodeBorder};
31
+ stroke-width: 1px;
32
+ }
33
+ .flowchart-label text {
34
+ text-anchor: middle;
35
+ }
36
+ // .flowchart-label .text-outer-tspan {
37
+ // text-anchor: middle;
38
+ // }
39
+ // .flowchart-label .text-inner-tspan {
40
+ // text-anchor: start;
41
+ // }
42
+
43
+ .node .label {
44
+ text-align: center;
45
+ }
46
+ .node.clickable {
47
+ cursor: pointer;
48
+ }
49
+
50
+ .arrowheadPath {
51
+ fill: ${e.arrowheadColor};
52
+ }
53
+
54
+ .edgePath .path {
55
+ stroke: ${e.lineColor};
56
+ stroke-width: 2.0px;
57
+ }
58
+
59
+ .flowchart-link {
60
+ stroke: ${e.lineColor};
61
+ fill: none;
62
+ }
63
+
64
+ .edgeLabel {
65
+ background-color: ${e.edgeLabelBackground};
66
+ /*
67
+ * This is for backward compatibility with existing code that didn't
68
+ * add a \`<p>\` around edge labels.
69
+ *
70
+ * TODO: We should probably remove this in a future release.
71
+ */
72
+ p {
73
+ margin: 0;
74
+ padding: 0;
75
+ display: inline;
76
+ }
77
+ rect {
78
+ opacity: 0.5;
79
+ background-color: ${e.edgeLabelBackground};
80
+ fill: ${e.edgeLabelBackground};
81
+ }
82
+ text-align: center;
83
+ }
84
+
85
+ /* For html labels only */
86
+ .labelBkg {
87
+ background-color: ${e.edgeLabelBackground};
88
+ }
89
+
90
+ .node .cluster {
91
+ // fill: ${pt(e.mainBkg,.5)};
92
+ fill: ${pt(e.clusterBkg,.5)};
93
+ stroke: ${pt(e.clusterBorder,.2)};
94
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
95
+ stroke-width: 1px;
96
+ }
97
+
98
+ .cluster text {
99
+ fill: ${e.titleColor};
100
+ }
101
+
102
+ .cluster span,p {
103
+ color: ${e.titleColor};
104
+ }
105
+ /* .cluster div {
106
+ color: ${e.titleColor};
107
+ } */
108
+
109
+ div.mermaidTooltip {
110
+ position: absolute;
111
+ text-align: center;
112
+ max-width: 200px;
113
+ padding: 2px;
114
+ font-family: ${e.fontFamily};
115
+ font-size: 12px;
116
+ background: ${e.tertiaryColor};
117
+ border: 1px solid ${e.border2};
118
+ border-radius: 2px;
119
+ pointer-events: none;
120
+ z-index: 100;
121
+ }
122
+
123
+ .flowchartTitleText {
124
+ text-anchor: middle;
125
+ font-size: 18px;
126
+ fill: ${e.textColor};
127
+ }
128
+ ${ge.getIconStyles()}
129
+ `,"getStyles"),De=u.__name((e,t,r,n)=>{t.forEach(s=>{Ce[s](e,r,n)})},"insertMarkers"),Ce={extension:u.__name((e,t,r)=>{_.log.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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:u.__name((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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:u.__name((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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:u.__name((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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:u.__name((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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:u.__name((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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:u.__name((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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:u.__name((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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:u.__name((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},Ie=De;function _t(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}u.__name(_t,"calculateBlockPosition");var Ne=u.__name(e=>{let t=0,r=0;for(const n of e.children){const{width:s,height:i,x:a,y:l}=n.size??{width:0,height:0,x:0,y:0};if(_.log.debug("getMaxChildSize abc95 child:",n.id,"width:",s,"height:",i,"x:",a,"y:",l,n.type),n.type==="space")continue;const c=s/(n.widthInColumns??1);c>t&&(t=c),i>r&&(r=i)}return{width:t,height:r}},"getMaxChildSize");function st(e,t,r=0,n=0,s=8){_.log.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(e.children?.length>0){for(const y of e.children)st(y,t,0,0,s);const l=Ne(e);i=l.width,a=l.height,_.log.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const y of e.children)y.size&&(_.log.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${i} ${a} ${JSON.stringify(y.size)}`),y.size.width=i*(y.widthInColumns??1)+s*((y.widthInColumns??1)-1),y.size.height=a,y.size.x=0,y.size.y=0,_.log.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${i} maxHeight:${a}`));for(const y of e.children)st(y,t,i,a,s);const c=e.columns??-1;let g=0;for(const y of e.children)g+=y.widthInColumns??1;let o=e.children.length;c>0&&c<g&&(o=c);const d=Math.ceil(g/o);let x=o*(i+s)+s,m=d*(a+s)+s;if(x<r){_.log.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${n} width ${x}`),x=r,m=n;const y=(r-o*s-s)/o,k=(n-d*s-s)/d;_.log.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",i),_.log.debug("Size indata abc88",e.id,"childHeight",k,"maxHeight",a),_.log.debug("Size indata abc88 xSize",o,"padding",s);for(const S of e.children)S.size&&(S.size.width=y,S.size.height=k,S.size.x=0,S.size.y=0)}if(_.log.debug(`abc95 (finale calc) ${e.id} xSize ${o} ySize ${d} columns ${c}${e.children.length} width=${Math.max(x,e.size?.width||0)}`),x<(e?.size?.width||0)){x=e?.size?.width||0;const y=c>0?Math.min(e.children.length,c):e.children.length;if(y>0){const k=(x-y*s-s)/y;_.log.debug("abc95 (growing to fit) width",e.id,x,e.size?.width,k);for(const S of e.children)S.size&&(S.size.width=k)}}e.size={width:x,height:m,x:0,y:0}}_.log.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}u.__name(st,"setBlockSizes");function vt(e,t,r=8){_.log.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const n=e.columns??-1;if(_.log.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){const s=e?.children[0]?.size?.width??0,i=e.children.length*s+(e.children.length-1)*r;_.log.debug("widthOfChildren 88",i,"posX");const a=new Map;{let d=0;for(const x of e.children){if(!x.size)continue;const{py:m}=_t(n,d),y=a.get(m)??0;x.size.height>y&&a.set(m,x.size.height);let k=x?.widthInColumns??1;n>0&&(k=Math.min(k,n-d%n)),d+=k}}const l=new Map;{let d=0;const x=[...a.keys()].sort((m,y)=>m-y);for(const m of x)l.set(m,d),d+=(a.get(m)??0)+r}let c=0;_.log.debug("abc91 block?.size?.x",e.id,e?.size?.x);let g=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,o=0;for(const d of e.children){const x=e;if(!d.size)continue;const{width:m,height:y}=d.size,{px:k,py:S}=_t(n,c);if(S!=o&&(o=S,g=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,_.log.debug("New row in layout for block",e.id," and child ",d.id,o)),_.log.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${c} (px, py) ${k},${S} (${x?.size?.x},${x?.size?.y}) parent: ${x.id} width: ${m}${r}`),x.size){const w=m/2;d.size.x=g+r+w,_.log.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${g} new startingPosX${d.size.x} ${w} padding=${r} width=${m} halfWidth=${w} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${m*(d?.widthInColumns??1)/2}`),g=d.size.x+w;const f=l.get(S)??0,b=a.get(S)??y;d.size.y=x.size.y-x.size.height/2+f+b/2+r,_.log.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${g}${r}${w}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${m*(d?.widthInColumns??1)/2}`)}d.children&&vt(d,t,r);let I=d?.widthInColumns??1;n>0&&(I=Math.min(I,n-c%n)),c+=I,_.log.debug("abc88 columnsPos",d,c)}}_.log.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}u.__name(vt,"layoutBlocks");function Et(e,{minX:t,minY:r,maxX:n,maxY:s}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:i,y:a,width:l,height:c}=e.size;i-l/2<t&&(t=i-l/2),a-c/2<r&&(r=a-c/2),i+l/2>n&&(n=i+l/2),a+c/2>s&&(s=a+c/2)}if(e.children)for(const i of e.children)({minX:t,minY:r,maxX:n,maxY:s}=Et(i,{minX:t,minY:r,maxX:n,maxY:s}));return{minX:t,minY:r,maxX:n,maxY:s}}u.__name(Et,"findBounds");function jt(e){const t=e.getBlock("root");if(!t)return;const r=v.getConfig2()?.block?.padding??8;st(t,e,0,0,r),vt(t,e,r),_.log.debug("getBlocks",JSON.stringify(t,null,2));const{minX:n,minY:s,maxX:i,maxY:a}=Et(t),l=a-s;return{x:n,y:s,width:i-n,height:l}}u.__name(jt,"layout");var Y=u.__name(async(e,t,r,n=!1,s=!1)=>{let i=t||"";typeof i=="object"&&(i=i[0]);const a=v.getConfig2(),l=v.getEffectiveHtmlLabels(a);return await Lt.createText(e,i,{style:r,isTitle:n,useHtmlLabels:l,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Be=u.__name((e,t,r,n,s)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,s),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,s)},"addEdgeMarkers"),Oe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=u.__name((e,t,r,n,s,i)=>{const a=Oe[r];if(!a){_.log.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${s}_${i}-${a}${l})`)},"addEdgeMarker"),wt={},A={},Re=u.__name(async(e,t)=>{const r=v.getConfig2(),n=v.getEffectiveHtmlLabels(r),s=e.insert("g").attr("class","edgeLabel"),i=s.insert("g").attr("class","label"),a=t.labelType==="markdown",l=await Lt.createText(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:a,isNode:!1,markdown:a,width:a?void 0:Number.POSITIVE_INFINITY},r);i.node().appendChild(l);let c=l.getBBox(),g=c;if(n){const d=l.children[0],x=_.select_default(l);c=d.getBoundingClientRect(),g=c,x.attr("width",c.width),x.attr("height",c.height)}else{const d=_.select_default(l).select("text").node();d&&typeof d.getBBox=="function"&&(g=d.getBBox())}i.attr("transform",G.computeLabelTransform(g,n)),wt[t.id]=s,t.width=c.width,t.height=c.height;let o;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),m=await Y(x,t.startLabelLeft,t.labelStyle);o=m;let y=m.getBBox();if(n){const k=m.children[0],S=_.select_default(m);y=k.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}x.attr("transform",G.computeLabelTransform(y,n)),A[t.id]||(A[t.id]={}),A[t.id].startLeft=d,J(o,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),m=await Y(x,t.startLabelRight,t.labelStyle);o=m;let y=m.getBBox();if(n){const k=m.children[0],S=_.select_default(m);y=k.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}x.attr("transform",G.computeLabelTransform(y,n)),A[t.id]||(A[t.id]={}),A[t.id].startRight=d,J(o,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),m=await Y(d,t.endLabelLeft,t.labelStyle);o=m;let y=m.getBBox();if(n){const k=m.children[0],S=_.select_default(m);y=k.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}x.attr("transform",G.computeLabelTransform(y,n)),A[t.id]||(A[t.id]={}),A[t.id].endLeft=d,J(o,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),m=await Y(d,t.endLabelRight,t.labelStyle);o=m;let y=m.getBBox();if(n){const k=m.children[0],S=_.select_default(m);y=k.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}x.attr("transform",G.computeLabelTransform(y,n)),A[t.id]||(A[t.id]={}),A[t.id].endRight=d,J(o,t.endLabelRight)}return l},"insertEdgeLabel");function J(e,t){v.getEffectiveHtmlLabels(v.getConfig2())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}u.__name(J,"setTerminalWidth");var Ae=u.__name((e,t)=>{_.log.debug("Moving label abc88 ",e.id,e.label,wt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const{subGraphTitleTotalMargin:n}=Ft.getSubGraphTitleMargins(v.getConfig2());if(e.label){const s=wt[e.id];let i=e.x,a=e.y;if(r){const l=D.utils_default.calcLabelPosition(r);_.log.debug("Moving label "+e.label+" from (",i,",",a,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(i=l.x,a=l.y)}s.attr("transform",`translate(${i}, ${a+n/2})`)}if(e.startLabelLeft){const s=A[e.id].startLeft;let i=e.x,a=e.y;if(r){const l=D.utils_default.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);i=l.x,a=l.y}s.attr("transform",`translate(${i}, ${a})`)}if(e.startLabelRight){const s=A[e.id].startRight;let i=e.x,a=e.y;if(r){const l=D.utils_default.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);i=l.x,a=l.y}s.attr("transform",`translate(${i}, ${a})`)}if(e.endLabelLeft){const s=A[e.id].endLeft;let i=e.x,a=e.y;if(r){const l=D.utils_default.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);i=l.x,a=l.y}s.attr("transform",`translate(${i}, ${a})`)}if(e.endLabelRight){const s=A[e.id].endRight;let i=e.x,a=e.y;if(r){const l=D.utils_default.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);i=l.x,a=l.y}s.attr("transform",`translate(${i}, ${a})`)}},"positionEdgeLabel"),ze=u.__name((e,t)=>{const r=e.x,n=e.y,s=Math.abs(t.x-r),i=Math.abs(t.y-n),a=e.width/2,l=e.height/2;return s>=a||i>=l},"outsideNode"),Me=u.__name((e,t,r)=>{_.log.debug(`intersection calc abc89:
130
+ outsidePoint: ${JSON.stringify(t)}
131
+ insidePoint : ${JSON.stringify(r)}
132
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,s=e.y,i=Math.abs(n-r.x),a=e.width/2;let l=r.x<t.x?a-i:a+i;const c=e.height/2,g=Math.abs(t.y-r.y),o=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(n-t.x)*c){let d=r.y<t.y?t.y-c-s:s-c-t.y;l=o*d/g;const x={x:r.x<t.x?r.x+l:r.x-o+l,y:r.y<t.y?r.y+g-d:r.y-g+d};return l===0&&(x.x=t.x,x.y=t.y),o===0&&(x.x=t.x),g===0&&(x.y=t.y),_.log.debug(`abc89 topp/bott calc, Q ${g}, q ${d}, R ${o}, r ${l}`,x),x}else{r.x<t.x?l=t.x-a-n:l=n-a-t.x;let d=g*l/o,x=r.x<t.x?r.x+o-l:r.x-o+l,m=r.y<t.y?r.y+d:r.y-d;return _.log.debug(`sides calc abc89, Q ${g}, q ${d}, R ${o}, r ${l}`,{_x:x,_y:m}),l===0&&(x=t.x,m=t.y),o===0&&(x=t.x),g===0&&(m=t.y),{x,y:m}}},"intersection"),Rt=u.__name((e,t)=>{_.log.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],s=!1;return e.forEach(i=>{if(!ze(t,i)&&!s){const a=Me(t,n,i);let l=!1;r.forEach(c=>{l=l||c.x===a.x&&c.y===a.y}),r.some(c=>c.x===a.x&&c.y===a.y)||r.push(a),s=!0}else n=i,s||r.push(i)}),r},"cutPathAtIntersect"),Pe=u.__name(function(e,t,r,n,s,i,a){let l=r.points;_.log.debug("abc88 InsertEdge: edge=",r,"e=",t);let c=!1;const g=i.node(t.v);var o=i.node(t.w);o?.intersect&&g?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(g.intersect(l[0])),l.push(o.intersect(l[l.length-1]))),r.toCluster&&(_.log.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),c=!0),r.fromCluster&&(_.log.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),c=!0);const d=l.filter(b=>!Number.isNaN(b.y));let x=D.basis_default;r.curve&&(s==="graph"||s==="flowchart")&&(x=r.curve);const{x:m,y}=G.getLineFunctionsWithOffset(r),k=he.line_default().x(m).y(y).curve(x);let S;switch(r.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-thick";break;default:S=""}switch(r.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break}const I=e.append("path").attr("d",k(d)).attr("id",r.id).attr("class"," "+S+(r.classes?" "+r.classes:"")).attr("style",r.style);let w="";(v.getConfig2().flowchart.arrowMarkerAbsolute||v.getConfig2().state.arrowMarkerAbsolute)&&(w=v.getUrl(!0)),Be(I,r,w,a,s);let f={};return c&&(f.updatedPath=l),f.originalPath=r.points,f},"insertEdge"),Fe=u.__name(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),He=u.__name((e,t,r,n)=>{const s=Fe(e),i=2,a=t.height+2*r.padding,l=a/i,c=n??t.width+2*l+r.padding,g=r.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:l,y:0},{x:c/2,y:2*g},{x:c-l,y:0},{x:c,y:0},{x:c,y:-a/3},{x:c+2*g,y:-a/2},{x:c,y:-2*a/3},{x:c,y:-a},{x:c-l,y:-a},{x:c/2,y:-a-2*g},{x:l,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*g,y:-a/2},{x:0,y:-a/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:l,y:0},{x:c-l,y:0},{x:c,y:-a/2},{x:c-l,y:-a},{x:l,y:-a},{x:0,y:-a/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:l,y:-a},{x:c-l,y:-a},{x:c,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:c,y:-l},{x:c,y:-a+l},{x:0,y:-a}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:c,y:0},{x:0,y:-l},{x:0,y:-a+l},{x:c,y:-a}]:s.has("right")&&s.has("left")?[{x:l,y:0},{x:l,y:-g},{x:c-l,y:-g},{x:c-l,y:0},{x:c,y:-a/2},{x:c-l,y:-a},{x:c-l,y:-a+g},{x:l,y:-a+g},{x:l,y:-a},{x:0,y:-a/2}]:s.has("up")&&s.has("down")?[{x:c/2,y:0},{x:0,y:-g},{x:l,y:-g},{x:l,y:-a+g},{x:0,y:-a+g},{x:c/2,y:-a},{x:c,y:-a+g},{x:c-l,y:-a+g},{x:c-l,y:-g},{x:c,y:-g}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:c,y:-l},{x:0,y:-a}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:c,y:0},{x:0,y:-a}]:s.has("left")&&s.has("up")?[{x:c,y:0},{x:0,y:-l},{x:c,y:-a}]:s.has("left")&&s.has("down")?[{x:c,y:0},{x:0,y:0},{x:c,y:-a}]:s.has("right")?[{x:l,y:-g},{x:l,y:-g},{x:c-l,y:-g},{x:c-l,y:0},{x:c,y:-a/2},{x:c-l,y:-a},{x:c-l,y:-a+g},{x:l,y:-a+g},{x:l,y:-a+g}]:s.has("left")?[{x:l,y:0},{x:l,y:-g},{x:c-l,y:-g},{x:c-l,y:-a+g},{x:l,y:-a+g},{x:l,y:-a},{x:0,y:-a/2}]:s.has("up")?[{x:l,y:-g},{x:l,y:-a+g},{x:0,y:-a+g},{x:c/2,y:-a},{x:c,y:-a+g},{x:c-l,y:-a+g},{x:c-l,y:-g}]:s.has("down")?[{x:c/2,y:0},{x:0,y:-g},{x:l,y:-g},{x:l,y:-a+g},{x:c-l,y:-a+g},{x:c-l,y:-g},{x:c,y:-g}]:[{x:0,y:0}]},"getArrowPoints");function Zt(e,t){return e.intersect(t)}u.__name(Zt,"intersectNode");var We=Zt;function Gt(e,t,r,n){var s=e.x,i=e.y,a=s-n.x,l=i-n.y,c=Math.sqrt(t*t*l*l+r*r*a*a),g=Math.abs(t*r*a/c);n.x<s&&(g=-g);var o=Math.abs(t*r*l/c);return n.y<i&&(o=-o),{x:s+g,y:i+o}}u.__name(Gt,"intersectEllipse");var Jt=Gt;function Qt(e,t,r){return Jt(e,t,t,r)}u.__name(Qt,"intersectCircle");var Ye=Qt;function $t(e,t,r,n){var s,i,a,l,c,g,o,d,x,m,y,k,S,I,w;if(s=t.y-e.y,a=e.x-t.x,c=t.x*e.y-e.x*t.y,x=s*r.x+a*r.y+c,m=s*n.x+a*n.y+c,!(x!==0&&m!==0&&St(x,m))&&(i=n.y-r.y,l=r.x-n.x,g=n.x*r.y-r.x*n.y,o=i*e.x+l*e.y+g,d=i*t.x+l*t.y+g,!(o!==0&&d!==0&&St(o,d))&&(y=s*l-i*a,y!==0)))return k=Math.abs(y/2),S=a*g-l*c,I=S<0?(S-k)/y:(S+k)/y,S=i*c-s*g,w=S<0?(S-k)/y:(S+k)/y,{x:I,y:w}}u.__name($t,"intersectLine");function St(e,t){return e*t>0}u.__name(St,"sameSign");var Ke=$t,Ue=te;function te(e,t,r){var n=e.x,s=e.y,i=[],a=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(y){a=Math.min(a,y.x),l=Math.min(l,y.y)}):(a=Math.min(a,t.x),l=Math.min(l,t.y));for(var c=n-e.width/2-a,g=s-e.height/2-l,o=0;o<t.length;o++){var d=t[o],x=t[o<t.length-1?o+1:0],m=Ke(e,r,{x:c+d.x,y:g+d.y},{x:c+x.x,y:g+x.y});m&&i.push(m)}return i.length?(i.length>1&&i.sort(function(y,k){var S=y.x-r.x,I=y.y-r.y,w=Math.sqrt(S*S+I*I),f=k.x-r.x,b=k.y-r.y,E=Math.sqrt(f*f+b*b);return w<E?-1:w===E?0:1}),i[0]):e}u.__name(te,"intersectPolygon");var C={node:We,circle:Ye,ellipse:Jt,polygon:Ue,rect:u.__name((e,t)=>{var r=e.x,n=e.y,s=t.x-r,i=t.y-n,a=e.width/2,l=e.height/2,c,g;return Math.abs(i)*a>Math.abs(s)*l?(i<0&&(l=-l),c=i===0?0:l*s/i,g=l):(s<0&&(a=-a),c=a,g=s===0?0:a*i/s),{x:r+c,y:n+g}},"intersectRect")},R=u.__name(async(e,t,r,n)=>{const s=v.getConfig2();let i;const a=t.useHtmlLabels||v.getEffectiveHtmlLabels(s);r?i=r:i="node default";const l=e.insert("g").attr("class",i).attr("id",t.domId||t.id),c=l.insert("g").attr("class","label").attr("style",t.labelStyle);let g;t.labelText===void 0?g="":g=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o;t.labelType==="markdown"?o=Lt.createText(c,v.sanitizeText(D.decodeEntities(g),s),{useHtmlLabels:a,width:t.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):o=await Y(c,v.sanitizeText(D.decodeEntities(g),s),t.labelStyle,!1,n);let d=o.getBBox();const x=t.padding/2;if(v.getEffectiveHtmlLabels(s)){const m=o.children[0],y=_.select_default(o);await Ft.configureLabelImages(m,g),d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height)}return a?c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):c.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:l,bbox:d,halfPadding:x,label:c}},"labelHelper"),N=u.__name((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function K(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}u.__name(K,"insertPolygonShape");var Xe=u.__name(async(e,t)=>{t.useHtmlLabels||v.getEffectiveHtmlLabels(v.getConfig2())||(t.centerLabel=!0);const{shapeSvg:r,bbox:n,halfPadding:s}=await R(e,t,"node "+t.classes,!0);_.log.info("Classes = ",t.classes);const i=r.insert("rect",":first-child");return i.attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-s).attr("y",-n.height/2-s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),N(t,i),t.intersect=function(a){return C.rect(t,a)},r},"note"),At=u.__name(e=>e?" "+e:"","formatClass"),P=u.__name((e,t)=>`${t||"node default"}${At(e.classes)} ${At(e.class)}`,"getClassesFromNode"),zt=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding+(n.height+t.padding),i=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];_.log.info("Question main (Circle)");const a=K(r,s,s,i);return a.attr("style",t.style),N(t,a),t.intersect=function(l){return _.log.warn("Intersect called"),C.polygon(t,i,l)},r},"question"),qe=u.__name((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}];return r.insert("polygon",":first-child").attr("points",s.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(i){return C.circle(t,14,i)},r},"choice"),Ve=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=4,i=t.positioned?t.height:n.height+t.padding,a=i/s,l=t.positioned?t.width:n.width+2*a+t.padding,c=[{x:a,y:0},{x:l-a,y:0},{x:l,y:-i/2},{x:l-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],g=K(r,l,i,c);return g.attr("style",t.style),N(t,g),t.intersect=function(o){return C.polygon(t,c,o)},r},"hexagon"),je=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,void 0,!0),s=2,i=n.height+2*t.padding,a=i/s,l=n.width+2*a+t.padding,c=t.positioned&&(t.widthInColumns??1)>1&&t.width>l?t.width:l,g=He(t.directions,n,t,c),o=K(r,c,i,g);return o.attr("style",t.style),N(t,o),t.intersect=function(d){return C.polygon(t,g,d)},r},"block_arrow"),Ze=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:-i/2,y:0},{x:s,y:0},{x:s,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return K(r,s,i,a).attr("style",t.style),t.width=s+i,t.height=i,t.intersect=function(l){return C.polygon(t,a,l)},r},"rect_left_inv_arrow"),Ge=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:-2*i/6,y:0},{x:s-i/6,y:0},{x:s+2*i/6,y:-i},{x:i/6,y:-i}],l=K(r,s,i,a);return l.attr("style",t.style),N(t,l),t.intersect=function(c){return C.polygon(t,a,c)},r},"lean_right"),Je=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:2*i/6,y:0},{x:s+i/6,y:0},{x:s-2*i/6,y:-i},{x:-i/6,y:-i}],l=K(r,s,i,a);return l.attr("style",t.style),N(t,l),t.intersect=function(c){return C.polygon(t,a,c)},r},"lean_left"),Qe=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:-2*i/6,y:0},{x:s+2*i/6,y:0},{x:s-i/6,y:-i},{x:i/6,y:-i}],l=K(r,s,i,a);return l.attr("style",t.style),N(t,l),t.intersect=function(c){return C.polygon(t,a,c)},r},"trapezoid"),$e=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:i/6,y:0},{x:s-i/6,y:0},{x:s+2*i/6,y:-i},{x:-2*i/6,y:-i}],l=K(r,s,i,a);return l.attr("style",t.style),N(t,l),t.intersect=function(c){return C.polygon(t,a,c)},r},"inv_trapezoid"),tr=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:0,y:0},{x:s+i/2,y:0},{x:s,y:-i/2},{x:s+i/2,y:-i},{x:0,y:-i}],l=K(r,s,i,a);return l.attr("style",t.style),N(t,l),t.intersect=function(c){return C.polygon(t,a,c)},r},"rect_right_inv_arrow"),er=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=s/2,a=i/(2.5+s/50),l=n.height+a+t.padding,c="M 0,"+a+" a "+i+","+a+" 0,0,0 "+s+" 0 a "+i+","+a+" 0,0,0 "+-s+" 0 l 0,"+l+" a "+i+","+a+" 0,0,0 "+s+" 0 l 0,"+-l;return N(t,r.attr("label-offset-y",a).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-s/2+","+-(l/2+a)+")")),t.intersect=function(g){const o=C.rect(t,g),d=o.x-t.x;if(i!=0&&(Math.abs(d)<t.width/2||Math.abs(d)==t.width/2&&Math.abs(o.y-t.y)>t.height/2-a)){let x=a*a*(1-d*d/(i*i));x!=0&&(x=Math.sqrt(x)),x=a-x,g.y-t.y>0&&(x=-x),o.y+=x}return o},r},"cylinder"),rr=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:s}=await R(e,t,"node "+t.classes+" "+t.class,!0),i=r.insert("rect",":first-child"),a=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,c=t.positioned?-a/2:-n.width/2-s,g=t.positioned?-l/2:-n.height/2-s;if(i.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",g).attr("width",a).attr("height",l),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(it(i,t.props.borders,a,l),o.delete("borders")),o.forEach(d=>{_.log.warn(`Unknown node property ${d}`)})}return N(t,i),t.intersect=function(o){return C.rect(t,o)},r},"rect"),ar=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:s}=await R(e,t,"node "+t.classes,!0),i=r.insert("rect",":first-child"),a=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,c=t.positioned?-a/2:-n.width/2-s,g=t.positioned?-l/2:-n.height/2-s;if(i.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",g).attr("width",a).attr("height",l),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(it(i,t.props.borders,a,l),o.delete("borders")),o.forEach(d=>{_.log.warn(`Unknown node property ${d}`)})}return N(t,i),t.intersect=function(o){return C.rect(t,o)},r},"composite"),sr=u.__name(async(e,t)=>{const{shapeSvg:r}=await R(e,t,"label",!0);_.log.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),s=0,i=0;if(n.attr("width",s).attr("height",i),r.attr("class","label edgeLabel"),t.props){const a=new Set(Object.keys(t.props));t.props.borders&&(it(n,t.props.borders,s,i),a.delete("borders")),a.forEach(l=>{_.log.warn(`Unknown node property ${l}`)})}return N(t,n),t.intersect=function(a){return C.rect(t,a)},r},"labelRect");function it(e,t,r,n){const s=[],i=u.__name(l=>{s.push(l,0)},"addBorder"),a=u.__name(l=>{s.push(0,l)},"skipBorder");t.includes("t")?(_.log.debug("add top border"),i(r)):a(r),t.includes("r")?(_.log.debug("add right border"),i(n)):a(n),t.includes("b")?(_.log.debug("add bottom border"),i(r)):a(r),t.includes("l")?(_.log.debug("add left border"),i(n)):a(n),e.attr("stroke-dasharray",s.join(" "))}u.__name(it,"applyNodePropertyBorders");var ir=u.__name(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),s=n.insert("rect",":first-child"),i=n.insert("line"),a=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof l=="object"?c=l[0]:c=l,_.log.info("Label text abc79",c,l,typeof l=="object");const g=await Y(a,c,t.labelStyle,!0,!0);let o={width:0,height:0};if(v.getEffectiveHtmlLabels(v.getConfig2())){const k=g.children[0],S=_.select_default(g);o=k.getBoundingClientRect(),S.attr("width",o.width),S.attr("height",o.height)}_.log.info("Text 2",l);const d=l.slice(1,l.length);let x=g.getBBox();const m=await Y(a,d.join?d.join("<br/>"):d,t.labelStyle,!0,!0);if(v.getEffectiveHtmlLabels(v.getConfig2())){const k=m.children[0],S=_.select_default(m);o=k.getBoundingClientRect(),S.attr("width",o.width),S.attr("height",o.height)}const y=t.padding/2;return _.select_default(m).attr("transform","translate( "+(o.width>x.width?0:(x.width-o.width)/2)+", "+(x.height+y+5)+")"),_.select_default(g).attr("transform","translate( "+(o.width<x.width?0:-(x.width-o.width)/2)+", 0)"),o=a.node().getBBox(),a.attr("transform","translate("+-o.width/2+", "+(-o.height/2-y+3)+")"),s.attr("class","outer title-state").attr("x",-o.width/2-y).attr("y",-o.height/2-y).attr("width",o.width+t.padding).attr("height",o.height+t.padding),i.attr("class","divider").attr("x1",-o.width/2-y).attr("x2",o.width/2+y).attr("y1",-o.height/2-y+x.height+y).attr("y2",-o.height/2-y+x.height+y),N(t,s),t.intersect=function(k){return C.rect(t,k)},n},"rectWithTitle"),nr=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.height+t.padding,i=n.width+s/4+t.padding;return N(t,r.insert("rect",":first-child").attr("style",t.style).attr("rx",s/2).attr("ry",s/2).attr("x",-i/2).attr("y",-s/2).attr("width",i).attr("height",s)),t.intersect=function(a){return C.rect(t,a)},r},"stadium"),lr=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:s}=await R(e,t,P(t,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),_.log.info("Circle main"),N(t,i),t.intersect=function(a){return _.log.info("Circle intersect",t,n.width/2+s,a),C.circle(t,n.width/2+s,a)},r},"circle"),cr=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:s}=await R(e,t,P(t,void 0),!0),i=5,a=r.insert("g",":first-child"),l=a.insert("circle"),c=a.insert("circle");return a.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s+i).attr("width",n.width+t.padding+i*2).attr("height",n.height+t.padding+i*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),_.log.info("DoubleCircle main"),N(t,l),t.intersect=function(g){return _.log.info("DoubleCircle intersect",t,n.width/2+s+i,g),C.circle(t,n.width/2+s+i,g)},r},"doublecircle"),or=u.__name(async(e,t)=>{const{shapeSvg:r,bbox:n}=await R(e,t,P(t,void 0),!0),s=n.width+t.padding,i=n.height+t.padding,a=[{x:0,y:0},{x:s,y:0},{x:s,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],l=K(r,s,i,a);return l.attr("style",t.style),N(t,l),t.intersect=function(c){return C.polygon(t,a,c)},r},"subroutine"),hr=u.__name((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),N(t,n),t.intersect=function(s){return C.circle(t,7,s)},r},"start"),Mt=u.__name((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s=70,i=10;return r==="LR"&&(s=10,i=70),N(t,n.append("rect").attr("x",-1*s/2).attr("y",-1*i/2).attr("width",s).attr("height",i).attr("class","fork-join")),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(a){return C.rect(t,a)},n},"forkJoin"),Pt={rhombus:zt,composite:ar,question:zt,rect:rr,labelRect:sr,rectWithTitle:ir,choice:qe,circle:lr,doublecircle:cr,stadium:nr,hexagon:Ve,block_arrow:je,rect_left_inv_arrow:Ze,lean_right:Ge,lean_left:Je,trapezoid:Qe,inv_trapezoid:$e,rect_right_inv_arrow:tr,cylinder:er,start:hr,end:u.__name((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),s=r.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),N(t,s),t.intersect=function(i){return C.circle(t,7,i)},r},"end"),note:Xe,subroutine:or,fork:Mt,join:Mt,class_box:u.__name(async(e,t)=>{const r=t.padding/2,n=4,s=8;let i;t.classes?i="node "+t.classes:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),l=a.insert("rect",":first-child"),c=a.insert("line"),g=a.insert("line");let o=0,d=n;const x=a.insert("g").attr("class","label");let m=0;const y=t.classData.annotations?.[0],k=await Y(x,t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",t.labelStyle,!0,!0);let S=k.getBBox();if(v.getEffectiveHtmlLabels(v.getConfig2())){const T=k.children[0],h=_.select_default(k);S=T.getBoundingClientRect(),h.attr("width",S.width),h.attr("height",S.height)}t.classData.annotations[0]&&(d+=S.height+n,o+=S.width);let I=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(v.getEffectiveHtmlLabels(v.getConfig2())?I+="&lt;"+t.classData.type+"&gt;":I+="<"+t.classData.type+">");const w=await Y(x,I,t.labelStyle,!0,!0);_.select_default(w).attr("class","classTitle");let f=w.getBBox();if(v.getEffectiveHtmlLabels(v.getConfig2())){const T=w.children[0],h=_.select_default(w);f=T.getBoundingClientRect(),h.attr("width",f.width),h.attr("height",f.height)}d+=f.height+n,f.width>o&&(o=f.width);const b=[];t.classData.members.forEach(async T=>{const h=T.getDisplayDetails();let M=h.displayText;v.getEffectiveHtmlLabels(v.getConfig2())&&(M=M.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const p=await Y(x,M,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0);let B=p.getBBox();if(v.getEffectiveHtmlLabels(v.getConfig2())){const q=p.children[0],U=_.select_default(p);B=q.getBoundingClientRect(),U.attr("width",B.width),U.attr("height",B.height)}B.width>o&&(o=B.width),d+=B.height+n,b.push(p)}),d+=s;const E=[];if(t.classData.methods.forEach(async T=>{const h=T.getDisplayDetails();let M=h.displayText;v.getEffectiveHtmlLabels(v.getConfig2())&&(M=M.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const p=await Y(x,M,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0);let B=p.getBBox();if(v.getEffectiveHtmlLabels(v.getConfig2())){const q=p.children[0],U=_.select_default(p);B=q.getBoundingClientRect(),U.attr("width",B.width),U.attr("height",B.height)}B.width>o&&(o=B.width),d+=B.height+n,E.push(p)}),d+=s,y){let T=(o-S.width)/2;_.select_default(k).attr("transform","translate( "+(-1*o/2+T)+", "+-1*d/2+")"),m=S.height+n}let L=(o-f.width)/2;return _.select_default(w).attr("transform","translate( "+(-1*o/2+L)+", "+(-1*d/2+m)+")"),m+=f.height+n,c.attr("class","divider").attr("x1",-o/2-r).attr("x2",o/2+r).attr("y1",-d/2-r+s+m).attr("y2",-d/2-r+s+m),m+=s,b.forEach(T=>{_.select_default(T).attr("transform","translate( "+-o/2+", "+(-1*d/2+m+s/2)+")");const h=T?.getBBox();m+=(h?.height??0)+n}),m+=s,g.attr("class","divider").attr("x1",-o/2-r).attr("x2",o/2+r).attr("y1",-d/2-r+s+m).attr("y2",-d/2-r+s+m),m+=s,E.forEach(T=>{_.select_default(T).attr("transform","translate( "+-o/2+", "+(-1*d/2+m)+")");const h=T?.getBBox();m+=(h?.height??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-r).attr("y",-(d/2)-r).attr("width",o+t.padding).attr("height",d+t.padding),N(t,l),t.intersect=function(T){return C.rect(t,T)},a},"class_box")},rt={},ee=u.__name(async(e,t,r)=>{let n,s;if(t.link){let i;v.getConfig2().securityLevel==="sandbox"?i="_top":t.linkTarget&&(i=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",i),s=await Pt[t.shape](n,t,r)}else s=await Pt[t.shape](e,t,r),n=s;return t.tooltip&&s.attr("title",t.tooltip),t.class&&s.attr("class","node default "+t.class),rt[t.id]=n,t.haveCallback&&rt[t.id].attr("class",rt[t.id].attr("class")+" clickable"),n},"insertNode"),gr=u.__name(e=>{const t=rt[e.id];_.log.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Tt(e,t,r=!1){const n=e;let s="default";(n?.classes?.length||0)>0&&(s=(n?.classes??[]).join(" ")),s=s+" flowchart-label";let i=0,a="",l;switch(n.type){case"round":i=5,a="rect";break;case"composite":i=0,a="composite",l=0;break;case"square":a="rect";break;case"diamond":a="question";break;case"hexagon":a="hexagon";break;case"block_arrow":a="block_arrow";break;case"odd":a="rect_left_inv_arrow";break;case"lean_right":a="lean_right";break;case"lean_left":a="lean_left";break;case"trapezoid":a="trapezoid";break;case"inv_trapezoid":a="inv_trapezoid";break;case"rect_left_inv_arrow":a="rect_left_inv_arrow";break;case"circle":a="circle";break;case"ellipse":a="ellipse";break;case"stadium":a="stadium";break;case"subroutine":a="subroutine";break;case"cylinder":a="cylinder";break;case"group":a="rect";break;case"doublecircle":a="doublecircle";break;default:a="rect"}const c=D.getStylesFromArray(n?.styles??[]),g=n.label,o=n.size??{width:0,height:0,x:0,y:0},d=t.getDiagramId();return{labelStyle:c.labelStyle,shape:a,labelText:g,rx:i,ry:i,class:s,style:c.style,id:n.id,domId:d?`${d}-${n.id}`:n.id,directions:n.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:r,intersect:void 0,type:n.type,padding:l??v.getConfig()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}u.__name(Tt,"getNodeFromBlock");async function re(e,t,r){const n=Tt(t,r,!1);if(n.type==="group")return;const s=await ee(e,n,{config:v.getConfig()}),i=s.node().getBBox(),a=r.getBlock(n.id);a.size={width:i.width,height:i.height,x:0,y:0,node:s},r.setBlock(a),s.remove()}u.__name(re,"calculateBlockSize");async function ae(e,t,r){const n=Tt(t,r,!0);r.getBlock(n.id).type!=="space"&&(await ee(e,n,{config:v.getConfig()}),t.intersect=n?.intersect,gr(n))}u.__name(ae,"insertBlockPositioned");async function nt(e,t,r,n){for(const s of t)await n(e,s,r),s.children&&await nt(e,s.children,r,n)}u.__name(nt,"performOperations");async function se(e,t,r){await nt(e,t,r,re)}u.__name(se,"calculateBlockSizes");async function ie(e,t,r){await nt(e,t,r,ae)}u.__name(ie,"insertBlocks");async function ne(e,t,r,n,s){const i=new ue.Graph({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const a of r)a.size&&i.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(const a of t)if(a.start&&a.end){const l=n.getBlock(a.start),c=n.getBlock(a.end);if(l?.size&&c?.size){const g=l.size,o=c.size,d=[{x:g.x,y:g.y},{x:g.x+(o.x-g.x)/2,y:g.y+(o.y-g.y)/2},{x:o.x,y:o.y}],x=s?`${s}-${a.id}`:a.id,m=`${a.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal"} ${a.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;Pe(e,{v:a.start,w:a.end,name:x},{...a,id:x,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:d,classes:m},void 0,"block",i,s),a.label&&(await Re(e,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:d,classes:m}),Ae({...a,x:d[1].x,y:d[1].y},{originalPath:d}))}}}u.__name(ne,"insertEdges");var ur={parser:me,db:Ee,renderer:{draw:u.__name(async function(e,t,r,n){const{securityLevel:s,block:i}=v.getConfig(),a=n.db;a.setDiagramId(t);let l;s==="sandbox"&&(l=_.select_default("#i"+t));const c=s==="sandbox"?_.select_default(l.nodes()[0].contentDocument.body):_.select_default("body"),g=s==="sandbox"?c.select(`[id="${t}"]`):_.select_default(`[id="${t}"]`);Ie(g,["point","circle","cross"],n.type,t);const o=a.getBlocks(),d=a.getBlocksFlat(),x=a.getEdges(),m=g.insert("g").attr("class","block");await se(m,o,a);const y=jt(a);if(await ie(m,o,a),await ne(m,x,d,a,t),y){const k=y,S=Math.max(1,Math.round(.125*(k.width/k.height))),I=k.height+S+10,w=k.width+10,{useMaxWidth:f}=i;v.configureSvgSize(g,I,w,!!f),_.log.debug("Here Bounds",y,k),g.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),getClasses:u.__name(function(e,t){return t.db.getClasses()},"getClasses")},styles:Te};exports.diagram=ur;
package/dist/builder.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  export { isSSR } from './utils/builder/env';
2
2
  export { EventManager } from './utils/builder/events';
3
- export { signal, createEffect, computed, batch } from './utils/builder/signal';
4
- export type { Getter, Setter, SignalOptions } from './utils/builder/signal';
3
+ export { signal, createEffect, computed, batch, untrack, createRoot, onCleanup, getOwner, runWithOwner, } from './utils/builder/signal';
4
+ export type { Getter, Setter, SignalOptions, Owner } from './utils/builder/signal';
5
5
  export { escapeHtml, escapeHtmlAttribute } from './utils/builder/escape';
6
6
  export { matchSelector, collectMatches } from './utils/builder/selectors';
7
7
  export type { MockNode } from './utils/builder/selectors';
8
8
  export { DocumentFragmentMock, HTMLElementMock, ShadowRootMock } from './utils/builder/mocks';
9
- export { createRef, ElementBuilder, ShadowBuilder } from './utils/builder/core';
10
- export type { Ref } from './utils/builder/core';
9
+ export { createRef, For, Index, Show, Switch, Match, ElementBuilder, ShadowBuilder } from './utils/builder/core';
10
+ export type { Ref, Child, ForOptions, ForHandle, IndexOptions, IndexHandle, ShowOptions, SwitchOptions, MatchClause, } from './utils/builder/core';
11
11
  export { View, Div, Span, Slot, ButtonBuilder, InputBuilder, Style, Label, Ul, Li, Section, Article, Nav, Header, Footer, Main, DeclarativeShadow, } from './utils/builder/factory';
package/dist/builder.js CHANGED
@@ -1,39 +1,48 @@
1
- import { a as s, c as e, i as t, n as o, o as r, r as c, s as i, t as l } from "./mocks-CMGoftIc.js";
2
- import { t as n } from "./events-C59wGdni.js";
3
- import { i as d, n as u, r as S, t as f } from "./signal-CSSZxlK5.js";
4
- import { _ as M, a as v, b as B, c as b, d as g, f as w, g as E, h as H, i as k, l as D, m as L, n as R, o as y, p as A, r as F, s as x, t as I, u as N, v as T, y as U } from "./factory-BdsO0dEW.js";
1
+ import { a as s, c as e, i as t, n as o, o as r, r as c, s as i, t as n } from "./mocks-CMGoftIc.js";
2
+ import { t as m } from "./events-C59wGdni.js";
3
+ import { A as S, C as d, D as h, E as p, M as w, N as M, O as f, P as g, S as k, T as v, _ as B, a as E, b, c as D, d as H, f as R, g as x, h as A, i as F, j as L, k as O, l as y, m as C, n as I, o as N, p as T, r as j, s as P, t as U, u as V, v as W, w as _, x as q, y as z } from "./factory-BkvRcCOx.js";
5
4
  export {
6
- I as Article,
7
- R as ButtonBuilder,
8
- F as DeclarativeShadow,
9
- k as Div,
10
- l as DocumentFragmentMock,
11
- T as ElementBuilder,
12
- n as EventManager,
13
- v as Footer,
5
+ U as Article,
6
+ I as ButtonBuilder,
7
+ j as DeclarativeShadow,
8
+ F as Div,
9
+ n as DocumentFragmentMock,
10
+ W as ElementBuilder,
11
+ m as EventManager,
12
+ E as Footer,
13
+ z as For,
14
14
  o as HTMLElementMock,
15
- y as Header,
16
- x as InputBuilder,
17
- b as Label,
18
- D as Li,
19
- N as Main,
20
- g as Nav,
21
- w as Section,
22
- U as ShadowBuilder,
15
+ N as Header,
16
+ b as Index,
17
+ P as InputBuilder,
18
+ D as Label,
19
+ y as Li,
20
+ V as Main,
21
+ q as Match,
22
+ H as Nav,
23
+ R as Section,
24
+ k as ShadowBuilder,
23
25
  c as ShadowRootMock,
24
- A as Slot,
25
- L as Span,
26
- H as Style,
27
- E as Ul,
28
- M as View,
29
- f as batch,
26
+ d as Show,
27
+ T as Slot,
28
+ C as Span,
29
+ A as Style,
30
+ _ as Switch,
31
+ x as Ul,
32
+ B as View,
33
+ p as batch,
30
34
  t as collectMatches,
31
- u as computed,
32
- S as createEffect,
33
- B as createRef,
35
+ h as computed,
36
+ f as createEffect,
37
+ v as createRef,
38
+ O as createRoot,
34
39
  r as escapeHtml,
35
40
  i as escapeHtmlAttribute,
41
+ S as getOwner,
36
42
  e as isSSR,
37
43
  s as matchSelector,
38
- d as signal
44
+ L as onCleanup,
45
+ w as runWithOwner,
46
+ M as signal,
47
+ g as untrack
39
48
  };