@fudanda/admin-antd 0.0.0-stage → 2.20261024.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -3
  3. package/THIRD_PARTY_NOTICES.md +55 -0
  4. package/dist/assets/libarchive-DxGirPmi.wasm +0 -0
  5. package/dist/assets/pdfium-BJ2Yip8Q.wasm +0 -0
  6. package/dist/assets/ppt-font-cjk-DxgKpThH.otf +0 -0
  7. package/dist/assets/ppt-native-Cz5DBbag.wasm +0 -0
  8. package/dist/assets/pptx.worker-CtaL8LO_.js +30 -0
  9. package/dist/assets/worker-C5LZNsKY.mjs +1650 -0
  10. package/dist/assets/worker-CDeo9jS-.js +40 -0
  11. package/dist/assets/worker-bundle-Dx5mKZOL.js +6 -0
  12. package/dist/automation.d.ts +3 -0
  13. package/dist/automation.js +15 -0
  14. package/dist/chunks/App-DNjXLysb.js +79 -0
  15. package/dist/chunks/AppModal-DJzQA6FR.js +1 -0
  16. package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
  17. package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
  18. package/dist/chunks/DashboardPage-BohGodSl.js +22 -0
  19. package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
  20. package/dist/chunks/DateTimeText-CIt0Qy45.js +1 -0
  21. package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
  22. package/dist/chunks/DictTag-2-adKbYg.js +1 -0
  23. package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
  24. package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
  25. package/dist/chunks/EmptyIllustration-DUC3RZmF.js +1 -0
  26. package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
  27. package/dist/chunks/EntityContextRuntime-sslBZqYD.js +1 -0
  28. package/dist/chunks/EntityRelationButton-DWn1rC2J.js +8 -0
  29. package/dist/chunks/ExportButton-AzH4D0oW.js +1 -0
  30. package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
  31. package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
  32. package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
  33. package/dist/chunks/FileViewerPreviewPanel-CMqVtGCr.js +41 -0
  34. package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
  35. package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
  36. package/dist/chunks/JsonPreviewPanel-Dhbza-Uu.js +1 -0
  37. package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
  38. package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
  39. package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
  40. package/dist/chunks/MarkdownPreviewPanel-DoiaAeRv.js +51 -0
  41. package/dist/chunks/MasterDetailLayout-sjPWw8BI.js +8 -0
  42. package/dist/chunks/MemberAssignmentSheet-Czbt6_zv.js +1 -0
  43. package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
  44. package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
  45. package/dist/chunks/ModalFooter-RMlvqrO9.js +1 -0
  46. package/dist/chunks/MonacoPreviewPanel-Dnz7xpWP.js +1 -0
  47. package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
  48. package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
  49. package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
  50. package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
  51. package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
  52. package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
  53. package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
  54. package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
  55. package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
  56. package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
  57. package/dist/chunks/ResponsiveTableActions-y54aSdhs.js +1 -0
  58. package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
  59. package/dist/chunks/ScrollArea-DqjJmHDN.js +11 -0
  60. package/dist/chunks/SearchToolbar-CvgYKUjr.js +1 -0
  61. package/dist/chunks/SessionClientTag-DIwnYodW.js +22 -0
  62. package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
  63. package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
  64. package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
  65. package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
  66. package/dist/chunks/UTIF-QUtClmQd.js +1 -0
  67. package/dist/chunks/UserAvatar-B8CFnTCn.js +1 -0
  68. package/dist/chunks/UserDisplay-J0Re8z-7.js +1 -0
  69. package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
  70. package/dist/chunks/UserLogsPanels-BHeSxWrk.js +36 -0
  71. package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
  72. package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
  73. package/dist/chunks/abnfDiagram-VCTEODGH-Z6OhNjoW.js +1 -0
  74. package/dist/chunks/activity-DBu4axwF.js +8 -0
  75. package/dist/chunks/arc-B3K1fDeF.js +1 -0
  76. package/dist/chunks/architecture-7GRP2DOG-CMtoOwin.js +1 -0
  77. package/dist/chunks/architectureDiagram-5GKGNRK7-V5A7S5fY.js +36 -0
  78. package/dist/chunks/archive-B_IKvysI.js +72 -0
  79. package/dist/chunks/array-BrHhzP_A.js +1 -0
  80. package/dist/chunks/arrow-left-CsxBMzKY.js +8 -0
  81. package/dist/chunks/avsc-C0VoJRmm.js +160 -0
  82. package/dist/chunks/blockDiagram-I7D4REHJ-CFKGJkc_.js +129 -0
  83. package/dist/chunks/browser-BKLM0ThC-mnGPrtB_.js +1 -0
  84. package/dist/chunks/browser-index-JqxD-45S.js +1 -0
  85. package/dist/chunks/builtin_esm-external-require-react-BsBndGeN.js +1 -0
  86. package/dist/chunks/bundle-DbfUnEV1.js +29 -0
  87. package/dist/chunks/c4Diagram-7LVT6UL2-BqYYoXPe.js +38 -0
  88. package/dist/chunks/channel-C9Dr7Z-W.js +1 -0
  89. package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
  90. package/dist/chunks/chart-renderer-k-Rd8vdL.js +7 -0
  91. package/dist/chunks/chevron-down-mn2tSKQd.js +8 -0
  92. package/dist/chunks/chevron-right-EBApfX6q.js +15 -0
  93. package/dist/chunks/chevrons-up-down-2M6hY6wt.js +15 -0
  94. package/dist/chunks/chunk-2E4U76K2-DNbbdpCx.js +1 -0
  95. package/dist/chunks/chunk-2Q5K7J3B-CmAE3Vs0.js +1 -0
  96. package/dist/chunks/chunk-2ZTRR5NV-BjsSRgBv.js +2 -0
  97. package/dist/chunks/chunk-3Z5EZCMW-uYiqz-6y.js +1 -0
  98. package/dist/chunks/chunk-4HAMMTFA-Aw59LwS3.js +62 -0
  99. package/dist/chunks/chunk-5V3GS4D5-B_CVcJic.js +1 -0
  100. package/dist/chunks/chunk-5VM5RSS4-DMlsEAcl.js +15 -0
  101. package/dist/chunks/chunk-6AZGARVD-CgAiC5mV.js +1 -0
  102. package/dist/chunks/chunk-6EIED4P4-CXz5D9B0.js +1 -0
  103. package/dist/chunks/chunk-6K3QC6MW-DtaQ52mY.js +1 -0
  104. package/dist/chunks/chunk-6TQVIW2G-D0YDxefI.js +1 -0
  105. package/dist/chunks/chunk-747NJXEK-DGoElbDa.js +2 -0
  106. package/dist/chunks/chunk-75Z2AOVW-IO9R6faP.js +2 -0
  107. package/dist/chunks/chunk-CLGD4ZFX-tRS89bnq.js +1 -0
  108. package/dist/chunks/chunk-DU6HZSFF-Bx48E1rg.js +125 -0
  109. package/dist/chunks/chunk-F27PBJKO-DtLva7y0.js +1 -0
  110. package/dist/chunks/chunk-FOHPRMQF-B8MMrnxV.js +255 -0
  111. package/dist/chunks/chunk-GMAD6QVW-D41KnniX.js +72 -0
  112. package/dist/chunks/chunk-GVQU2GXP-CVzgM_ui.js +1 -0
  113. package/dist/chunks/chunk-I5DQTOEV-CoecQT42.js +1 -0
  114. package/dist/chunks/chunk-ICYGCRZG-lH3opfCY.js +1 -0
  115. package/dist/chunks/chunk-IH6LHLGP-tD-j3Rsy.js +1 -0
  116. package/dist/chunks/chunk-IMKFNOWR-CL9pLQhV.js +231 -0
  117. package/dist/chunks/chunk-JWPE2WC7-Wk0BVLn5.js +1 -0
  118. package/dist/chunks/chunk-KI3K4JFJ-C-3Y_9er.js +1 -0
  119. package/dist/chunks/chunk-L3NEJ4N5-CmvrS7Dt.js +1 -0
  120. package/dist/chunks/chunk-LNGE3PJU-BP1fsJRz.js +34 -0
  121. package/dist/chunks/chunk-OSK3NFVY-C9uWOXTC.js +10 -0
  122. package/dist/chunks/chunk-OUJLGHUK-Cm55l9bx.js +2 -0
  123. package/dist/chunks/chunk-P2QGCYS3-C9bc1yiM.js +1 -0
  124. package/dist/chunks/chunk-POPQ4Y6H-P1s5xaxM.js +1 -0
  125. package/dist/chunks/chunk-PWAF6VOD-IORmPx9D.js +1 -0
  126. package/dist/chunks/chunk-SHT3W25Y-Bip4melZ.js +168 -0
  127. package/dist/chunks/chunk-SVP7TREG-BKCgUOuy.js +88 -0
  128. package/dist/chunks/chunk-TICWLB2K-12W2EmSx.js +206 -0
  129. package/dist/chunks/chunk-TLUHSLCS-DsqF476v.js +1 -0
  130. package/dist/chunks/chunk-UY3FDG6J-71d_M6t3.js +1 -0
  131. package/dist/chunks/chunk-XHIXRSVI-C2X1-xC6.js +1 -0
  132. package/dist/chunks/chunk-XXDRQBXY-Bl6AoSZF.js +1 -0
  133. package/dist/chunks/chunk-Y2CYZVJY-DjEHBC-3.js +1 -0
  134. package/dist/chunks/circle-check-RKAno__V.js +8 -0
  135. package/dist/chunks/circle-x-BB5x-D-8.js +8 -0
  136. package/dist/chunks/classDiagram-ZZMXUADV-CZrpYcfK.js +1 -0
  137. package/dist/chunks/classDiagram-v2-VYDZK3BY-CZrpYcfK.js +1 -0
  138. package/dist/chunks/clipboard-ERcMSMRH.js +1 -0
  139. package/dist/chunks/clock-CniP1gZS.js +8 -0
  140. package/dist/chunks/confirm-BtBBEqk8.js +1 -0
  141. package/dist/chunks/controls-C5dPckUT.js +1 -0
  142. package/dist/chunks/copy-ofLPH1I0.js +8 -0
  143. package/dist/chunks/cose-bilkent-JH36ORCC-D9OUqkk5.js +1 -0
  144. package/dist/chunks/createLucideIcon-BtwfYE6A.js +83 -0
  145. package/dist/chunks/cynefin-OW5HDTMX-B8_kUynj.js +1 -0
  146. package/dist/chunks/cynefinDiagram-5FMLGOSQ-DhQChnCg.js +62 -0
  147. package/dist/chunks/cytoscape.esm-wDUnleWx.js +339 -0
  148. package/dist/chunks/dagre-GXQ25YYZ-CfbwC_a5.js +4 -0
  149. package/dist/chunks/dagre-ZVAWSfFw.js +1 -0
  150. package/dist/chunks/data-B05HzECj.js +28 -0
  151. package/dist/chunks/date-picker-CPUxgHVv.js +1 -0
  152. package/dist/chunks/defaultLocale-BvxIcb9Y.js +1 -0
  153. package/dist/chunks/deleteAction-CCocr5uV.js +1 -0
  154. package/dist/chunks/diagram-D9cwc7QH.js +5 -0
  155. package/dist/chunks/diagram-S7CK7UJ4-DVPbdtMm.js +30 -0
  156. package/dist/chunks/diagram-UQ7AKVKN-D_ZBhGLL.js +41 -0
  157. package/dist/chunks/diagram-VSXAHHWV-Dqypp-OX.js +3 -0
  158. package/dist/chunks/diagram-VX7I27RA-CbWJVJ_L.js +24 -0
  159. package/dist/chunks/diagram-Z3DM3KII-CUyP4-RY.js +24 -0
  160. package/dist/chunks/direct-engine-thps0u7R.js +5 -0
  161. package/dist/chunks/dist-Bauqz5on.js +1 -0
  162. package/dist/chunks/dist-CWj_XYki.js +1 -0
  163. package/dist/chunks/dist-D_KGQS7-.js +11 -0
  164. package/dist/chunks/dist-DdW4yNBK.js +1 -0
  165. package/dist/chunks/docx-preview-CPN81HCr.js +11 -0
  166. package/dist/chunks/download--5IybXxz.js +8 -0
  167. package/dist/chunks/drawing-D2Qrun-P.js +48 -0
  168. package/dist/chunks/ebnfDiagram-PWID7BFC-C5NMigjm.js +1 -0
  169. package/dist/chunks/ellipsis-Dux1Nxa5.js +8 -0
  170. package/dist/chunks/email-ByshRsFv.js +61 -0
  171. package/dist/chunks/emailHtml-BAKcRhSm.js +1 -0
  172. package/dist/chunks/erDiagram-RLTQ6QDP-B5rUHJPJ.js +99 -0
  173. package/dist/chunks/eventmodeling-NTZA5JFV-C74no5BH.js +1 -0
  174. package/dist/chunks/export-BkwewH6Q.js +1 -0
  175. package/dist/chunks/export-DlTz5dc2.js +341 -0
  176. package/dist/chunks/eye-off-BtJoIT5n.js +8 -0
  177. package/dist/chunks/feedback-BnjMKZpz.js +1 -0
  178. package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
  179. package/dist/chunks/fit-CsnhEncA.js +1 -0
  180. package/dist/chunks/flowDiagram-HODETNUW-BuMvaSeo.js +1 -0
  181. package/dist/chunks/form-CQutQFiD.js +1 -0
  182. package/dist/chunks/funnel-BwQjQI4Y.js +8 -0
  183. package/dist/chunks/ganttDiagram-EL5Y4UJY-DIAlbvVg.js +292 -0
  184. package/dist/chunks/geo-DR0fL7r2.js +38 -0
  185. package/dist/chunks/gitGraph-4MIJSDKK-Ce5mOfp1.js +1 -0
  186. package/dist/chunks/gitGraphDiagram-WWUBYQGX-DN3G9xiQ.js +106 -0
  187. package/dist/chunks/graphlib-CYBMTUbW.js +1 -0
  188. package/dist/chunks/icons-CbRx5Om7.js +1 -0
  189. package/dist/chunks/illustrations-DT1eq6jI.js +1 -0
  190. package/dist/chunks/image-ez9hvzKT.js +17 -0
  191. package/dist/chunks/index.es-OAWlVkoK.js +16 -0
  192. package/dist/chunks/info-A6RAGUB7-BP6lMBIR.js +1 -0
  193. package/dist/chunks/info-BQa8C31Y.js +8 -0
  194. package/dist/chunks/infoDiagram-27XIBGKW-BhQtr_Ti.js +2 -0
  195. package/dist/chunks/init-Ca_Ibf4y.js +1 -0
  196. package/dist/chunks/ishikawaDiagram-5VMMS53U-CLR6CAi4.js +70 -0
  197. package/dist/chunks/journeyDiagram-3NMN7TZE-_-Q7sjsP.js +139 -0
  198. package/dist/chunks/json-viewer-DHYRjY8I.js +1 -0
  199. package/dist/chunks/jszip.min-hNOoGCeG.js +14 -0
  200. package/dist/chunks/kanban-definition-UXKFOSKX-D97mHeUZ.js +89 -0
  201. package/dist/chunks/katex-D5qu7EYh.js +257 -0
  202. package/dist/chunks/layout-grid-Bp9bwiQZ.js +8 -0
  203. package/dist/chunks/lib-BlRm3nk1.js +15 -0
  204. package/dist/chunks/lib-C1nFUu19.js +4 -0
  205. package/dist/chunks/lib-CqYXBtHb.js +1 -0
  206. package/dist/chunks/libarchive-DRzzJvQl.js +7 -0
  207. package/dist/chunks/line-BV7qVRkM.js +1 -0
  208. package/dist/chunks/line-qVHaOdPp.js +1 -0
  209. package/dist/chunks/linear-DXABSWHW.js +1 -0
  210. package/dist/chunks/list-0CbyOlT9.js +1 -0
  211. package/dist/chunks/list-DCcWnjUg.js +8 -0
  212. package/dist/chunks/listTableProps-DDynsnLF.js +1 -0
  213. package/dist/chunks/log-in-OzbNes8i.js +8 -0
  214. package/dist/chunks/lucide-react-VfAPsQQ5.js +8 -0
  215. package/dist/chunks/maplibre-gl-Bxi83GUP.js +819 -0
  216. package/dist/chunks/maplibre-shared-Oo0L8Lll.js +6 -0
  217. package/dist/chunks/maximize-CnmQ11E7.js +8 -0
  218. package/dist/chunks/media-DoGe_p4O.js +1 -0
  219. package/dist/chunks/menu-mQgsexFx.js +15 -0
  220. package/dist/chunks/mermaid-parser.core-DvCAQkzY.js +3 -0
  221. package/dist/chunks/mermaid.core-CxOC6yPr.js +15 -0
  222. package/dist/chunks/messages-CFyOVxEM.js +1 -0
  223. package/dist/chunks/mindmap-definition-YA3MSWOX-A2UgnMwx.js +96 -0
  224. package/dist/chunks/minimize-Bpau_zCe.js +8 -0
  225. package/dist/chunks/msg-BzZbudMm.js +7 -0
  226. package/dist/chunks/ofd-C7DKqJ6Z.js +33 -0
  227. package/dist/chunks/ofd-DrJyXIpS.js +14 -0
  228. package/dist/chunks/openDocument-DGzqlyJg.js +12 -0
  229. package/dist/chunks/options-B65xkxOY.js +1 -0
  230. package/dist/chunks/ordinal-NuFkISw7.js +1 -0
  231. package/dist/chunks/packet-AYTQ26CC-DS6h3a5l.js +1 -0
  232. package/dist/chunks/panzoom.es-DnuzxUQi.js +1 -0
  233. package/dist/chunks/parse-6ZQGx714.js +1 -0
  234. package/dist/chunks/parser-DC3PvpL4.js +72 -0
  235. package/dist/chunks/path-VUNELGFR.js +1 -0
  236. package/dist/chunks/pegDiagram-XKGWAZYB-DxQqpKfh.js +1 -0
  237. package/dist/chunks/pie-WAS4IAKB-BsaegmNA.js +1 -0
  238. package/dist/chunks/pieDiagram-E7YTZNPT-BUsnkTkJ.js +39 -0
  239. package/dist/chunks/postal-mime-DMcA5b7k.js +28 -0
  240. package/dist/chunks/ppt-B0WY5Gks.js +30 -0
  241. package/dist/chunks/ppt-BIiNnCyj.js +1 -0
  242. package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
  243. package/dist/chunks/preload-helper-C-73SErw.js +1 -0
  244. package/dist/chunks/print-mask-Dguzv0rv.js +17 -0
  245. package/dist/chunks/printLayout-oeudvFkr.js +34 -0
  246. package/dist/chunks/printMask-LefOTJqk.js +8 -0
  247. package/dist/chunks/psd-hjeNFQZ-.js +36 -0
  248. package/dist/chunks/purify.es-BsWMI_aG.js +5 -0
  249. package/dist/chunks/quadrantDiagram-AXDQQJYC-BmQNSzhY.js +7 -0
  250. package/dist/chunks/radar-RG4KPBEZ-BoHdw2h7.js +1 -0
  251. package/dist/chunks/railroad-74A4TZTK-BifJffb4.js +1 -0
  252. package/dist/chunks/railroad-abnf-HS5TGJTU-CMEPumRO.js +1 -0
  253. package/dist/chunks/railroad-ebnf-LZEXJU2U-B06BgAeN.js +1 -0
  254. package/dist/chunks/railroad-peg-WCYAUIDC-CMjriUEs.js +1 -0
  255. package/dist/chunks/railroadDiagram-O6MQD6OU-B2t5KY26.js +1 -0
  256. package/dist/chunks/react-runtime-x2lFbSKq.js +11 -0
  257. package/dist/chunks/refresh-cw-Dz8O9-Hp.js +8 -0
  258. package/dist/chunks/rendered-slot-YhfmcMJr.js +1 -0
  259. package/dist/chunks/requirementDiagram-BXWQKSXE-CBBfNOAp.js +84 -0
  260. package/dist/chunks/rolldown-runtime-BKuNeK48.js +1 -0
  261. package/dist/chunks/rotate-ccw-D2__Zisi.js +8 -0
  262. package/dist/chunks/rotate-cw-BSTVLlWY.js +8 -0
  263. package/dist/chunks/rough.esm-CVrpq1dW.js +1 -0
  264. package/dist/chunks/sankeyDiagram-P5KCCOFB-Cp8SrFyb.js +40 -0
  265. package/dist/chunks/save-w-NwiMMY.js +8 -0
  266. package/dist/chunks/search-DYZU68h1.js +8 -0
  267. package/dist/chunks/search-filters-CRIhZ0gL.js +1 -0
  268. package/dist/chunks/sequenceDiagram-WJ2MYXX4-PDtVfEoj.js +162 -0
  269. package/dist/chunks/shield-alert-De_Hx56I.js +8 -0
  270. package/dist/chunks/sizeCapture-INFHLROL-DA-kAaXB.js +1 -0
  271. package/dist/chunks/skeleton-CrjMjJNr.js +1 -0
  272. package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
  273. package/dist/chunks/spreadsheet-LR3SOG-x.js +58 -0
  274. package/dist/chunks/sql-wasm-browser-CFddXd9f.js +2 -0
  275. package/dist/chunks/src-C1iDJpBK.js +1 -0
  276. package/dist/chunks/src-vLpLkuQx.js +1 -0
  277. package/dist/chunks/stateDiagram-D77RDMKH-C1Sx8KUD.js +1 -0
  278. package/dist/chunks/stateDiagram-v2-MP3YSRHH-7wYLSzBX.js +1 -0
  279. package/dist/chunks/swimlanes-42K2YHIH-BmybX9eL.js +1 -0
  280. package/dist/chunks/swimlanesDiagram-VR7AAH4N-DxhXklfm.js +8 -0
  281. package/dist/chunks/tabs-BobA_IcO.js +1 -0
  282. package/dist/chunks/theme-controller-D-ATwFal.js +1 -0
  283. package/dist/chunks/timeline-definition-24CTP7MA-QS9QNm2i.js +120 -0
  284. package/dist/chunks/tinycolor-CG1wnM-U.js +1 -0
  285. package/dist/chunks/togeojson.es-BE8iM7U6.js +1 -0
  286. package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
  287. package/dist/chunks/trash-tHBT8Mpw.js +8 -0
  288. package/dist/chunks/treeView-Q6P3EWNA-CN0l7whJ.js +1 -0
  289. package/dist/chunks/treemap-WGGIJYW6-C4P1fQxS.js +1 -0
  290. package/dist/chunks/typography-DKK_iHcj.js +1 -0
  291. package/dist/chunks/ui-BFsHoY7a.js +1 -0
  292. package/dist/chunks/ui-utils-ClxYogUQ.js +1 -0
  293. package/dist/chunks/upload-M-n6woFv.js +8 -0
  294. package/dist/chunks/useCrudOperationColumn-D935tixd.js +1 -0
  295. package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
  296. package/dist/chunks/useModalViewport-HF7te75S.js +1 -0
  297. package/dist/chunks/useRowSelection-4GOMFmjG.js +1 -0
  298. package/dist/chunks/useStatusToggle-B2qZaoc-.js +1 -0
  299. package/dist/chunks/user-round-kYfBkPNu.js +15 -0
  300. package/dist/chunks/users-BXZLb4TY.js +8 -0
  301. package/dist/chunks/vennDiagram-4TSXK5OY-CVd73ycc.js +34 -0
  302. package/dist/chunks/view-B8ZvC8z3.js +1 -0
  303. package/dist/chunks/viewer-Ct88ypIL.js +24 -0
  304. package/dist/chunks/wardley-WFR3VGLG-cG9pRFwD.js +1 -0
  305. package/dist/chunks/wardleyDiagram-VM6X3IG4-B42d0Gqz.js +78 -0
  306. package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
  307. package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
  308. package/dist/chunks/wordMl-Y_ghyTZ8.js +1 -0
  309. package/dist/chunks/worker-engine-B4e92GsN.js +17369 -0
  310. package/dist/chunks/x-Ak9hw1R9.js +8 -0
  311. package/dist/chunks/xmind-CF9YwkOD.js +58 -0
  312. package/dist/chunks/xychartDiagram-S5SC5T6Z-B_Owv9Ho.js +7 -0
  313. package/dist/file-viewer/flyfish-viewer-assets.json +46 -0
  314. package/dist/file-viewer/vendor/docx/docx.worker.js +5 -0
  315. package/dist/file-viewer/vendor/docx/jszip.min.js +13 -0
  316. package/dist/file-viewer/vendor/xlsx/sheet.worker.js +107 -0
  317. package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
  318. package/dist/index.d.ts +5 -0
  319. package/dist/index.js +1 -0
  320. package/dist/public/avatars/avatar-01.svg +1 -0
  321. package/dist/public/avatars/avatar-02.svg +1 -0
  322. package/dist/public/avatars/avatar-03.svg +1 -0
  323. package/dist/public/avatars/avatar-04.svg +1 -0
  324. package/dist/public/avatars/avatar-05.svg +1 -0
  325. package/dist/public/avatars/avatar-06.svg +1 -0
  326. package/dist/public/avatars/avatar-07.svg +1 -0
  327. package/dist/public/avatars/avatar-08.svg +1 -0
  328. package/dist/public/avatars/avatar-09.svg +1 -0
  329. package/dist/public/avatars/avatar-10.svg +1 -0
  330. package/dist/public/avatars/avatar-11.svg +1 -0
  331. package/dist/public/avatars/avatar-12.svg +1 -0
  332. package/dist/public/monaco/vs/abap-D-t0cyap.js +1 -0
  333. package/dist/public/monaco/vs/apex-CcIm7xu6.js +1 -0
  334. package/dist/public/monaco/vs/assets/css.worker-URu8fCFR.js +97 -0
  335. package/dist/public/monaco/vs/assets/editor.worker-lj3bdIIn.js +30 -0
  336. package/dist/public/monaco/vs/assets/editorWebWorkerMain-CA_vMoUU.js +30 -0
  337. package/dist/public/monaco/vs/assets/html.worker-D1SL3iM8.js +474 -0
  338. package/dist/public/monaco/vs/assets/json.worker-CoJx_OPf.js +62 -0
  339. package/dist/public/monaco/vs/assets/ts.worker-BWKtMYOk.js +67722 -0
  340. package/dist/public/monaco/vs/azcli-BA0tQDCg.js +1 -0
  341. package/dist/public/monaco/vs/basic-languages/monaco.contribution.js +1 -0
  342. package/dist/public/monaco/vs/bat-C397hTD6.js +1 -0
  343. package/dist/public/monaco/vs/bicep-DF5aW17k.js +2 -0
  344. package/dist/public/monaco/vs/cameligo-plsz8qhj.js +1 -0
  345. package/dist/public/monaco/vs/clojure-Y2auQMzK.js +1 -0
  346. package/dist/public/monaco/vs/coffee-Bu45yuWE.js +1 -0
  347. package/dist/public/monaco/vs/cpp-CkKPQIni.js +1 -0
  348. package/dist/public/monaco/vs/csharp-CX28MZyh.js +1 -0
  349. package/dist/public/monaco/vs/csp-D8uWnyxW.js +1 -0
  350. package/dist/public/monaco/vs/css-CaeNmE3S.js +3 -0
  351. package/dist/public/monaco/vs/css.worker-CyhWkhHo.js +1 -0
  352. package/dist/public/monaco/vs/cssMode-CV6Ay48H.js +1 -0
  353. package/dist/public/monaco/vs/cypher-DVThT8BS.js +1 -0
  354. package/dist/public/monaco/vs/dart-CmGfCvrO.js +1 -0
  355. package/dist/public/monaco/vs/dockerfile-CZqqYdch.js +1 -0
  356. package/dist/public/monaco/vs/ecl-30fUercY.js +1 -0
  357. package/dist/public/monaco/vs/editor/editor.main.css +1 -0
  358. package/dist/public/monaco/vs/editor/editor.main.js +1 -0
  359. package/dist/public/monaco/vs/editor-KLE6jdfb.js +831 -0
  360. package/dist/public/monaco/vs/editor.js +1 -0
  361. package/dist/public/monaco/vs/editorWorkerHost-fVE1cjcC.js +35 -0
  362. package/dist/public/monaco/vs/elixir-xjPaIfzF.js +1 -0
  363. package/dist/public/monaco/vs/flow9-DqtmStfK.js +1 -0
  364. package/dist/public/monaco/vs/freemarker2-FWreY7v7.js +3 -0
  365. package/dist/public/monaco/vs/fsharp-BOMdg4U1.js +1 -0
  366. package/dist/public/monaco/vs/go-D_hbi-Jt.js +1 -0
  367. package/dist/public/monaco/vs/graphql-CKUU4kLG.js +1 -0
  368. package/dist/public/monaco/vs/handlebars-CZi4pHCH.js +1 -0
  369. package/dist/public/monaco/vs/hcl-DTaboeZW.js +1 -0
  370. package/dist/public/monaco/vs/html-j_7ZTNRU.js +1 -0
  371. package/dist/public/monaco/vs/html.worker-CA3iAimZ.js +1 -0
  372. package/dist/public/monaco/vs/htmlMode-27by_KM4.js +1 -0
  373. package/dist/public/monaco/vs/index-049xrXrp.js +1 -0
  374. package/dist/public/monaco/vs/index-CBVt3dzv.js +5 -0
  375. package/dist/public/monaco/vs/index.js +1 -0
  376. package/dist/public/monaco/vs/ini-CsNwO04R.js +1 -0
  377. package/dist/public/monaco/vs/initialize-DL0l1TGY.js +1 -0
  378. package/dist/public/monaco/vs/java-CI4ZMsH9.js +1 -0
  379. package/dist/public/monaco/vs/javascript-DTJl4Jn1.js +1 -0
  380. package/dist/public/monaco/vs/json.worker-BizpAl9O.js +1 -0
  381. package/dist/public/monaco/vs/jsonMode-DLUiMUrI.js +1 -0
  382. package/dist/public/monaco/vs/julia-BwzEvaQw.js +1 -0
  383. package/dist/public/monaco/vs/kotlin-IUYPiTV8.js +1 -0
  384. package/dist/public/monaco/vs/language/css/monaco.contribution.js +1 -0
  385. package/dist/public/monaco/vs/language/html/monaco.contribution.js +1 -0
  386. package/dist/public/monaco/vs/language/json/monaco.contribution.js +1 -0
  387. package/dist/public/monaco/vs/language/typescript/monaco.contribution.js +1 -0
  388. package/dist/public/monaco/vs/less-C0eDYdqa.js +2 -0
  389. package/dist/public/monaco/vs/lexon-iON-Kj97.js +1 -0
  390. package/dist/public/monaco/vs/liquid-CLJYelW6.js +1 -0
  391. package/dist/public/monaco/vs/loader.js +1368 -0
  392. package/dist/public/monaco/vs/lspLanguageFeatures-BIkJOWLw.js +2 -0
  393. package/dist/public/monaco/vs/lua-DtygF91M.js +1 -0
  394. package/dist/public/monaco/vs/m3-CsR4AuFi.js +1 -0
  395. package/dist/public/monaco/vs/main-BEx-Fmlo.js +15 -0
  396. package/dist/public/monaco/vs/main-DsK8pnKg.js +3 -0
  397. package/dist/public/monaco/vs/markdown-C_rD0bIw.js +1 -0
  398. package/dist/public/monaco/vs/mdx-CpzZIPHF.js +1 -0
  399. package/dist/public/monaco/vs/mips-CiYP61RB.js +1 -0
  400. package/dist/public/monaco/vs/monaco.contribution-9cKT3C7t.js +1 -0
  401. package/dist/public/monaco/vs/monaco.contribution-BE88ZNGY.js +1 -0
  402. package/dist/public/monaco/vs/monaco.contribution-BPhsneLd.js +1 -0
  403. package/dist/public/monaco/vs/monaco.contribution-BgRy6xDf.js +1 -0
  404. package/dist/public/monaco/vs/msdax-C38-sJlp.js +1 -0
  405. package/dist/public/monaco/vs/mysql-CdtbpvbG.js +1 -0
  406. package/dist/public/monaco/vs/nls/lang/cs.d.ts +1 -0
  407. package/dist/public/monaco/vs/nls/lang/cs.js +9 -0
  408. package/dist/public/monaco/vs/nls/lang/de.d.ts +1 -0
  409. package/dist/public/monaco/vs/nls/lang/de.js +9 -0
  410. package/dist/public/monaco/vs/nls/lang/es.d.ts +1 -0
  411. package/dist/public/monaco/vs/nls/lang/es.js +9 -0
  412. package/dist/public/monaco/vs/nls/lang/fr.d.ts +1 -0
  413. package/dist/public/monaco/vs/nls/lang/fr.js +9 -0
  414. package/dist/public/monaco/vs/nls/lang/it.d.ts +1 -0
  415. package/dist/public/monaco/vs/nls/lang/it.js +9 -0
  416. package/dist/public/monaco/vs/nls/lang/ja.d.ts +1 -0
  417. package/dist/public/monaco/vs/nls/lang/ja.js +9 -0
  418. package/dist/public/monaco/vs/nls/lang/ko.d.ts +1 -0
  419. package/dist/public/monaco/vs/nls/lang/ko.js +9 -0
  420. package/dist/public/monaco/vs/nls/lang/pl.d.ts +1 -0
  421. package/dist/public/monaco/vs/nls/lang/pl.js +9 -0
  422. package/dist/public/monaco/vs/nls/lang/pt-br.d.ts +1 -0
  423. package/dist/public/monaco/vs/nls/lang/pt-br.js +9 -0
  424. package/dist/public/monaco/vs/nls/lang/ru.d.ts +1 -0
  425. package/dist/public/monaco/vs/nls/lang/ru.js +9 -0
  426. package/dist/public/monaco/vs/nls/lang/tr.d.ts +1 -0
  427. package/dist/public/monaco/vs/nls/lang/tr.js +9 -0
  428. package/dist/public/monaco/vs/nls/lang/zh-cn.d.ts +1 -0
  429. package/dist/public/monaco/vs/nls/lang/zh-cn.js +9 -0
  430. package/dist/public/monaco/vs/nls/lang/zh-tw.d.ts +1 -0
  431. package/dist/public/monaco/vs/nls/lang/zh-tw.js +9 -0
  432. package/dist/public/monaco/vs/nls.messages-loader.js +1 -0
  433. package/dist/public/monaco/vs/objective-c-CntZFaHX.js +1 -0
  434. package/dist/public/monaco/vs/pascal-r6kuqfl_.js +1 -0
  435. package/dist/public/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
  436. package/dist/public/monaco/vs/perl-DABw_TcH.js +1 -0
  437. package/dist/public/monaco/vs/pgsql-me_jFXeX.js +1 -0
  438. package/dist/public/monaco/vs/php-D_kh-9LK.js +1 -0
  439. package/dist/public/monaco/vs/pla-VfZjczW0.js +1 -0
  440. package/dist/public/monaco/vs/postiats-BBSzz8Pk.js +1 -0
  441. package/dist/public/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
  442. package/dist/public/monaco/vs/powershell-B-7ap1zc.js +1 -0
  443. package/dist/public/monaco/vs/protobuf-BmtuEB1A.js +2 -0
  444. package/dist/public/monaco/vs/pug-BRpRNeEb.js +1 -0
  445. package/dist/public/monaco/vs/python-CqWUUgfu.js +1 -0
  446. package/dist/public/monaco/vs/qsharp-BzsFaUU9.js +1 -0
  447. package/dist/public/monaco/vs/r-f8dDdrp4.js +1 -0
  448. package/dist/public/monaco/vs/razor-hok5y9Km.js +1 -0
  449. package/dist/public/monaco/vs/redis-fvZQY4PI.js +1 -0
  450. package/dist/public/monaco/vs/redshift-45Et0LQi.js +1 -0
  451. package/dist/public/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
  452. package/dist/public/monaco/vs/ruby-CZO8zYTz.js +1 -0
  453. package/dist/public/monaco/vs/rust-Bfetafyc.js +1 -0
  454. package/dist/public/monaco/vs/sb-3GYllVck.js +1 -0
  455. package/dist/public/monaco/vs/scala-foMgrKo1.js +1 -0
  456. package/dist/public/monaco/vs/scheme-CHdMtr7p.js +1 -0
  457. package/dist/public/monaco/vs/scss-C1cmLt9V.js +3 -0
  458. package/dist/public/monaco/vs/shell-ClXCKCEW.js +1 -0
  459. package/dist/public/monaco/vs/solidity-MZ6ExpPy.js +1 -0
  460. package/dist/public/monaco/vs/sophia-DWkuSsPQ.js +1 -0
  461. package/dist/public/monaco/vs/sparql-AUGFYSyk.js +1 -0
  462. package/dist/public/monaco/vs/sql-32GpJSV2.js +1 -0
  463. package/dist/public/monaco/vs/st-CuDFIVZ_.js +1 -0
  464. package/dist/public/monaco/vs/swift-t-PfMj7W.js +1 -0
  465. package/dist/public/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
  466. package/dist/public/monaco/vs/tcl-D74tq1nH.js +1 -0
  467. package/dist/public/monaco/vs/toggleHighContrast-qGX7E9o7.js +61 -0
  468. package/dist/public/monaco/vs/ts.worker-2QLmBukE.js +1 -0
  469. package/dist/public/monaco/vs/tsMode-B0S_kp2q.js +11 -0
  470. package/dist/public/monaco/vs/twig-C6taOxMV.js +1 -0
  471. package/dist/public/monaco/vs/typescript-_2t_511t.js +1 -0
  472. package/dist/public/monaco/vs/typespec-8OfoLt6R.js +1 -0
  473. package/dist/public/monaco/vs/vb-Dyb2648j.js +1 -0
  474. package/dist/public/monaco/vs/wgsl-BhLXMOR0.js +298 -0
  475. package/dist/public/monaco/vs/workers-BBttULjf.js +1 -0
  476. package/dist/public/monaco/vs/xml-cZjNDqDT.js +1 -0
  477. package/dist/public/monaco/vs/yaml-A1fOIdH6.js +1 -0
  478. package/dist/src-LbWcrSWe.js +3 -0
  479. package/dist/styles.css +2 -0
  480. package/dist/styles.d.ts +1 -0
  481. package/dist/types.d.ts +1 -0
  482. package/package.json +113 -4
@@ -0,0 +1,8 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./createLucideIcon-BtwfYE6A.js";var r,i;function a(){return(a=e((()=>{
2
+ /**
3
+ * @license lucide-react v1.53.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ t(),r={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]},r.node,i=n(r)})))()}export{a as n,i as t};
@@ -0,0 +1,15 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./createLucideIcon-BtwfYE6A.js";var r,i;function a(){return(a=e((()=>{
2
+ /**
3
+ * @license lucide-react v1.53.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ t(),r={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]},r.node,i=n(r)})))()}var o,s;function c(){return(c=e((()=>{
9
+ /**
10
+ * @license lucide-react v1.53.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ t(),o={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]},o.node,s=n(o)})))()}export{a as i,c as n,i as r,s as t};
@@ -0,0 +1,15 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./createLucideIcon-BtwfYE6A.js";var r,i;function a(){return(a=e((()=>{
2
+ /**
3
+ * @license lucide-react v1.53.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ t(),r={name:`chevrons-down-up`,size:24,node:[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]},r.node,i=n(r)})))()}var o,s;function c(){return(c=e((()=>{
9
+ /**
10
+ * @license lucide-react v1.53.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ t(),o={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]},o.node,s=n(o)})))()}export{a as i,c as n,i as r,s as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./preload-helper-C-73SErw.js";import{n as r,r as i}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as a,w as o}from"./src-C1iDJpBK.js";import{b as s,j as c,x as l}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{_ as u,d}from"./chunk-75Z2AOVW-IO9R6faP.js";import{o as f,r as p}from"./chunk-4HAMMTFA-Aw59LwS3.js";import{a as m,i as ee,n as te,r as ne,t as re}from"./chunk-GVQU2GXP-CVzgM_ui.js";import{a as ie,c as ae,i as oe,n as h,o as g,r as _,t as se,u as v}from"./chunk-OSK3NFVY-C9uWOXTC.js";import{n as y,t as ce}from"./graphlib-CYBMTUbW.js";import{n as le,r as ue,t as de}from"./chunk-L3NEJ4N5-CmvrS7Dt.js";function b(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}async function x(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await f(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}async function S(e,t,n){let r=await ee(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}async function C(e,t){let r=new y({multigraph:!0,compound:!0}),i=[...t.edges],a=l(),o=b(e),{edgeLabels:s,nodes:c}=o,u=/* @__PURE__ */ new Map,d=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)d&&await x(c,e),r.setNode(e.id,{...e});else{if(d){let t=await S(c,e,{config:a,dir:e.dir});u.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of i)d&&_(e)&&await g(s,e),r.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await n(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-DA-kAaXB.js`);return{captureNodeSizes:e}},[],import.meta.url);r(e,t)}return{graph:r,groups:o,nodeElements:u}}function w({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:i,afterPaint:a,paintOptions:o}){let s=t??E;return/* @__PURE__ */ r(async function(t,r,c,l){let u=r.select(`g`);(c?.insertMarkers??ae)(u,t.markers,t.type,t.diagramId),T();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await n(t,d),m={...d,measure:f};i?await i(t,m,p):await D(t,m,o),await a?.(t,m,p)},`render`)}function T(){re(),se(),de(),z()}async function E(e,{element:t}){return await C(t,e)}async function D(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await O(i,r,t,n);let a=A(e.nodes);for(let r of e.edges)j(r,n)||await M(i,r,a,e,n,t)}async function O(e,t,n,r){t.clusterNode?m(t):k(t,n,r)?await ue(e.clusters,t):m(t)}function k(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}function A(e){let t=/* @__PURE__ */ new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}function j(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function M(e,t,n,r,i,a){let o=ie(e.edgePaths,{...t},i.clusterDb??/* @__PURE__ */ new Map,r.type,N(t.start,t,n,a,i),N(t.end,t,n,a,i),r.diagramId,P(t,i));_(t)&&(h.has(t.id)||await g(e.edgeLabels,t),F(t,o))}function N(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}function P(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}function F(e,t){let n=t?.updatedPath??t?.originalPath,r=s(),{subGraphTitleTotalMargin:i}=te({flowchart:r.flowchart??{}});if(e.label){let r=h.get(e.id),a=e.x,s=e.y;if(n){let r=u.calcLabelPosition(n);o.debug(`Moving label `+e.label+` from (`,a,`,`,s,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(a=r.x,s=r.y)}r.attr(`transform`,`translate(${a}, ${s+i/2})`)}if(e?.startLabelLeft){let t=v.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=u.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=v.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=u.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=v.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=u.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=v.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=u.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}var I,L,R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q;function $(){return($=e((()=>{le(),oe(),ne(),p(),d(),c(),a(),i(),ce(),t(),r(b,`createLayoutElementGroups`),r(x,`measureGroupLabel`),r(S,`insertMeasuredNode`),r(C,`createGraphWithElements`),I=/* @__PURE__ */ new Map,L=/* @__PURE__ */ new Map,R=/* @__PURE__ */ new Map,z=/* @__PURE__ */ r(()=>{L.clear(),R.clear(),I.clear()},`clear`),B=/* @__PURE__ */ r((e,t)=>{let n=L.get(t)||[];return o.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),V=/* @__PURE__ */ r((e,t)=>{let n=L.get(t)||[];return o.info(`Descendants of `,t,` is `,n),o.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||B(e.v,t)||B(e.w,t)||n.includes(e.w):(o.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),H=/* @__PURE__ */ r((e,t,n,r)=>{o.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),o.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)H(i,t,n,r);else{let a=t.node(i);o.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(o.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(o.debug(`Setting parent`,i,e),n.setParent(i,e)):(o.info(`In copy `,e,`root`,r,`data`,t.node(e),r),o.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let s=t.edges(i);o.debug(`Copying Edges`,s),s.forEach(i=>{o.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);o.info(`Edge data`,a,r);try{V(i,r)?(o.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),o.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):o.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){o.error(e)}})}o.debug(`Removing node`,i),t.removeNode(i)})},`copy`),U=/* @__PURE__ */ r((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)R.set(i,e),r=[...r,...U(i,t)];return r},`extractDescendants`),W=/* @__PURE__ */ r((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),G=/* @__PURE__ */ r((e,t,n)=>{let r=t.children(e);if(o.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=G(e,t,n),a=W(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),K=/* @__PURE__ */ r(e=>!I.has(e)||!I.get(e).externalConnections?e:I.has(e)?I.get(e).id:e,`getAnchorId`),q=/* @__PURE__ */ r((e,t)=>{if(!e||t>10)o.debug(`Opting out, no graph `);else{o.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug(`Cluster identified`,t,` Replacement id in edges: `,G(t,e,t)),L.set(t,U(t,e)),I.set(t,{id:G(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(o.debug(`Cluster identified`,t,L),r.forEach(e=>{B(e.v,t)^B(e.w,t)&&(o.debug(`Edge: `,e,` leaves cluster `,t),o.debug(`Descendants of XXX `,t,`: `,L.get(t)),I.get(t).externalConnections=!0)})):o.debug(`Not a cluster `,t,L)});for(let t of I.keys()){let n=I.get(t).id,r=e.parent(n);r!==t&&I.has(r)&&!I.get(r).externalConnections&&(I.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&I.get(t)?.externalConnections&&i&&Z(e,n,t)){let r=Q(e,t,e.parent(n));r&&(I.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);o.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),o.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(o.debug(`Fix XXX`,I,`ids:`,t.v,t.w,`Translating: `,I.get(t.v),` --- `,I.get(t.w)),I.get(t.v)||I.get(t.w)){if(o.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=K(t.v),i=K(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);I.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);I.get(r).externalConnections=!0,n.toCluster=t.w}o.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),J(e,0),o.trace(I)}},`adjustClustersAndEdges`),J=/* @__PURE__ */ r((e,t)=>{if(t>10){o.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r)o.debug(`Done, no node has children`,e.nodes());else{o.debug(`Nodes = `,n,t);for(let r of n)if(o.debug(`Extracting node`,r,I,I.has(r)&&!I.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!I.has(r))o.debug(`Not a cluster`,r,t);else if(!I.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){o.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;I.get(r)?.clusterData?.dir&&(n=I.get(r).clusterData.dir,o.debug(`Fixing dir`,I.get(r).clusterData.dir,n));let i=new y({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});H(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:I.get(r).clusterData,label:I.get(r).label,graph:i})}else o.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!I.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),o.debug(I);n=e.nodes(),o.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);o.debug(` Now next level`,r,n),n?.clusterNode&&J(n.graph,t+1)}}},`extractor`),Y=/* @__PURE__ */ r((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=Y(e,e.children(t));n=[...n,...r]}),n},`sorter`),X=/* @__PURE__ */ r(e=>Y(e,e.children()),`sortNodesByHierarchy`),Z=/* @__PURE__ */ r((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=I.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),Q=/* @__PURE__ */ r((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||B(i,n))continue;let r=G(i,e,t);if(r&&!Z(e,r,t))return r}return null},`findSafeAnchorNode`),r(w,`createCommonLayoutRenderer`),r(T,`clearLayoutRenderState`),r(E,`defaultMeasureLayout`),r(D,`paintLayoutData`),r(O,`paintLayoutNode`),r(k,`shouldPaintAsCluster`),r(A,`buildNodeLookup`),r(j,`shouldSkipPaintEdge`),r(M,`paintLayoutEdge`),r(N,`getRenderedNode`),r(P,`shouldSkipIntersect`),r(F,`positionRenderedEdgeLabel`)})))()}export{b as a,$ as c,X as d,w as i,S as l,T as n,E as o,I as r,G as s,q as t,D as u};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";var r;function i(){return(i=e((()=>{n(),r=class{constructor(e){this.init=e,this.records=this.init()}static{t(this,`ImperativeState`)}reset(){this.records=this.init()}}})))()}export{i as n,r as t};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,h as i,n as a,o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e=o){let a=r(t(e),c),s=r(n({shared:a}),i,h);return a.ServiceRegistry.register(s),{shared:a,RailroadEbnf:s}}var f,p,m,h;function g(){return(g=e((()=>{l(),f=class extends s{static{u(this,`RailroadEbnfTokenBuilder`)}constructor(){super([`railroad-ebnf-beta`])}},p=/* @__PURE__ */ u(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`
2
+ `;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}}else n+=r}return n},`decodeEscapedString`),m=class extends a{static{u(this,`RailroadEbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return p(e)}return r}runCustomConverter(e,t,n){if(e.name===`EBNF_STRING`)return p(t);if(e.name===`EBNF_SPECIAL_SEQUENCE`)return t.slice(1,-1).trim()}},h={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new f,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new m,`ValueConverter`)}},u(d,`createRailroadEbnfServices`)})))()}export{d as n,g as r,h as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,f as i,n as a,o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e=o){let a=r(t(e),c),s=r(n({shared:a}),i,m);return a.ServiceRegistry.register(s),{shared:a,Pie:s}}var f,p,m;function h(){return(h=e((()=>{l(),f=class extends s{static{u(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},p=class extends a{static{u(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},m={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new f,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new p,`ValueConverter`)}},u(d,`createPieServices`)})))()}export{d as n,h as r,m as t};
@@ -0,0 +1,62 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as r,S as i,t as a,w as o}from"./src-C1iDJpBK.js";import{A as s,B as c,N as l,T as u,V as d,b as f,f as p,g as m,j as h,x as g}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{a as _,d as v,m as y,r as b,u as x}from"./chunk-75Z2AOVW-IO9R6faP.js";import{n as S,t as C}from"./chunk-PWAF6VOD-IORmPx9D.js";import{i as w,n as T,r as E}from"./chunk-GMAD6QVW-D41KnniX.js";import{a as D,i as O,n as k,o as A,t as j}from"./chunk-P2QGCYS3-C9bc1yiM.js";import{n as M,t as N}from"./rough.esm-CVrpq1dW.js";async function P(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!F(e);await Promise.all([...n].map(e=>new Promise(n=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let t=g().fontSize?g().fontSize:window.getComputedStyle(document.body).fontSize,[n=p.fontSize]=y(t),r=n*5+`px`;e.style.minWidth=r,e.style.maxWidth=r}else e.style.width=`100%`;n(e)}t(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}function F(e){return e.nodeType===Mt?e.textContent?.trim()!==``:e.nodeType!==jt||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(F)}function I(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}function L(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}function R(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}function ee(e){let n=Array.from(e.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=/* @__PURE__ */ t((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}function te(e,t){return e.intersect(t)}function ne(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}function z(e,t,n){return Bt(e,t,t,n)}function B(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&re(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&re(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}function re(e,t){return e*t>0}function ie(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=Ht(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}function ae(e,t){let{labelStyles:n}=D(t);t.labelStyle=n;let r=X(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:s}=t,c=N.svg(a),l=A(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=a.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,x(s)),Y(t,d),t.intersect=function(e){return o.info(`Circle intersect`,t,1,e),Q.circle(t,1,e)},a}function V(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}function H(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}async function oe(e,n){let{labelStyles:r,nodeStyles:i}=D(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=/* @__PURE__ */ t(e=>e+s,`calcTotalHeight`),l=/* @__PURE__ */ t(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await J(e,n,X(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=H(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...V(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...V(g/2,_/2,g/2,-_/2,p,m,!0)],b=N.svg(u),x=A(n,{});n.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=I(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),w.attr(`transform`,`translate(${p/2}, 0)`),Y(n,w),n.intersect=function(e){return Q.polygon(n,y,e)},u}async function se(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=D(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await J(e,n,X(n)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=n.padding??12,d=Math.max(s.width+u*2,n.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,n.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=n,y=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=N.svg(o).path(_,A(n,{}));y.node()?.appendChild(e),v&&y.attr(`style`,v)}else y.append(`path`).attr(`d`,_).attr(`style`,a);y.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),Y(n,y);let b=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${b-s.height/2-(s.y-(s.top??0))})`);let x=/* @__PURE__ */ t((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),S=[...x(d/2,m,-1),...x(g/2,h,1).reverse()];return n.intersect=function(e){return Q.polygon(n,S,e)},o}async function ce(e,t){let{themeVariables:n}=g(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=D(t),{shapeSvg:o,bbox:s}=await J(e,t,X(t)),c=t.padding??8,l=s.height,d=Math.max(s.width+c*2,Gt,t?.width??0),f=Math.max(l+Wt+Ut+c*2,t?.height??0),p=-d/2,m=-f/2,h=-(Wt+Ut)/2,_=o.select(`.label`);_&&(t.useHtmlLabels??u(g())?_.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2+h})`):_.attr(`transform`,`translate(0, ${-s.height/2+h})`));let v;if(t.look===`handDrawn`){let e=N.svg(o),n=A(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(Z(p,m,d,f,Kt),n);v=o.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container collapsed-group`).attr(`style`,x(t.cssStyles))}else v=o.insert(`rect`,`:first-child`),v.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,Kt).attr(`ry`,Kt).attr(`x`,p).attr(`y`,m).attr(`width`,d).attr(`height`,f).attr(`fill`,r).attr(`stroke`,i);let y=m+c+l+Wt;o.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,p+8).attr(`y1`,y).attr(`x2`,p+d-8).attr(`y2`,y).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let b=y+Ut/2;for(let e=-1;e<=1;e++)o.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,b).attr(`r`,2.5).attr(`fill`,i);return Y(t,v),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},o}function U(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}async function le(e,t){let n=t,{shapeSvg:r,bbox:i}=await J(e,n,X(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=Qt(n.directions??[],i,n,u),f=U(r,u,o,d);return f.attr(`style`,n.style??null),Y(n,f),n.intersect=function(e){return Q.polygon(n,d,e)},r}async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=N.svg(a).path(Z(-u/2,f,u,d,12),A(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),Y(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return Q.rect(t,e)},a}async function de(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+$t),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+$t,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+$t},{x:0+$t,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=I(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=U(s,l,u,p);return r&&m.attr(`style`,r),Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},s}function fe(e,t){let{nodeStyles:n}=D(t);t.label=``;let r=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=N.svg(r),c=A(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=I(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return Q.polygon(t,o,e)},r}async function pe(e,t,n){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:c}=await J(e,t,X(t)),l=n?.padding??c,u=t.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=N.svg(a),n=A(t,{}),r=e.circle(0,0,u*2,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,x(f))}else d=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return Y(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return Q.circle(e,n,t)},t.intersect=function(e){return o.info(`Circle intersect`,t,u,e),Q.circle(t,u,e)},a}async function me(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await J(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),Y(n,o),n.intersect=function(e){return Q.rect(n,e)},r}async function he(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=N.svg(a).path(Z(-u/2,f,u,d,12),A(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),Y(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return Q.rect(t,e)},a}function ge(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
2
+ M ${i.x},${i.y} L ${o.x},${o.y}`}function _e(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,c=N.svg(i),l=A(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,a*2,l),d=ge(a),f=c.path(d,l),p=i.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),Y(t,p),t.intersect=function(e){return o.info(`crossedCircle intersect`,t,{radius:a,point:e}),Q.circle(t,a,e)},i}function W(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}async function ve(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...W(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...W(l/2+d*2,-d,d,20,-180,-270),...W(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...W(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...W(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...W(l/2+l*.1,-d,d,20,-180,-270),...W(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...W(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=N.svg(i),g=A(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=I(p).replace(`Z`,``),v=h.path(_,g),y=I(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}function G(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}async function ye(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...G(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...G(l/2+d*2,-d,d,20,-180,-270),...G(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...G(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...G(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...G(l/2+d*2,-d,d,20,-180,-270),...G(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...G(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=N.svg(i),g=A(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=I(p).replace(`Z`,``),v=h.path(_,g),y=I(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}function K(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}async function be(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...K(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...K(l/2+d*2,-d,d,20,-180,-270),...K(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...K(l/2,u/2,d,20,0,90)],m=[...K(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...K(-l/2-d/2,-d,d,20,0,90),...K(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...K(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...K(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...K(l/2+d*2,-d,d,20,-180,-270),...K(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...K(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...K(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...K(-l/2-d/2,-d,d,20,0,90),...K(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...K(-l/2+d+d/2,u/2,d,30,-180,-270)],g=N.svg(i),_=A(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=I(p).replace(`Z`,``),y=g.path(v,_),b=I(m).replace(`Z`,``),x=g.path(b,_),S=I(h),C=g.path(S,{..._}),w=i.insert(`g`,`:first-child`);return w.insert(()=>C,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>y,`:first-child`),w.insert(()=>x,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,h,e)},i}async function xe(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=N.svg(s),m=A(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,y=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...R(-_,-g/2,d,50,270,90)],b=I(y),x=p.path(b,m),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}async function Se(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=N.svg(i),n=A(t,{}),r=e.path(Z(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);Y(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let y=m+l,b=Math.asin(Math.min(1,(h-y)/l))*180/Math.PI,x=[...R(0,-y,l,24,180+b,-b),...R(-(-c/2+f),-(h+f),f,12,90,0),...R(-(-c/2+f),-(p/2-f),f,12,360,270),...R(-(c/2-f),-(p/2-f),f,12,270,180),...R(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return Q.polygon(t,x,e)},i}async function Ce(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.width<an&&(t.width=an)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<rn&&(t.height=rn)}let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=Math.max(t.width??0,l.width)+o,f=d/2,p=f/(2.5+d/50),m=Math.max(t.height??0,l.height)+a+p,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=N.svg(c),n=tn(0,0,d,m,f,p),r=nn(0,p,d,m,f,p),i=A(t,{}),a=e.path(n,i),o=e.path(r,A(t,{fill:`none`}));h=c.insert(()=>o,`:first-child`),h=c.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=en(0,0,d,m,f,p);h=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,x(g)).attr(`style`,r)}return h.attr(`label-offset-y`,p),h.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),Y(t,h),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}async function we(e,t,n){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await J(e,t,X(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=N.svg(a),n=A(t,{}),r=f||p?e.path(Z(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,x(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,x(f)).attr(`ry`,x(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return Y(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},a}async function Te(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await we(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=N.svg(c),n=A(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=N.svg(o),g=A(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,y),t.intersect=function(e){return Q.rect(t,e)},o}async function De(e,t){let{labelStyles:n,nodeStyles:r}=D(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,s=t.look===`neo`?16:a,{shapeSvg:c,bbox:l}=await J(e,t,X(t)),u=(t?.width?t?.width/2:l.width/2)+(s??0),d=u-i,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=N.svg(c),n=A(t,{roughness:.2,strokeWidth:2.5}),r=A(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,x(t.cssClasses)).attr(`style`,x(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return Y(t,f),t.intersect=function(e){return o.info(`DoubleCircle intersect`,t,u,e),Q.circle(t,u,e)},c}function Oe(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=D(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=N.svg(a),{nodeBorder:l}=n,u=A(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=a.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),Y(t,f),t.intersect=function(e){return o.info(`filledCircle intersect`,t,{radius:7,point:e}),Q.circle(t,7,e)},a}async function ke(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<on&&(t.height=on),t.width=(t?.width??0)-a-a/2,t.width<sn&&(t.width=sn));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+(a??0),d=t?.height?t?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=N.svg(s),g=A(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=I(p),v=h.path(_,g),y=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,Y(t,y),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return o.info(`Triangle intersect`,t,p,e),Q.polygon(t,p,e)},s}async function Ae(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=N.svg(i).path(g,A(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?Y(t,v):Y(t,v,{width:c,height:d});let y=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return Q.polygon(t,h,e)},i}function je(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=D(t);t.label=``;let o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=N.svg(o),p=A(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),Y(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return Q.rect(t,e)},o}async function Me(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:Math.max(15,c.width))+i*2,u=(t?.height?t?.height:Math.max(10,c.height))+a*2,d=u/2,{cssStyles:f}=t,p=N.svg(s),m=A(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...R(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=I(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return o.info(`Pill intersect`,t,{radius:d,point:e}),Q.polygon(t,h,e)},s}async function Ne(e,t){let{labelStyles:n,nodeStyles:r}=D(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await J(e,t,X(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=N.svg(c),n=A(t,{}),r=cn(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=U(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},c}async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await J(e,t,X(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=N.svg(i),u=A(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=I(d),p=l.path(f,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-a/2}, ${-s/2})`),Y(t,m),t.intersect=function(e){return o.info(`Pill intersect`,t,{points:d}),Q.polygon(t,d,e)},i}async function Fe(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=D(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(a,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await J(e,t,`icon-shape default`),p=t.pos===`t`,m=c,h=c,{nodeBorder:g}=n,{stylesMap:_}=j(t),v=-h/2,y=-m/2,b=t.label?8:0,x=N.svg(u),S=A(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(v,y,h,m,S),T=Math.max(h,d.width),E=m+d.height+b,O=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`transparent`,stroke:`none`}),k=u.insert(()=>w,`:first-child`),M=u.insert(()=>O);if(t.icon){let e=u.append(`g`);e.html(`<g>${await C(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+b/2-i/2-o:-d.height/2-b/2-i/2-o})`),e.attr(`style`,`color: ${_.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-E/2:E/2-d.height})`),k.attr(`transform`,`translate(0,${p?d.height/2+b/2:-d.height/2-b/2})`),Y(t,M),t.intersect=function(e){if(o.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+b},{x:n+h/2,y:r-i/2+d.height+b},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+d.height+b},{x:n-d.width/2,y:r-i/2+d.height+b}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+d.width/2,y:r-i/2+m},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],Q.polygon(t,a,e)},u}async function Ie(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=D(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(a,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await J(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:g}=n,{stylesMap:_}=j(t),v=N.svg(u),y=A(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`),y.stroke=_.get(`fill`)??g;let b=u.append(`g`);t.icon&&b.html(`<g>${await C(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let x=b.node().getBBox(),S=x.width,w=x.height,T=x.x,E=x.y,O=Math.max(S,w)*Math.SQRT2+40,k=v.circle(0,0,O,y),M=Math.max(O,d.width),P=O+d.height+p,F=v.rectangle(-M/2,-P/2,M,P,{...y,fill:`transparent`,stroke:`none`}),I=u.insert(()=>k,`:first-child`),L=u.insert(()=>F);return b.attr(`transform`,`translate(${-S/2-T},${m?d.height/2+p/2-w/2-E:-d.height/2-p/2-w/2-E})`),b.attr(`style`,`color: ${_.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),Y(t,L),t.intersect=function(e){return o.info(`iconSquare intersect`,t,e),Q.rect(t,e)},u}async function Le(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=D(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(a,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,g=c+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=j(t),b=-g/2,x=-h/2,S=t.label?8:0,w=N.svg(u),T=A(t,{});t.look!==`handDrawn`&&(T.roughness=0,T.fillStyle=`solid`),T.stroke=y.get(`fill`)??v;let E=w.path(Z(b,x,g,h,5),T),O=Math.max(g,d.width),k=h+d.height+S,M=w.rectangle(-O/2,-k/2,O,k,{...T,fill:`transparent`,stroke:`none`}),P=u.insert(()=>E,`:first-child`).attr(`class`,`icon-shape2`),F=u.insert(()=>M);if(t.icon){let e=u.append(`g`);e.html(`<g>${await C(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-k/2:k/2-d.height})`),P.attr(`transform`,`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Y(t,F),t.intersect=function(e){if(o.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+S},{x:n+g/2,y:r-i/2+d.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+S},{x:n-d.width/2,y:r-i/2+d.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},u}async function Re(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=D(t);t.labelStyle=i;let a=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(a,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,g=c+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=j(t),b=-g/2,x=-h/2,S=t.label?8:0,w=N.svg(u),T=A(t,{});t.look!==`handDrawn`&&(T.roughness=0,T.fillStyle=`solid`),T.stroke=y.get(`fill`)??v;let E=w.path(Z(b,x,g,h,.1),T),O=Math.max(g,d.width),k=h+d.height+S,M=w.rectangle(-O/2,-k/2,O,k,{...T,fill:`transparent`,stroke:`none`}),P=u.insert(()=>E,`:first-child`),F=u.insert(()=>M);if(t.icon){let e=u.append(`g`);e.html(`<g>${await C(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-k/2:k/2-d.height})`),P.attr(`transform`,`translate(0,${m?d.height/2+S/2:-d.height/2-S/2})`),Y(t,F),t.intersect=function(e){if(o.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+S},{x:n+g/2,y:r-i/2+d.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+S},{x:n-d.width/2,y:r-i/2+d.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},u}async function ze(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:s}=D(t);t.labelStyle=s;let c=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??i),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await J(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,y=N.svg(f),b=A(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(g,_,u,d,b),S=Math.max(u,p.width),C=d+p.height+v,w=y.rectangle(-S/2,-C/2,S,C,{...b,fill:`none`,stroke:`none`}),T=f.insert(()=>x,`:first-child`),E=f.insert(()=>w);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?C/2-d:-C/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),T.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),Y(t,E),t.intersect=function(e){if(o.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+u/2,y:r-i/2+p.height+v},{x:n+u/2,y:r+i/2},{x:n-u/2,y:r+i/2},{x:n-u/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-u/2,y:r-i/2},{x:n+u/2,y:r-i/2},{x:n+u/2,y:r-i/2+d},{x:n+p.width/2,y:r-i/2+d},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+d},{x:n-u/2,y:r-i/2+d}],Q.polygon(t,a,e)},f}async function Be(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=I(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=U(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}async function Ve(e,t){let{shapeSvg:n,bbox:r,label:i}=await J(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),Y(t,a),t.intersect=function(e){return Q.rect(t,e)},n}async function He(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=I(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=U(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}async function Ue(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=I(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=U(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}function We(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=N.svg(i),d=A(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=I(l),p=u.path(f,d),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${s/2},${-c})`),Y(t,m),t.intersect=function(e){return o.info(`lightningBolt intersect`,t,e),Q.polygon(t,l,e)},i}async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<pn&&(t.width=pn);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<fn&&(t.height=fn)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=N.svg(s),n=un(0,0,u,p,d,f,m),r=dn(0,f,u,p,d,f),i=A(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=ln(0,0,u,p,d,f,m);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,x(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Y(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}async function Ke(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=N.svg(s),g=A(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...L(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),Y(t,y),t.intersect=function(e){return Q.polygon(t,_,e)},s}async function qe(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=N.svg(c),y=A(t,{}),b=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],x=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=I(b),C=v.path(S,y),w=I(x),T=v.path(w,y);t.look!==`handDrawn`&&(C=ee(C),T=ee(T));let E=c.insert(`g`,`:first-child`);return E.insert(()=>C),E.insert(()=>T),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),Y(t,E),t.intersect=function(e){return Q.polygon(t,b,e)},c}async function Je(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=L(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],b=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],x=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],S=N.svg(i),C=A(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=I(b),T=S.path(w,C),E=I(x),O=S.path(E,C),k=i.insert(()=>T,`:first-child`);return k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),k.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),Y(t,k),t.intersect=function(e){return Q.polygon(t,b,e)},i}async function Ye(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r,t.useHtmlLabels||u(f())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),d=-c/2,p=-l/2,{cssStyles:m}=t,h=N.svg(a),g=A(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(d,p,c,l,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Y(t,v),t.intersect=function(e){return Q.rect(t,e)},a}async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=N.svg(i),n=A(t,{}),r=mn(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=U(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),Y(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=Q.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=N.svg(s),y=A(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=I(g),x=v.path(b,y),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,g,e)},s}async function Qe(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let a;a=t.cssClasses?`node `+t.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),c=s.insert(`g`),l=s.insert(`g`).attr(`class`,`label`).attr(`style`,r),d=t.description,f=t.label,p=await Rt(l,f,t.labelStyle,!0,!0),m={width:0,height:0};if(u(g())){let e=p.children[0],t=i(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}o.info(`Text 2`,d);let h=d||[],_=p.getBBox(),v=await Rt(l,Array.isArray(h)?h.join(`<br/>`):h,t.labelStyle,!0,!0),y=v.children[0],b=i(v);m=y.getBoundingClientRect(),b.attr(`width`,m.width),b.attr(`height`,m.height);let x=(t.padding||0)/2;i(v).attr(`transform`,`translate( `+(m.width>_.width?0:(_.width-m.width)/2)+`, `+(_.height+x+5)+`)`),i(p).attr(`transform`,`translate( `+(m.width<_.width?0:-(_.width-m.width)/2)+`, 0)`),m=l.node().getBBox(),l.attr(`transform`,`translate(`+-m.width/2+`, `+(-m.height/2-x+3)+`)`);let S=m.width+(t.padding||0),C=m.height+(t.padding||0),w=-m.width/2-x,T=-m.height/2-x,E,O;if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=e.path(Z(w,T,S,C,t.rx||0),n),i=e.line(-m.width/2-x,-m.height/2-x+_.height+x,m.width/2+x,-m.height/2-x+_.height+x,n);O=s.insert(()=>(o.debug(`Rough node insert CXC`,r),i),`:first-child`),E=s.insert(()=>(o.debug(`Rough node insert CXC`,r),r),`:first-child`)}else E=c.insert(`rect`,`:first-child`),O=c.insert(`line`),E.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-m.width/2-x).attr(`y`,-m.height/2-x).attr(`width`,m.width+(t.padding||0)).attr(`height`,m.height+(t.padding||0)),O.attr(`class`,`divider`).attr(`x1`,-m.width/2-x).attr(`x2`,m.width/2+x).attr(`y1`,-m.height/2-x+_.height+x).attr(`y2`,-m.height/2-x+_.height+x);return Y(t,E),t.intersect=function(e){return Q.rect(t,e)},s}async function $e(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return we(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}async function et(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?hn:hn*2),u=(t?.height??s.height)+a*2,d=l-hn,f=u,p=hn-l/2,m=-u/2,{cssStyles:h}=t,g=N.svg(o),_=A(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-hn,y:m+f},{x:p-hn,y:m},{x:p,y:m},{x:p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`).attr(`style`,x(h)),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${hn/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,b),t.intersect=function(e){return Q.rect(t,e)},o}async function tt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=N.svg(s),v=A(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],b=I(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}async function nt(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return we(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}async function rt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=N.svg(s),m=A(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...R(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...R(u/2-d,0,d,50,270,450)],g=I(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return Q.polygon(t,h,e)},s}async function it(e,t){return we(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}function at(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=N.svg(u),f=A(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return Y(t,_),t.intersect=function(e){return Q.circle(t,(t.width??0)/2,e)},u}function ot(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=N.svg(a).circle(0,0,t.width,O(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return Y(t,o),t.intersect=function(e){return Q.circle(t,(t.width??7)/2,e)},a}async function st(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.width+2*gn+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*gn,f=u,p=-l/2,m=-u/2,h=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+gn,m,p+gn,m+f,n),a=e.line(p+gn+d,m,p+gn+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,x(c)),Y(t,o)}else{let e=U(s,d,f,h);r&&e.attr(`style`,r),Y(t,e)}return t.intersect=function(e){return Q.polygon(t,h,e)},s}async function ct(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-_n*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height?t?.height:c.height)+o*2,u=_n*l,d=_n*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=N.svg(s),v=A(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],b=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=I(y),S=_.path(x,v),C=I(b),w=_.path(C,{...v,fillStyle:`solid`}),T=s.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),Y(t,T),t.intersect=function(e){return Q.polygon(t,y,e)},s}async function lt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=N.svg(i),h=A(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...L(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...L(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],b=I(g),x=m.path(b,h),S=I(y),C=m.path(S,{...h,fillStyle:`solid`}),w=i.insert(()=>C,`:first-child`);return w.insert(()=>x,`:first-child`),w.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,g,e)},i}async function ut(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),Y(t,u),t.intersect=function(e){return Q.rect(t,e)},i}async function dt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2,o=t.height??0;if(t.height&&(t.height-=a,t.height<xn&&(t.height=xn)),t.width){let e=o/2/(2.5+o/50);t.width=t.width-a-e*3,t.width<Sn&&(t.width=Sn)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=Math.max(t.height??0,c.height)+a,d=u/2,f=d/(2.5+u/50),p=Math.max(t.width??0,c.width)+f+a,{cssStyles:m}=t,h;if(t.look===`handDrawn`){let e=N.svg(s),n=yn(0,0,p,u,f,d),r=bn(0,0,p,u,f,d),i=e.path(n,A(t,{})),a=e.path(r,A(t,{fill:`none`}));h=s.insert(()=>a,`:first-child`),h=s.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=vn(0,0,p,u,f,d);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,x(m)).attr(`style`,r),h.attr(`class`,`basic label-container outer-path`),m&&h.selectAll(`path`).attr(`style`,m),r&&h.selectAll(`path`).attr(`style`,r)}return h.attr(`label-offset-x`,f),h.attr(`transform`,`translate(${-p/2}, ${u/2} )`),l.attr(`transform`,`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,h),t.intersect=function(e){let n=Q.rect(t,e),r=n.y-(t.y??0);if(d!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}async function ft(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=N.svg(s),n=A(t,{}),r=I(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=U(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}async function pt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=N.svg(s),p=A(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=I(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),Y(t,_),t.intersect=function(e){return Q.polygon(t,m,e)},s}async function mt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<wn&&(t.width=wn),t.height=t?.height??0,t.height<Cn&&(t.height=Cn));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=m(g().flowchart?.htmlLabels),d=(t?.width?t?.width:c.width)+a,f=t?.height?t?.height:d+c.height,p=f,h=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:_}=t,v=N.svg(s),y=A(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=I(h),x=v.path(b,y),S=s.insert(()=>x,`:first-child`).attr(`transform`,`translate(${-f/2}, ${f/2})`).attr(`class`,`outer-path`);return _&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),t.width=d,t.height=f,Y(t,S),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${f/2-(c.height+(t.padding??0)/(u?2:1)-(c.y-(c.top??0)))})`),t.intersect=function(e){return o.info(`Triangle intersect`,t,h,e),Q.polygon(t,h,e)},s}async function ht(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=N.svg(c),y=A(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-d/2-_,y:m/2},...L(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],x=I(b),S=v.path(x,y),C=c.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),Y(t,C),t.intersect=function(e){return Q.polygon(t,b,e)},c}async function gt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=N.svg(s),h=A(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...L(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...L(l/2,-f/2,-l/2,-f/2,d,-1)],_=I(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),Y(t,y),t.intersect=function(e){return Q.polygon(t,g,e)},s}async function _t(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-$,10),t.height=Math.max((t?.height??0)-a*2-$,10));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width?t?.width:s.width)+i*2+$,u=(t?.height?t?.height:s.height)+a*2+$,d=l-$,f=u-$,p=-d/2,m=-f/2,{cssStyles:h}=t,g=N.svg(o),_=A(t,{}),v=[{x:p-$,y:m-$},{x:p-$,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-$}],y=`M${p-$},${m-$} L${p+d},${m-$} L${p+d},${m+f} L${p-$},${m+f} L${p-$},${m-$}
3
+ M${p-$},${m} L${p+d},${m}
4
+ M${p},${m-$} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=g.path(y,_),x=o.insert(()=>b,`:first-child`);return x.attr(`transform`,`translate(${$/2}, ${$/2})`),x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+$/2-(s.x-(s.left??0))}, ${-(s.height/2)+$/2-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,v,e)},o}async function vt(e,t){let n=t;n.alias&&(t.label=n.alias);let{theme:r,themeVariables:a}=f(),{rowEven:o,rowOdd:s,nodeBorder:c,borderColorArray:l}=a;if(t.look===`handDrawn`){let{themeVariables:n}=f(),{background:r}=n;await vt(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let u=f();t.useHtmlLabels=u.htmlLabels;let d=u.er?.diagramPadding??10,p=u.er?.entityPadding??6,{cssStyles:h}=t,{labelStyles:g,nodeStyles:_}=D(t);if(n.attributes.length===0&&t.label){let i={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:``};b(t.label,u)+i.labelPaddingX*2<u.er.minEntityWidth&&(t.width=u.er.minEntityWidth);let a=await we(e,t,i);if(r!=null&&Tn.has(r)){let e=n.colorIndex??0;a.attr(`data-color-id`,`color-${e%l.length}`)}if(!m(u.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}u.htmlLabels||(d*=1.25,p*=1.25);let v=X(t);v||=`node default`;let y=e.insert(`g`).attr(`class`,v).attr(`id`,t.domId||t.id),x=await yt(y,t.label??``,u,0,0,[`name`],g);x.height+=p;let S=0,C=[],w=[],T=0,E=0,O=0,k=0,j=!0,M=!0;for(let e of n.attributes){let t=await yt(y,e.type,u,0,S,[`attribute-type`],g);T=Math.max(T,t.width+d);let n=await yt(y,e.name,u,0,S,[`attribute-name`],g);E=Math.max(E,n.width+d);let r=await yt(y,e.keys.join(),u,0,S,[`attribute-keys`],g);O=Math.max(O,r.width+d);let i=await yt(y,e.comment,u,0,S,[`attribute-comment`],g);k=Math.max(k,i.width+d);let a=Math.max(t.height,n.height,r.height,i.height)+p;w.push({yOffset:S,rowHeight:a}),S+=a}let P=4;O<=d&&(j=!1,O=0,P--),k<=d&&(M=!1,k=0,P--);let F=y.node().getBBox();if(x.width+d*2-(T+E+O+k)>0){let e=x.width+d*2-(T+E+O+k);T+=e/P,E+=e/P,O>0&&(O+=e/P),k>0&&(k+=e/P)}let I=T+E+O+k,L=N.svg(y),R=A(t,{});t.look!==`handDrawn`&&(R.roughness=0,R.fillStyle=`solid`);let ee=0;w.length>0&&(ee=w.reduce((e,t)=>e+(t?.rowHeight??0),0));let te=Math.max(F.width+d*2,t?.width||0,I),ne=Math.max((ee??0)+x.height,t?.height||0),z=-te/2,B=-ne/2;if(y.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=i(n[t]),a=r.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?o+=T:r.attr(`class`).includes(`attribute-keys`)?o+=T+E:r.attr(`class`).includes(`attribute-comment`)&&(o+=T+E+O))}r.attr(`transform`,`translate(${z+d/2+o}, ${s+B+x.height+p/2})`)}),y.select(`.name`).attr(`transform`,`translate(`+-x.width/2+`, `+(B+p/2)+`)`),r!=null&&Tn.has(r)){let e=n.colorIndex??0;y.attr(`data-color-id`,`color-${e%l.length}`)}let re=L.rectangle(z,B,te,ne,R),ie=y.insert(()=>re,`:first-child`).attr(`class`,`outer-path`).attr(`style`,h.join(``));C.push(0);for(let[e,t]of w.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=L.rectangle(z,x.height+B+t?.yOffset,te,t?.rowHeight,{...R,fill:n?o:s,stroke:c});y.insert(()=>r,`g.label`).attr(`style`,h.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ae=1e-4,V=bt(z,x.height+B,te+z,x.height+B,ae),H=L.polygon(V.map(e=>[e.x,e.y]),R);if(y.insert(()=>H).attr(`class`,`divider`),V=bt(T+z,x.height+B,T+z,ne+B,ae),H=L.polygon(V.map(e=>[e.x,e.y]),R),y.insert(()=>H).attr(`class`,`divider`),j){let e=T+E+z;V=bt(e,x.height+B,e,ne+B,ae),H=L.polygon(V.map(e=>[e.x,e.y]),R),y.insert(()=>H).attr(`class`,`divider`)}if(M){let e=T+E+O+z;V=bt(e,x.height+B,e,ne+B,ae),H=L.polygon(V.map(e=>[e.x,e.y]),R),y.insert(()=>H).attr(`class`,`divider`)}for(let e of C){let t=x.height+B+e;V=bt(z,t,te+z,t,ae),H=L.polygon(V.map(e=>[e.x,e.y]),R),y.insert(()=>H).attr(`class`,`divider`)}if(Y(t,ie),_&&t.look!==`handDrawn`){if(r!=null&&En.has(r))y.selectAll(`path`).attr(`style`,_);else{let e=_.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);y.selectAll(`path`).attr(`style`,e??``),y.selectAll(`.row-rect-even path`).attr(`style`,_)}}return t.intersect=function(e){return Q.rect(t,e)},y}async function yt(e,t,n,r=0,a=0,o=[],s=``){let c=e.insert(`g`).attr(`class`,`label ${o.join(` `)}`).attr(`transform`,`translate(${r}, ${a})`).attr(`style`,s);t!==l(t)&&(t=l(t),t=t.replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`));let u=c.node().appendChild(await T(c,t,{width:b(t,n)+100,style:s,useHtmlLabels:n.htmlLabels},n));if(t.includes(`&lt;`)||t.includes(`&gt;`)){let e=u.children[0];for(e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`)}let d=u.getBBox();if(m(n.htmlLabels)){let e=u.children[0];e.style.textAlign=`start`;let t=i(u);d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}return d}function bt(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}async function xt(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await St(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await St(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await St(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await St(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}async function St(e,t,n,r=[]){let a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),o=f(),c=`useHtmlLabels`in t?t.useHtmlLabels:m(o.htmlLabels)??!0,l=``;l=`text`in t?t.text:t.label,!c&&l.startsWith(`\\`)&&(l=l.substring(1)),s(l)&&(c=!0);let u=await T(a,d(_(l)),{width:b(l,o)+50,classes:`markdown-node-label`,useHtmlLabels:c},o),p,h=1;if(c){let e=u.children[0],t=i(u);h=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(h+=e.innerHTML.split(`<mrow>`).length-1),await P(e),p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}else{r.includes(`font-weight: bolder`)&&i(u).selectAll(`tspan`).attr(`font-weight`,``),h=u.children.length;let e=u.children[0];(u.textContent===``||u.textContent.includes(`&gt`))&&(e.textContent=l[0]+l.substring(1).replaceAll(`&gt;`,`>`).replaceAll(`&lt;`,`<`).trim(),l[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),p=u.getBBox()}return a.attr(`transform`,`translate(0,`+(-p.height/(2*h)+n)+`)`),p.height}async function Ct(e,t){let n=g(),{themeVariables:r}=n,{useGradient:a}=r,o=n.class.padding??12,s=o,c=t.useHtmlLabels??m(n.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];let{shapeSvg:u,bbox:d}=await xt(e,t,n,c,s),{labelStyles:f,nodeStyles:p}=D(t);t.labelStyle=f,t.cssStyles=l.styles||``;let h=l.styles?.join(`;`)||p||``;t.cssStyles||=h.replaceAll(`!important`,``).split(`;`);let _=l.members.length===0&&l.methods.length===0&&!n.class?.hideEmptyMembersBox,v=N.svg(u),y=A(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=Math.max(t.width??0,d.width),x=Math.max(t.height??0,d.height),S=(t.height??0)>d.height;l.members.length===0&&l.methods.length===0?x+=s:l.members.length>0&&l.methods.length===0&&(x+=s*2);let C=-b/2,w=-x/2,T=_?o*2:l.members.length===0&&l.methods.length===0?-o:0;S&&(T=o*2);let E=v.rectangle(C-o,w-o-(_?o:l.members.length===0&&l.methods.length===0?-o/2:0),b+2*o,x+2*o+T,y),O=u.insert(()=>E,`:first-child`);O.attr(`class`,`basic label-container outer-path`);let k=O.node().getBBox(),j=u.select(`.annotation-group`).node().getBBox().height-(_?o/2:0)||0,M=u.select(`.label-group`).node().getBBox().height-(_?o/2:0)||0,P=u.select(`.members-group`).node().getBBox().height-(_?o/2:0)||0,F=(j+M+w+o-(w-o-(_?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(u.selectAll(`.text`).each((e,t,r)=>{let a=i(r[t]),d=a.attr(`transform`),f=0;if(d){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(d);e&&(f=parseFloat(e[2]))}let p=f+w+o-(_?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(P,s/2);p=S?Math.max(F,j+M+e+w+s*2+o)+s*2:j+M+e+w+s*4+o}l.members.length===0&&l.methods.length===0&&n.class?.hideEmptyMembersBox&&(p=l.annotations.length>0?f-s:f),c||(p-=4);let m=C;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(m=-a.node()?.getBBox().width/2||0,u.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(m=0)})),a.attr(`transform`,`translate(${m}, ${p})`)}),l.members.length>0||l.methods.length>0||_){let e=j+M+w+o,n=v.line(k.x,e,k.x+k.width,e+.001,y);u.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!a?` neo-line`:``}`).attr(`style`,h)}if(_||l.members.length>0||l.methods.length>0){let e=j+M+P+w+s*2+o,n=v.line(k.x,S?Math.max(F,e):e,k.x+k.width,(S?Math.max(F,e):e)+.001,y);u.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!a?` neo-line`:``}`).attr(`style`,h)}if(l.look!==`handDrawn`&&u.selectAll(`path`).attr(`style`,h),O.select(`:nth-child(2)`).attr(`style`,h),u.selectAll(`.divider`).select(`path`).attr(`style`,h),t.labelStyle?u.selectAll(`span`).attr(`style`,t.labelStyle):u.selectAll(`span`).attr(`style`,h),!c){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(h);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}else if(f){let t=e.exec(f);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}}}return Y(t,O),t.intersect=function(e){return Q.rect(t,e)},u}async function wt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let a=t,o=t,s=`verifyMethod`in t,c=X(t),l=g(),{themeVariables:u}=l,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,p=l.layout===`elk`?`start`:`center`,m=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId??t.id),h;h=s?await q(m,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):await q(m,`&lt;&lt;Element&gt;&gt;`,0,t.labelStyle);let _=h,v=await q(m,a.name,_,t.labelStyle+`; font-weight: bold;`);if(_+=v+20,s){let e=await q(m,`${a.requirementId?`ID: ${a.requirementId}`:``}`,_,t.labelStyle,p);_+=e;let n=await q(m,`${a.text?`Text: ${a.text}`:``}`,_,t.labelStyle,p);_+=n;let r=await q(m,`${a.risk?`Risk: ${a.risk}`:``}`,_,t.labelStyle,p);_+=r,await q(m,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:``}`,_,t.labelStyle,p)}else{let e=await q(m,`${o.type?`Type: ${o.type}`:``}`,_,t.labelStyle,p);_+=e,await q(m,`${o.docRef?`Doc Ref: ${o.docRef}`:``}`,_,t.labelStyle,p)}let y=(m.node()?.getBBox().width??200)+20,b=(m.node()?.getBBox().height??200)+20,x=-y/2,S=-b/2,C=N.svg(m),w=A(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=C.rectangle(x,S,y,b,w),E=m.insert(()=>T,`:first-child`);if(E.attr(`class`,`basic label-container outer-path`).attr(`style`,r),d?.length){let e=t.colorIndex??0;m.attr(`data-color-id`,`color-${e%d.length}`)}if(m.selectAll(`.label`).each((e,t,n)=>{let r=i(n[t]),a=r.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-b/2,l=x+10;(t===0||t===1)&&(l=o),r.attr(`transform`,`translate(${l}, ${c+20})`)}),_>h+v+20){let e=S+h+v+20,n;if(t.look===`neo`){let t=.001,r=[[x,e],[x+y,e],[x+y,e+t],[x,e+t]];n=C.polygon(r,w)}else n=C.line(x,e,x+y,e,w);m.insert(()=>n).attr(`class`,`divider`)}return Y(t,E),t.intersect=function(e){return Q.rect(t,e)},r&&t.look!==`handDrawn`&&(f||d?.length)&&m.selectAll(`path`).attr(`style`,r),m}async function q(e,t,n,r=``,a=`center`){if(t===``)return 0;let o=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),s=g(),c=s.htmlLabels??!0,l=await T(o,d(_(t)),{width:b(t,s)+50,classes:`markdown-node-label`,useHtmlLabels:c,style:r},s),u;if(c){let e=l.children[0],t=i(l);a===`start`&&i(e).style(`text-align`,`left`),u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}else{let e=l.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);if(a===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}u=l.getBBox(),u.height+=6}return o.attr(`transform`,`translate(${-u.width/2},${-u.height/2+n})`),u.height}async function Tt(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=D(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await It(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await It(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await It(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,b=-_/2,x=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let S,{rx:C,ry:w}=t,{cssStyles:T}=t;if(t.look===`handDrawn`){let e=N.svg(o),n=A(t,{}),r=C||w?e.path(Z(b,x,_,y,C||0),n):e.rectangle(b,x,_,y,n);S=o.insert(()=>r,`:first-child`),S.attr(`class`,`basic label-container`).attr(`style`,T||null)}else{S=o.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,C??5).attr(`ry`,w??5).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=b+2,r=x+Math.floor((C??0)/2),i=x+y-Math.floor((C??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Dn(e))}}return Y(t,S),t.height=y,t.intersect=function(e){return Q.rect(t,e)},o}async function Et(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:s,label:c}=await J(e,t,X(t)),l=a.width+10*s,u=a.height+8*s,d=.15*l,{cssStyles:f}=t,p=a.width+20,m=a.height+20,h=Math.max(l,p),g=Math.max(u,m);c.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0
5
+ a${d},${d} 1 0,0 ${h*.25},${-1*g*.1}
6
+ a${d},${d} 1 0,0 ${h*.25},0
7
+ a${d},${d} 1 0,0 ${h*.25},0
8
+ a${d},${d} 1 0,0 ${h*.25},${g*.1}
9
+
10
+ a${d},${d} 1 0,0 ${h*.15},${g*.33}
11
+ a${d*.8},${d*.8} 1 0,0 0,${g*.34}
12
+ a${d},${d} 1 0,0 ${-1*h*.15},${g*.33}
13
+
14
+ a${d},${d} 1 0,0 ${-1*h*.25},${g*.15}
15
+ a${d},${d} 1 0,0 ${-1*h*.25},0
16
+ a${d},${d} 1 0,0 ${-1*h*.25},0
17
+ a${d},${d} 1 0,0 ${-1*h*.25},${-1*g*.15}
18
+
19
+ a${d},${d} 1 0,0 ${-1*h*.1},${-1*g*.33}
20
+ a${d*.8},${d*.8} 1 0,0 0,${-1*g*.34}
21
+ a${d},${d} 1 0,0 ${h*.1},${-1*g*.33}
22
+ H0 V0 Z`;if(t.look===`handDrawn`){let e=N.svg(i),n=A(t,{}),r=e.path(v,n);_=i.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,x(f))}else _=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,v);return _.attr(`transform`,`translate(${-h/2}, ${-g/2})`),Y(t,_),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return o.info(`Bang intersect`,t,e),Q.rect(t,e)},i}async function Dt(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:s,label:c}=await J(e,t,X(t)),l=a.width+2*s,u=a.height+2*s,d=.15*l,f=.25*l,p=.35*l,m=.2*l,{cssStyles:h}=t,g,_=`M0 0
23
+ a${d},${d} 0 0,1 ${l*.25},${-1*l*.1}
24
+ a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
25
+ a${f},${f} 1 0,1 ${l*.35},${l*.2}
26
+
27
+ a${d},${d} 1 0,1 ${l*.15},${u*.35}
28
+ a${m},${m} 1 0,1 ${-1*l*.15},${u*.65}
29
+
30
+ a${f},${d} 1 0,1 ${-1*l*.25},${l*.15}
31
+ a${p},${p} 1 0,1 ${-1*l*.5},0
32
+ a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15}
33
+
34
+ a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35}
35
+ a${m},${m} 1 0,1 ${l*.1},${-1*u*.65}
36
+ H0 V0 Z`;if(t.look===`handDrawn`){let e=N.svg(i),n=A(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,x(h))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return c.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),g.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Y(t,g),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return o.info(`Cloud intersect`,t,e),Q.rect(t,e)},i}async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=D(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
37
+ M${-c/2} ${l/2-5}
38
+ v${-l+10}
39
+ q0,-5 5,-5
40
+ h${c-10}
41
+ q5,0 5,5
42
+ v${l-5}
43
+ H${-c/2}
44
+ Z
45
+ `:`
46
+ M${-c/2} ${l/2-5}
47
+ v${-l+10}
48
+ q0,-5 5,-5
49
+ h${c-10}
50
+ q5,0 5,5
51
+ v${l-10}
52
+ q0,5 -5,5
53
+ h${-(c-10)}
54
+ q-5,0 -5,-5
55
+ Z
56
+ `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),Y(t,d),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},i}async function kt(e,t){return pe(e,t,{padding:t.padding??0})}function At(e){return e in kn}var jt,Mt,Nt,Pt,Ft,J,It,Y,X,Lt,Z,Rt,zt,Bt,Vt,Ht,Q,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,$,Tn,En,Dn,On,kn;function An(){return(An=e((()=>{k(),w(),S(),v(),h(),r(),n(),a(),M(),jt=1,Mt=3,t(P,`configureLabelImages`),t(F,`hasTextBesidesImages`),Nt=3,Pt=32,Ft=/* @__PURE__ */ t(async(e,t,n)=>{let r=g(),a=e.insert(`g`).attr(`class`,n??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,x(t.labelStyle)),s=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),l=t.width?Math.max(t.width-2*(t.padding??0),Pt):g().flowchart?.wrappingWidth??200,u=r.c4?.wrap??!0?l:1/0,d=await Promise.all(s.map(async e=>{let n=o.append(`g`).attr(`class`,e.cssClass),a=await T(n,c(_(e.text??``),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:t.labelStyle},r);return i(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),i(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:n,box:n.node().getBBox()}})),f=Math.max(...d.map(({box:e})=>e.width),0),p=0;for(let{el:e,box:t}of d)e.attr(`transform`,`translate(${f/2-t.x-t.width/2}, ${p-t.y})`),p+=t.height+Nt;let m=d.length>0?p-Nt:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-f/2}, ${-m/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),J=/* @__PURE__ */ t(async(e,t,n)=>{if(t.stereotype!==void 0)return Ft(e,t,n);let r,a=t.useHtmlLabels||m(g()?.htmlLabels);r=n||`node default`;let o=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,x(t.labelStyle)),l;l=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let u=!!t.icon||!!t.img,d=t.labelType===`markdown`,f=await T(s,c(_(l),g()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||g().flowchart?.wrappingWidth,classes:d?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:u,markdown:d},g()),p=(t?.padding??0)/2,h;if(a){let e=f.children[0],t=i(f);await P(e),h=await E.measure(()=>e.getBoundingClientRect()),t.attr(`width`,h.width),t.attr(`height`,h.height)}else h=await E.measure(()=>f.getBBox());return a?s.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):s.attr(`transform`,`translate(0, `+-h.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:h,halfPadding:p,label:s}},`labelHelper`),It=/* @__PURE__ */ t(async(e,t,n)=>{let r=n.useHtmlLabels??u(g()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),o=await T(a,c(_(t),g()),{useHtmlLabels:r,width:n.width||g()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),s=n.padding/2,l;if(u(g())){let e=o.children[0],t=i(o);l=await E.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await E.measure(()=>o.getBBox());return r?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),n.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:s,label:a}},`insertLabel`),Y=/* @__PURE__ */ t((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),X=/* @__PURE__ */ t((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`),t(I,`createPathFromPoints`),t(L,`generateFullSineWavePoints`),t(R,`generateCirclePoints`),t(ee,`mergePaths`),Lt=/* @__PURE__ */ t((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),Z=/* @__PURE__ */ t((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),Rt=/* @__PURE__ */ t(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=g(),s=u(o);return await T(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),t(te,`intersectNode`),zt=te,t(ne,`intersectEllipse`),Bt=ne,t(z,`intersectCircle`),Vt=z,t(B,`intersectLine`),t(re,`sameSign`),Ht=B,t(ie,`intersectPolygon`),Q={node:zt,circle:Vt,ellipse:Bt,polygon:ie,rect:Lt},t(ae,`anchor`),t(V,`generateArcPoints`),t(H,`calculateArcSagitta`),t(oe,`bowTieRect`),t(se,`bucket`),Ut=20,Wt=8,Gt=80,Kt=8,t(ce,`collapsedGroup`),t(U,`insertPolygonShape`),qt=[`right`,`left`,`up`,`down`],Jt=`point`,Yt=/* @__PURE__ */ t(e=>{let t=/* @__PURE__ */ new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),Xt=/* @__PURE__ */ t(e=>qt.filter(t=>e.has(t)).join(`|`)||Jt,`getDirectionKey`),Zt={"right|left|up|down":/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":/* @__PURE__ */ t(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":/* @__PURE__ */ t(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":/* @__PURE__ */ t(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":/* @__PURE__ */ t(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":/* @__PURE__ */ t(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":/* @__PURE__ */ t(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":/* @__PURE__ */ t(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":/* @__PURE__ */ t(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:/* @__PURE__ */ t(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[Jt]:()=>[{x:0,y:0}]},Qt=/* @__PURE__ */ t((e,t,n,r)=>{let i=Yt(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(Zt[Xt(i)]??Zt[Jt])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`),t(le,`block_arrow`),t(ue,`browser`),$t=12,t(de,`card`),t(fe,`choice`),t(pe,`circle`),t(me,`composite`),t(he,`consoleWindow`),t(ge,`createLine`),t(_e,`crossedCircle`),t(W,`generateCirclePoints`),t(ve,`curlyBraceLeft`),t(G,`generateCirclePoints`),t(ye,`curlyBraceRight`),t(K,`generateCirclePoints`),t(be,`curlyBraces`),t(xe,`curvedTrapezoid`),t(Se,`person`),en=/* @__PURE__ */ t((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),tn=/* @__PURE__ */ t((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),nn=/* @__PURE__ */ t((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),rn=8,an=8,t(Ce,`cylinder`),t(we,`drawRect`),t(Te,`datastore`),t(Ee,`dividedRectangle`),t(De,`doublecircle`),t(Oe,`filledCircle`),on=10,sn=10,t(ke,`flippedTriangle`),t(Ae,`folder`),t(je,`forkJoin`),t(Me,`halfRoundedRectangle`),cn=/* @__PURE__ */ t((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`),t(Ne,`hexagon`),t(Pe,`hourglass`),t(Fe,`icon`),t(Ie,`iconCircle`),t(Le,`iconRounded`),t(Re,`iconSquare`),t(ze,`imageSquare`),t(Be,`inv_trapezoid`),t(Ve,`labelRect`),t(He,`lean_left`),t(Ue,`lean_right`),t(We,`lightningBolt`),ln=/* @__PURE__ */ t((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),un=/* @__PURE__ */ t((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),dn=/* @__PURE__ */ t((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),fn=10,pn=10,t(Ge,`linedCylinder`),t(Ke,`linedWaveEdgedRect`),t(qe,`multiRect`),t(Je,`multiWaveEdgedRectangle`),t(Ye,`note`),mn=/* @__PURE__ */ t((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`),t(Xe,`question`),t(Ze,`rect_left_inv_arrow`),t(Qe,`rectWithTitle`),t($e,`roundedRect`),hn=8,t(et,`shadedProcess`),t(tt,`slopedRect`),t(nt,`squareRect`),t(rt,`stadium`),t(it,`state`),t(at,`stateEnd`),t(ot,`stateStart`),gn=8,t(st,`subroutine`),_n=.2,t(ct,`taggedRect`),t(lt,`taggedWaveEdgedRectangle`),t(ut,`text`),vn=/* @__PURE__ */ t((e,t,n,r,i,a)=>`M${e},${t}
57
+ a${i},${a} 0,0,1 0,${-r}
58
+ l${n},0
59
+ a${i},${a} 0,0,1 0,${r}
60
+ M${n},${-r}
61
+ a${i},${a} 0,0,0 0,${r}
62
+ l${-n},0`,`createCylinderPathD`),yn=/* @__PURE__ */ t((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),bn=/* @__PURE__ */ t((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),xn=5,Sn=10,t(dt,`tiltedCylinder`),t(ft,`trapezoid`),t(pt,`trapezoidalPentagon`),Cn=10,wn=10,t(mt,`triangle`),t(ht,`waveEdgedRectangle`),t(gt,`waveRectangle`),$=10,t(_t,`windowPane`),Tn=/* @__PURE__ */ new Set([`redux-color`,`redux-dark-color`]),En=/* @__PURE__ */ new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),t(vt,`erBox`),t(yt,`addText`),t(bt,`lineToPolygon`),t(xt,`textHelper`),t(St,`addText`),t(Ct,`classBox`),t(wt,`requirementBox`),t(q,`addText`),Dn=/* @__PURE__ */ t(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`),t(Tt,`kanbanItem`),t(Et,`bang`),t(Dt,`cloud`),t(Ot,`defaultMindmapNode`),t(kt,`mindmapCircle`),On=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:nt},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:$e},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:rt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:st},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ce},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:Te},{semanticName:`Folder`,name:`Folder`,shortName:`folder`,description:`Folder or directory`,aliases:[`directory`],handler:Ae},{semanticName:`Bucket`,name:`Bucket`,shortName:`bucket`,description:`Object storage bucket`,handler:se},{semanticName:`Console`,name:`Console (terminal window)`,shortName:`console`,description:`Terminal or console window`,handler:he},{semanticName:`Browser`,name:`Browser`,shortName:`browser`,description:`Browser window`,handler:ue},{semanticName:`Person`,name:`Person`,shortName:`person`,description:`Person (circular head above a rounded body)`,handler:Se},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:pe},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Et},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Dt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:Xe},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Ne},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Ue},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:He},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:ft},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:Be},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:De},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:ut},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:de},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:et},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:ot},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:at},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:je},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Pe},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:ve},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:ye},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:be},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:We},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:ht},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Me},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:dt},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:Ge},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:xe},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Ee},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:mt},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:_t},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Oe},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:pt},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:ke},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:tt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:Je},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:qe},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:oe},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:_e},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:lt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:ct},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:gt},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:Ze},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:Ke}],kn=(/* @__PURE__ */ t(()=>{let e=[...Object.entries({state:it,choice:fe,note:Ye,composite:me,rectWithTitle:Qe,labelRect:Ve,block_arrow:le,collapsedGroup:ce,iconSquare:Re,iconCircle:Ie,icon:Fe,iconRounded:Le,imageSquare:ze,anchor:ae,kanbanItem:Tt,mindmapCircle:kt,defaultMindmapNode:Ot,classBox:Ct,erBox:vt,requirementBox:wt}),...On.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`))(),t(At,`isValidShape`)})))()}export{At as a,Y as c,Lt as i,Z as n,J as o,An as r,kn as s,Rt as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,i,l as a,o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e=o){let i=r(t(e),c),s=r(n({shared:i}),a,p);return i.ServiceRegistry.register(s),{shared:i,Info:s}}var f,p;function m(){return(m=e((()=>{l(),f=class extends s{static{u(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},p={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new f,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new i,`ValueConverter`)}},u(d,`createInfoServices`)})))()}export{d as n,m as r,p as t};
@@ -0,0 +1,15 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";var r;function i(){return(i=e((()=>{n(),r=/* @__PURE__ */ t(()=>`
2
+ /* Font Awesome icon styling - consolidated */
3
+ .label-icon {
4
+ display: inline-block;
5
+ height: 1em;
6
+ overflow: visible;
7
+ vertical-align: -0.125em;
8
+ }
9
+
10
+ .node .label-icon path {
11
+ fill: currentColor;
12
+ stroke: revert;
13
+ stroke-width: revert;
14
+ }
15
+ `,`getIconStyles`)})))()}export{i as n,r as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,n as i,o as a,r as o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e=a){let i=r(t(e),c),s=r(n({shared:i}),o,m);return i.ServiceRegistry.register(s),{shared:i,Architecture:s}}var f,p,m;function h(){return(h=e((()=>{l(),f=class extends s{static{u(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},p=class extends i{static{u(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},m={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new f,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new p,`ValueConverter`)}},u(d,`createArchitectureServices`)})))()}export{d as n,h as r,m as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,i,o as a,s as o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}function f(e=a){let i=r(t(e),c),s=r(n({shared:i}),o,b);return i.ServiceRegistry.register(s),d(s),{shared:i,EventModel:s}}var p,m,h,g,_,v,y,b;function x(){return(x=e((()=>{l(),p=class extends s{static{u(this,`EventModelingTokenBuilder`)}constructor(){super([`eventmodeling`])}},m=/* @__PURE__ */ new Set([`cmd`,`command`]),h=/* @__PURE__ */ new Set([`evt`,`event`]),g=/* @__PURE__ */ new Set([`rmo`,`readmodel`]),_=/* @__PURE__ */ new Set([`pcr`,`processor`]),v=/* @__PURE__ */ new Set([`ui`]),u(d,`registerValidationChecks`),y=class{static{u(this,`EventModelingValidator`)}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(m.has(e.modelEntityType)?this.validateSources(e,/* @__PURE__ */ new Set([...v,..._]),`command`,`ui or processor`,t):h.has(e.modelEntityType)?this.validateSources(e,m,`event`,`command`,t):g.has(e.modelEntityType)?this.validateSources(e,h,`read model`,`event`,t):_.has(e.modelEntityType)?this.validateSources(e,g,`processor`,`read model`,t):v.has(e.modelEntityType)&&this.validateSources(e,g,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},b={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new p,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new i,`ValueConverter`)},validation:{EventModelingValidator:/* @__PURE__ */ u(()=>new y,`EventModelingValidator`)}},u(f,`createEventModelingServices`)})))()}export{f as n,x as r,b as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,n as i,o as a,t as o,u as s,w as c,x as l,y as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}function f(e=a){let i=r(t(e),s),o=r(n({shared:i}),u,_);return i.ServiceRegistry.register(o),d(o),{shared:i,Treemap:o}}var p,m,h,g,_;function v(){return(v=e((()=>{c(),p=class extends o{static{l(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},m=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,h=class extends i{static{l(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=m.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},l(d,`registerValidationChecks`),g=class{static{l(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},_={parser:{TokenBuilder:/* @__PURE__ */ l(()=>new p,`TokenBuilder`),ValueConverter:/* @__PURE__ */ l(()=>new h,`ValueConverter`)},validation:{TreemapValidator:/* @__PURE__ */ l(()=>new g,`TreemapValidator`)}},l(f,`createTreemapServices`)})))()}export{f as n,v as r,_ as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,a as i,i as a,o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e=o){let a=r(t(e),c),s=r(n({shared:a}),i,p);return a.ServiceRegistry.register(s),{shared:a,Cynefin:s}}var f,p;function m(){return(m=e((()=>{l(),f=class extends s{static{u(this,`CynefinTokenBuilder`)}constructor(){super([`cynefin-beta`])}},p={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new f,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new a,`ValueConverter`)}},u(d,`createCynefinServices`)})))()}export{d as n,m as r,p as t};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{C as t,S as n,T as r,_ as i,n as a,o,t as s,u as c,w as l,x as u}from"./chunk-FOHPRMQF-B8MMrnxV.js";function d(e=o){let a=r(t(e),c),s=r(n({shared:a}),i,h);return a.ServiceRegistry.register(s),{shared:a,RailroadPeg:s}}var f,p,m,h;function g(){return(g=e((()=>{l(),f=class extends s{static{u(this,`RailroadPegTokenBuilder`)}constructor(){super([`railroad-peg-beta`])}},p=/* @__PURE__ */ u(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`
2
+ `;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}}else n+=r}return n},`decodeEscapedString`),m=class extends a{static{u(this,`RailroadPegValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return p(e)}return r}runCustomConverter(e,t,n){if(e.name===`PEG_STRING`)return p(t)}},h={parser:{TokenBuilder:/* @__PURE__ */ u(()=>new f,`TokenBuilder`),ValueConverter:/* @__PURE__ */ u(()=>new m,`ValueConverter`)}},u(d,`createRailroadPegServices`)})))()}export{d as n,g as r,h as t};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as r,S as i,t as a,w as o}from"./src-C1iDJpBK.js";import{h as s,j as c,p as l,r as u,s as d,z as f}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{l as ee,t as te}from"./dist-DdW4yNBK.js";function ne(e){this._context=e}function re(e){return new ne(e)}function ie(){return(ie=e((()=>{ne.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}})))()}function ae(e){return new p(e,!0)}function oe(e){return new p(e,!1)}var p;function se(){return(se=e((()=>{p=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}})))()}function m(){}function h(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function g(e){this._context=e}function ce(e){return new g(e)}function _(){return(_=e((()=>{g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:h(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:h(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}})))()}function le(e){this._context=e}function ue(e){return new le(e)}function de(){return(de=e((()=>{_(),le.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:h(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}})))()}function fe(e){this._context=e}function pe(e){return new fe(e)}function me(){return(me=e((()=>{_(),fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:h(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}})))()}function he(e,t){this._basis=new g(e),this._beta=t}var ge;function _e(){return(_e=e((()=>{_(),he.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},ge=(function e(t){function n(e){return t===1?new g(e):new he(e,t)}return n.beta=function(t){return e(+t)},n})(.85)})))()}function v(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function ve(e,t){this._context=e,this._k=(1-t)/6}var ye;function y(){return(y=e((()=>{ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:v(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:v(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},ye=(function e(t){function n(e){return new ve(e,t)}return n.tension=function(t){return e(+t)},n})(0)})))()}function b(e,t){this._context=e,this._k=(1-t)/6}var be;function x(){return(x=e((()=>{y(),b.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:v(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},be=(function e(t){function n(e){return new b(e,t)}return n.tension=function(t){return e(+t)},n})(0)})))()}function S(e,t){this._context=e,this._k=(1-t)/6}var xe;function C(){return(C=e((()=>{y(),S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:v(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},xe=(function e(t){function n(e){return new S(e,t)}return n.tension=function(t){return e(+t)},n})(0)})))()}function w(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Se(e,t){this._context=e,this._alpha=t}var T;function E(){return(E=e((()=>{ee(),y(),Se.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:w(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},T=(function e(t){function n(e){return t?new Se(e,t):new ve(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)})))()}function Ce(e,t){this._context=e,this._alpha=t}var we;function Te(){return(Te=e((()=>{x(),E(),Ce.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:w(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},we=(function e(t){function n(e){return t?new Ce(e,t):new b(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)})))()}function Ee(e,t){this._context=e,this._alpha=t}var De;function Oe(){return(Oe=e((()=>{C(),E(),Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:w(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},De=(function e(t){function n(e){return t?new Ee(e,t):new S(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)})))()}function ke(e){this._context=e}function Ae(e){return new ke(e)}function je(){return(je=e((()=>{ke.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}})))()}function Me(e){return e<0?-1:1}function Ne(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Me(a)+Me(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Pe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function D(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function O(e){this._context=e}function Fe(e){this._context=new Ie(e)}function Ie(e){this._context=e}function Le(e){return new O(e)}function Re(e){return new Fe(e)}function ze(){return(ze=e((()=>{O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:D(this,this._t0,Pe(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,D(this,Pe(this,n=Ne(this,e,t)),n);break;default:D(this,this._t0,n=Ne(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Fe.prototype=Object.create(O.prototype)).point=function(e,t){O.prototype.point.call(this,t,e)},Ie.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}}})))()}function Be(e){this._context=e}function Ve(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function He(e){return new Be(e)}function Ue(){return(Ue=e((()=>{Be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ve(e),i=Ve(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}})))()}function k(e,t){this._context=e,this._t=t}function We(e){return new k(e,.5)}function Ge(e){return new k(e,0)}function Ke(e){return new k(e,1)}function qe(){return(qe=e((()=>{k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}}})))()}function A(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Je(){}function Ye(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function j(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}function Xe(){return(Xe=e((()=>{})))()}var M,N,P,F,I,L,R,z,B,V,Ze,Qe,$e,et,tt,nt,rt,H,it,at,ot,st;function U(){return(U=e((()=>{M=`[object RegExp]`,N=`[object String]`,P=`[object Number]`,F=`[object Boolean]`,I=`[object Arguments]`,L=`[object Symbol]`,R=`[object Date]`,z=`[object Map]`,B=`[object Set]`,V=`[object Array]`,Ze=`[object ArrayBuffer]`,Qe=`[object Object]`,$e=`[object DataView]`,et=`[object Uint8Array]`,tt=`[object Uint8ClampedArray]`,nt=`[object Uint16Array]`,rt=`[object Uint32Array]`,H=`[object Int8Array]`,it=`[object Int16Array]`,at=`[object Int32Array]`,ot=`[object Float32Array]`,st=`[object Float64Array]`})))()}var ct;function lt(){return(lt=e((()=>{ct=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()})))()}function ut(e){return ct.Buffer!==void 0&&ct.Buffer.isBuffer(e)}function W(){return(W=e((()=>{lt()})))()}function dt(e){return Number.isSafeInteger(e)&&e>=0}function ft(e){return e!=null&&typeof e!=`function`&&dt(e.length)}function pt(){return(pt=e((()=>{})))()}function mt(e){return e===`__proto__`}function G(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function ht(){return(ht=e((()=>{})))()}function gt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _t(e,t){return K(e,void 0,e,/* @__PURE__ */ new Map,t)}function K(e,t,n,r=/* @__PURE__ */ new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(G(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=K(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=/* @__PURE__ */ new Map;r.set(e,t);for(let[a,o]of e)t.set(a,K(o,a,n,r,i));return t}if(e instanceof Set){let t=/* @__PURE__ */ new Set;r.set(e,t);for(let a of e)t.add(K(a,void 0,n,r,i));return t}if(ut(e))return e.subarray();if(gt(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=K(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),q(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),q(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),q(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,q(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),q(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),q(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),q(t,e,n,r,i),t}if(typeof e==`object`&&vt(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),q(t,e,n,r,i),t}return e}function q(e,t,n=e,r,i){let a=[...Object.keys(t),...Ye(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=K(t[s],s,n,r,i))}}function vt(e){switch(j(e)){case I:case V:case Ze:case $e:case F:case R:case ot:case st:case H:case it:case at:case z:case P:case Qe:case M:case B:case N:case L:case et:case tt:case nt:case rt:return!0;default:return!1}}function yt(){return(yt=e((()=>{U(),W()})))()}function bt(e,t){return _t(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(j(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),q(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case P:case N:case F:{let t=new e.constructor(e?.valueOf());return q(t,e),t}case I:{let t={};return q(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function xt(){return(xt=e((()=>{U(),yt()})))()}function St(e){return bt(e)}function Ct(){return(Ct=e((()=>{xt()})))()}function wt(e){return typeof e==`object`&&!!e&&j(e)===`[object Arguments]`}function Tt(){return(Tt=e((()=>{})))()}function Et(e){return typeof e==`object`&&!!e}function Dt(e){return Et(e)&&ft(e)}function Ot(){return(Ot=e((()=>{pt()})))()}function J(e){return gt(e)}function kt(){return(kt=e((()=>{})))()}function Y(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Y.Cache||Map),n}function At(){return(At=e((()=>{Y.Cache=Map})))()}function jt(e){if(G(e))return e;if(Array.isArray(e)||gt(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Mt(){return(Mt=e((()=>{})))()}function Nt(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Pt(i,t,r,/* @__PURE__ */ new Map)}return i}function Pt(e,t,n,r){if(G(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return jt(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)e in t||(t[e]=void 0)}let i=[...Object.keys(t),...Ye(t)];for(let a=0;a<i.length;a++){let o=i[a];if(mt(o))continue;let s=t[o],c=e[o];if(wt(s)&&(s={...s}),wt(c)&&(c={...c}),ut(s)&&(s=St(s)),Array.isArray(s)){if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(Dt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[]}let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||Et(c)&&Et(s)&&(A(c)||A(s)||J(c)||J(s))?e[o]=Pt(c,s,n,r):c==null&&A(s)?e[o]=Pt({},s,n,r):c==null&&J(s)?e[o]=St(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Ft(){return(Ft=e((()=>{Mt(),W(),Ct(),Tt(),Ot(),kt()})))()}function It(e,...t){return Nt(e,...t,Je)}function Lt(){return(Lt=e((()=>{Ft()})))()}function Rt(e,t){return e?Qt[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}function zt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,Zt.sanitizeUrl)(n)}function Bt(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Vt(e){let t,n=0;return e.forEach(e=>{n+=Bt(e,t),t=e}),Z(e,n/2)}function Ht(e){return e.length===1?e[0]:Vt(e)}function Ut(e,t,n){let r=structuredClone(n);o.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=Z(r,25+e),a=10+e*.5,s=Math.atan2(r[0].y-i.y,r[0].x-i.x),c={x:0,y:0};return t===`start_left`?(c.x=Math.sin(s+Math.PI)*a+(r[0].x+i.x)/2,c.y=-Math.cos(s+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(c.x=Math.sin(s-Math.PI)*a+(r[0].x+i.x)/2-5,c.y=-Math.cos(s-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(c.x=Math.sin(s)*a+(r[0].x+i.x)/2-5,c.y=-Math.cos(s)*a+(r[0].y+i.y)/2-5):(c.x=Math.sin(s)*a+(r[0].x+i.x)/2,c.y=-Math.cos(s)*a+(r[0].y+i.y)/2),c}function Wt(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}function Gt(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}function Kt(e,t){return Q(e,t).height}function X(e,t){return Q(e,t).width}function qt(e){return`str`in e}function Jt(e,t){return It({},e,t)}function Yt(e){return e??null}function Xt(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}var Zt,Qt,$t,en,tn,nn,rn,an,on,Z,sn,cn,ln,un,dn,fn,pn,mn,Q,hn,gn,_n,vn,$,yn,bn,xn,Sn;function Cn(){return(Cn=e((()=>{c(),r(),n(),Zt=te(),a(),At(),Lt(),Qt={curveBasis:ce,curveBasisClosed:ue,curveBasisOpen:pe,curveBumpX:ae,curveBumpY:oe,curveBundle:ge,curveCardinalClosed:be,curveCardinalOpen:xe,curveCardinal:ye,curveCatmullRomClosed:we,curveCatmullRomOpen:De,curveCatmullRom:T,curveLinear:re,curveLinearClosed:Ae,curveMonotoneX:Le,curveMonotoneY:Re,curveNatural:He,curveStep:We,curveStepAfter:Ke,curveStepBefore:Ge},$t=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,en=/* @__PURE__ */ t(function(e,t){let n=tn(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);f(e),r=u(r,[...e])}else r=n.args;if(!r)return;let i=l(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),tn=/* @__PURE__ */ t(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${$t.source})(?=[}][%]{2}).*
2
+ `,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),o.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=s.exec(e))!==null;)if(r.index===s.lastIndex&&s.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return o.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),nn=/* @__PURE__ */ t(function(e){return e.replace(s,``)},`removeDirectives`),rn=/* @__PURE__ */ t(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`),t(Rt,`interpolateToCurve`),t(zt,`formatUrl`),an=/* @__PURE__ */ t((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){o.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`),t(Bt,`distance`),t(Vt,`traverseEdge`),t(Ht,`calcLabelPosition`),on=/* @__PURE__ */ t((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),Z=/* @__PURE__ */ t((e,t)=>{let n,r=t;for(let t of e){if(n){let e=Bt(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:on((1-i)*n.x+i*t.x,5),y:on((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),sn=/* @__PURE__ */ t((e,t,n)=>{o.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=Z(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(a)*i+(t[0].x+r.x)/2,s.y=-Math.cos(a)*i+(t[0].y+r.y)/2,s},`calcCardinalityPosition`),t(Ut,`calcTerminalLabelPosition`),t(Wt,`getStylesFromArray`),cn=0,ln=/* @__PURE__ */ t(()=>(cn++,`id-`+Math.random().toString(36).substr(2,12)+`-`+cn),`generateId`),t(Gt,`makeRandomHex`),un=/* @__PURE__ */ t(e=>Gt(e.length),`random`),dn=/* @__PURE__ */ t(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),fn=/* @__PURE__ */ t(function(e,t){let n=t.text.replace(d.lineBreakRegex,` `),[,r]=$(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),pn=Y((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),d.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=X(`${e} `,n),c=X(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=mn(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),mn=Y((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(X(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`),t(Kt,`calculateTextHeight`),t(X,`calculateTextWidth`),Q=Y((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=$(n),s=[`sans-serif`,r],c=e.split(d.lineBreakRegex),l=[],u=i(`body`);if(!u.remove)return{width:0,height:0,lineHeight:0};let f=u.append(`svg`);for(let e of s){let t=0,n={width:0,height:0,lineHeight:0};for(let r of c){let i=dn();i.text=r||`​`;let s=fn(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}l.push(n)}return f.remove(),l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),hn=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{t(this,`InitIDGenerator`)}},_n=/* @__PURE__ */ t(function(e){return gn||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),gn.innerHTML=e,unescape(gn.textContent)},`entityDecode`),t(qt,`isDetailedError`),vn=/* @__PURE__ */ t((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),$=/* @__PURE__ */ t(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`),t(Jt,`cleanAndMerge`),yn={assignWithDepth:u,wrapLabel:pn,calculateTextHeight:Kt,calculateTextWidth:X,calculateTextDimensions:Q,cleanAndMerge:Jt,detectInit:en,detectDirective:tn,isSubstringInArray:rn,interpolateToCurve:Rt,calcLabelPosition:Ht,calcCardinalityPosition:sn,calcTerminalLabelPosition:Ut,formatUrl:zt,getStylesFromArray:Wt,generateId:ln,random:un,runFunc:an,entityDecode:_n,insertTitle:vn,isLabelCoordinateInPath:Xt,parseFontSize:$,InitIDGenerator:hn},bn=/* @__PURE__ */ t(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),xn=/* @__PURE__ */ t(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),Sn=/* @__PURE__ */ t((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`),t(Yt,`handleUndefinedAttr`),t(Xt,`isLabelCoordinateInPath`)})))()}export{Xe as $,Ze as A,H as B,ht as C,ae as Ct,W as D,re as Dt,ft as E,ie as Et,ot as F,B as G,P as H,st as I,nt as J,N as K,U as L,F as M,$e as N,ut as O,R as P,j as Q,it as R,wt as S,_ as St,pt as T,se as Tt,Qe as U,z as V,M as W,et as X,rt as Y,tt as Z,yn as _,y as _t,xn as a,He as at,J as b,de as bt,Sn as c,Re as ct,Cn as d,Te as dt,qe as et,Rt as f,T as ft,nn as g,ye as gt,un as h,x as ht,Jt as i,Ue as it,V as j,I as k,Wt as l,je as lt,$ as m,C as mt,Kt as n,Ge as nt,bn as o,ze as ot,qt as p,E as pt,L as q,X as r,We as rt,ln as s,Le as st,Q as t,Ke as tt,Yt as u,Oe as ut,pn as v,_e as vt,G as w,oe as wt,Tt as x,ce as xt,kt as y,me as yt,at as z};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{S as r,t as i}from"./src-C1iDJpBK.js";import{j as a,x as o}from"./chunk-DU6HZSFF-Bx48E1rg.js";var s;function c(){return(c=e((()=>{a(),n(),i(),s=/* @__PURE__ */ t(e=>{let{securityLevel:t}=o(),n=r(`body`);if(t===`sandbox`){let t=r(`#i${e}`).node()?.contentDocument??document;n=r(t.body)}return n.select(`#${e}`)},`selectSvgElement`)})))()}export{s as n,c as t};