@marimo-team/frontend 0.15.4 → 0.16.0-dev96986

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 (325) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +19 -0
  2. package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-SX7fDaTK.js} +1 -1
  3. package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-MJUW3b7C.js} +6 -6
  4. package/dist/assets/_baseEach-9_logFrf.js +1 -0
  5. package/dist/assets/_baseMap-NzEbKt5c.js +1 -0
  6. package/dist/assets/_baseUniq-C5LFcyNC.js +1 -0
  7. package/dist/assets/_createAggregator-ZRm2b6Zm.js +1 -0
  8. package/dist/assets/agent-panel-BBd11wNX.js +287 -0
  9. package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
  10. package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-DwAaEQfS.js} +1 -1
  11. package/dist/assets/architectureDiagram-W76B3OCA-BJmVXUoW.js +36 -0
  12. package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-KiwU-a3C.js} +1 -1
  13. package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-DzxZjE7B.js} +1 -1
  14. package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-DjmldG_J.js} +5 -5
  15. package/dist/assets/channel-DHcKBVM4.js +1 -0
  16. package/dist/assets/chat-panel-DgJZr0eS.js +3 -0
  17. package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-EUTQThiZ.js} +1 -1
  18. package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-DZAiDJxy.js} +1 -1
  19. package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-Bd0Czs-J.js} +1 -1
  20. package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-DEKMIknX.js} +1 -1
  21. package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-E0jwHU_n.js} +1 -1
  22. package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-BzaIHJbq.js} +1 -1
  23. package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-CZFYvqnm.js} +1 -1
  24. package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BNqnFjtv.js} +1 -1
  25. package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-D3J_mYrF.js} +1 -1
  26. package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +1 -0
  27. package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +1 -0
  28. package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-ifzRuAR3.js} +1 -1
  29. package/dist/assets/clone-CSxIll62.js +1 -0
  30. package/dist/assets/command-palette-D2fdVSET.js +1 -0
  31. package/dist/assets/common-Ku-cF_2J.js +1 -0
  32. package/dist/assets/{compile-Ct_jzdKr.js → compile-BgZlHW1c.js} +1 -1
  33. package/dist/assets/cose-bilkent-S5V4N54A-CVM83SqK.js +1 -0
  34. package/dist/assets/dagre-5GWH7T2D-ouQPkxT3.js +4 -0
  35. package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-B47j5GJJ.js} +1 -1
  36. package/dist/assets/datasources-panel-Bt41Zir-.js +1 -0
  37. package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-CZC_B7pK.js} +4 -4
  38. package/dist/assets/diagram-N5W7TBWH-CQ817ZdR.js +24 -0
  39. package/dist/assets/diagram-QEK2KX5R-DOK_psUO.js +43 -0
  40. package/dist/assets/diagram-S2PKOQOG-CVljmOW8.js +24 -0
  41. package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-C7yIvGg1.js} +1 -1
  42. package/dist/assets/edit-page-CyTMQV2u.js +129 -0
  43. package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-C7FjlUsY.js} +1 -1
  44. package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-DIOGM_CU.js} +1 -1
  45. package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-DYu8cEdc.js} +1 -1
  46. package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Ddb8RkFG.js} +1 -1
  47. package/dist/assets/file-explorer-panel-Oy9DbyFP.js +1 -0
  48. package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-CmvW5iTb.js} +1 -1
  49. package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-BaKQlCaT.js} +4 -4
  50. package/dist/assets/gitGraphDiagram-NY62KEGX-CWO24eP6.js +65 -0
  51. package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-CNDLEJ9a.js} +11 -11
  52. package/dist/assets/graph-BZKTtxsc.js +1 -0
  53. package/dist/assets/home-page-Bvwppn9N.js +9 -0
  54. package/dist/assets/{index-VPWqq2Pg.js → index-0XOUPdwT.js} +1 -1
  55. package/dist/assets/{index-uacyUula.js → index-BH7f3aiU.js} +1 -1
  56. package/dist/assets/{index-Dt9UWeWn.js → index-BJVyzkx5.js} +1 -1
  57. package/dist/assets/{index-BAH034Ue.js → index-B_d_JZGI.js} +1 -1
  58. package/dist/assets/{index-CB2pnVQG.js → index-BgXbBA39.js} +1 -1
  59. package/dist/assets/{index-B8llrTSo.js → index-Brf2DwUM.js} +1 -1
  60. package/dist/assets/{index-BLu5CX6z.js → index-CXrWwFX6.js} +1 -1
  61. package/dist/assets/{index-DyLSuOH1.js → index-CZaurnA9.js} +1 -1
  62. package/dist/assets/{index-BFSnz7iM.js → index-CerjupfZ.js} +1 -1
  63. package/dist/assets/{index-B7yXbrLa.js → index-D-tZfElD.js} +1 -1
  64. package/dist/assets/{index-c6If577Q.js → index-D3PqGupX.js} +1 -1
  65. package/dist/assets/{index-CSgxTUzD.js → index-DCkzth56.js} +1 -1
  66. package/dist/assets/{index-DWOaniGT.js → index-DFrGFNW1.js} +1 -1
  67. package/dist/assets/{index-CPN7TRA1.js → index-DZhOPkOB.js} +1 -1
  68. package/dist/assets/index-DadI618h.css +1 -0
  69. package/dist/assets/{index-DqzMPAC8.js → index-DkntzpX4.js} +2 -2
  70. package/dist/assets/{index-B1_GXGaP.js → index-DmgwT3sx.js} +1 -1
  71. package/dist/assets/index-PmY0x4Zd.js +578 -0
  72. package/dist/assets/{index-Bq516OmX.js → index-WXJFkQHg.js} +1 -1
  73. package/dist/assets/{index-DSU75csX.js → index-qE8lHQ-N.js} +1 -1
  74. package/dist/assets/{index-DMomwMcN.js → index-zrSUQXha.js} +1 -1
  75. package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +2 -0
  76. package/dist/assets/isEmpty-D1t7Gran.js +1 -0
  77. package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-D4Rp6H_h.js} +1 -1
  78. package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-DFt9DftA.js} +4 -4
  79. package/dist/assets/layout-D8WXi2_g.js +1 -0
  80. package/dist/assets/linear-BwY8e5hA.js +1 -0
  81. package/dist/assets/links-4B6ldZ5P.js +7 -0
  82. package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-Dxiyt7dO.js} +1 -1
  83. package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
  84. package/dist/assets/markdown-renderer-VDu-NBKB.js +263 -0
  85. package/dist/assets/mermaid-B-O-Puyi.js +1 -0
  86. package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-BFFCqfOn.js} +41 -41
  87. package/dist/assets/min-DtVSfYKl.js +1 -0
  88. package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-kyvIY8Dg.js} +2 -2
  89. package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-GjLB2UK4.js} +1 -1
  90. package/dist/assets/outline-panel-CMJjOoN7.js +1 -0
  91. package/dist/assets/packages-panel-nfXB-bKW.js +1 -0
  92. package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-D8JFQcWR.js} +3 -3
  93. package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-Nf8GzxXG.js} +1 -1
  94. package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-CnW9p7ZA.js} +1 -1
  95. package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-CCUxF8BZ.js} +1 -1
  96. package/dist/assets/run-page-Bl4p3AbZ.js +1 -0
  97. package/dist/assets/sankeyDiagram-GR3RE2ED-Sr8kDwP1.js +10 -0
  98. package/dist/assets/scratchpad-panel-Ja1Mu-W3.js +1 -0
  99. package/dist/assets/secrets-panel-B-3fcSyP.js +1 -0
  100. package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-CBJ152Q3.js} +4 -4
  101. package/dist/assets/{slides-component-DMjQomc3.css → slides-component-C-LoGC1U.css} +1 -1
  102. package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-DGtsVP5o.js} +1 -1
  103. package/dist/assets/snippets-panel-ClNnwKBM.js +1 -0
  104. package/dist/assets/sortBy-D47H6Vyl.js +1 -0
  105. package/dist/assets/state-B_RCHTH5.js +1 -0
  106. package/dist/assets/stateDiagram-KXAO66HF-BlBFSAZr.js +1 -0
  107. package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +1 -0
  108. package/dist/assets/storage-BNcWOH3-.js +26 -0
  109. package/dist/assets/terminal-CATzv5Hd.js +10 -0
  110. package/dist/assets/time-CsYqILfB.js +1 -0
  111. package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-CGrhjuAs.js} +1 -1
  112. package/dist/assets/tracing-DUbJtOyq.js +2 -0
  113. package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DmzqPUtc.js} +2 -2
  114. package/dist/assets/{trash-UBqfK4mR.js → trash-rxdjLzkf.js} +1 -1
  115. package/dist/assets/{tree-XiEycetl.js → tree-C2Ul1h1C.js} +1 -1
  116. package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-N9hyUpyj.js} +20 -20
  117. package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
  118. package/dist/assets/variable-panel-BbgupOdG.js +1 -0
  119. package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-CR_MHOBT.js} +1 -1
  120. package/dist/assets/worker-fHbtoWvT.js +1 -0
  121. package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-jdLZsMb2.js} +1 -1
  122. package/dist/index.html +2 -2
  123. package/package.json +10 -5
  124. package/src/__tests__/mocks.ts +43 -0
  125. package/src/components/app-config/user-config-form.tsx +78 -1
  126. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +116 -65
  127. package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
  128. package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
  129. package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
  130. package/src/components/chat/acp/__tests__/state.test.ts +38 -42
  131. package/src/components/chat/acp/agent-docs.tsx +33 -6
  132. package/src/components/chat/acp/agent-panel.css +0 -18
  133. package/src/components/chat/acp/agent-panel.tsx +394 -72
  134. package/src/components/chat/acp/agent-selector.tsx +7 -1
  135. package/src/components/chat/acp/blocks.tsx +40 -10
  136. package/src/components/chat/acp/common.tsx +10 -2
  137. package/src/components/chat/acp/context-utils.ts +127 -0
  138. package/src/components/chat/acp/prompt.ts +96 -53
  139. package/src/components/chat/acp/state.ts +1 -1
  140. package/src/components/chat/acp/types.ts +8 -0
  141. package/src/components/chat/chat-panel.tsx +28 -89
  142. package/src/components/chat/chat-utils.ts +127 -1
  143. package/src/components/chat/markdown-renderer.css +39 -0
  144. package/src/components/chat/markdown-renderer.tsx +12 -47
  145. package/src/components/chat/tool-call-accordion.tsx +148 -26
  146. package/src/components/data-table/SearchBar.tsx +8 -7
  147. package/src/components/data-table/__tests__/column_formatting.test.ts +50 -35
  148. package/src/components/data-table/__tests__/data-table.test.tsx +39 -1
  149. package/src/components/data-table/cell-hover-template/feature.ts +14 -0
  150. package/src/components/data-table/cell-hover-template/types.ts +11 -0
  151. package/src/components/data-table/charts/components/form-fields.tsx +41 -37
  152. package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
  153. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +5 -2
  154. package/src/components/data-table/column-formatting/feature.ts +62 -29
  155. package/src/components/data-table/column-formatting/types.ts +1 -0
  156. package/src/components/data-table/column-header.tsx +3 -1
  157. package/src/components/data-table/column-summary/chart-spec-model.tsx +24 -7
  158. package/src/components/data-table/column-summary/column-summary.tsx +18 -9
  159. package/src/components/data-table/columns.tsx +42 -18
  160. package/src/components/data-table/data-table.tsx +10 -2
  161. package/src/components/data-table/date-popover.tsx +85 -75
  162. package/src/components/data-table/filter-pills.tsx +14 -9
  163. package/src/components/data-table/header-items.tsx +5 -1
  164. package/src/components/data-table/pagination.tsx +20 -13
  165. package/src/components/data-table/renderers.tsx +28 -0
  166. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +10 -8
  167. package/src/components/datasources/column-preview.tsx +6 -2
  168. package/src/components/datasources/datasources.tsx +8 -12
  169. package/src/components/editor/Cell.tsx +6 -0
  170. package/src/components/editor/actions/name-cell-input.tsx +6 -1
  171. package/src/components/editor/actions/useCellActionButton.tsx +3 -1
  172. package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
  173. package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
  174. package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
  175. package/src/components/editor/ai/completion-handlers.tsx +44 -6
  176. package/src/components/editor/ai/completion-utils.ts +92 -0
  177. package/src/components/editor/ai/transport/chat-transport.tsx +39 -0
  178. package/src/components/editor/cell/CellStatus.tsx +23 -20
  179. package/src/components/editor/cell/CreateCellButton.tsx +3 -4
  180. package/src/components/editor/cell/StagedAICell.tsx +51 -0
  181. package/src/components/editor/cell/cell-actions.tsx +2 -1
  182. package/src/components/editor/cell/code/language-toggle.tsx +3 -4
  183. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +39 -28
  184. package/src/components/editor/controls/notebook-menu-dropdown.tsx +4 -2
  185. package/src/components/editor/file-tree/requesting-tree.tsx +14 -8
  186. package/src/components/editor/renderers/CellArray.tsx +3 -4
  187. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
  188. package/src/components/editor/renderers/slides-layout/types.ts +1 -0
  189. package/src/components/pages/home-page.tsx +4 -1
  190. package/src/components/slides/slides-component.tsx +1 -1
  191. package/src/components/slides/slides.css +6 -0
  192. package/src/components/terminal/__tests__/state.test.ts +207 -0
  193. package/src/components/terminal/hooks.ts +41 -0
  194. package/src/components/terminal/state.ts +75 -0
  195. package/src/components/terminal/terminal.tsx +334 -13
  196. package/src/components/terminal/theme.tsx +57 -0
  197. package/src/components/tracing/tracing-spec.ts +5 -4
  198. package/src/components/ui/range-slider.tsx +4 -2
  199. package/src/components/ui/slider.tsx +3 -1
  200. package/src/components/variables/variables-table.tsx +3 -0
  201. package/src/core/MarimoApp.tsx +9 -6
  202. package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
  203. package/src/core/ai/context/__tests__/registry.test.ts +6 -4
  204. package/src/core/ai/context/providers/cell-output.ts +3 -2
  205. package/src/core/ai/context/providers/error.ts +3 -1
  206. package/src/core/ai/context/providers/file.ts +7 -2
  207. package/src/core/ai/context/providers/tables.ts +3 -2
  208. package/src/core/ai/context/providers/variable.ts +6 -4
  209. package/src/core/ai/staged-cells.ts +208 -0
  210. package/src/core/cells/cells.ts +1 -1
  211. package/src/core/cells/logs.ts +1 -1
  212. package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
  213. package/src/core/codemirror/language/LanguageAdapters.ts +9 -3
  214. package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
  215. package/src/core/codemirror/lsp/notebook-lsp.ts +8 -2
  216. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  217. package/src/core/codemirror/rtc/loro/awareness.ts +52 -17
  218. package/src/core/codemirror/rtc/loro/sync.ts +12 -4
  219. package/src/core/config/config-schema.ts +1 -0
  220. package/src/core/config/config.ts +4 -0
  221. package/src/core/hotkeys/hotkeys.ts +8 -4
  222. package/src/core/i18n/__tests__/locale-provider.test.tsx +176 -0
  223. package/src/core/i18n/locale-provider.tsx +35 -0
  224. package/src/core/i18n/with-locale.tsx +12 -0
  225. package/src/core/islands/components/web-components.tsx +13 -10
  226. package/src/core/islands/main.ts +2 -2
  227. package/src/core/kernel/RuntimeState.ts +4 -1
  228. package/src/core/kernel/messages.ts +8 -12
  229. package/src/core/network/DeferredRequestRegistry.ts +16 -4
  230. package/src/core/runtime/runtime.ts +5 -4
  231. package/src/core/saving/__tests__/filename.test.ts +37 -0
  232. package/src/core/static/__tests__/download-html.test.ts +43 -1
  233. package/src/core/wasm/bridge.ts +5 -1
  234. package/src/core/wasm/store.ts +4 -1
  235. package/src/core/wasm/worker/message-buffer.ts +3 -2
  236. package/src/core/websocket/types.ts +22 -16
  237. package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
  238. package/src/css/app/Cell.css +11 -0
  239. package/src/hooks/useFormatting.ts +97 -0
  240. package/src/hooks/useTimer.ts +8 -5
  241. package/src/plugins/core/RenderHTML.tsx +36 -2
  242. package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
  243. package/src/plugins/core/registerReactComponent.tsx +44 -10
  244. package/src/plugins/impl/DataTablePlugin.tsx +4 -0
  245. package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
  246. package/src/plugins/impl/RangeSliderPlugin.tsx +5 -3
  247. package/src/plugins/impl/SliderPlugin.tsx +3 -1
  248. package/src/plugins/impl/anywidget/model.ts +16 -5
  249. package/src/plugins/impl/data-editor/types.ts +7 -5
  250. package/src/plugins/impl/data-explorer/components/column-summary.tsx +20 -13
  251. package/src/plugins/impl/panel/utils.ts +6 -4
  252. package/src/plugins/layout/OutlinePlugin.tsx +69 -0
  253. package/src/plugins/layout/StatPlugin.tsx +4 -1
  254. package/src/plugins/plugins.ts +2 -0
  255. package/src/stories/cell.stories.tsx +1 -1
  256. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  257. package/src/utils/__tests__/cell-urls.test.ts +29 -0
  258. package/src/utils/__tests__/dates.test.ts +45 -24
  259. package/src/utils/__tests__/filenames.test.ts +18 -0
  260. package/src/utils/__tests__/numbers.test.ts +42 -30
  261. package/src/utils/__tests__/once.test.ts +187 -0
  262. package/src/utils/__tests__/path.test.ts +38 -0
  263. package/src/utils/__tests__/urls.test.ts +56 -1
  264. package/src/utils/dates.ts +15 -10
  265. package/src/utils/edit-distance.ts +8 -6
  266. package/src/utils/errors.ts +9 -0
  267. package/src/utils/id-tree.tsx +21 -10
  268. package/src/utils/localStorage.ts +13 -4
  269. package/src/utils/numbers.ts +11 -11
  270. package/src/utils/once.ts +32 -0
  271. package/src/utils/paths.ts +4 -1
  272. package/src/utils/pluralize.ts +12 -5
  273. package/src/utils/python-poet/poet.ts +30 -15
  274. package/src/utils/time.ts +5 -1
  275. package/dist/assets/ConnectedDataExplorerComponent-Cn5-l2X1.js +0 -19
  276. package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
  277. package/dist/assets/_baseMap-DBVArUYD.js +0 -1
  278. package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
  279. package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
  280. package/dist/assets/agent-panel-COUYnuIK.js +0 -475
  281. package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
  282. package/dist/assets/channel-CjhbjOv4.js +0 -1
  283. package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
  284. package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
  285. package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
  286. package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
  287. package/dist/assets/clone-DM1YNjEn.js +0 -1
  288. package/dist/assets/command-palette-S0bzQp7v.js +0 -1
  289. package/dist/assets/common-B8U9k2Ly.js +0 -1
  290. package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
  291. package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
  292. package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
  293. package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
  294. package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
  295. package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
  296. package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
  297. package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
  298. package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
  299. package/dist/assets/graph-CssCVWIq.js +0 -1
  300. package/dist/assets/home-page-9eW6qida.js +0 -9
  301. package/dist/assets/index-CknhX2Vy.css +0 -1
  302. package/dist/assets/index-DcCIe7np.js +0 -28
  303. package/dist/assets/index-OC46250R.js +0 -570
  304. package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
  305. package/dist/assets/layout-DpQrxGW-.js +0 -1
  306. package/dist/assets/linear-NsreOeBF.js +0 -1
  307. package/dist/assets/links-CbvGxbsJ.js +0 -7
  308. package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
  309. package/dist/assets/min-D259kI3t.js +0 -1
  310. package/dist/assets/outline-panel-uvsS-YEQ.js +0 -1
  311. package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
  312. package/dist/assets/run-page-Bb68qdhQ.js +0 -1
  313. package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
  314. package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
  315. package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
  316. package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
  317. package/dist/assets/sortBy-aLGA-PGK.js +0 -1
  318. package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
  319. package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
  320. package/dist/assets/storage-CGlP4lCF.js +0 -26
  321. package/dist/assets/terminal-CxkHubcu.js +0 -9
  322. package/dist/assets/time-D2nr1UgQ.js +0 -1
  323. package/dist/assets/tracing-kTqHxa7q.js +0 -2
  324. package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
  325. package/dist/assets/worker-X5rxzQGQ.js +0 -1
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-5GWH7T2D-BfpcVBgq.js","./graph-CssCVWIq.js","./index-OC46250R.js","./index-CknhX2Vy.css","./_baseUniq-Dk7ZPJ3N.js","./_baseEach-C1FLm7WW.js","./layout-DpQrxGW-.js","./min-D259kI3t.js","./_baseMap-DBVArUYD.js","./sortBy-aLGA-PGK.js","./clone-DM1YNjEn.js","./transform-D9VCJYws.js","./timer-Bqd5yn_a.js","./step-BwsUM5iJ.js","./cose-bilkent-S5V4N54A-wz1Sfx7j.js","./cytoscape.esm-UcEO6FGL.js","./c4Diagram-FPNF74CW-BHPzDxE2.js","./chunk-TZMSLE5B-D-h3ahXI.js","./flowDiagram-PVAE7QVJ-DfbIRSAW.js","./chunk-FMBD7UC4-R5o-nSiG.js","./chunk-55IACEB6-DdzvO3HR.js","./chunk-QN33PNHL-DqS9-FYm.js","./channel-CjhbjOv4.js","./erDiagram-AWTI2OKA-E84mAle_.js","./gitGraphDiagram-NY62KEGX-C1t6QtVa.js","./chunk-4BX2VUAB-DLxaCNYh.js","./chunk-QZHKN3VN-BZ-TzajS.js","./treemap-75Q7IDZK-CnuVFbBG.js","./_createAggregator-Bn38fDd3.js","./ganttDiagram-OWAHRB6G-DR4HZ1z_.js","./time-D2nr1UgQ.js","./linear-NsreOeBF.js","./init-DLRA0X12.js","./infoDiagram-STP46IZ2-CwiAoz9f.js","./pieDiagram-ADFJNKIX-C5IQ5DBZ.js","./arc-Cuwikxov.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-LMRXKWRM-CFXFnQxx.js","./xychartDiagram-6GGTOJPD-Dcz3O-A3.js","./range-CtcPcB_L.js","./requirementDiagram-4UW4RH46-D9bPC89T.js","./sequenceDiagram-C3RYC4MD-6N7_hY4k.js","./classDiagram-KNZD7YFC-DHs5cFzy.js","./chunk-K7UQS3LO-DxaMrGgG.js","./classDiagram-v2-RKCZMP56-DHs5cFzy.js","./stateDiagram-KXAO66HF-Bd68WT3b.js","./chunk-TVAH2DTR-BsgP2dyv.js","./stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js","./journeyDiagram-BIP6EPQ6-BBiFyygf.js","./timeline-definition-XQNQX7LJ-BEaynAiY.js","./mindmap-definition-Q6HEUPPD-CVLQNn1q.js","./kanban-definition-6OIFK2YF-DhgA6Nt6.js","./sankeyDiagram-GR3RE2ED-BSJOau8E.js","./colors-bszWmPJw.js","./diagram-S2PKOQOG-tLScBy7Z.js","./diagram-QEK2KX5R-ZTc3qikh.js","./blockDiagram-QIGZ2CNN-BrOkAf_c.js","./architectureDiagram-W76B3OCA-DBzWQKKu.js","./diagram-N5W7TBWH-Bf0oqqQh.js","./index-BEQfoZiP.js"])))=>i.map(i=>d[i]);
2
- import{A as ny,aY as sy,fo as ly,fF as hy,fG as cy,fl as dy,fH as uy,fI as py,a9 as gy,a0 as gt,fJ as Sn,fE as fy,dP as $p,__tla as my}from"./index-OC46250R.js";import{s as dt}from"./transform-D9VCJYws.js";import{o as Ep,q as Op,r as Dp,u as Ip,v as Pp,x as Np,y as yy,z as Tn,A as Rp,B as by,C as xy,D as qp,E as Cy,F as ky,G as wy,H as Sy,I as Ty,k as Bn,l as By}from"./step-BwsUM5iJ.js";let ga,zp,Ge,Qt,vn,Mn,li,Lt,fa,Ln,_n,Fn,ma,An,$e,Wp,_r,ya,hi,ba,$n,et,En,Xe,W,X,jp,u,On,Dn,xa,Hp,In,Ct,ue,ci,Ca,ke,ka,Y,wa,Pn,Sa,Nn,Yp,Up,Vp,U,Gp,Rn,qn,zn,Xp,Ze,Wn,jn,Hn,Zp,Yn,ut,Ta,kt,ie,Un,Ht,Vn,Ee,Ba,E,Gn,Ke,Kp,Qp,Xn,Jp,Zn,Kn,Xt,Qn,Jn,ts,tg,es,vy=Promise.all([(()=>{try{return my}catch{}})()]).then(async()=>{var fr,mr,yr,br,xr,Cr,kr,wr,Ue;var eg=Object.prototype.hasOwnProperty;Sa=function(e){if(e==null)return!0;if(ny(e)&&(sy(e)||typeof e=="string"||typeof e.splice=="function"||ly(e)||hy(e)||cy(e)))return!e.length;var t=dy(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(uy(e))return!py(e).length;for(var r in e)if(eg.call(e,r))return!1;return!0};class rs{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r)}this._x0=t,this._y0=r}}function is(e){return new rs(e,!0)}function as(e){return new rs(e,!1)}let os,va;ma={name:"mermaid",version:"11.11.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},va={exports:{}};var rg=(os||(os=1,va.exports=(function(){var e=1e3,t=6e4,r=36e5,i="millisecond",a="second",o="minute",s="hour",n="day",c="week",l="month",h="quarter",d="year",p="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var T=["th","st","nd","rd"],M=F%100;return"["+F+(T[(M-20)%10]||T[M]||T[0])+"]"}},y=function(F,T,M){var A=String(F);return!A||A.length>=T?F:""+Array(T+1-A.length).join(M)+F},x={s:y,z:function(F){var T=-F.utcOffset(),M=Math.abs(T),A=Math.floor(M/60),_=M%60;return(T<=0?"+":"-")+y(A,2,"0")+":"+y(_,2,"0")},m:function F(T,M){if(T.date()<M.date())return-F(M,T);var A=12*(M.year()-T.year())+(M.month()-T.month()),_=T.clone().add(A,l),$=M-_<0,O=T.clone().add(A+($?-1:1),l);return+(-(A+(M-_)/($?_-O:O-_))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:l,y:d,w:c,d:n,D:p,h:s,m:o,s:a,ms:i,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},w="en",L={};L[w]=b;var v="$isDayjsObject",C=function(F){return F instanceof R||!(!F||!F[v])},S=function F(T,M,A){var _;if(!T)return w;if(typeof T=="string"){var $=T.toLowerCase();L[$]&&(_=$),M&&(L[$]=M,_=$);var O=T.split("-");if(!_&&O.length>1)return F(O[0])}else{var tt=T.name;L[tt]=T,_=tt}return!A&&_&&(w=_),_||!A&&w},P=function(F,T){if(C(F))return F.clone();var M=typeof T=="object"?T:{};return M.date=F,M.args=arguments,new R(M)},D=x;D.l=S,D.i=C,D.w=function(F,T){return P(F,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var R=(function(){function F(M){this.$L=S(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[v]=!0}var T=F.prototype;return T.parse=function(M){this.$d=(function(A){var _=A.date,$=A.utc;if(_===null)return new Date(NaN);if(D.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var O=_.match(f);if(O){var tt=O[2]-1||0,it=(O[7]||"0").substring(0,3);return $?new Date(Date.UTC(O[1],tt,O[3]||1,O[4]||0,O[5]||0,O[6]||0,it)):new Date(O[1],tt,O[3]||1,O[4]||0,O[5]||0,O[6]||0,it)}}return new Date(_)})(M),this.init()},T.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},T.$utils=function(){return D},T.isValid=function(){return this.$d.toString()!==g},T.isSame=function(M,A){var _=P(M);return this.startOf(A)<=_&&_<=this.endOf(A)},T.isAfter=function(M,A){return P(M)<this.startOf(A)},T.isBefore=function(M,A){return this.endOf(A)<P(M)},T.$g=function(M,A,_){return D.u(M)?this[A]:this.set(_,M)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(M,A){var _=this,$=!!D.u(A)||A,O=D.p(M),tt=function(st,ht){var yt=D.w(_.$u?Date.UTC(_.$y,ht,st):new Date(_.$y,ht,st),_);return $?yt:yt.endOf(n)},it=function(st,ht){return D.w(_.toDate()[st].apply(_.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(ht)),_)},lt=this.$W,rt=this.$M,xt=this.$D,ft="set"+(this.$u?"UTC":"");switch(O){case d:return $?tt(1,0):tt(31,11);case l:return $?tt(1,rt):tt(0,rt+1);case c:var Gt=this.$locale().weekStart||0,Z=(lt<Gt?lt+7:lt)-Gt;return tt($?xt-Z:xt+(6-Z),rt);case n:case p:return it(ft+"Hours",0);case s:return it(ft+"Minutes",1);case o:return it(ft+"Seconds",2);case a:return it(ft+"Milliseconds",3);default:return this.clone()}},T.endOf=function(M){return this.startOf(M,!1)},T.$set=function(M,A){var _,$=D.p(M),O="set"+(this.$u?"UTC":""),tt=(_={},_[n]=O+"Date",_[p]=O+"Date",_[l]=O+"Month",_[d]=O+"FullYear",_[s]=O+"Hours",_[o]=O+"Minutes",_[a]=O+"Seconds",_[i]=O+"Milliseconds",_)[$],it=$===n?this.$D+(A-this.$W):A;if($===l||$===d){var lt=this.clone().set(p,1);lt.$d[tt](it),lt.init(),this.$d=lt.set(p,Math.min(this.$D,lt.daysInMonth())).$d}else tt&&this.$d[tt](it);return this.init(),this},T.set=function(M,A){return this.clone().$set(M,A)},T.get=function(M){return this[D.p(M)]()},T.add=function(M,A){var _,$=this;M=Number(M);var O=D.p(A),tt=function(rt){var xt=P($);return D.w(xt.date(xt.date()+Math.round(rt*M)),$)};if(O===l)return this.set(l,this.$M+M);if(O===d)return this.set(d,this.$y+M);if(O===n)return tt(1);if(O===c)return tt(7);var it=(_={},_[o]=t,_[s]=r,_[a]=e,_)[O]||1,lt=this.$d.getTime()+M*it;return D.w(lt,this)},T.subtract=function(M,A){return this.add(-1*M,A)},T.format=function(M){var A=this,_=this.$locale();if(!this.isValid())return _.invalidDate||g;var $=M||"YYYY-MM-DDTHH:mm:ssZ",O=D.z(this),tt=this.$H,it=this.$m,lt=this.$M,rt=_.weekdays,xt=_.months,ft=_.meridiem,Gt=function(ht,yt,qt,Et){return ht&&(ht[yt]||ht(A,$))||qt[yt].slice(0,Et)},Z=function(ht){return D.s(tt%12||12,ht,"0")},st=ft||function(ht,yt,qt){var Et=ht<12?"AM":"PM";return qt?Et.toLowerCase():Et};return $.replace(m,function(ht,yt){return yt||(function(qt){switch(qt){case"YY":return String(A.$y).slice(-2);case"YYYY":return D.s(A.$y,4,"0");case"M":return lt+1;case"MM":return D.s(lt+1,2,"0");case"MMM":return Gt(_.monthsShort,lt,xt,3);case"MMMM":return Gt(xt,lt);case"D":return A.$D;case"DD":return D.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return Gt(_.weekdaysMin,A.$W,rt,2);case"ddd":return Gt(_.weekdaysShort,A.$W,rt,3);case"dddd":return rt[A.$W];case"H":return String(tt);case"HH":return D.s(tt,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return st(tt,it,!0);case"A":return st(tt,it,!1);case"m":return String(it);case"mm":return D.s(it,2,"0");case"s":return String(A.$s);case"ss":return D.s(A.$s,2,"0");case"SSS":return D.s(A.$ms,3,"0");case"Z":return O}return null})(ht)||O.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(M,A,_){var $,O=this,tt=D.p(A),it=P(M),lt=(it.utcOffset()-this.utcOffset())*t,rt=this-it,xt=function(){return D.m(O,it)};switch(tt){case d:$=xt()/12;break;case l:$=xt();break;case h:$=xt()/3;break;case c:$=(rt-lt)/6048e5;break;case n:$=(rt-lt)/864e5;break;case s:$=rt/r;break;case o:$=rt/t;break;case a:$=rt/e;break;default:$=rt}return _?$:D.a($)},T.daysInMonth=function(){return this.endOf(l).$D},T.$locale=function(){return L[this.$L]},T.locale=function(M,A){if(!M)return this.$L;var _=this.clone(),$=S(M,A,!0);return $&&(_.$L=$),_},T.clone=function(){return D.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},F})(),I=R.prototype;return P.prototype=I,[["$ms",i],["$s",a],["$m",o],["$H",s],["$W",n],["$M",l],["$y",d],["$D",p]].forEach(function(F){I[F[1]]=function(T){return this.$g(T,F[0],F[1])}}),P.extend=function(F,T){return F.$i||(F(T,R,P),F.$i=!0),P},P.locale=S,P.isDayjs=C,P.unix=function(F){return P(1e3*F)},P.en=L[w],P.Ls=L,P.p={},P})()),va.exports);Hn=gy(rg);let Ma,ae,di,Yt;Ma=Object.defineProperty,u=(e,t)=>Ma(e,"name",{value:t,configurable:!0}),vn=(e,t)=>{for(var r in t)Ma(e,r,{get:t[r],enumerable:!0})},ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},E={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},di=u(function(e="fatal"){let t=ae.fatal;typeof e=="string"?e.toLowerCase()in ae&&(t=ae[e]):typeof e=="number"&&(t=e),E.trace=()=>{},E.debug=()=>{},E.info=()=>{},E.warn=()=>{},E.error=()=>{},E.fatal=()=>{},t<=ae.fatal&&(E.fatal=console.error?console.error.bind(console,Yt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Yt("FATAL"))),t<=ae.error&&(E.error=console.error?console.error.bind(console,Yt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Yt("ERROR"))),t<=ae.warn&&(E.warn=console.warn?console.warn.bind(console,Yt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Yt("WARN"))),t<=ae.info&&(E.info=console.info?console.info.bind(console,Yt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Yt("INFO"))),t<=ae.debug&&(E.debug=console.debug?console.debug.bind(console,Yt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("DEBUG"))),t<=ae.trace&&(E.trace=console.debug?console.debug.bind(console,Yt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("TRACE")))},"setLogLevel"),Yt=u(e=>`%c${Hn().format("ss.SSS")} : ${e} : `,"format");let Fr,pe;Fr={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return 2.55*r;e/=360,t/=100;const a=(r/=100)<.5?r*(1+t):r+t-r*t,o=2*r-a;switch(i){case"r":return 255*Fr.hue2rgb(o,a,e+1/3);case"g":return 255*Fr.hue2rgb(o,a,e);case"b":return 255*Fr.hue2rgb(o,a,e-1/3)}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),o=Math.min(e,t,r),s=(a+o)/2;if(i==="l")return 100*s;if(a===o)return 0;const n=a-o;if(i==="s")return 100*(s>.5?n/(2-a-o):n/(a+o));switch(a){case e:return 60*((t-r)/n+(t<r?6:0));case t:return 60*((r-e)/n+2);case r:return 60*((e-t)/n+4);default:return-1}}},et={channel:Fr,lang:{clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(1e10*e)/1e10},unit:{dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},pe={};for(let e=0;e<=255;e++)pe[e]=et.unit.dec2hex(e);const La=0,Qe=1,Oe=2;class ig{constructor(){this.type=La}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=La}is(t){return this.type===t}}let Ar,De,we,Je,tr,_a,ns,Fa,B,N,Aa,$a,ss,ls,hs;Ar=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new ig}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=La,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:i}=e;t===void 0&&(e.h=et.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=et.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=et.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:i}=e;t===void 0&&(e.r=et.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=et.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=et.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(Oe)||t===void 0?(this._ensureHSL(),et.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(Oe)||t===void 0?(this._ensureHSL(),et.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(Oe)||t===void 0?(this._ensureHSL(),et.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Qe)||t===void 0?(this._ensureRGB(),et.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Qe)||t===void 0?(this._ensureRGB(),et.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Qe)||t===void 0?(this._ensureRGB(),et.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Qe),this.changed=!0,this.data.r=e}set g(e){this.type.set(Qe),this.changed=!0,this.data.g=e}set b(e){this.type.set(Qe),this.changed=!0,this.data.b=e}set h(e){this.type.set(Oe),this.changed=!0,this.data.h=e}set s(e){this.type.set(Oe),this.changed=!0,this.data.s=e}set l(e){this.type.set(Oe),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),De={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(De.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,o=a%4==0,s=a>4,n=s?1:17,c=s?8:4,l=o?0:-1,h=s?255:15;return Ar.set({r:(i>>c*(l+3)&h)*n,g:(i>>c*(l+2)&h)*n,b:(i>>c*(l+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${pe[Math.round(t)]}${pe[Math.round(r)]}${pe[Math.round(i)]}${pe[Math.round(255*a)]}`:`#${pe[Math.round(t)]}${pe[Math.round(r)]}${pe[Math.round(i)]}`}},we={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(we.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return et.channel.clamp.h(.9*parseFloat(r));case"rad":return et.channel.clamp.h(180*parseFloat(r)/Math.PI);case"turn":return et.channel.clamp.h(360*parseFloat(r))}}return et.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(we.re);if(!r)return;const[,i,a,o,s,n]=r;return Ar.set({h:we._hue2deg(i),s:et.channel.clamp.s(parseFloat(a)),l:et.channel.clamp.l(parseFloat(o)),a:s?et.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${et.lang.round(t)}, ${et.lang.round(r)}%, ${et.lang.round(i)}%, ${a})`:`hsl(${et.lang.round(t)}, ${et.lang.round(r)}%, ${et.lang.round(i)}%)`}},Je={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Je.colors[e];if(t)return De.parse(t)},stringify:e=>{const t=De.stringify(e);for(const r in Je.colors)if(Je.colors[r]===t)return r}},tr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(tr.re);if(!r)return;const[,i,a,o,s,n,c,l,h]=r;return Ar.set({r:et.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:et.channel.clamp.g(s?2.55*parseFloat(o):parseFloat(o)),b:et.channel.clamp.b(c?2.55*parseFloat(n):parseFloat(n)),a:l?et.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${et.lang.round(t)}, ${et.lang.round(r)}, ${et.lang.round(i)}, ${et.lang.round(a)})`:`rgb(${et.lang.round(t)}, ${et.lang.round(r)}, ${et.lang.round(i)})`}},Qt={format:{keyword:Je,hex:De,rgb:tr,rgba:tr,hsl:we,hsla:we},parse:e=>{if(typeof e!="string")return e;const t=De.parse(e)||tr.parse(e)||we.parse(e)||Je.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Oe)||e.data.r===void 0?we.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?tr.stringify(e):De.stringify(e)},_a=(e,t)=>{const r=Qt.parse(e);for(const i in t)r[i]=et.channel.clamp[i](t[i]);return Qt.stringify(r)},Ge=(e,t,r=0,i=1)=>{if(typeof e!="number")return _a(e,{a:t});const a=Ar.set({r:et.channel.clamp.r(e),g:et.channel.clamp.g(t),b:et.channel.clamp.b(r),a:et.channel.clamp.a(i)});return Qt.stringify(a)},ns=e=>(t=>{const{r,g:i,b:a}=Qt.parse(t),o=.2126*et.channel.toLinear(r)+.7152*et.channel.toLinear(i)+.0722*et.channel.toLinear(a);return et.lang.round(o)})(e)>=.5,Xe=e=>!ns(e),Fa=(e,t,r)=>{const i=Qt.parse(e),a=i[t],o=et.channel.clamp[t](a+r);return a!==o&&(i[t]=o),Qt.stringify(i)},W=(e,t)=>Fa(e,"l",t),X=(e,t)=>Fa(e,"l",-t),B=(e,t)=>{const r=Qt.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return _a(e,i)},N=(e,t=100)=>{const r=Qt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((i,a,o=50)=>{const{r:s,g:n,b:c,a:l}=Qt.parse(i),{r:h,g:d,b:p,a:g}=Qt.parse(a),f=o/100,m=2*f-1,b=l-g,y=((m*b===-1?m:(m+b)/(1+m*b))+1)/2,x=1-y;return Ge(s*y+h*x,n*y+d*x,c*y+p*x,l*f+g*(1-f))})(r,e,t)},{entries:Aa,setPrototypeOf:$a,isFrozen:ss,getPrototypeOf:ls,getOwnPropertyDescriptor:hs}=Object;let{freeze:Dt,seal:Zt,create:cs}=Object,{apply:Ea,construct:Oa}=typeof Reflect<"u"&&Reflect;Dt||(Dt=function(e){return e}),Zt||(Zt=function(e){return e}),Ea||(Ea=function(e,t,r){return e.apply(t,r)}),Oa||(Oa=function(e,t){return new e(...t)});const ui=Pt(Array.prototype.forEach),ag=Pt(Array.prototype.lastIndexOf),ds=Pt(Array.prototype.pop),$r=Pt(Array.prototype.push),og=Pt(Array.prototype.splice),pi=Pt(String.prototype.toLowerCase),Da=Pt(String.prototype.toString),us=Pt(String.prototype.match),Er=Pt(String.prototype.replace),ng=Pt(String.prototype.indexOf),sg=Pt(String.prototype.trim),Jt=Pt(Object.prototype.hasOwnProperty),It=Pt(RegExp.prototype.test),Or=(ps=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Oa(ps,t)});var ps;function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return Ea(e,t,i)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pi;$a&&$a(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const o=r(a);o!==a&&(ss(t)||(t[i]=o),a=o)}e[a]=!0}return e}function lg(e){for(let t=0;t<e.length;t++)Jt(e,t)||(e[t]=null);return e}function ge(e){const t=cs(null);for(const[r,i]of Aa(e))Jt(e,r)&&(Array.isArray(i)?t[r]=lg(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ge(i):t[r]=i);return t}function Dr(e,t){for(;e!==null;){const r=hs(e,t);if(r){if(r.get)return Pt(r.get);if(typeof r.value=="function")return Pt(r.value)}e=ls(e)}return function(){return null}}const gs=Dt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ia=Dt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Pa=Dt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hg=Dt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Na=Dt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cg=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fs=Dt(["#text"]),ms=Dt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ra=Dt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ys=Dt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),gi=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dg=Zt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ug=Zt(/<%[\w\W]*|[\w\W]*%>/gm),pg=Zt(/\$\{[\w\W]*/gm),gg=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),fg=Zt(/^aria-[\-\w]+$/),bs=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mg=Zt(/^(?:\w+script|data):/i),yg=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xs=Zt(/^html$/i),bg=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i);var Cs=Object.freeze({__proto__:null,ARIA_ATTR:fg,ATTR_WHITESPACE:yg,CUSTOM_ELEMENT:bg,DATA_ATTR:gg,DOCTYPE_NAME:xs,ERB_EXPR:ug,IS_ALLOWED_URI:bs,IS_SCRIPT_OR_DATA:mg,MUSTACHE_EXPR:dg,TMPLIT_EXPR:pg});const xg=1,Cg=3,kg=7,wg=8,Sg=9,Tg=function(){return typeof window>"u"?null:window};let fi,Ie,qa,er,ks,za,Se,mi,yi,Wa,ws,bi,Ir,Pr,Ft,Ss,Ts,Bs,vs,Ms,Ls,_s,Fs,oe,te,ja,Ha,As,Nr,$s,Pe,Nt,Ne,Rr,qr,Es,Os,Ds,Ya,Ua,Va,Is,zr,Ps,Ga,Ns,Xa,Rs,qs;Ie=(function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tg();const r=k=>e(k);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==Sg||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:n,Node:c,Element:l,NodeFilter:h,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:f}=t,m=l.prototype,b=Dr(m,"cloneNode"),y=Dr(m,"remove"),x=Dr(m,"nextSibling"),w=Dr(m,"childNodes"),L=Dr(m,"parentNode");if(typeof n=="function"){const k=i.createElement("template");k.content&&k.content.ownerDocument&&(i=k.content.ownerDocument)}let v,C="";const{implementation:S,createNodeIterator:P,createDocumentFragment:D,getElementsByTagName:R}=i,{importNode:I}=a;let F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported=typeof Aa=="function"&&typeof L=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:T,ERB_EXPR:M,TMPLIT_EXPR:A,DATA_ATTR:_,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:tt,CUSTOM_ELEMENT:it}=Cs;let{IS_ALLOWED_URI:lt}=Cs,rt=null;const xt=ot({},[...gs,...Ia,...Pa,...Na,...fs]);let ft=null;const Gt=ot({},[...ms,...Ra,...ys,...gi]);let Z=Object.seal(cs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),st=null,ht=null,yt=!0,qt=!0,Et=!1,oi=!0,he=!1,sa=!0,Ve=!1,gn=!1,fn=!1,Sr=!1,la=!1,ha=!1,gp=!0,fp=!1,mn=!0,ni=!1,Tr={},Br=null;const mp=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let yp=null;const bp=ot({},["audio","video","img","source","image","track"]);let yn=null;const xp=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ca="http://www.w3.org/1998/Math/MathML",da="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml";let vr=xe,bn=!1,xn=null;const ey=ot({},[ca,da,xe],Da);let ua=ot({},["mi","mo","mn","ms","mtext"]),pa=ot({},["annotation-xml"]);const ry=ot({},["title","style","font","a","script"]);let si=null;const iy=["application/xhtml+xml","text/html"];let Mt=null,Mr=null;const ay=i.createElement("form"),Cp=function(k){return k instanceof RegExp||k instanceof Function},Cn=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Mr||Mr!==k){if(k&&typeof k=="object"||(k={}),k=ge(k),si=iy.indexOf(k.PARSER_MEDIA_TYPE)===-1?"text/html":k.PARSER_MEDIA_TYPE,Mt=si==="application/xhtml+xml"?Da:pi,rt=Jt(k,"ALLOWED_TAGS")?ot({},k.ALLOWED_TAGS,Mt):xt,ft=Jt(k,"ALLOWED_ATTR")?ot({},k.ALLOWED_ATTR,Mt):Gt,xn=Jt(k,"ALLOWED_NAMESPACES")?ot({},k.ALLOWED_NAMESPACES,Da):ey,yn=Jt(k,"ADD_URI_SAFE_ATTR")?ot(ge(xp),k.ADD_URI_SAFE_ATTR,Mt):xp,yp=Jt(k,"ADD_DATA_URI_TAGS")?ot(ge(bp),k.ADD_DATA_URI_TAGS,Mt):bp,Br=Jt(k,"FORBID_CONTENTS")?ot({},k.FORBID_CONTENTS,Mt):mp,st=Jt(k,"FORBID_TAGS")?ot({},k.FORBID_TAGS,Mt):ge({}),ht=Jt(k,"FORBID_ATTR")?ot({},k.FORBID_ATTR,Mt):ge({}),Tr=!!Jt(k,"USE_PROFILES")&&k.USE_PROFILES,yt=k.ALLOW_ARIA_ATTR!==!1,qt=k.ALLOW_DATA_ATTR!==!1,Et=k.ALLOW_UNKNOWN_PROTOCOLS||!1,oi=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=k.SAFE_FOR_TEMPLATES||!1,sa=k.SAFE_FOR_XML!==!1,Ve=k.WHOLE_DOCUMENT||!1,Sr=k.RETURN_DOM||!1,la=k.RETURN_DOM_FRAGMENT||!1,ha=k.RETURN_TRUSTED_TYPE||!1,fn=k.FORCE_BODY||!1,gp=k.SANITIZE_DOM!==!1,fp=k.SANITIZE_NAMED_PROPS||!1,mn=k.KEEP_CONTENT!==!1,ni=k.IN_PLACE||!1,lt=k.ALLOWED_URI_REGEXP||bs,vr=k.NAMESPACE||xe,ua=k.MATHML_TEXT_INTEGRATION_POINTS||ua,pa=k.HTML_INTEGRATION_POINTS||pa,Z=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&Cp(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&Cp(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),he&&(qt=!1),la&&(Sr=!0),Tr&&(rt=ot({},fs),ft=[],Tr.html===!0&&(ot(rt,gs),ot(ft,ms)),Tr.svg===!0&&(ot(rt,Ia),ot(ft,Ra),ot(ft,gi)),Tr.svgFilters===!0&&(ot(rt,Pa),ot(ft,Ra),ot(ft,gi)),Tr.mathMl===!0&&(ot(rt,Na),ot(ft,ys),ot(ft,gi))),k.ADD_TAGS&&(rt===xt&&(rt=ge(rt)),ot(rt,k.ADD_TAGS,Mt)),k.ADD_ATTR&&(ft===Gt&&(ft=ge(ft)),ot(ft,k.ADD_ATTR,Mt)),k.ADD_URI_SAFE_ATTR&&ot(yn,k.ADD_URI_SAFE_ATTR,Mt),k.FORBID_CONTENTS&&(Br===mp&&(Br=ge(Br)),ot(Br,k.FORBID_CONTENTS,Mt)),mn&&(rt["#text"]=!0),Ve&&ot(rt,["html","head","body"]),rt.table&&(ot(rt,["tbody"]),delete st.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,C=v.createHTML("")}else v===void 0&&(v=(function(V,q){if(typeof V!="object"||typeof V.createPolicy!="function")return null;let ct=null;const pt="data-tt-policy-suffix";q&&q.hasAttribute(pt)&&(ct=q.getAttribute(pt));const at="dompurify"+(ct?"#"+ct:"");try{return V.createPolicy(at,{createHTML:Bt=>Bt,createScriptURL:Bt=>Bt})}catch{return console.warn("TrustedTypes policy "+at+" could not be created."),null}})(f,o)),v!==null&&typeof C=="string"&&(C=v.createHTML(""));Dt&&Dt(k),Mr=k}},kp=ot({},[...Ia,...Pa,...hg]),wp=ot({},[...Na,...cg]),ce=function(k){$r(r.removed,{element:k});try{L(k).removeChild(k)}catch{y(k)}},Lr=function(k,V){try{$r(r.removed,{attribute:V.getAttributeNode(k),from:V})}catch{$r(r.removed,{attribute:null,from:V})}if(V.removeAttribute(k),k==="is")if(Sr||la)try{ce(V)}catch{}else try{V.setAttribute(k,"")}catch{}},Sp=function(k){let V=null,q=null;if(fn)k="<remove></remove>"+k;else{const at=us(k,/^[\r\n\t ]+/);q=at&&at[0]}si==="application/xhtml+xml"&&vr===xe&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const ct=v?v.createHTML(k):k;if(vr===xe)try{V=new g().parseFromString(ct,si)}catch{}if(!V||!V.documentElement){V=S.createDocument(vr,"template",null);try{V.documentElement.innerHTML=bn?C:ct}catch{}}const pt=V.body||V.documentElement;return k&&q&&pt.insertBefore(i.createTextNode(q),pt.childNodes[0]||null),vr===xe?R.call(V,Ve?"html":"body")[0]:Ve?V.documentElement:pt},Tp=function(k){return P.call(k.ownerDocument||k,k,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},kn=function(k){return k instanceof p&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof d)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Bp=function(k){return typeof c=="function"&&k instanceof c};function Ce(k,V,q){ui(k,ct=>{ct.call(r,V,q,Mr)})}const vp=function(k){let V=null;if(Ce(F.beforeSanitizeElements,k,null),kn(k))return ce(k),!0;const q=Mt(k.nodeName);if(Ce(F.uponSanitizeElement,k,{tagName:q,allowedTags:rt}),sa&&k.hasChildNodes()&&!Bp(k.firstElementChild)&&It(/<[/\w!]/g,k.innerHTML)&&It(/<[/\w!]/g,k.textContent)||k.nodeType===kg||sa&&k.nodeType===wg&&It(/<[/\w]/g,k.data))return ce(k),!0;if(!rt[q]||st[q]){if(!st[q]&&Lp(q)&&(Z.tagNameCheck instanceof RegExp&&It(Z.tagNameCheck,q)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(q)))return!1;if(mn&&!Br[q]){const ct=L(k)||k.parentNode,pt=w(k)||k.childNodes;if(pt&&ct)for(let at=pt.length-1;at>=0;--at){const Bt=b(pt[at],!0);Bt.__removalCount=(k.__removalCount||0)+1,ct.insertBefore(Bt,x(k))}}return ce(k),!0}return k instanceof l&&!(function(ct){let pt=L(ct);pt&&pt.tagName||(pt={namespaceURI:vr,tagName:"template"});const at=pi(ct.tagName),Bt=pi(pt.tagName);return!!xn[ct.namespaceURI]&&(ct.namespaceURI===da?pt.namespaceURI===xe?at==="svg":pt.namespaceURI===ca?at==="svg"&&(Bt==="annotation-xml"||ua[Bt]):!!kp[at]:ct.namespaceURI===ca?pt.namespaceURI===xe?at==="math":pt.namespaceURI===da?at==="math"&&pa[Bt]:!!wp[at]:ct.namespaceURI===xe?!(pt.namespaceURI===da&&!pa[Bt])&&!(pt.namespaceURI===ca&&!ua[Bt])&&!wp[at]&&(ry[at]||!kp[at]):!(si!=="application/xhtml+xml"||!xn[ct.namespaceURI]))})(k)?(ce(k),!0):q!=="noscript"&&q!=="noembed"&&q!=="noframes"||!It(/<\/no(script|embed|frames)/i,k.innerHTML)?(he&&k.nodeType===Cg&&(V=k.textContent,ui([T,M,A],ct=>{V=Er(V,ct," ")}),k.textContent!==V&&($r(r.removed,{element:k.cloneNode()}),k.textContent=V)),Ce(F.afterSanitizeElements,k,null),!1):(ce(k),!0)},Mp=function(k,V,q){if(gp&&(V==="id"||V==="name")&&(q in i||q in ay))return!1;if(!(qt&&!ht[V]&&It(_,V))){if(!(yt&&It($,V))){if(!ft[V]||ht[V]){if(!(Lp(k)&&(Z.tagNameCheck instanceof RegExp&&It(Z.tagNameCheck,k)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(k))&&(Z.attributeNameCheck instanceof RegExp&&It(Z.attributeNameCheck,V)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(V))||V==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&It(Z.tagNameCheck,q)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(q))))return!1}else if(!yn[V]){if(!It(lt,Er(q,tt,""))){if((V!=="src"&&V!=="xlink:href"&&V!=="href"||k==="script"||ng(q,"data:")!==0||!yp[k])&&!(Et&&!It(O,Er(q,tt,"")))){if(q)return!1}}}}}return!0},Lp=function(k){return k!=="annotation-xml"&&us(k,it)},_p=function(k){Ce(F.beforeSanitizeAttributes,k,null);const{attributes:V}=k;if(!V||kn(k))return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ft,forceKeepAttr:void 0};let ct=V.length;for(;ct--;){const pt=V[ct],{name:at,namespaceURI:Bt,value:Ae}=pt,de=Mt(at),wn=Ae;let Ot=at==="value"?wn:sg(wn);if(q.attrName=de,q.attrValue=Ot,q.keepAttr=!0,q.forceKeepAttr=void 0,Ce(F.uponSanitizeAttribute,k,q),Ot=q.attrValue,!fp||de!=="id"&&de!=="name"||(Lr(at,k),Ot="user-content-"+Ot),sa&&It(/((--!?|])>)|<\/(style|title)/i,Ot)){Lr(at,k);continue}if(q.forceKeepAttr)continue;if(!q.keepAttr){Lr(at,k);continue}if(!oi&&It(/\/>/i,Ot)){Lr(at,k);continue}he&&ui([T,M,A],Ap=>{Ot=Er(Ot,Ap," ")});const Fp=Mt(k.nodeName);if(Mp(Fp,de,Ot)){if(v&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Bt)switch(f.getAttributeType(Fp,de)){case"TrustedHTML":Ot=v.createHTML(Ot);break;case"TrustedScriptURL":Ot=v.createScriptURL(Ot)}if(Ot!==wn)try{Bt?k.setAttributeNS(Bt,at,Ot):k.setAttribute(at,Ot),kn(k)?ce(k):ds(r.removed)}catch{Lr(at,k)}}else Lr(at,k)}Ce(F.afterSanitizeAttributes,k,null)},oy=function k(V){let q=null;const ct=Tp(V);for(Ce(F.beforeSanitizeShadowDOM,V,null);q=ct.nextNode();)Ce(F.uponSanitizeShadowNode,q,null),vp(q),_p(q),q.content instanceof s&&k(q.content);Ce(F.afterSanitizeShadowDOM,V,null)};return r.sanitize=function(k){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,ct=null,pt=null,at=null;if(bn=!k,bn&&(k="<!-->"),typeof k!="string"&&!Bp(k)){if(typeof k.toString!="function")throw Or("toString is not a function");if(typeof(k=k.toString())!="string")throw Or("dirty is not a string, aborting")}if(!r.isSupported)return k;if(gn||Cn(V),r.removed=[],typeof k=="string"&&(ni=!1),ni){if(k.nodeName){const de=Mt(k.nodeName);if(!rt[de]||st[de])throw Or("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof c)q=Sp("<!---->"),ct=q.ownerDocument.importNode(k,!0),ct.nodeType===xg&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?q=ct:q.appendChild(ct);else{if(!Sr&&!he&&!Ve&&k.indexOf("<")===-1)return v&&ha?v.createHTML(k):k;if(q=Sp(k),!q)return Sr?null:ha?C:""}q&&fn&&ce(q.firstChild);const Bt=Tp(ni?k:q);for(;pt=Bt.nextNode();)vp(pt),_p(pt),pt.content instanceof s&&oy(pt.content);if(ni)return k;if(Sr){if(la)for(at=D.call(q.ownerDocument);q.firstChild;)at.appendChild(q.firstChild);else at=q;return(ft.shadowroot||ft.shadowrootmode)&&(at=I.call(a,at,!0)),at}let Ae=Ve?q.outerHTML:q.innerHTML;return Ve&&rt["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&It(xs,q.ownerDocument.doctype.name)&&(Ae="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
3
- `+Ae),he&&ui([T,M,A],de=>{Ae=Er(Ae,de," ")}),v&&ha?v.createHTML(Ae):Ae},r.setConfig=function(){Cn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),gn=!0},r.clearConfig=function(){Mr=null,gn=!1},r.isValidAttribute=function(k,V,q){Mr||Cn({});const ct=Mt(k),pt=Mt(V);return Mp(ct,pt,q)},r.addHook=function(k,V){typeof V=="function"&&$r(F[k],V)},r.removeHook=function(k,V){if(V!==void 0){const q=ag(F[k],V);return q===-1?void 0:og(F[k],q,1)[0]}return ds(F[k])},r.removeHooks=function(k){F[k]=[]},r.removeAllHooks=function(){F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r})(),qa=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,er=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ks=/\s*%%.*\n/gm,za=(fr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},u(fr,"UnknownDiagramError"),fr),Se={},mi=u(function(e,t){e=e.replace(qa,"").replace(er,"").replace(ks,`
4
- `);for(const[r,{detector:i}]of Object.entries(Se))if(i(e,t))return r;throw new za(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),yi=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)Wa(t,r,i)},"registerLazyLoadedDiagrams"),Wa=u((e,t,r)=>{Se[e]&&E.warn(`Detector with key ${e} already exists. Overwriting.`),Se[e]={detector:t,loader:r},E.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),ws=u(e=>Se[e].loader,"getDiagramLoader"),bi=u((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>bi(e,o,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]!="object"||e[o]!==void 0&&typeof e[o]!="object"?(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o]):(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=bi(e[o],t[o],{depth:r-1,clobber:i}))}),e)},"assignWithDepth"),kt=bi,Ir="#ffffff",Pr="#f2f2f2",Ft=u((e,t)=>B(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),Ss=(mr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v,C;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.darkMode)for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=X(this["cScale"+S],75);else for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=X(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||N(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||W(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||X(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||B(this.mainBkg,{h:180,s:-15,l:t*(5+3*S)}),this["surfacePeer"+S]=this["surfacePeer"+S]||B(this.mainBkg,{h:180,s:-15,l:t*(8+3*S)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||B(this.primaryColor,{h:64}),this.fillType3=this.fillType3||B(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||B(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||B(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||B(this.primaryColor,{h:128}),this.fillType7=this.fillType7||B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-10}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||B(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((p=this.xyChart)==null?void 0:p.backgroundColor)||this.background,titleColor:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((b=this.xyChart)==null?void 0:b.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(mr,"Theme"),mr),Ts=u(e=>{const t=new Ss;return t.calculate(e),t},"getThemeVariables"),Bs=(yr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ge(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=X("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=X(this.sectionBkgColor,10),this.taskBorderColor=Ge(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ge(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.secondBkg=W(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=W(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||W(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{h:30,s:-30,l:-(4*C-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((p=this.radar)==null?void 0:p.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((b=this.radar)==null?void 0:b.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((x=this.radar)==null?void 0:x.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||B(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||B(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||B(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||B(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||B(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(yr,"Theme"),yr),vs=u(e=>{const t=new Bs;return t.calculate(e),t},"getThemeVariables"),Ms=(br=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=B(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ge(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||B(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{h:30,l:-(7+5*C)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||B(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-30}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||B(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||B(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||X(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(br,"Theme"),br),An=u(e=>{const t=new Ms;return t.calculate(e),t},"getThemeVariables"),Ls=(xr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=W("#cde498",10),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.actorBorder=X(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||B(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{h:30,s:-30,l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||B(this.primaryColor,{l:-30}),this.pie5=this.pie5||B(this.secondaryColor,{l:-30}),this.pie6=this.pie6||B(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||B(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(xr,"Theme"),xr),_s=u(e=>{const t=new Ls;return t.calculate(e),t},"getThemeVariables"),Fs=(Cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||W(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=X(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=X(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((p=this.radar)==null?void 0:p.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((b=this.radar)==null?void 0:b.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((x=this.radar)==null?void 0:x.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||B(this.primaryColor,{h:-30}),this.git4=this.pie5||B(this.primaryColor,{h:-60}),this.git5=this.pie6||B(this.primaryColor,{h:-90}),this.git6=this.pie7||B(this.primaryColor,{h:60}),this.git7=this.pie8||B(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Cr,"Theme"),Cr),oe={base:{getThemeVariables:Ts},dark:{getThemeVariables:vs},default:{getThemeVariables:An},forest:{getThemeVariables:_s},neutral:{getThemeVariables:u(e=>{const t=new Fs;return t.calculate(e),t},"getThemeVariables")}},te={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},ja={...te,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:oe.default.getThemeVariables(),sequence:{...te.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...te.gantt,tickInterval:void 0,useWidth:void 0},c4:{...te.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...te.flowchart,inheritDir:!1},external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...te.pie,useWidth:984},xyChart:{...te.xyChart,useWidth:void 0},requirement:{...te.requirement,useWidth:void 0},packet:{...te.packet},radar:{...te.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Ha=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ha(e[i],"")]:[...r,t+i],[]),"keyify"),As=new Set(Ha(ja,"")),fa=ja,Nr=u(e=>{if(E.debug("sanitizeDirective called with",e),typeof e=="object"&&e!=null)if(Array.isArray(e))e.forEach(t=>Nr(t));else{for(const t of Object.keys(e)){if(E.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!As.has(t)||e[t]==null){E.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){E.debug("sanitizing object",t),Nr(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(E.debug("sanitizing css option",t),e[t]=$s(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}E.debug("After sanitization",e)}},"sanitizeDirective"),$s=u(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Pe=Object.freeze(fa),Nt=kt({},Pe),Ne=[],Rr=kt({},Pe),qr=u((e,t)=>{let r=kt({},e),i={};for(const a of t)Va(a),i=kt(i,a);if(r=kt(r,i),i.theme&&i.theme in oe){const a=kt({},fi),o=kt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in oe&&(r.themeVariables=oe[r.theme].getThemeVariables(o))}return Xa(Rr=r),Rr},"updateCurrentConfig"),Es=u(e=>(Nt=kt({},Pe),Nt=kt(Nt,e),e.theme&&oe[e.theme]&&(Nt.themeVariables=oe[e.theme].getThemeVariables(e.themeVariables)),qr(Nt,Ne),Nt),"setSiteConfig"),Os=u(e=>{fi=kt({},e)},"saveConfigFromInitialize"),Ds=u(e=>(Nt=kt(Nt,e),qr(Nt,Ne),Nt),"updateSiteConfig"),Ya=u(()=>kt({},Nt),"getSiteConfig"),Ua=u(e=>(Xa(e),kt(Rr,e),Lt()),"setConfig"),Lt=u(()=>kt({},Rr),"getConfig"),Va=u(e=>{e&&(["secure",...Nt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(E.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Va(e[t])}))},"sanitize"),Is=u(e=>{var t;Nr(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ne.push(e),qr(Nt,Ne)},"addDirective"),zr=u((e=Nt)=>{qr(e,Ne=[])},"reset"),Ps={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ga={},Ns=u(e=>{Ga[e]||(E.warn(Ps[e]),Ga[e]=!0)},"issueWarning"),Xa=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ns("LAZY_LOAD_DEPRECATED")},"checkConfig"),Xp=u(()=>{let e={};fi&&(e=kt(e,fi));for(const t of Ne)e=kt(e,t);return e},"getUserDefinedConfig"),Ke=/<br\s*\/?>/gi,Rs=u(e=>e?Qa(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),qs=(()=>{let e=!1;return()=>{e||(zs(),e=!0)}})();function zs(){const e="data-temp-href-target";Ie.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ie.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}u(zs,"setupDompurifyHooks");let Za,Ka,Ws,js,Hs,Ys,Qa,Us,Vs,xi,Gs,Xs,Ja,Ci,Zs,Ks,Qs,Wr,Js,tl,el;Za=u(e=>(qs(),Ie.sanitize(e)),"removeScript"),Ka=u((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Za(e):i!=="loose"&&(e=(e=(e=Qa(e)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),e=Ys(e))}return e},"sanitizeMore"),Ht=u((e,t)=>e&&(e=t.dompurifyConfig?Ie.sanitize(Ka(e,t),t.dompurifyConfig).toString():Ie.sanitize(Ka(e,t),{FORBID_TAGS:["style"]}).toString()),"sanitizeText"),Ws=u((e,t)=>typeof e=="string"?Ht(e,t):e.flat().map(r=>Ht(r,t)),"sanitizeTextOrArray"),js=u(e=>Ke.test(e),"hasBreaks"),Hs=u(e=>e.split(Ke),"splitBreaks"),Ys=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Qa=u(e=>e.replace(Ke,"#br#"),"breakToPlaceholder"),ya=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Ct=u(e=>e!==!1&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),Us=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Vs=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ba=u(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const o=t[i-1],s=t[i+1];Gs(o,s)&&(a=o+","+s,i++,r.pop())}r.push(Xs(a))}return r.join("")},"parseGenericTypes"),xi=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Gs=u((e,t)=>{const r=xi(e,"~"),i=xi(t,"~");return r===1&&i===1},"shouldCombineSets"),Xs=u(e=>{const t=xi(e,"~");let r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),o=i.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)i[a]="<",i[o]=">",a=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ja=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ci=/\$\$(.*)\$\$/g,$e=u(e=>{var t;return(((t=e.match(Ci))==null?void 0:t.length)??0)>0},"hasKatex"),Wp=u(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await hi(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),Zs=u(async(e,t)=>{if(!$e(e))return e;if(!(Ja()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ci,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:a}=await import("./katex-LV4FpwlL.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!Ja()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ke).map(a=>$e(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Ci,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),hi=u(async(e,t)=>Ht(await Zs(e,t),t),"renderKatexSanitized"),Ee={getRows:Rs,sanitizeText:Ht,sanitizeTextOrArray:Ws,hasBreaks:js,splitBreaks:Hs,lineBreakRegex:Ke,removeScript:Za,getUrl:ya,evaluate:Ct,getMax:Us,getMin:Vs},Ks=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Qs=u(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ta=u(function(e,t,r,i){const a=Qs(t,r,i);Ks(e,a)},"configureSvgSize"),En=u(function(e,t,r,i){const a=t.node().getBBox(),o=a.width,s=a.height;E.info(`SVG bounds: ${o}x${s}`,a);let n=0,c=0;E.info(`Graph bounds: ${n}x${c}`,e),n=o+2*r,c=s+2*r,E.info(`Calculated bounds: ${n}x${c}`),Ta(t,c,n,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),Wr={},Js=u((e,t,r)=>{let i="";return e in Wr&&Wr[e]?i=Wr[e](r):E.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-5GWH7T2D-ouQPkxT3.js","./graph-BZKTtxsc.js","./index-PmY0x4Zd.js","./index-DadI618h.css","./_baseUniq-C5LFcyNC.js","./_baseEach-9_logFrf.js","./isEmpty-D1t7Gran.js","./layout-D8WXi2_g.js","./min-DtVSfYKl.js","./_baseMap-NzEbKt5c.js","./sortBy-D47H6Vyl.js","./clone-CSxIll62.js","./transform-D9VCJYws.js","./timer-Bqd5yn_a.js","./step-BwsUM5iJ.js","./cose-bilkent-S5V4N54A-CVM83SqK.js","./cytoscape.esm-UcEO6FGL.js","./c4Diagram-FPNF74CW-DjmldG_J.js","./chunk-TZMSLE5B-BNqnFjtv.js","./flowDiagram-PVAE7QVJ-CmvW5iTb.js","./chunk-FMBD7UC4-Bd0Czs-J.js","./chunk-55IACEB6-DZAiDJxy.js","./chunk-QN33PNHL-E0jwHU_n.js","./channel-DHcKBVM4.js","./erDiagram-AWTI2OKA-DYu8cEdc.js","./gitGraphDiagram-NY62KEGX-CWO24eP6.js","./chunk-4BX2VUAB-EUTQThiZ.js","./chunk-QZHKN3VN-BzaIHJbq.js","./treemap-75Q7IDZK-N9hyUpyj.js","./_createAggregator-ZRm2b6Zm.js","./ganttDiagram-OWAHRB6G-BaKQlCaT.js","./time-CsYqILfB.js","./linear-BwY8e5hA.js","./init-DLRA0X12.js","./infoDiagram-STP46IZ2-CAuVVehw.js","./pieDiagram-ADFJNKIX-D8JFQcWR.js","./arc-Cuwikxov.js","./ordinal-DDUp3AbE.js","./quadrantDiagram-LMRXKWRM-Nf8GzxXG.js","./xychartDiagram-6GGTOJPD-jdLZsMb2.js","./range-CtcPcB_L.js","./requirementDiagram-4UW4RH46-CCUxF8BZ.js","./sequenceDiagram-C3RYC4MD-CBJ152Q3.js","./classDiagram-KNZD7YFC-D-xwLnlX.js","./chunk-K7UQS3LO-DEKMIknX.js","./classDiagram-v2-RKCZMP56-D-xwLnlX.js","./stateDiagram-KXAO66HF-BlBFSAZr.js","./chunk-TVAH2DTR-CZFYvqnm.js","./stateDiagram-v2-UMBNRL4Z-DbA-iToo.js","./journeyDiagram-BIP6EPQ6-D4Rp6H_h.js","./timeline-definition-XQNQX7LJ-CGrhjuAs.js","./mindmap-definition-Q6HEUPPD-kyvIY8Dg.js","./kanban-definition-6OIFK2YF-DFt9DftA.js","./sankeyDiagram-GR3RE2ED-Sr8kDwP1.js","./colors-bszWmPJw.js","./diagram-S2PKOQOG-CVljmOW8.js","./diagram-QEK2KX5R-DOK_psUO.js","./blockDiagram-QIGZ2CNN-DzxZjE7B.js","./architectureDiagram-W76B3OCA-BJmVXUoW.js","./diagram-N5W7TBWH-CQ817ZdR.js","./index-BEQfoZiP.js"])))=>i.map(i=>d[i]);
2
+ import{ai as oy,a9 as gt,gc as wn,gb as ny,gd as Ap,__tla as sy}from"./index-PmY0x4Zd.js";import{s as dt}from"./transform-D9VCJYws.js";import{o as $p,q as Ep,r as Dp,u as Op,v as Ip,x as Pp,y as ly,z as Sn,A as Np,B as hy,C as cy,D as qp,E as dy,F as uy,G as py,H as gy,I as fy,k as Tn,l as my}from"./step-BwsUM5iJ.js";import{i as Rp}from"./isEmpty-D1t7Gran.js";let ga,zp,Ge,Qt,Bn,vn,li,Lt,fa,Mn,Ln,_n,ma,Fn,$e,Wp,_r,ya,hi,ba,An,et,$n,Xe,W,X,jp,u,En,Dn,xa,Hp,On,Ct,ue,ci,Ca,ke,ka,Y,wa,In,Pn,Yp,Up,Vp,U,Gp,Nn,qn,Rn,Xp,Ze,zn,Wn,jn,Zp,Hn,ut,Sa,kt,ie,Yn,Ht,Un,Ee,Ta,E,Vn,Ke,Kp,Qp,Gn,Jp,Xn,Zn,Xt,Kn,Qn,Jn,tg,ts,yy=Promise.all([(()=>{try{return sy}catch{}})()]).then(async()=>{var fr,mr,yr,br,xr,Cr,kr,wr,Ue;class es{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r)}this._x0=t,this._y0=r}}function rs(e){return new es(e,!0)}function is(e){return new es(e,!1)}let as,Ba;ma={name:"mermaid",version:"11.11.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.0",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.28.9","typedoc-plugin-markdown":"^4.8.0",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},Ba={exports:{}};var eg=(as||(as=1,Ba.exports=(function(){var e=1e3,t=6e4,r=36e5,i="millisecond",a="second",o="minute",s="hour",n="day",c="week",l="month",h="quarter",d="year",p="date",g="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var T=["th","st","nd","rd"],M=F%100;return"["+F+(T[(M-20)%10]||T[M]||T[0])+"]"}},y=function(F,T,M){var A=String(F);return!A||A.length>=T?F:""+Array(T+1-A.length).join(M)+F},x={s:y,z:function(F){var T=-F.utcOffset(),M=Math.abs(T),A=Math.floor(M/60),_=M%60;return(T<=0?"+":"-")+y(A,2,"0")+":"+y(_,2,"0")},m:function F(T,M){if(T.date()<M.date())return-F(M,T);var A=12*(M.year()-T.year())+(M.month()-T.month()),_=T.clone().add(A,l),$=M-_<0,D=T.clone().add(A+($?-1:1),l);return+(-(A+(M-_)/($?_-D:D-_))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:l,y:d,w:c,d:n,D:p,h:s,m:o,s:a,ms:i,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},w="en",L={};L[w]=b;var v="$isDayjsObject",C=function(F){return F instanceof q||!(!F||!F[v])},S=function F(T,M,A){var _;if(!T)return w;if(typeof T=="string"){var $=T.toLowerCase();L[$]&&(_=$),M&&(L[$]=M,_=$);var D=T.split("-");if(!_&&D.length>1)return F(D[0])}else{var tt=T.name;L[tt]=T,_=tt}return!A&&_&&(w=_),_||!A&&w},P=function(F,T){if(C(F))return F.clone();var M=typeof T=="object"?T:{};return M.date=F,M.args=arguments,new q(M)},O=x;O.l=S,O.i=C,O.w=function(F,T){return P(F,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var q=(function(){function F(M){this.$L=S(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[v]=!0}var T=F.prototype;return T.parse=function(M){this.$d=(function(A){var _=A.date,$=A.utc;if(_===null)return new Date(NaN);if(O.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var D=_.match(f);if(D){var tt=D[2]-1||0,it=(D[7]||"0").substring(0,3);return $?new Date(Date.UTC(D[1],tt,D[3]||1,D[4]||0,D[5]||0,D[6]||0,it)):new Date(D[1],tt,D[3]||1,D[4]||0,D[5]||0,D[6]||0,it)}}return new Date(_)})(M),this.init()},T.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},T.$utils=function(){return O},T.isValid=function(){return this.$d.toString()!==g},T.isSame=function(M,A){var _=P(M);return this.startOf(A)<=_&&_<=this.endOf(A)},T.isAfter=function(M,A){return P(M)<this.startOf(A)},T.isBefore=function(M,A){return this.endOf(A)<P(M)},T.$g=function(M,A,_){return O.u(M)?this[A]:this.set(_,M)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(M,A){var _=this,$=!!O.u(A)||A,D=O.p(M),tt=function(st,ht){var yt=O.w(_.$u?Date.UTC(_.$y,ht,st):new Date(_.$y,ht,st),_);return $?yt:yt.endOf(n)},it=function(st,ht){return O.w(_.toDate()[st].apply(_.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(ht)),_)},lt=this.$W,rt=this.$M,xt=this.$D,ft="set"+(this.$u?"UTC":"");switch(D){case d:return $?tt(1,0):tt(31,11);case l:return $?tt(1,rt):tt(0,rt+1);case c:var Gt=this.$locale().weekStart||0,Z=(lt<Gt?lt+7:lt)-Gt;return tt($?xt-Z:xt+(6-Z),rt);case n:case p:return it(ft+"Hours",0);case s:return it(ft+"Minutes",1);case o:return it(ft+"Seconds",2);case a:return it(ft+"Milliseconds",3);default:return this.clone()}},T.endOf=function(M){return this.startOf(M,!1)},T.$set=function(M,A){var _,$=O.p(M),D="set"+(this.$u?"UTC":""),tt=(_={},_[n]=D+"Date",_[p]=D+"Date",_[l]=D+"Month",_[d]=D+"FullYear",_[s]=D+"Hours",_[o]=D+"Minutes",_[a]=D+"Seconds",_[i]=D+"Milliseconds",_)[$],it=$===n?this.$D+(A-this.$W):A;if($===l||$===d){var lt=this.clone().set(p,1);lt.$d[tt](it),lt.init(),this.$d=lt.set(p,Math.min(this.$D,lt.daysInMonth())).$d}else tt&&this.$d[tt](it);return this.init(),this},T.set=function(M,A){return this.clone().$set(M,A)},T.get=function(M){return this[O.p(M)]()},T.add=function(M,A){var _,$=this;M=Number(M);var D=O.p(A),tt=function(rt){var xt=P($);return O.w(xt.date(xt.date()+Math.round(rt*M)),$)};if(D===l)return this.set(l,this.$M+M);if(D===d)return this.set(d,this.$y+M);if(D===n)return tt(1);if(D===c)return tt(7);var it=(_={},_[o]=t,_[s]=r,_[a]=e,_)[D]||1,lt=this.$d.getTime()+M*it;return O.w(lt,this)},T.subtract=function(M,A){return this.add(-1*M,A)},T.format=function(M){var A=this,_=this.$locale();if(!this.isValid())return _.invalidDate||g;var $=M||"YYYY-MM-DDTHH:mm:ssZ",D=O.z(this),tt=this.$H,it=this.$m,lt=this.$M,rt=_.weekdays,xt=_.months,ft=_.meridiem,Gt=function(ht,yt,Rt,Et){return ht&&(ht[yt]||ht(A,$))||Rt[yt].slice(0,Et)},Z=function(ht){return O.s(tt%12||12,ht,"0")},st=ft||function(ht,yt,Rt){var Et=ht<12?"AM":"PM";return Rt?Et.toLowerCase():Et};return $.replace(m,function(ht,yt){return yt||(function(Rt){switch(Rt){case"YY":return String(A.$y).slice(-2);case"YYYY":return O.s(A.$y,4,"0");case"M":return lt+1;case"MM":return O.s(lt+1,2,"0");case"MMM":return Gt(_.monthsShort,lt,xt,3);case"MMMM":return Gt(xt,lt);case"D":return A.$D;case"DD":return O.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return Gt(_.weekdaysMin,A.$W,rt,2);case"ddd":return Gt(_.weekdaysShort,A.$W,rt,3);case"dddd":return rt[A.$W];case"H":return String(tt);case"HH":return O.s(tt,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return st(tt,it,!0);case"A":return st(tt,it,!1);case"m":return String(it);case"mm":return O.s(it,2,"0");case"s":return String(A.$s);case"ss":return O.s(A.$s,2,"0");case"SSS":return O.s(A.$ms,3,"0");case"Z":return D}return null})(ht)||D.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(M,A,_){var $,D=this,tt=O.p(A),it=P(M),lt=(it.utcOffset()-this.utcOffset())*t,rt=this-it,xt=function(){return O.m(D,it)};switch(tt){case d:$=xt()/12;break;case l:$=xt();break;case h:$=xt()/3;break;case c:$=(rt-lt)/6048e5;break;case n:$=(rt-lt)/864e5;break;case s:$=rt/r;break;case o:$=rt/t;break;case a:$=rt/e;break;default:$=rt}return _?$:O.a($)},T.daysInMonth=function(){return this.endOf(l).$D},T.$locale=function(){return L[this.$L]},T.locale=function(M,A){if(!M)return this.$L;var _=this.clone(),$=S(M,A,!0);return $&&(_.$L=$),_},T.clone=function(){return O.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},F})(),I=q.prototype;return P.prototype=I,[["$ms",i],["$s",a],["$m",o],["$H",s],["$W",n],["$M",l],["$y",d],["$D",p]].forEach(function(F){I[F[1]]=function(T){return this.$g(T,F[0],F[1])}}),P.extend=function(F,T){return F.$i||(F(T,q,P),F.$i=!0),P},P.locale=S,P.isDayjs=C,P.unix=function(F){return P(1e3*F)},P.en=L[w],P.Ls=L,P.p={},P})()),Ba.exports);jn=oy(eg);let va,ae,di,Yt;va=Object.defineProperty,u=(e,t)=>va(e,"name",{value:t,configurable:!0}),Bn=(e,t)=>{for(var r in t)va(e,r,{get:t[r],enumerable:!0})},ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},E={trace:u((...e)=>{},"trace"),debug:u((...e)=>{},"debug"),info:u((...e)=>{},"info"),warn:u((...e)=>{},"warn"),error:u((...e)=>{},"error"),fatal:u((...e)=>{},"fatal")},di=u(function(e="fatal"){let t=ae.fatal;typeof e=="string"?e.toLowerCase()in ae&&(t=ae[e]):typeof e=="number"&&(t=e),E.trace=()=>{},E.debug=()=>{},E.info=()=>{},E.warn=()=>{},E.error=()=>{},E.fatal=()=>{},t<=ae.fatal&&(E.fatal=console.error?console.error.bind(console,Yt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Yt("FATAL"))),t<=ae.error&&(E.error=console.error?console.error.bind(console,Yt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Yt("ERROR"))),t<=ae.warn&&(E.warn=console.warn?console.warn.bind(console,Yt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Yt("WARN"))),t<=ae.info&&(E.info=console.info?console.info.bind(console,Yt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Yt("INFO"))),t<=ae.debug&&(E.debug=console.debug?console.debug.bind(console,Yt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("DEBUG"))),t<=ae.trace&&(E.trace=console.debug?console.debug.bind(console,Yt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Yt("TRACE")))},"setLogLevel"),Yt=u(e=>`%c${jn().format("ss.SSS")} : ${e} : `,"format");let Fr,pe;Fr={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return 2.55*r;e/=360,t/=100;const a=(r/=100)<.5?r*(1+t):r+t-r*t,o=2*r-a;switch(i){case"r":return 255*Fr.hue2rgb(o,a,e+1/3);case"g":return 255*Fr.hue2rgb(o,a,e);case"b":return 255*Fr.hue2rgb(o,a,e-1/3)}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),o=Math.min(e,t,r),s=(a+o)/2;if(i==="l")return 100*s;if(a===o)return 0;const n=a-o;if(i==="s")return 100*(s>.5?n/(2-a-o):n/(a+o));switch(a){case e:return 60*((t-r)/n+(t<r?6:0));case t:return 60*((r-e)/n+2);case r:return 60*((e-t)/n+4);default:return-1}}},et={channel:Fr,lang:{clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(1e10*e)/1e10},unit:{dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},pe={};for(let e=0;e<=255;e++)pe[e]=et.unit.dec2hex(e);const Ma=0,Qe=1,De=2;class rg{constructor(){this.type=Ma}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ma}is(t){return this.type===t}}let Ar,Oe,we,Je,tr,La,os,_a,B,N,Fa,Aa,ns,ss,ls;Ar=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new rg}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Ma,this}_ensureHSL(){const e=this.data,{h:t,s:r,l:i}=e;t===void 0&&(e.h=et.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=et.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=et.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:t,g:r,b:i}=e;t===void 0&&(e.r=et.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=et.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=et.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,t=e.r;return this.type.is(De)||t===void 0?(this._ensureHSL(),et.channel.hsl2rgb(e,"r")):t}get g(){const e=this.data,t=e.g;return this.type.is(De)||t===void 0?(this._ensureHSL(),et.channel.hsl2rgb(e,"g")):t}get b(){const e=this.data,t=e.b;return this.type.is(De)||t===void 0?(this._ensureHSL(),et.channel.hsl2rgb(e,"b")):t}get h(){const e=this.data,t=e.h;return this.type.is(Qe)||t===void 0?(this._ensureRGB(),et.channel.rgb2hsl(e,"h")):t}get s(){const e=this.data,t=e.s;return this.type.is(Qe)||t===void 0?(this._ensureRGB(),et.channel.rgb2hsl(e,"s")):t}get l(){const e=this.data,t=e.l;return this.type.is(Qe)||t===void 0?(this._ensureRGB(),et.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Qe),this.changed=!0,this.data.r=e}set g(e){this.type.set(Qe),this.changed=!0,this.data.g=e}set b(e){this.type.set(Qe),this.changed=!0,this.data.b=e}set h(e){this.type.set(De),this.changed=!0,this.data.h=e}set s(e){this.type.set(De),this.changed=!0,this.data.s=e}set l(e){this.type.set(De),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),Oe={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Oe.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,o=a%4==0,s=a>4,n=s?1:17,c=s?8:4,l=o?0:-1,h=s?255:15;return Ar.set({r:(i>>c*(l+3)&h)*n,g:(i>>c*(l+2)&h)*n,b:(i>>c*(l+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${pe[Math.round(t)]}${pe[Math.round(r)]}${pe[Math.round(i)]}${pe[Math.round(255*a)]}`:`#${pe[Math.round(t)]}${pe[Math.round(r)]}${pe[Math.round(i)]}`}},we={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(we.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return et.channel.clamp.h(.9*parseFloat(r));case"rad":return et.channel.clamp.h(180*parseFloat(r)/Math.PI);case"turn":return et.channel.clamp.h(360*parseFloat(r))}}return et.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(we.re);if(!r)return;const[,i,a,o,s,n]=r;return Ar.set({h:we._hue2deg(i),s:et.channel.clamp.s(parseFloat(a)),l:et.channel.clamp.l(parseFloat(o)),a:s?et.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${et.lang.round(t)}, ${et.lang.round(r)}%, ${et.lang.round(i)}%, ${a})`:`hsl(${et.lang.round(t)}, ${et.lang.round(r)}%, ${et.lang.round(i)}%)`}},Je={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Je.colors[e];if(t)return Oe.parse(t)},stringify:e=>{const t=Oe.stringify(e);for(const r in Je.colors)if(Je.colors[r]===t)return r}},tr={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(tr.re);if(!r)return;const[,i,a,o,s,n,c,l,h]=r;return Ar.set({r:et.channel.clamp.r(a?2.55*parseFloat(i):parseFloat(i)),g:et.channel.clamp.g(s?2.55*parseFloat(o):parseFloat(o)),b:et.channel.clamp.b(c?2.55*parseFloat(n):parseFloat(n)),a:l?et.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${et.lang.round(t)}, ${et.lang.round(r)}, ${et.lang.round(i)}, ${et.lang.round(a)})`:`rgb(${et.lang.round(t)}, ${et.lang.round(r)}, ${et.lang.round(i)})`}},Qt={format:{keyword:Je,hex:Oe,rgb:tr,rgba:tr,hsl:we,hsla:we},parse:e=>{if(typeof e!="string")return e;const t=Oe.parse(e)||tr.parse(e)||we.parse(e)||Je.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(De)||e.data.r===void 0?we.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?tr.stringify(e):Oe.stringify(e)},La=(e,t)=>{const r=Qt.parse(e);for(const i in t)r[i]=et.channel.clamp[i](t[i]);return Qt.stringify(r)},Ge=(e,t,r=0,i=1)=>{if(typeof e!="number")return La(e,{a:t});const a=Ar.set({r:et.channel.clamp.r(e),g:et.channel.clamp.g(t),b:et.channel.clamp.b(r),a:et.channel.clamp.a(i)});return Qt.stringify(a)},os=e=>(t=>{const{r,g:i,b:a}=Qt.parse(t),o=.2126*et.channel.toLinear(r)+.7152*et.channel.toLinear(i)+.0722*et.channel.toLinear(a);return et.lang.round(o)})(e)>=.5,Xe=e=>!os(e),_a=(e,t,r)=>{const i=Qt.parse(e),a=i[t],o=et.channel.clamp[t](a+r);return a!==o&&(i[t]=o),Qt.stringify(i)},W=(e,t)=>_a(e,"l",t),X=(e,t)=>_a(e,"l",-t),B=(e,t)=>{const r=Qt.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return La(e,i)},N=(e,t=100)=>{const r=Qt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((i,a,o=50)=>{const{r:s,g:n,b:c,a:l}=Qt.parse(i),{r:h,g:d,b:p,a:g}=Qt.parse(a),f=o/100,m=2*f-1,b=l-g,y=((m*b===-1?m:(m+b)/(1+m*b))+1)/2,x=1-y;return Ge(s*y+h*x,n*y+d*x,c*y+p*x,l*f+g*(1-f))})(r,e,t)},{entries:Fa,setPrototypeOf:Aa,isFrozen:ns,getPrototypeOf:ss,getOwnPropertyDescriptor:ls}=Object;let{freeze:Ot,seal:Zt,create:hs}=Object,{apply:$a,construct:Ea}=typeof Reflect<"u"&&Reflect;Ot||(Ot=function(e){return e}),Zt||(Zt=function(e){return e}),$a||($a=function(e,t,r){return e.apply(t,r)}),Ea||(Ea=function(e,t){return new e(...t)});const ui=Pt(Array.prototype.forEach),ig=Pt(Array.prototype.lastIndexOf),cs=Pt(Array.prototype.pop),$r=Pt(Array.prototype.push),ag=Pt(Array.prototype.splice),pi=Pt(String.prototype.toLowerCase),Da=Pt(String.prototype.toString),ds=Pt(String.prototype.match),Er=Pt(String.prototype.replace),og=Pt(String.prototype.indexOf),ng=Pt(String.prototype.trim),Jt=Pt(Object.prototype.hasOwnProperty),It=Pt(RegExp.prototype.test),Dr=(us=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ea(us,t)});var us;function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return $a(e,t,i)}}function ot(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pi;Aa&&Aa(e,null);let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const o=r(a);o!==a&&(ns(t)||(t[i]=o),a=o)}e[a]=!0}return e}function sg(e){for(let t=0;t<e.length;t++)Jt(e,t)||(e[t]=null);return e}function ge(e){const t=hs(null);for(const[r,i]of Fa(e))Jt(e,r)&&(Array.isArray(i)?t[r]=sg(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ge(i):t[r]=i);return t}function Or(e,t){for(;e!==null;){const r=ls(e,t);if(r){if(r.get)return Pt(r.get);if(typeof r.value=="function")return Pt(r.value)}e=ss(e)}return function(){return null}}const ps=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Oa=Ot(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ia=Ot(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),lg=Ot(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Pa=Ot(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hg=Ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gs=Ot(["#text"]),fs=Ot(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Na=Ot(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ms=Ot(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),gi=Ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cg=Zt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dg=Zt(/<%[\w\W]*|[\w\W]*%>/gm),ug=Zt(/\$\{[\w\W]*/gm),pg=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),gg=Zt(/^aria-[\-\w]+$/),ys=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fg=Zt(/^(?:\w+script|data):/i),mg=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bs=Zt(/^html$/i),yg=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i);var xs=Object.freeze({__proto__:null,ARIA_ATTR:gg,ATTR_WHITESPACE:mg,CUSTOM_ELEMENT:yg,DATA_ATTR:pg,DOCTYPE_NAME:bs,ERB_EXPR:dg,IS_ALLOWED_URI:ys,IS_SCRIPT_OR_DATA:fg,MUSTACHE_EXPR:cg,TMPLIT_EXPR:ug});const bg=1,xg=3,Cg=7,kg=8,wg=9,Sg=function(){return typeof window>"u"?null:window};let fi,Ie,qa,er,Cs,Ra,Se,mi,yi,za,ks,bi,Ir,Pr,Ft,ws,Ss,Ts,Bs,vs,Ms,Ls,_s,oe,te,Wa,ja,Fs,Nr,As,Pe,Nt,Ne,qr,Rr,$s,Es,Ds,Ha,Ya,Ua,Os,zr,Is,Va,Ps,Ga,Ns,qs;Ie=(function e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sg();const r=k=>e(k);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==wg||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const a=i,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:n,Node:c,Element:l,NodeFilter:h,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:f}=t,m=l.prototype,b=Or(m,"cloneNode"),y=Or(m,"remove"),x=Or(m,"nextSibling"),w=Or(m,"childNodes"),L=Or(m,"parentNode");if(typeof n=="function"){const k=i.createElement("template");k.content&&k.content.ownerDocument&&(i=k.content.ownerDocument)}let v,C="";const{implementation:S,createNodeIterator:P,createDocumentFragment:O,getElementsByTagName:q}=i,{importNode:I}=a;let F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported=typeof Fa=="function"&&typeof L=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:T,ERB_EXPR:M,TMPLIT_EXPR:A,DATA_ATTR:_,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:tt,CUSTOM_ELEMENT:it}=xs;let{IS_ALLOWED_URI:lt}=xs,rt=null;const xt=ot({},[...ps,...Oa,...Ia,...Pa,...gs]);let ft=null;const Gt=ot({},[...fs,...Na,...ms,...gi]);let Z=Object.seal(hs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),st=null,ht=null,yt=!0,Rt=!0,Et=!1,oi=!0,he=!1,sa=!0,Ve=!1,pn=!1,gn=!1,Sr=!1,la=!1,ha=!1,pp=!0,gp=!1,fn=!0,ni=!1,Tr={},Br=null;const fp=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let mp=null;const yp=ot({},["audio","video","img","source","image","track"]);let mn=null;const bp=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ca="http://www.w3.org/1998/Math/MathML",da="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml";let vr=xe,yn=!1,bn=null;const ty=ot({},[ca,da,xe],Da);let ua=ot({},["mi","mo","mn","ms","mtext"]),pa=ot({},["annotation-xml"]);const ey=ot({},["title","style","font","a","script"]);let si=null;const ry=["application/xhtml+xml","text/html"];let Mt=null,Mr=null;const iy=i.createElement("form"),xp=function(k){return k instanceof RegExp||k instanceof Function},xn=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Mr||Mr!==k){if(k&&typeof k=="object"||(k={}),k=ge(k),si=ry.indexOf(k.PARSER_MEDIA_TYPE)===-1?"text/html":k.PARSER_MEDIA_TYPE,Mt=si==="application/xhtml+xml"?Da:pi,rt=Jt(k,"ALLOWED_TAGS")?ot({},k.ALLOWED_TAGS,Mt):xt,ft=Jt(k,"ALLOWED_ATTR")?ot({},k.ALLOWED_ATTR,Mt):Gt,bn=Jt(k,"ALLOWED_NAMESPACES")?ot({},k.ALLOWED_NAMESPACES,Da):ty,mn=Jt(k,"ADD_URI_SAFE_ATTR")?ot(ge(bp),k.ADD_URI_SAFE_ATTR,Mt):bp,mp=Jt(k,"ADD_DATA_URI_TAGS")?ot(ge(yp),k.ADD_DATA_URI_TAGS,Mt):yp,Br=Jt(k,"FORBID_CONTENTS")?ot({},k.FORBID_CONTENTS,Mt):fp,st=Jt(k,"FORBID_TAGS")?ot({},k.FORBID_TAGS,Mt):ge({}),ht=Jt(k,"FORBID_ATTR")?ot({},k.FORBID_ATTR,Mt):ge({}),Tr=!!Jt(k,"USE_PROFILES")&&k.USE_PROFILES,yt=k.ALLOW_ARIA_ATTR!==!1,Rt=k.ALLOW_DATA_ATTR!==!1,Et=k.ALLOW_UNKNOWN_PROTOCOLS||!1,oi=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,he=k.SAFE_FOR_TEMPLATES||!1,sa=k.SAFE_FOR_XML!==!1,Ve=k.WHOLE_DOCUMENT||!1,Sr=k.RETURN_DOM||!1,la=k.RETURN_DOM_FRAGMENT||!1,ha=k.RETURN_TRUSTED_TYPE||!1,gn=k.FORCE_BODY||!1,pp=k.SANITIZE_DOM!==!1,gp=k.SANITIZE_NAMED_PROPS||!1,fn=k.KEEP_CONTENT!==!1,ni=k.IN_PLACE||!1,lt=k.ALLOWED_URI_REGEXP||ys,vr=k.NAMESPACE||xe,ua=k.MATHML_TEXT_INTEGRATION_POINTS||ua,pa=k.HTML_INTEGRATION_POINTS||pa,Z=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&xp(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&xp(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),he&&(Rt=!1),la&&(Sr=!0),Tr&&(rt=ot({},gs),ft=[],Tr.html===!0&&(ot(rt,ps),ot(ft,fs)),Tr.svg===!0&&(ot(rt,Oa),ot(ft,Na),ot(ft,gi)),Tr.svgFilters===!0&&(ot(rt,Ia),ot(ft,Na),ot(ft,gi)),Tr.mathMl===!0&&(ot(rt,Pa),ot(ft,ms),ot(ft,gi))),k.ADD_TAGS&&(rt===xt&&(rt=ge(rt)),ot(rt,k.ADD_TAGS,Mt)),k.ADD_ATTR&&(ft===Gt&&(ft=ge(ft)),ot(ft,k.ADD_ATTR,Mt)),k.ADD_URI_SAFE_ATTR&&ot(mn,k.ADD_URI_SAFE_ATTR,Mt),k.FORBID_CONTENTS&&(Br===fp&&(Br=ge(Br)),ot(Br,k.FORBID_CONTENTS,Mt)),fn&&(rt["#text"]=!0),Ve&&ot(rt,["html","head","body"]),rt.table&&(ot(rt,["tbody"]),delete st.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Dr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Dr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=k.TRUSTED_TYPES_POLICY,C=v.createHTML("")}else v===void 0&&(v=(function(V,R){if(typeof V!="object"||typeof V.createPolicy!="function")return null;let ct=null;const pt="data-tt-policy-suffix";R&&R.hasAttribute(pt)&&(ct=R.getAttribute(pt));const at="dompurify"+(ct?"#"+ct:"");try{return V.createPolicy(at,{createHTML:Bt=>Bt,createScriptURL:Bt=>Bt})}catch{return console.warn("TrustedTypes policy "+at+" could not be created."),null}})(f,o)),v!==null&&typeof C=="string"&&(C=v.createHTML(""));Ot&&Ot(k),Mr=k}},Cp=ot({},[...Oa,...Ia,...lg]),kp=ot({},[...Pa,...hg]),ce=function(k){$r(r.removed,{element:k});try{L(k).removeChild(k)}catch{y(k)}},Lr=function(k,V){try{$r(r.removed,{attribute:V.getAttributeNode(k),from:V})}catch{$r(r.removed,{attribute:null,from:V})}if(V.removeAttribute(k),k==="is")if(Sr||la)try{ce(V)}catch{}else try{V.setAttribute(k,"")}catch{}},wp=function(k){let V=null,R=null;if(gn)k="<remove></remove>"+k;else{const at=ds(k,/^[\r\n\t ]+/);R=at&&at[0]}si==="application/xhtml+xml"&&vr===xe&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const ct=v?v.createHTML(k):k;if(vr===xe)try{V=new g().parseFromString(ct,si)}catch{}if(!V||!V.documentElement){V=S.createDocument(vr,"template",null);try{V.documentElement.innerHTML=yn?C:ct}catch{}}const pt=V.body||V.documentElement;return k&&R&&pt.insertBefore(i.createTextNode(R),pt.childNodes[0]||null),vr===xe?q.call(V,Ve?"html":"body")[0]:Ve?V.documentElement:pt},Sp=function(k){return P.call(k.ownerDocument||k,k,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Cn=function(k){return k instanceof p&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof d)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Tp=function(k){return typeof c=="function"&&k instanceof c};function Ce(k,V,R){ui(k,ct=>{ct.call(r,V,R,Mr)})}const Bp=function(k){let V=null;if(Ce(F.beforeSanitizeElements,k,null),Cn(k))return ce(k),!0;const R=Mt(k.nodeName);if(Ce(F.uponSanitizeElement,k,{tagName:R,allowedTags:rt}),sa&&k.hasChildNodes()&&!Tp(k.firstElementChild)&&It(/<[/\w!]/g,k.innerHTML)&&It(/<[/\w!]/g,k.textContent)||k.nodeType===Cg||sa&&k.nodeType===kg&&It(/<[/\w]/g,k.data))return ce(k),!0;if(!rt[R]||st[R]){if(!st[R]&&Mp(R)&&(Z.tagNameCheck instanceof RegExp&&It(Z.tagNameCheck,R)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(R)))return!1;if(fn&&!Br[R]){const ct=L(k)||k.parentNode,pt=w(k)||k.childNodes;if(pt&&ct)for(let at=pt.length-1;at>=0;--at){const Bt=b(pt[at],!0);Bt.__removalCount=(k.__removalCount||0)+1,ct.insertBefore(Bt,x(k))}}return ce(k),!0}return k instanceof l&&!(function(ct){let pt=L(ct);pt&&pt.tagName||(pt={namespaceURI:vr,tagName:"template"});const at=pi(ct.tagName),Bt=pi(pt.tagName);return!!bn[ct.namespaceURI]&&(ct.namespaceURI===da?pt.namespaceURI===xe?at==="svg":pt.namespaceURI===ca?at==="svg"&&(Bt==="annotation-xml"||ua[Bt]):!!Cp[at]:ct.namespaceURI===ca?pt.namespaceURI===xe?at==="math":pt.namespaceURI===da?at==="math"&&pa[Bt]:!!kp[at]:ct.namespaceURI===xe?!(pt.namespaceURI===da&&!pa[Bt])&&!(pt.namespaceURI===ca&&!ua[Bt])&&!kp[at]&&(ey[at]||!Cp[at]):!(si!=="application/xhtml+xml"||!bn[ct.namespaceURI]))})(k)?(ce(k),!0):R!=="noscript"&&R!=="noembed"&&R!=="noframes"||!It(/<\/no(script|embed|frames)/i,k.innerHTML)?(he&&k.nodeType===xg&&(V=k.textContent,ui([T,M,A],ct=>{V=Er(V,ct," ")}),k.textContent!==V&&($r(r.removed,{element:k.cloneNode()}),k.textContent=V)),Ce(F.afterSanitizeElements,k,null),!1):(ce(k),!0)},vp=function(k,V,R){if(pp&&(V==="id"||V==="name")&&(R in i||R in iy))return!1;if(!(Rt&&!ht[V]&&It(_,V))){if(!(yt&&It($,V))){if(!ft[V]||ht[V]){if(!(Mp(k)&&(Z.tagNameCheck instanceof RegExp&&It(Z.tagNameCheck,k)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(k))&&(Z.attributeNameCheck instanceof RegExp&&It(Z.attributeNameCheck,V)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(V))||V==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&It(Z.tagNameCheck,R)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(R))))return!1}else if(!mn[V]){if(!It(lt,Er(R,tt,""))){if((V!=="src"&&V!=="xlink:href"&&V!=="href"||k==="script"||og(R,"data:")!==0||!mp[k])&&!(Et&&!It(D,Er(R,tt,"")))){if(R)return!1}}}}}return!0},Mp=function(k){return k!=="annotation-xml"&&ds(k,it)},Lp=function(k){Ce(F.beforeSanitizeAttributes,k,null);const{attributes:V}=k;if(!V||Cn(k))return;const R={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ft,forceKeepAttr:void 0};let ct=V.length;for(;ct--;){const pt=V[ct],{name:at,namespaceURI:Bt,value:Ae}=pt,de=Mt(at),kn=Ae;let Dt=at==="value"?kn:ng(kn);if(R.attrName=de,R.attrValue=Dt,R.keepAttr=!0,R.forceKeepAttr=void 0,Ce(F.uponSanitizeAttribute,k,R),Dt=R.attrValue,!gp||de!=="id"&&de!=="name"||(Lr(at,k),Dt="user-content-"+Dt),sa&&It(/((--!?|])>)|<\/(style|title)/i,Dt)){Lr(at,k);continue}if(R.forceKeepAttr)continue;if(!R.keepAttr){Lr(at,k);continue}if(!oi&&It(/\/>/i,Dt)){Lr(at,k);continue}he&&ui([T,M,A],Fp=>{Dt=Er(Dt,Fp," ")});const _p=Mt(k.nodeName);if(vp(_p,de,Dt)){if(v&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Bt)switch(f.getAttributeType(_p,de)){case"TrustedHTML":Dt=v.createHTML(Dt);break;case"TrustedScriptURL":Dt=v.createScriptURL(Dt)}if(Dt!==kn)try{Bt?k.setAttributeNS(Bt,at,Dt):k.setAttribute(at,Dt),Cn(k)?ce(k):cs(r.removed)}catch{Lr(at,k)}}else Lr(at,k)}Ce(F.afterSanitizeAttributes,k,null)},ay=function k(V){let R=null;const ct=Sp(V);for(Ce(F.beforeSanitizeShadowDOM,V,null);R=ct.nextNode();)Ce(F.uponSanitizeShadowNode,R,null),Bp(R),Lp(R),R.content instanceof s&&k(R.content);Ce(F.afterSanitizeShadowDOM,V,null)};return r.sanitize=function(k){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,ct=null,pt=null,at=null;if(yn=!k,yn&&(k="<!-->"),typeof k!="string"&&!Tp(k)){if(typeof k.toString!="function")throw Dr("toString is not a function");if(typeof(k=k.toString())!="string")throw Dr("dirty is not a string, aborting")}if(!r.isSupported)return k;if(pn||xn(V),r.removed=[],typeof k=="string"&&(ni=!1),ni){if(k.nodeName){const de=Mt(k.nodeName);if(!rt[de]||st[de])throw Dr("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof c)R=wp("<!---->"),ct=R.ownerDocument.importNode(k,!0),ct.nodeType===bg&&ct.nodeName==="BODY"||ct.nodeName==="HTML"?R=ct:R.appendChild(ct);else{if(!Sr&&!he&&!Ve&&k.indexOf("<")===-1)return v&&ha?v.createHTML(k):k;if(R=wp(k),!R)return Sr?null:ha?C:""}R&&gn&&ce(R.firstChild);const Bt=Sp(ni?k:R);for(;pt=Bt.nextNode();)Bp(pt),Lp(pt),pt.content instanceof s&&ay(pt.content);if(ni)return k;if(Sr){if(la)for(at=O.call(R.ownerDocument);R.firstChild;)at.appendChild(R.firstChild);else at=R;return(ft.shadowroot||ft.shadowrootmode)&&(at=I.call(a,at,!0)),at}let Ae=Ve?R.outerHTML:R.innerHTML;return Ve&&rt["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&It(bs,R.ownerDocument.doctype.name)&&(Ae="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
3
+ `+Ae),he&&ui([T,M,A],de=>{Ae=Er(Ae,de," ")}),v&&ha?v.createHTML(Ae):Ae},r.setConfig=function(){xn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),pn=!0},r.clearConfig=function(){Mr=null,pn=!1},r.isValidAttribute=function(k,V,R){Mr||xn({});const ct=Mt(k),pt=Mt(V);return vp(ct,pt,R)},r.addHook=function(k,V){typeof V=="function"&&$r(F[k],V)},r.removeHook=function(k,V){if(V!==void 0){const R=ig(F[k],V);return R===-1?void 0:ag(F[k],R,1)[0]}return cs(F[k])},r.removeHooks=function(k){F[k]=[]},r.removeAllHooks=function(){F={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r})(),qa=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,er=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Cs=/\s*%%.*\n/gm,Ra=(fr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},u(fr,"UnknownDiagramError"),fr),Se={},mi=u(function(e,t){e=e.replace(qa,"").replace(er,"").replace(Cs,`
4
+ `);for(const[r,{detector:i}]of Object.entries(Se))if(i(e,t))return r;throw new Ra(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),yi=u((...e)=>{for(const{id:t,detector:r,loader:i}of e)za(t,r,i)},"registerLazyLoadedDiagrams"),za=u((e,t,r)=>{Se[e]&&E.warn(`Detector with key ${e} already exists. Overwriting.`),Se[e]={detector:t,loader:r},E.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),ks=u(e=>Se[e].loader,"getDiagramLoader"),bi=u((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>bi(e,o,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]!="object"||e[o]!==void 0&&typeof e[o]!="object"?(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o]):(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=bi(e[o],t[o],{depth:r-1,clobber:i}))}),e)},"assignWithDepth"),kt=bi,Ir="#ffffff",Pr="#f2f2f2",Ft=u((e,t)=>B(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),ws=(mr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v,C;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||B(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||B(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ft(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ft(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||N(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||N(this.tertiaryColor),this.lineColor=this.lineColor||N(this.background),this.arrowheadColor=this.arrowheadColor||N(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||X(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||N(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||X(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.darkMode)for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=X(this["cScale"+S],75);else for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScale"+S]=X(this["cScale"+S],25);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleInv"+S]=this["cScaleInv"+S]||N(this["cScale"+S]);for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this.darkMode?this["cScalePeer"+S]=this["cScalePeer"+S]||W(this["cScale"+S],10):this["cScalePeer"+S]=this["cScalePeer"+S]||X(this["cScale"+S],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let S=0;S<this.THEME_COLOR_LIMIT;S++)this["cScaleLabel"+S]=this["cScaleLabel"+S]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let S=0;S<5;S++)this["surface"+S]=this["surface"+S]||B(this.mainBkg,{h:180,s:-15,l:t*(5+3*S)}),this["surfacePeer"+S]=this["surfacePeer"+S]||B(this.mainBkg,{h:180,s:-15,l:t*(8+3*S)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||B(this.primaryColor,{h:64}),this.fillType3=this.fillType3||B(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||B(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||B(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||B(this.primaryColor,{h:128}),this.fillType7=this.fillType7||B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-10}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||B(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((a=this.radar)==null?void 0:a.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((c=this.radar)==null?void 0:c.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((d=this.radar)==null?void 0:d.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((p=this.xyChart)==null?void 0:p.backgroundColor)||this.background,titleColor:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((b=this.xyChart)==null?void 0:b.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((x=this.xyChart)==null?void 0:x.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((w=this.xyChart)==null?void 0:w.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((L=this.xyChart)==null?void 0:L.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(mr,"Theme"),mr),Ss=u(e=>{const t=new ws;return t.calculate(e),t},"getThemeVariables"),Ts=(yr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=N(this.background),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(N("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ge(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=X("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=X(this.sectionBkgColor,10),this.taskBorderColor=Ge(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ge(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||X(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.secondBkg=W(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=W(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScalePeer"+C]=this["cScalePeer"+C]||W(this["cScale"+C],10);for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{h:30,s:-30,l:-(4*C-10)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{h:30,s:-30,l:-(4*C-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((p=this.radar)==null?void 0:p.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((b=this.radar)==null?void 0:b.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((x=this.radar)==null?void 0:x.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?X(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||B(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||B(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||B(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||B(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||B(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(yr,"Theme"),yr),Bs=u(e=>{const t=new Ts;return t.calculate(e),t},"getThemeVariables"),vs=(br=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=B(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ge(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||B(this["cScale"+C],{h:180});for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{h:30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{h:30,l:-(7+5*C)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||N(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||N(this.labelTextColor);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||B(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||B(this.primaryColor,{l:-10}),this.pie5=this.pie5||B(this.secondaryColor,{l:-30}),this.pie6=this.pie6||B(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||B(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||B(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||X(N(this.git0),25),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(br,"Theme"),br),Fn=u(e=>{const t=new vs;return t.calculate(e),t},"getThemeVariables"),Ms=(xr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=W("#cde498",10),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.primaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.actorBorder=X(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||B(this.primaryColor,{h:30}),this.cScale4=this.cScale4||B(this.primaryColor,{h:60}),this.cScale5=this.cScale5||B(this.primaryColor,{h:90}),this.cScale6=this.cScale6||B(this.primaryColor,{h:120}),this.cScale7=this.cScale7||B(this.primaryColor,{h:150}),this.cScale8=this.cScale8||B(this.primaryColor,{h:210}),this.cScale9=this.cScale9||B(this.primaryColor,{h:270}),this.cScale10=this.cScale10||B(this.primaryColor,{h:300}),this.cScale11=this.cScale11||B(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||X(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||X(this.tertiaryColor,40);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=X(this["cScale"+C],10),this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||B(this["cScale"+C],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{h:30,s:-30,l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{h:30,s:-30,l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||B(this.primaryColor,{l:-30}),this.pie5=this.pie5||B(this.secondaryColor,{l:-30}),this.pie6=this.pie6||B(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||B(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||B(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||B(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||B(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||B(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||B(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((l=this.radar)==null?void 0:l.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((p=this.xyChart)==null?void 0:p.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((f=this.xyChart)==null?void 0:f.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((y=this.xyChart)==null?void 0:y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((x=this.xyChart)==null?void 0:x.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((w=this.xyChart)==null?void 0:w.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((L=this.xyChart)==null?void 0:L.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((v=this.xyChart)==null?void 0:v.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||B(this.primaryColor,{h:-30}),this.git4=this.git4||B(this.primaryColor,{h:-60}),this.git5=this.git5||B(this.primaryColor,{h:-90}),this.git6=this.git6||B(this.primaryColor,{h:60}),this.git7=this.git7||B(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=X(this.git0,25),this.git1=X(this.git1,25),this.git2=X(this.git2,25),this.git3=X(this.git3,25),this.git4=X(this.git4,25),this.git5=X(this.git5,25),this.git6=X(this.git6,25),this.git7=X(this.git7,25)),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||N(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||N(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(xr,"Theme"),xr),Ls=u(e=>{const t=new Ms;return t.calculate(e),t},"getThemeVariables"),_s=(Cr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=B(this.primaryColor,{h:-160}),this.primaryBorderColor=Ft(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ft(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ft(this.tertiaryColor,this.darkMode),this.primaryTextColor=N(this.primaryColor),this.secondaryTextColor=N(this.secondaryColor),this.tertiaryTextColor=N(this.tertiaryColor),this.lineColor=N(this.background),this.textColor=N(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,a,o,s,n,c,l,h,d,p,g,f,m,b,y,x,w,L,v;this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||N(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||W(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||X(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||B(this.mainBkg,{l:-(5+5*C)}),this["surfacePeer"+C]=this["surfacePeer"+C]||B(this.mainBkg,{l:-(8+5*C)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=X(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=X(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=B(this.primaryColor,{h:64}),this.fillType3=B(this.secondaryColor,{h:64}),this.fillType4=B(this.primaryColor,{h:-64}),this.fillType5=B(this.secondaryColor,{h:-64}),this.fillType6=B(this.primaryColor,{h:128}),this.fillType7=B(this.secondaryColor,{h:128});for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+C]=this["cScale"+C];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||B(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||B(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||B(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||B(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||B(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||B(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?W(this.quadrant1Fill):X(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((i=this.xyChart)==null?void 0:i.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((n=this.xyChart)==null?void 0:n.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((c=this.xyChart)==null?void 0:c.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((l=this.xyChart)==null?void 0:l.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((h=this.xyChart)==null?void 0:h.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((p=this.radar)==null?void 0:p.axisColor)||this.lineColor,axisStrokeWidth:((g=this.radar)==null?void 0:g.axisStrokeWidth)||2,axisLabelFontSize:((f=this.radar)==null?void 0:f.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((b=this.radar)==null?void 0:b.curveStrokeWidth)||2,graticuleColor:((y=this.radar)==null?void 0:y.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((x=this.radar)==null?void 0:x.graticuleStrokeWidth)||1,graticuleOpacity:((w=this.radar)==null?void 0:w.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((v=this.radar)==null?void 0:v.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=X(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||B(this.primaryColor,{h:-30}),this.git4=this.pie5||B(this.primaryColor,{h:-60}),this.git5=this.pie6||B(this.primaryColor,{h:-90}),this.git6=this.pie7||B(this.primaryColor,{h:60}),this.git7=this.pie8||B(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||N(this.git0),this.gitInv1=this.gitInv1||N(this.git1),this.gitInv2=this.gitInv2||N(this.git2),this.gitInv3=this.gitInv3||N(this.git3),this.gitInv4=this.gitInv4||N(this.git4),this.gitInv5=this.gitInv5||N(this.git5),this.gitInv6=this.gitInv6||N(this.git6),this.gitInv7=this.gitInv7||N(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pr}calculate(t){if(typeof t!="object")return void this.updateColors();const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},u(Cr,"Theme"),Cr),oe={base:{getThemeVariables:Ss},dark:{getThemeVariables:Bs},default:{getThemeVariables:Fn},forest:{getThemeVariables:Ls},neutral:{getThemeVariables:u(e=>{const t=new _s;return t.calculate(e),t},"getThemeVariables")}},te={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Wa={...te,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:oe.default.getThemeVariables(),sequence:{...te.sequence,messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:u(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:u(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...te.gantt,tickInterval:void 0,useWidth:void 0},c4:{...te.c4,useWidth:void 0,personFont:u(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...te.flowchart,inheritDir:!1},external_personFont:u(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:u(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:u(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:u(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:u(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:u(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:u(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:u(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:u(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:u(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:u(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:u(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:u(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:u(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:u(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:u(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:u(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:u(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:u(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:u(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:u(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...te.pie,useWidth:984},xyChart:{...te.xyChart,useWidth:void 0},requirement:{...te.requirement,useWidth:void 0},packet:{...te.packet},radar:{...te.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},ja=u((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...ja(e[i],"")]:[...r,t+i],[]),"keyify"),Fs=new Set(ja(Wa,"")),fa=Wa,Nr=u(e=>{if(E.debug("sanitizeDirective called with",e),typeof e=="object"&&e!=null)if(Array.isArray(e))e.forEach(t=>Nr(t));else{for(const t of Object.keys(e)){if(E.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Fs.has(t)||e[t]==null){E.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){E.debug("sanitizing object",t),Nr(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(E.debug("sanitizing css option",t),e[t]=As(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}E.debug("After sanitization",e)}},"sanitizeDirective"),As=u(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Pe=Object.freeze(fa),Nt=kt({},Pe),Ne=[],qr=kt({},Pe),Rr=u((e,t)=>{let r=kt({},e),i={};for(const a of t)Ua(a),i=kt(i,a);if(r=kt(r,i),i.theme&&i.theme in oe){const a=kt({},fi),o=kt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in oe&&(r.themeVariables=oe[r.theme].getThemeVariables(o))}return Ga(qr=r),qr},"updateCurrentConfig"),$s=u(e=>(Nt=kt({},Pe),Nt=kt(Nt,e),e.theme&&oe[e.theme]&&(Nt.themeVariables=oe[e.theme].getThemeVariables(e.themeVariables)),Rr(Nt,Ne),Nt),"setSiteConfig"),Es=u(e=>{fi=kt({},e)},"saveConfigFromInitialize"),Ds=u(e=>(Nt=kt(Nt,e),Rr(Nt,Ne),Nt),"updateSiteConfig"),Ha=u(()=>kt({},Nt),"getSiteConfig"),Ya=u(e=>(Ga(e),kt(qr,e),Lt()),"setConfig"),Lt=u(()=>kt({},qr),"getConfig"),Ua=u(e=>{e&&(["secure",...Nt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(E.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Ua(e[t])}))},"sanitize"),Os=u(e=>{var t;Nr(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ne.push(e),Rr(Nt,Ne)},"addDirective"),zr=u((e=Nt)=>{Rr(e,Ne=[])},"reset"),Is={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Va={},Ps=u(e=>{Va[e]||(E.warn(Is[e]),Va[e]=!0)},"issueWarning"),Ga=u(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ps("LAZY_LOAD_DEPRECATED")},"checkConfig"),Xp=u(()=>{let e={};fi&&(e=kt(e,fi));for(const t of Ne)e=kt(e,t);return e},"getUserDefinedConfig"),Ke=/<br\s*\/?>/gi,Ns=u(e=>e?Ka(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),qs=(()=>{let e=!1;return()=>{e||(Rs(),e=!0)}})();function Rs(){const e="data-temp-href-target";Ie.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ie.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}u(Rs,"setupDompurifyHooks");let Xa,Za,zs,Ws,js,Hs,Ka,Ys,Us,xi,Vs,Gs,Qa,Ci,Xs,Zs,Ks,Wr,Qs,Js,tl;Xa=u(e=>(qs(),Ie.sanitize(e)),"removeScript"),Za=u((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Xa(e):i!=="loose"&&(e=(e=(e=Ka(e)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),e=Hs(e))}return e},"sanitizeMore"),Ht=u((e,t)=>e&&(e=t.dompurifyConfig?Ie.sanitize(Za(e,t),t.dompurifyConfig).toString():Ie.sanitize(Za(e,t),{FORBID_TAGS:["style"]}).toString()),"sanitizeText"),zs=u((e,t)=>typeof e=="string"?Ht(e,t):e.flat().map(r=>Ht(r,t)),"sanitizeTextOrArray"),Ws=u(e=>Ke.test(e),"hasBreaks"),js=u(e=>e.split(Ke),"splitBreaks"),Hs=u(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ka=u(e=>e.replace(Ke,"#br#"),"breakToPlaceholder"),ya=u(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Ct=u(e=>e!==!1&&!["false","null","0"].includes(String(e).trim().toLowerCase()),"evaluate"),Ys=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Us=u(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ba=u(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const o=t[i-1],s=t[i+1];Vs(o,s)&&(a=o+","+s,i++,r.pop())}r.push(Gs(a))}return r.join("")},"parseGenericTypes"),xi=u((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Vs=u((e,t)=>{const r=xi(e,"~"),i=xi(t,"~");return r===1&&i===1},"shouldCombineSets"),Gs=u(e=>{const t=xi(e,"~");let r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),o=i.lastIndexOf("~");for(;a!==-1&&o!==-1&&a!==o;)i[a]="<",i[o]=">",a=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Qa=u(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ci=/\$\$(.*)\$\$/g,$e=u(e=>{var t;return(((t=e.match(Ci))==null?void 0:t.length)??0)>0},"hasKatex"),Wp=u(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await hi(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),Xs=u(async(e,t)=>{if(!$e(e))return e;if(!(Qa()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ci,"MathML is unsupported in this environment.");{const{default:r}=await gt(async()=>{const{default:a}=await import("./katex-LV4FpwlL.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!Qa()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ke).map(a=>$e(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Ci,(a,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),hi=u(async(e,t)=>Ht(await Xs(e,t),t),"renderKatexSanitized"),Ee={getRows:Ns,sanitizeText:Ht,sanitizeTextOrArray:zs,hasBreaks:Ws,splitBreaks:js,lineBreakRegex:Ke,removeScript:Xa,getUrl:ya,evaluate:Ct,getMax:Ys,getMin:Us},Zs=u(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Ks=u(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Sa=u(function(e,t,r,i){const a=Ks(t,r,i);Zs(e,a)},"configureSvgSize"),$n=u(function(e,t,r,i){const a=t.node().getBBox(),o=a.width,s=a.height;E.info(`SVG bounds: ${o}x${s}`,a);let n=0,c=0;E.info(`Graph bounds: ${n}x${c}`,e),n=o+2*r,c=s+2*r,E.info(`Calculated bounds: ${n}x${c}`),Sa(t,c,n,i);const l=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",l)},"setupGraphViewbox"),Wr={},Qs=u((e,t,r)=>{let i="";return e in Wr&&Wr[e]?i=Wr[e](r):E.warn(`No theme found for ${e}`),` & {
5
5
  font-family: ${r.fontFamily};
6
6
  font-size: ${r.fontSize};
7
7
  fill: ${r.textColor}
@@ -77,60 +77,60 @@ import{A as ny,aY as sy,fo as ly,fF as hy,fG as cy,fl as dy,fH as uy,fI as py,a9
77
77
  ${i}
78
78
 
79
79
  ${t}
80
- `},"getStyles"),tl=u((e,t)=>{t!==void 0&&(Wr[e]=t)},"addStylesForDiagram"),el=Js,ga={},vn(ga,{clear:()=>es,getAccDescription:()=>Un,getAccTitle:()=>On,getDiagramTitle:()=>Kn,setAccDescription:()=>Zn,setAccTitle:()=>Yn,setDiagramTitle:()=>Xn});let ki,wi,Si,Ti,to,rl,Bi,il,jr,Hr,vi,al;ki="",wi="",Si="",Ti=u(e=>Ht(e,Lt()),"sanitizeText"),es=u(()=>{ki="",Si="",wi=""},"clear"),Yn=u(e=>{ki=Ti(e).replace(/^\s+/g,"")},"setAccTitle"),On=u(()=>ki,"getAccTitle"),Zn=u(e=>{Si=Ti(e).replace(/\n\s+/g,`
81
- `)},"setAccDescription"),Un=u(()=>Si,"getAccDescription"),Xn=u(e=>{wi=Ti(e)},"setDiagramTitle"),Kn=u(()=>wi,"getDiagramTitle"),to=E,rl=di,ut=Lt,Kp=Ua,zp=Pe,Bi=u(e=>Ht(e,ut()),"sanitizeText"),Mn=En,il=u(()=>ga,"getCommonDb"),jr={},Hr=u((e,t,r)=>{var i;jr[e]&&to.warn(`Diagram with id ${e} already registered. Overwriting.`),jr[e]=t,r&&Wa(e,r),tl(e,t.styles),(i=t.injectUtils)==null||i.call(t,to,rl,ut,Bi,Mn,il(),()=>{})},"registerDiagram"),vi=u(e=>{if(e in jr)return jr[e];throw new al(e)},"getDiagram"),al=(kr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},u(kr,"DiagramNotFoundError"),kr),Fn=u(e=>{var i;const{securityLevel:t}=ut();let r=dt("body");if(t==="sandbox"){const a=dt(`#i${e}`),o=((i=a.node())==null?void 0:i.contentDocument)??document;r=dt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function eo(e){return e==null}function ol(e){return typeof e=="object"&&e!==null}function nl(e){return Array.isArray(e)?e:eo(e)?[]:[e]}function sl(e,t){var r,i,a,o;if(t)for(r=0,i=(o=Object.keys(t)).length;r<i;r+=1)e[a=o[r]]=t[a];return e}function ll(e,t){var r,i="";for(r=0;r<t;r+=1)i+=e;return i}function hl(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}u(eo,"isNothing"),u(ol,"isObject"),u(nl,"toArray"),u(sl,"extend"),u(ll,"repeat"),u(hl,"isNegativeZero");var St={isNothing:eo,isObject:ol,toArray:nl,repeat:ll,isNegativeZero:hl,extend:sl};function ro(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
80
+ `},"getStyles"),Js=u((e,t)=>{t!==void 0&&(Wr[e]=t)},"addStylesForDiagram"),tl=Qs,ga={},Bn(ga,{clear:()=>ts,getAccDescription:()=>Yn,getAccTitle:()=>En,getDiagramTitle:()=>Zn,setAccDescription:()=>Xn,setAccTitle:()=>Hn,setDiagramTitle:()=>Gn});let ki,wi,Si,Ti,Ja,el,Bi,rl,jr,Hr,vi,il;ki="",wi="",Si="",Ti=u(e=>Ht(e,Lt()),"sanitizeText"),ts=u(()=>{ki="",Si="",wi=""},"clear"),Hn=u(e=>{ki=Ti(e).replace(/^\s+/g,"")},"setAccTitle"),En=u(()=>ki,"getAccTitle"),Xn=u(e=>{Si=Ti(e).replace(/\n\s+/g,`
81
+ `)},"setAccDescription"),Yn=u(()=>Si,"getAccDescription"),Gn=u(e=>{wi=Ti(e)},"setDiagramTitle"),Zn=u(()=>wi,"getDiagramTitle"),Ja=E,el=di,ut=Lt,Kp=Ya,zp=Pe,Bi=u(e=>Ht(e,ut()),"sanitizeText"),vn=$n,rl=u(()=>ga,"getCommonDb"),jr={},Hr=u((e,t,r)=>{var i;jr[e]&&Ja.warn(`Diagram with id ${e} already registered. Overwriting.`),jr[e]=t,r&&za(e,r),Js(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ja,el,ut,Bi,vn,rl(),()=>{})},"registerDiagram"),vi=u(e=>{if(e in jr)return jr[e];throw new il(e)},"getDiagram"),il=(kr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},u(kr,"DiagramNotFoundError"),kr),_n=u(e=>{var i;const{securityLevel:t}=ut();let r=dt("body");if(t==="sandbox"){const a=dt(`#i${e}`),o=((i=a.node())==null?void 0:i.contentDocument)??document;r=dt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function to(e){return e==null}function al(e){return typeof e=="object"&&e!==null}function ol(e){return Array.isArray(e)?e:to(e)?[]:[e]}function nl(e,t){var r,i,a,o;if(t)for(r=0,i=(o=Object.keys(t)).length;r<i;r+=1)e[a=o[r]]=t[a];return e}function sl(e,t){var r,i="";for(r=0;r<t;r+=1)i+=e;return i}function ll(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}u(to,"isNothing"),u(al,"isObject"),u(ol,"toArray"),u(nl,"extend"),u(sl,"repeat"),u(ll,"isNegativeZero");var St={isNothing:to,isObject:al,toArray:ol,repeat:sl,isNegativeZero:ll,extend:nl};function eo(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
82
82
 
83
- `+e.mark.snippet),i+" "+r):i}function rr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ro(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}u(ro,"formatError"),u(rr,"YAMLException$1"),rr.prototype=Object.create(Error.prototype),rr.prototype.constructor=rr,rr.prototype.toString=u(function(e){return this.name+": "+ro(this,e)},"toString");var zt=rr;function Mi(e,t,r,i,a){var o="",s="",n=Math.floor(a/2)-1;return i-t>n&&(t=i-n+(o=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+o.length}}function Li(e,t){return St.repeat(" ",t-e.length)+e}function cl(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],o=[],s=-1;r=i.exec(e.buffer);)o.push(r.index),a.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var n,c,l="",h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(n=1;n<=t.linesBefore&&!(s-n<0);n++)c=Mi(e.buffer,a[s-n],o[s-n],e.position-(a[s]-a[s-n]),d),l=St.repeat(" ",t.indent)+Li((e.line-n+1).toString(),h)+" | "+c.str+`
83
+ `+e.mark.snippet),i+" "+r):i}function rr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=eo(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}u(eo,"formatError"),u(rr,"YAMLException$1"),rr.prototype=Object.create(Error.prototype),rr.prototype.constructor=rr,rr.prototype.toString=u(function(e){return this.name+": "+eo(this,e)},"toString");var zt=rr;function Mi(e,t,r,i,a){var o="",s="",n=Math.floor(a/2)-1;return i-t>n&&(t=i-n+(o=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+o.length}}function Li(e,t){return St.repeat(" ",t-e.length)+e}function hl(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,a=[0],o=[],s=-1;r=i.exec(e.buffer);)o.push(r.index),a.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var n,c,l="",h=Math.min(e.line+t.linesAfter,o.length).toString().length,d=t.maxLength-(t.indent+h+3);for(n=1;n<=t.linesBefore&&!(s-n<0);n++)c=Mi(e.buffer,a[s-n],o[s-n],e.position-(a[s]-a[s-n]),d),l=St.repeat(" ",t.indent)+Li((e.line-n+1).toString(),h)+" | "+c.str+`
84
84
  `+l;for(c=Mi(e.buffer,a[s],o[s],e.position,d),l+=St.repeat(" ",t.indent)+Li((e.line+1).toString(),h)+" | "+c.str+`
85
85
  `,l+=St.repeat("-",t.indent+h+3+c.pos)+`^
86
86
  `,n=1;n<=t.linesAfter&&!(s+n>=o.length);n++)c=Mi(e.buffer,a[s+n],o[s+n],e.position-(a[s]-a[s+n]),d),l+=St.repeat(" ",t.indent)+Li((e.line+n+1).toString(),h)+" | "+c.str+`
87
- `;return l.replace(/\n$/,"")}u(Mi,"getLine"),u(Li,"padStart"),u(cl,"makeSnippet");var Bg=cl,vg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Mg=["scalar","sequence","mapping"];function dl(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function ul(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(vg.indexOf(r)===-1)throw new zt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=dl(t.styleAliases||null),Mg.indexOf(this.kind)===-1)throw new zt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}u(dl,"compileStyleAliases"),u(ul,"Type$1");var At=ul;function io(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(a=s)}),r[a]=i}),r}function pl(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(u(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function _i(e){return this.extend(e)}u(io,"compileList"),u(pl,"compileMap"),u(_i,"Schema$1"),_i.prototype.extend=u(function(e){var t=[],r=[];if(e instanceof At)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new zt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach(function(a){if(!(a instanceof At))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new zt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new zt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof At))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(_i.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=io(i,"implicit"),i.compiledExplicit=io(i,"explicit"),i.compiledTypeMap=pl(i.compiledImplicit,i.compiledExplicit),i},"extend");var Lg=new _i({explicit:[new At("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(e){return e!==null?e:""},"construct")}),new At("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(e){return e!==null?e:[]},"construct")}),new At("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(e){return e!==null?e:{}},"construct")})]});function gl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function fl(){return null}function ml(e){return e===null}u(gl,"resolveYamlNull"),u(fl,"constructYamlNull"),u(ml,"isNull");var _g=new At("tag:yaml.org,2002:null",{kind:"scalar",resolve:gl,construct:fl,predicate:ml,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"});function yl(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function bl(e){return e==="true"||e==="True"||e==="TRUE"}function xl(e){return Object.prototype.toString.call(e)==="[object Boolean]"}u(yl,"resolveYamlBoolean"),u(bl,"constructYamlBoolean"),u(xl,"isBoolean");var Fg=new At("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yl,construct:bl,predicate:xl,represent:{lowercase:u(function(e){return e?"true":"false"},"lowercase"),uppercase:u(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Cl(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function kl(e){return 48<=e&&e<=55}function wl(e){return 48<=e&&e<=57}function Sl(e){if(e===null)return!1;var t,r=e.length,i=0,a=!1;if(!r)return!1;if((t=e[i])!=="-"&&t!=="+"||(t=e[++i]),t==="0"){if(i+1===r)return!0;if((t=e[++i])==="b"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(t!=="0"&&t!=="1")return!1;a=!0}return a&&t!=="_"}if(t==="x"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!Cl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}if(t==="o"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!kl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}}if(t==="_")return!1;for(;i<r;i++)if((t=e[i])!=="_"){if(!wl(e.charCodeAt(i)))return!1;a=!0}return!(!a||t==="_")}function Tl(e){var t,r=e,i=1;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),(t=r[0])!=="-"&&t!=="+"||(t==="-"&&(i=-1),t=(r=r.slice(1))[0]),r==="0")return 0;if(t==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Bl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1==0&&!St.isNegativeZero(e)}u(Cl,"isHexCode"),u(kl,"isOctCode"),u(wl,"isDecCode"),u(Sl,"resolveYamlInteger"),u(Tl,"constructYamlInteger"),u(Bl,"isInteger");var Ag=new At("tag:yaml.org,2002:int",{kind:"scalar",resolve:Sl,construct:Tl,predicate:Bl,represent:{binary:u(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:u(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:u(function(e){return e.toString(10)},"decimal"),hexadecimal:u(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$g=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vl(e){return e!==null&&!(!$g.test(e)||e[e.length-1]==="_")}function Ml(e){var t,r;return r=(t=e.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}u(vl,"resolveYamlFloat"),u(Ml,"constructYamlFloat");var Eg=/^[-+]?[0-9]+e/;function Ll(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(St.isNegativeZero(e))return"-0.0";return r=e.toString(10),Eg.test(r)?r.replace("e",".e"):r}function _l(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||St.isNegativeZero(e))}u(Ll,"representYamlFloat"),u(_l,"isFloat");var Og=new At("tag:yaml.org,2002:float",{kind:"scalar",resolve:vl,construct:Ml,predicate:_l,represent:Ll,defaultStyle:"lowercase"}),Fl=Lg.extend({implicit:[_g,Fg,Ag,Og]}),Dg=Fl,Al=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),$l=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function El(e){return e!==null&&(Al.exec(e)!==null||$l.exec(e)!==null)}function Ol(e){var t,r,i,a,o,s,n,c,l=0,h=null;if((t=Al.exec(e))===null&&(t=$l.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(o=+t[4],s=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=6e4*(60*+t[10]+ +(t[11]||0)),t[9]==="-"&&(h=-h)),c=new Date(Date.UTC(r,i,a,o,s,n,l)),h&&c.setTime(c.getTime()-h),c}function Dl(e){return e.toISOString()}u(El,"resolveYamlTimestamp"),u(Ol,"constructYamlTimestamp"),u(Dl,"representYamlTimestamp");var Ig=new At("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:El,construct:Ol,instanceOf:Date,represent:Dl});function Il(e){return e==="<<"||e===null}u(Il,"resolveYamlMerge");var Pg=new At("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Il}),ao=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
- \r`;function Pl(e){if(e===null)return!1;var t,r,i=0,a=e.length,o=ao;for(r=0;r<a;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;i+=6}return i%8==0}function Nl(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,o=ao,s=0,n=[];for(t=0;t<a;t++)t%4==0&&t&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|o.indexOf(i.charAt(t));return(r=a%4*6)===0?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):r===18?(n.push(s>>10&255),n.push(s>>2&255)):r===12&&n.push(s>>4&255),new Uint8Array(n)}function Rl(e){var t,r,i="",a=0,o=e.length,s=ao;for(t=0;t<o;t++)t%3==0&&t&&(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]),a=(a<<8)+e[t];return(r=o%3)===0?(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]):r===2?(i+=s[a>>10&63],i+=s[a>>4&63],i+=s[a<<2&63],i+=s[64]):r===1&&(i+=s[a>>2&63],i+=s[a<<4&63],i+=s[64],i+=s[64]),i}function ql(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}u(Pl,"resolveYamlBinary"),u(Nl,"constructYamlBinary"),u(Rl,"representYamlBinary"),u(ql,"isBinary");var Ng=new At("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pl,construct:Nl,predicate:ql,represent:Rl}),Rg=Object.prototype.hasOwnProperty,qg=Object.prototype.toString;function zl(e){if(e===null)return!0;var t,r,i,a,o,s=[],n=e;for(t=0,r=n.length;t<r;t+=1){if(i=n[t],o=!1,qg.call(i)!=="[object Object]")return!1;for(a in i)if(Rg.call(i,a)){if(o)return!1;o=!0}if(!o||s.indexOf(a)!==-1)return!1;s.push(a)}return!0}function Wl(e){return e!==null?e:[]}u(zl,"resolveYamlOmap"),u(Wl,"constructYamlOmap");var zg=new At("tag:yaml.org,2002:omap",{kind:"sequence",resolve:zl,construct:Wl}),Wg=Object.prototype.toString;function jl(e){if(e===null)return!0;var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Wg.call(i)!=="[object Object]"||(a=Object.keys(i)).length!==1)return!1;o[t]=[a[0],i[a[0]]]}return!0}function Hl(e){if(e===null)return[];var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],a=Object.keys(i),o[t]=[a[0],i[a[0]]];return o}u(jl,"resolveYamlPairs"),u(Hl,"constructYamlPairs");var jg=new At("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jl,construct:Hl}),Hg=Object.prototype.hasOwnProperty;function Yl(e){if(e===null)return!0;var t,r=e;for(t in r)if(Hg.call(r,t)&&r[t]!==null)return!1;return!0}function Ul(e){return e!==null?e:{}}u(Yl,"resolveYamlSet"),u(Ul,"constructYamlSet");var Yg=new At("tag:yaml.org,2002:set",{kind:"mapping",resolve:Yl,construct:Ul}),Vl=Dg.extend({implicit:[Ig,Pg],explicit:[Ng,zg,jg,Yg]}),Te=Object.prototype.hasOwnProperty,Ug=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Vg=/[\x85\u2028\u2029]/,Gg=/[,\[\]\{\}]/,Gl=/^(?:!|!!|![a-z\-]+!)$/i,Xl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function oo(e){return Object.prototype.toString.call(e)}function ee(e){return e===10||e===13}function Be(e){return e===9||e===32}function Rt(e){return e===9||e===32||e===10||e===13}function Re(e){return e===44||e===91||e===93||e===123||e===125}function Zl(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Kl(e){return e===120?2:e===117?4:e===85?8:0}function Ql(e){return 48<=e&&e<=57?e-48:-1}function no(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Jl(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}u(oo,"_class"),u(ee,"is_EOL"),u(Be,"is_WHITE_SPACE"),u(Rt,"is_WS_OR_EOL"),u(Re,"is_FLOW_INDICATOR"),u(Zl,"fromHexCode"),u(Kl,"escapedHexLen"),u(Ql,"fromDecimalCode"),u(no,"simpleEscapeSequence"),u(Jl,"charFromCodepoint");var qe,th=new Array(256),eh=new Array(256);for(qe=0;qe<256;qe++)th[qe]=no(qe)?1:0,eh[qe]=no(qe);function rh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Vl,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function so(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Bg(r),new zt(t,r)}function G(e,t){throw so(e,t)}function Yr(e,t){e.onWarning&&e.onWarning.call(null,so(e,t))}u(rh,"State$1"),u(so,"generateError"),u(G,"throwError"),u(Yr,"throwWarning");var ih={YAML:u(function(e,t,r){var i,a,o;e.version!==null&&G(e,"duplication of %YAML directive"),r.length!==1&&G(e,"YAML directive accepts exactly one argument"),(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))===null&&G(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&&G(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Yr(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(e,t,r){var i,a;r.length!==2&&G(e,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],Gl.test(i)||G(e,"ill-formed tag handle (first argument) of the TAG directive"),Te.call(e.tagMap,i)&&G(e,'there is a previously declared suffix for "'+i+'" tag handle'),Xl.test(a)||G(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function fe(e,t,r,i){var a,o,s,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,o=n.length;a<o;a+=1)(s=n.charCodeAt(a))===9||32<=s&&s<=1114111||G(e,"expected valid JSON character");else Ug.test(n)&&G(e,"the stream contains non-printable characters");e.result+=n}}function lo(e,t,r,i){var a,o,s,n;for(St.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(a=Object.keys(r)).length;s<n;s+=1)o=a[s],Te.call(t,o)||(t[o]=r[o],i[o]=!0)}function ze(e,t,r,i,a,o,s,n,c){var l,h;if(Array.isArray(a))for(l=0,h=(a=Array.prototype.slice.call(a)).length;l<h;l+=1)Array.isArray(a[l])&&G(e,"nested arrays are not supported inside keys"),typeof a=="object"&&oo(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&oo(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,h=o.length;l<h;l+=1)lo(e,t,o[l],r);else lo(e,t,o,r);else e.json||Te.call(r,a)||!Te.call(t,a)||(e.line=s||e.line,e.lineStart=n||e.lineStart,e.position=c||e.position,G(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[a]=o,delete r[a];return t}function Fi(e){var t;(t=e.input.charCodeAt(e.position))===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):G(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function bt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Be(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(!ee(a))break;for(Fi(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return r!==-1&&i!==0&&e.lineIndent<r&&Yr(e,"deficient indentation"),i}function Ur(e){var t,r=e.position;return!((t=e.input.charCodeAt(r))!==45&&t!==46||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,(t=e.input.charCodeAt(r))!==0&&!Rt(t)))}function Ai(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
90
- `,t-1))}function ah(e,t,r){var i,a,o,s,n,c,l,h,d=e.kind,p=e.result;if(Rt(h=e.input.charCodeAt(e.position))||Re(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(Rt(i=e.input.charCodeAt(e.position+1))||r&&Re(i)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;h!==0;){if(h===58){if(Rt(i=e.input.charCodeAt(e.position+1))||r&&Re(i))break}else if(h===35){if(Rt(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Ur(e)||r&&Re(h))break;if(ee(h)){if(n=e.line,c=e.lineStart,l=e.lineIndent,bt(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}e.position=o,e.line=n,e.lineStart=c,e.lineIndent=l;break}}s&&(fe(e,a,o,!1),Ai(e,e.line-n),a=o=e.position,s=!1),Be(h)||(o=e.position+1),h=e.input.charCodeAt(++e.position)}return fe(e,a,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}function oh(e,t){var r,i,a;if((r=e.input.charCodeAt(e.position))!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39){if(fe(e,i,e.position,!0),(r=e.input.charCodeAt(++e.position))!==39)return!0;i=e.position,e.position++,a=e.position}else ee(r)?(fe(e,i,a,!0),Ai(e,bt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Ur(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}function nh(e,t){var r,i,a,o,s,n;if((n=e.input.charCodeAt(e.position))!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return fe(e,r,e.position,!0),e.position++,!0;if(n===92){if(fe(e,r,e.position,!0),ee(n=e.input.charCodeAt(++e.position)))bt(e,!1,t);else if(n<256&&th[n])e.result+=eh[n],e.position++;else if((s=Kl(n))>0){for(a=s,o=0;a>0;a--)(s=Zl(n=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+s:G(e,"expected hexadecimal character");e.result+=Jl(o),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else ee(n)?(fe(e,r,i,!0),Ai(e,bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ur(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}function sh(e,t){var r,i,a,o,s,n,c,l,h,d,p,g,f=!0,m=e.tag,b=e.anchor,y=Object.create(null);if((g=e.input.charCodeAt(e.position))===91)s=93,l=!1,o=[];else{if(g!==123)return!1;s=125,l=!0,o={}}for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(bt(e,!0,t),(g=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=m,e.anchor=b,e.kind=l?"mapping":"sequence",e.result=o,!0;f?g===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),p=null,n=c=!1,g===63&&Rt(e.input.charCodeAt(e.position+1))&&(n=c=!0,e.position++,bt(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,We(e,t,1,!1,!0),d=e.tag,h=e.result,bt(e,!0,t),g=e.input.charCodeAt(e.position),!c&&e.line!==r||g!==58||(n=!0,g=e.input.charCodeAt(++e.position),bt(e,!0,t),We(e,t,1,!1,!0),p=e.result),l?ze(e,o,y,d,h,p,r,i,a):n?o.push(ze(e,null,y,d,h,p,r,i,a)):o.push(h),bt(e,!0,t),(g=e.input.charCodeAt(e.position))===44?(f=!0,g=e.input.charCodeAt(++e.position)):f=!1}G(e,"unexpected end of the stream within a flow collection")}function lh(e,t){var r,i,a,o,s=1,n=!1,c=!1,l=t,h=0,d=!1;if((o=e.input.charCodeAt(e.position))===124)i=!1;else{if(o!==62)return!1;i=!0}for(e.kind="scalar",e.result="";o!==0;)if((o=e.input.charCodeAt(++e.position))===43||o===45)s===1?s=o===43?3:2:G(e,"repeat of a chomping mode identifier");else{if(!((a=Ql(o))>=0))break;a===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?G(e,"repeat of an indentation width identifier"):(l=t+a-1,c=!0)}if(Be(o)){do o=e.input.charCodeAt(++e.position);while(Be(o));if(o===35)do o=e.input.charCodeAt(++e.position);while(!ee(o)&&o!==0)}for(;o!==0;){for(Fi(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!c||e.lineIndent<l)&&o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>l&&(l=e.lineIndent),ee(o))h++;else{if(e.lineIndent<l){s===3?e.result+=St.repeat(`
87
+ `;return l.replace(/\n$/,"")}u(Mi,"getLine"),u(Li,"padStart"),u(hl,"makeSnippet");var Tg=hl,Bg=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],vg=["scalar","sequence","mapping"];function cl(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function dl(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Bg.indexOf(r)===-1)throw new zt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=cl(t.styleAliases||null),vg.indexOf(this.kind)===-1)throw new zt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}u(cl,"compileStyleAliases"),u(dl,"Type$1");var At=dl;function ro(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(a=s)}),r[a]=i}),r}function ul(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(a){a.multi?(r.multi[a.kind].push(a),r.multi.fallback.push(a)):r[a.kind][a.tag]=r.fallback[a.tag]=a}for(u(i,"collectType"),e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return r}function _i(e){return this.extend(e)}u(ro,"compileList"),u(ul,"compileMap"),u(_i,"Schema$1"),_i.prototype.extend=u(function(e){var t=[],r=[];if(e instanceof At)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new zt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach(function(a){if(!(a instanceof At))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new zt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new zt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof At))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(_i.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=ro(i,"implicit"),i.compiledExplicit=ro(i,"explicit"),i.compiledTypeMap=ul(i.compiledImplicit,i.compiledExplicit),i},"extend");var Mg=new _i({explicit:[new At("tag:yaml.org,2002:str",{kind:"scalar",construct:u(function(e){return e!==null?e:""},"construct")}),new At("tag:yaml.org,2002:seq",{kind:"sequence",construct:u(function(e){return e!==null?e:[]},"construct")}),new At("tag:yaml.org,2002:map",{kind:"mapping",construct:u(function(e){return e!==null?e:{}},"construct")})]});function pl(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function gl(){return null}function fl(e){return e===null}u(pl,"resolveYamlNull"),u(gl,"constructYamlNull"),u(fl,"isNull");var Lg=new At("tag:yaml.org,2002:null",{kind:"scalar",resolve:pl,construct:gl,predicate:fl,represent:{canonical:u(function(){return"~"},"canonical"),lowercase:u(function(){return"null"},"lowercase"),uppercase:u(function(){return"NULL"},"uppercase"),camelcase:u(function(){return"Null"},"camelcase"),empty:u(function(){return""},"empty")},defaultStyle:"lowercase"});function ml(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function yl(e){return e==="true"||e==="True"||e==="TRUE"}function bl(e){return Object.prototype.toString.call(e)==="[object Boolean]"}u(ml,"resolveYamlBoolean"),u(yl,"constructYamlBoolean"),u(bl,"isBoolean");var _g=new At("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ml,construct:yl,predicate:bl,represent:{lowercase:u(function(e){return e?"true":"false"},"lowercase"),uppercase:u(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:u(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function xl(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Cl(e){return 48<=e&&e<=55}function kl(e){return 48<=e&&e<=57}function wl(e){if(e===null)return!1;var t,r=e.length,i=0,a=!1;if(!r)return!1;if((t=e[i])!=="-"&&t!=="+"||(t=e[++i]),t==="0"){if(i+1===r)return!0;if((t=e[++i])==="b"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(t!=="0"&&t!=="1")return!1;a=!0}return a&&t!=="_"}if(t==="x"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!xl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}if(t==="o"){for(i++;i<r;i++)if((t=e[i])!=="_"){if(!Cl(e.charCodeAt(i)))return!1;a=!0}return a&&t!=="_"}}if(t==="_")return!1;for(;i<r;i++)if((t=e[i])!=="_"){if(!kl(e.charCodeAt(i)))return!1;a=!0}return!(!a||t==="_")}function Sl(e){var t,r=e,i=1;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),(t=r[0])!=="-"&&t!=="+"||(t==="-"&&(i=-1),t=(r=r.slice(1))[0]),r==="0")return 0;if(t==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r.slice(2),16);if(r[1]==="o")return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Tl(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1==0&&!St.isNegativeZero(e)}u(xl,"isHexCode"),u(Cl,"isOctCode"),u(kl,"isDecCode"),u(wl,"resolveYamlInteger"),u(Sl,"constructYamlInteger"),u(Tl,"isInteger");var Fg=new At("tag:yaml.org,2002:int",{kind:"scalar",resolve:wl,construct:Sl,predicate:Tl,represent:{binary:u(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:u(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:u(function(e){return e.toString(10)},"decimal"),hexadecimal:u(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ag=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Bl(e){return e!==null&&!(!Ag.test(e)||e[e.length-1]==="_")}function vl(e){var t,r;return r=(t=e.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}u(Bl,"resolveYamlFloat"),u(vl,"constructYamlFloat");var $g=/^[-+]?[0-9]+e/;function Ml(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(St.isNegativeZero(e))return"-0.0";return r=e.toString(10),$g.test(r)?r.replace("e",".e"):r}function Ll(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||St.isNegativeZero(e))}u(Ml,"representYamlFloat"),u(Ll,"isFloat");var Eg=new At("tag:yaml.org,2002:float",{kind:"scalar",resolve:Bl,construct:vl,predicate:Ll,represent:Ml,defaultStyle:"lowercase"}),_l=Mg.extend({implicit:[Lg,_g,Fg,Eg]}),Dg=_l,Fl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Al=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function $l(e){return e!==null&&(Fl.exec(e)!==null||Al.exec(e)!==null)}function El(e){var t,r,i,a,o,s,n,c,l=0,h=null;if((t=Fl.exec(e))===null&&(t=Al.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(o=+t[4],s=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=6e4*(60*+t[10]+ +(t[11]||0)),t[9]==="-"&&(h=-h)),c=new Date(Date.UTC(r,i,a,o,s,n,l)),h&&c.setTime(c.getTime()-h),c}function Dl(e){return e.toISOString()}u($l,"resolveYamlTimestamp"),u(El,"constructYamlTimestamp"),u(Dl,"representYamlTimestamp");var Og=new At("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:$l,construct:El,instanceOf:Date,represent:Dl});function Ol(e){return e==="<<"||e===null}u(Ol,"resolveYamlMerge");var Ig=new At("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ol}),io=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function Il(e){if(e===null)return!1;var t,r,i=0,a=e.length,o=io;for(r=0;r<a;r++)if(!((t=o.indexOf(e.charAt(r)))>64)){if(t<0)return!1;i+=6}return i%8==0}function Pl(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,o=io,s=0,n=[];for(t=0;t<a;t++)t%4==0&&t&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|o.indexOf(i.charAt(t));return(r=a%4*6)===0?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):r===18?(n.push(s>>10&255),n.push(s>>2&255)):r===12&&n.push(s>>4&255),new Uint8Array(n)}function Nl(e){var t,r,i="",a=0,o=e.length,s=io;for(t=0;t<o;t++)t%3==0&&t&&(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]),a=(a<<8)+e[t];return(r=o%3)===0?(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[63&a]):r===2?(i+=s[a>>10&63],i+=s[a>>4&63],i+=s[a<<2&63],i+=s[64]):r===1&&(i+=s[a>>2&63],i+=s[a<<4&63],i+=s[64],i+=s[64]),i}function ql(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}u(Il,"resolveYamlBinary"),u(Pl,"constructYamlBinary"),u(Nl,"representYamlBinary"),u(ql,"isBinary");var Pg=new At("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Il,construct:Pl,predicate:ql,represent:Nl}),Ng=Object.prototype.hasOwnProperty,qg=Object.prototype.toString;function Rl(e){if(e===null)return!0;var t,r,i,a,o,s=[],n=e;for(t=0,r=n.length;t<r;t+=1){if(i=n[t],o=!1,qg.call(i)!=="[object Object]")return!1;for(a in i)if(Ng.call(i,a)){if(o)return!1;o=!0}if(!o||s.indexOf(a)!==-1)return!1;s.push(a)}return!0}function zl(e){return e!==null?e:[]}u(Rl,"resolveYamlOmap"),u(zl,"constructYamlOmap");var Rg=new At("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Rl,construct:zl}),zg=Object.prototype.toString;function Wl(e){if(e===null)return!0;var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],zg.call(i)!=="[object Object]"||(a=Object.keys(i)).length!==1)return!1;o[t]=[a[0],i[a[0]]]}return!0}function jl(e){if(e===null)return[];var t,r,i,a,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],a=Object.keys(i),o[t]=[a[0],i[a[0]]];return o}u(Wl,"resolveYamlPairs"),u(jl,"constructYamlPairs");var Wg=new At("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Wl,construct:jl}),jg=Object.prototype.hasOwnProperty;function Hl(e){if(e===null)return!0;var t,r=e;for(t in r)if(jg.call(r,t)&&r[t]!==null)return!1;return!0}function Yl(e){return e!==null?e:{}}u(Hl,"resolveYamlSet"),u(Yl,"constructYamlSet");var Hg=new At("tag:yaml.org,2002:set",{kind:"mapping",resolve:Hl,construct:Yl}),Ul=Dg.extend({implicit:[Og,Ig],explicit:[Pg,Rg,Wg,Hg]}),Te=Object.prototype.hasOwnProperty,Yg=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ug=/[\x85\u2028\u2029]/,Vg=/[,\[\]\{\}]/,Vl=/^(?:!|!!|![a-z\-]+!)$/i,Gl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ao(e){return Object.prototype.toString.call(e)}function ee(e){return e===10||e===13}function Be(e){return e===9||e===32}function qt(e){return e===9||e===32||e===10||e===13}function qe(e){return e===44||e===91||e===93||e===123||e===125}function Xl(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Zl(e){return e===120?2:e===117?4:e===85?8:0}function Kl(e){return 48<=e&&e<=57?e-48:-1}function oo(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Ql(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}u(ao,"_class"),u(ee,"is_EOL"),u(Be,"is_WHITE_SPACE"),u(qt,"is_WS_OR_EOL"),u(qe,"is_FLOW_INDICATOR"),u(Xl,"fromHexCode"),u(Zl,"escapedHexLen"),u(Kl,"fromDecimalCode"),u(oo,"simpleEscapeSequence"),u(Ql,"charFromCodepoint");var Re,Jl=new Array(256),th=new Array(256);for(Re=0;Re<256;Re++)Jl[Re]=oo(Re)?1:0,th[Re]=oo(Re);function eh(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ul,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function no(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Tg(r),new zt(t,r)}function G(e,t){throw no(e,t)}function Yr(e,t){e.onWarning&&e.onWarning.call(null,no(e,t))}u(eh,"State$1"),u(no,"generateError"),u(G,"throwError"),u(Yr,"throwWarning");var rh={YAML:u(function(e,t,r){var i,a,o;e.version!==null&&G(e,"duplication of %YAML directive"),r.length!==1&&G(e,"YAML directive accepts exactly one argument"),(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))===null&&G(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&&G(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Yr(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:u(function(e,t,r){var i,a;r.length!==2&&G(e,"TAG directive accepts exactly two arguments"),i=r[0],a=r[1],Vl.test(i)||G(e,"ill-formed tag handle (first argument) of the TAG directive"),Te.call(e.tagMap,i)&&G(e,'there is a previously declared suffix for "'+i+'" tag handle'),Gl.test(a)||G(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function fe(e,t,r,i){var a,o,s,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,o=n.length;a<o;a+=1)(s=n.charCodeAt(a))===9||32<=s&&s<=1114111||G(e,"expected valid JSON character");else Yg.test(n)&&G(e,"the stream contains non-printable characters");e.result+=n}}function so(e,t,r,i){var a,o,s,n;for(St.isObject(r)||G(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(a=Object.keys(r)).length;s<n;s+=1)o=a[s],Te.call(t,o)||(t[o]=r[o],i[o]=!0)}function ze(e,t,r,i,a,o,s,n,c){var l,h;if(Array.isArray(a))for(l=0,h=(a=Array.prototype.slice.call(a)).length;l<h;l+=1)Array.isArray(a[l])&&G(e,"nested arrays are not supported inside keys"),typeof a=="object"&&ao(a[l])==="[object Object]"&&(a[l]="[object Object]");if(typeof a=="object"&&ao(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,h=o.length;l<h;l+=1)so(e,t,o[l],r);else so(e,t,o,r);else e.json||Te.call(r,a)||!Te.call(t,a)||(e.line=s||e.line,e.lineStart=n||e.lineStart,e.position=c||e.position,G(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[a]=o,delete r[a];return t}function Fi(e){var t;(t=e.input.charCodeAt(e.position))===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):G(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function bt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Be(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(!ee(a))break;for(Fi(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position)}return r!==-1&&i!==0&&e.lineIndent<r&&Yr(e,"deficient indentation"),i}function Ur(e){var t,r=e.position;return!((t=e.input.charCodeAt(r))!==45&&t!==46||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,(t=e.input.charCodeAt(r))!==0&&!qt(t)))}function Ai(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
90
+ `,t-1))}function ih(e,t,r){var i,a,o,s,n,c,l,h,d=e.kind,p=e.result;if(qt(h=e.input.charCodeAt(e.position))||qe(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(qt(i=e.input.charCodeAt(e.position+1))||r&&qe(i)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;h!==0;){if(h===58){if(qt(i=e.input.charCodeAt(e.position+1))||r&&qe(i))break}else if(h===35){if(qt(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Ur(e)||r&&qe(h))break;if(ee(h)){if(n=e.line,c=e.lineStart,l=e.lineIndent,bt(e,!1,-1),e.lineIndent>=t){s=!0,h=e.input.charCodeAt(e.position);continue}e.position=o,e.line=n,e.lineStart=c,e.lineIndent=l;break}}s&&(fe(e,a,o,!1),Ai(e,e.line-n),a=o=e.position,s=!1),Be(h)||(o=e.position+1),h=e.input.charCodeAt(++e.position)}return fe(e,a,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}function ah(e,t){var r,i,a;if((r=e.input.charCodeAt(e.position))!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39){if(fe(e,i,e.position,!0),(r=e.input.charCodeAt(++e.position))!==39)return!0;i=e.position,e.position++,a=e.position}else ee(r)?(fe(e,i,a,!0),Ai(e,bt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&Ur(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}function oh(e,t){var r,i,a,o,s,n;if((n=e.input.charCodeAt(e.position))!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return fe(e,r,e.position,!0),e.position++,!0;if(n===92){if(fe(e,r,e.position,!0),ee(n=e.input.charCodeAt(++e.position)))bt(e,!1,t);else if(n<256&&Jl[n])e.result+=th[n],e.position++;else if((s=Zl(n))>0){for(a=s,o=0;a>0;a--)(s=Xl(n=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+s:G(e,"expected hexadecimal character");e.result+=Ql(o),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else ee(n)?(fe(e,r,i,!0),Ai(e,bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ur(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}function nh(e,t){var r,i,a,o,s,n,c,l,h,d,p,g,f=!0,m=e.tag,b=e.anchor,y=Object.create(null);if((g=e.input.charCodeAt(e.position))===91)s=93,l=!1,o=[];else{if(g!==123)return!1;s=125,l=!0,o={}}for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(bt(e,!0,t),(g=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=m,e.anchor=b,e.kind=l?"mapping":"sequence",e.result=o,!0;f?g===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),p=null,n=c=!1,g===63&&qt(e.input.charCodeAt(e.position+1))&&(n=c=!0,e.position++,bt(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,We(e,t,1,!1,!0),d=e.tag,h=e.result,bt(e,!0,t),g=e.input.charCodeAt(e.position),!c&&e.line!==r||g!==58||(n=!0,g=e.input.charCodeAt(++e.position),bt(e,!0,t),We(e,t,1,!1,!0),p=e.result),l?ze(e,o,y,d,h,p,r,i,a):n?o.push(ze(e,null,y,d,h,p,r,i,a)):o.push(h),bt(e,!0,t),(g=e.input.charCodeAt(e.position))===44?(f=!0,g=e.input.charCodeAt(++e.position)):f=!1}G(e,"unexpected end of the stream within a flow collection")}function sh(e,t){var r,i,a,o,s=1,n=!1,c=!1,l=t,h=0,d=!1;if((o=e.input.charCodeAt(e.position))===124)i=!1;else{if(o!==62)return!1;i=!0}for(e.kind="scalar",e.result="";o!==0;)if((o=e.input.charCodeAt(++e.position))===43||o===45)s===1?s=o===43?3:2:G(e,"repeat of a chomping mode identifier");else{if(!((a=Kl(o))>=0))break;a===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?G(e,"repeat of an indentation width identifier"):(l=t+a-1,c=!0)}if(Be(o)){do o=e.input.charCodeAt(++e.position);while(Be(o));if(o===35)do o=e.input.charCodeAt(++e.position);while(!ee(o)&&o!==0)}for(;o!==0;){for(Fi(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!c||e.lineIndent<l)&&o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>l&&(l=e.lineIndent),ee(o))h++;else{if(e.lineIndent<l){s===3?e.result+=St.repeat(`
91
91
  `,n?1+h:h):s===1&&n&&(e.result+=`
92
92
  `);break}for(i?Be(o)?(d=!0,e.result+=St.repeat(`
93
93
  `,n?1+h:h)):d?(d=!1,e.result+=St.repeat(`
94
94
  `,h+1)):h===0?n&&(e.result+=" "):e.result+=St.repeat(`
95
95
  `,h):e.result+=St.repeat(`
96
- `,n?1+h:h),n=!0,c=!0,h=0,r=e.position;!ee(o)&&o!==0;)o=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}}return!0}function ho(e,t){var r,i,a=e.tag,o=e.anchor,s=[],n=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);i!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i===45)&&Rt(e.input.charCodeAt(e.position+1));)if(n=!0,e.position++,bt(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,We(e,t,3,!1,!0),s.push(e.result),bt(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&i!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!n&&(e.tag=a,e.anchor=o,e.kind="sequence",e.result=s,!0)}function hh(e,t,r){var i,a,o,s,n,c,l,h=e.tag,d=e.anchor,p={},g=Object.create(null),f=null,m=null,b=null,y=!1,x=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),l=e.input.charCodeAt(e.position);l!==0;){if(y||e.firstTabInLine===-1||(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,l!==63&&l!==58||!Rt(i)){if(s=e.line,n=e.lineStart,c=e.position,!We(e,r,2,!1,!0))break;if(e.line===o){for(l=e.input.charCodeAt(e.position);Be(l);)l=e.input.charCodeAt(++e.position);if(l===58)Rt(l=e.input.charCodeAt(++e.position))||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ze(e,p,g,f,m,null,s,n,c),f=m=b=null),x=!0,y=!1,a=!1,f=e.tag,m=e.result;else{if(!x)return e.tag=h,e.anchor=d,!0;G(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return e.tag=h,e.anchor=d,!0;G(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else l===63?(y&&(ze(e,p,g,f,m,null,s,n,c),f=m=b=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):G(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,l=i;if((e.line===o||e.lineIndent>t)&&(y&&(s=e.line,n=e.lineStart,c=e.position),We(e,t,4,!0,a)&&(y?m=e.result:b=e.result),y||(ze(e,p,g,f,m,b,s,n,c),f=m=b=null),bt(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&l!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&ze(e,p,g,f,m,null,s,n,c),x&&(e.tag=h,e.anchor=d,e.kind="mapping",e.result=p),x}function ch(e){var t,r,i,a,o=!1,s=!1;if((a=e.input.charCodeAt(e.position))!==33)return!1;if(e.tag!==null&&G(e,"duplication of a tag property"),(a=e.input.charCodeAt(++e.position))===60?(o=!0,a=e.input.charCodeAt(++e.position)):a===33?(s=!0,r="!!",a=e.input.charCodeAt(++e.position)):r="!",t=e.position,o){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):G(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Rt(a);)a===33&&(s?G(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),Gl.test(r)||G(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),Gg.test(i)&&G(e,"tag suffix cannot contain flow indicator characters")}i&&!Xl.test(i)&&G(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{G(e,"tag name is malformed: "+i)}return o?e.tag=i:Te.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:r==="!"?e.tag="!"+i:r==="!!"?e.tag="tag:yaml.org,2002:"+i:G(e,'undeclared tag handle "'+r+'"'),!0}function dh(e){var t,r;if((r=e.input.charCodeAt(e.position))!==38)return!1;for(e.anchor!==null&&G(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Rt(r)&&!Re(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function uh(e){var t,r,i;if((i=e.input.charCodeAt(e.position))!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Rt(i)&&!Re(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Te.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],bt(e,!0,-1),!0}function We(e,t,r,i,a){var o,s,n,c,l,h,d,p,g,f=1,m=!1,b=!1;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=n=r===4||r===3,i&&bt(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;ch(e)||dh(e);)bt(e,!0,-1)?(m=!0,n=o,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):n=!1;if(n&&(n=m||a),f!==1&&r!==4||(p=r===1||r===2?t:t+1,g=e.position-e.lineStart,f===1?n&&(ho(e,g)||hh(e,g,p))||sh(e,p)?b=!0:(s&&lh(e,p)||oh(e,p)||nh(e,p)?b=!0:uh(e)?(b=!0,e.tag===null&&e.anchor===null||G(e,"alias node should not have any properties")):ah(e,p,r===1)&&(b=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(b=n&&ho(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&G(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c<l;c+=1)if((d=e.implicitTypes[c]).resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Te.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,c=0,l=(h=e.typeMap.multi[e.kind||"fallback"]).length;c<l;c+=1)if(e.tag.slice(0,h[c].tag.length)===h[c].tag){d=h[c];break}d||G(e,"unknown tag !<"+e.tag+">"),e.result!==null&&d.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||b}function ph(e){var t,r,i,a,o=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(bt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!Rt(a);)a=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&G(e,"directive name must not be less than one character in length");a!==0;){for(;Be(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ee(a));break}if(ee(a))break;for(t=e.position;a!==0&&!Rt(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}a!==0&&Fi(e),Te.call(ih,r)?ih[r](e,r,i):Yr(e,'unknown document directive "'+r+'"')}bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,bt(e,!0,-1)):s&&G(e,"directives end mark is expected"),We(e,e.lineIndent-1,4,!1,!0),bt(e,!0,-1),e.checkLineBreaks&&Vg.test(e.input.slice(o,e.position))&&Yr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ur(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,bt(e,!0,-1)):e.position<e.length-1&&G(e,"end of the stream or a document separator is expected")}function co(e,t){t=t||{},(e=String(e)).length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new rh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,G(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ph(r);return r.documents}function gh(e,t){var r=co(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new zt("expected a single document in the stream, but found more")}}u(fe,"captureSegment"),u(lo,"mergeMappings"),u(ze,"storeMappingPair"),u(Fi,"readLineBreak"),u(bt,"skipSeparationSpace"),u(Ur,"testDocumentSeparator"),u(Ai,"writeFoldedLines"),u(ah,"readPlainScalar"),u(oh,"readSingleQuotedScalar"),u(nh,"readDoubleQuotedScalar"),u(sh,"readFlowCollection"),u(lh,"readBlockScalar"),u(ho,"readBlockSequence"),u(hh,"readBlockMapping"),u(ch,"readTagProperty"),u(dh,"readAnchorProperty"),u(uh,"readAlias"),u(We,"composeNode"),u(ph,"readDocument"),u(co,"loadDocuments"),u(function(e,t,r){t!==null&&typeof t=="object"&&r===void 0&&(r=t,t=null);var i=co(e,r);if(typeof t!="function")return i;for(var a=0,o=i.length;a<o;a+=1)t(i[a])},"loadAll$1"),u(gh,"load$1");var Xg={load:gh},fh=Object.prototype.toString,mh=Object.prototype.hasOwnProperty,uo=65279,Zg={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Kg=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Qg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function yh(e,t){var r,i,a,o,s,n,c;if(t===null)return{};for(r={},a=0,o=(i=Object.keys(t)).length;a<o;a+=1)s=i[a],n=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),(c=e.compiledTypeMap.fallback[s])&&mh.call(c.styleAliases,n)&&(n=c.styleAliases[n]),r[s]=n;return r}function bh(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else{if(!(e<=4294967295))throw new zt("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+St.repeat("0",i-t.length)+t}u(yh,"compileStyleMap"),u(bh,"encodeHex");function xh(e){this.schema=e.schema||Vl,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=St.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=yh(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function po(e,t){for(var r,i=St.repeat(" ",t),a=0,o=-1,s="",n=e.length;a<n;)(o=e.indexOf(`
96
+ `,n?1+h:h),n=!0,c=!0,h=0,r=e.position;!ee(o)&&o!==0;)o=e.input.charCodeAt(++e.position);fe(e,r,e.position,!1)}}return!0}function lo(e,t){var r,i,a=e.tag,o=e.anchor,s=[],n=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),i=e.input.charCodeAt(e.position);i!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i===45)&&qt(e.input.charCodeAt(e.position+1));)if(n=!0,e.position++,bt(e,!0,-1)&&e.lineIndent<=t)s.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,We(e,t,3,!1,!0),s.push(e.result),bt(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&i!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!n&&(e.tag=a,e.anchor=o,e.kind="sequence",e.result=s,!0)}function lh(e,t,r){var i,a,o,s,n,c,l,h=e.tag,d=e.anchor,p={},g=Object.create(null),f=null,m=null,b=null,y=!1,x=!1;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),l=e.input.charCodeAt(e.position);l!==0;){if(y||e.firstTabInLine===-1||(e.position=e.firstTabInLine,G(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,l!==63&&l!==58||!qt(i)){if(s=e.line,n=e.lineStart,c=e.position,!We(e,r,2,!1,!0))break;if(e.line===o){for(l=e.input.charCodeAt(e.position);Be(l);)l=e.input.charCodeAt(++e.position);if(l===58)qt(l=e.input.charCodeAt(++e.position))||G(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(ze(e,p,g,f,m,null,s,n,c),f=m=b=null),x=!0,y=!1,a=!1,f=e.tag,m=e.result;else{if(!x)return e.tag=h,e.anchor=d,!0;G(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!x)return e.tag=h,e.anchor=d,!0;G(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else l===63?(y&&(ze(e,p,g,f,m,null,s,n,c),f=m=b=null),x=!0,y=!0,a=!0):y?(y=!1,a=!0):G(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,l=i;if((e.line===o||e.lineIndent>t)&&(y&&(s=e.line,n=e.lineStart,c=e.position),We(e,t,4,!0,a)&&(y?m=e.result:b=e.result),y||(ze(e,p,g,f,m,b,s,n,c),f=m=b=null),bt(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&l!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&ze(e,p,g,f,m,null,s,n,c),x&&(e.tag=h,e.anchor=d,e.kind="mapping",e.result=p),x}function hh(e){var t,r,i,a,o=!1,s=!1;if((a=e.input.charCodeAt(e.position))!==33)return!1;if(e.tag!==null&&G(e,"duplication of a tag property"),(a=e.input.charCodeAt(++e.position))===60?(o=!0,a=e.input.charCodeAt(++e.position)):a===33?(s=!0,r="!!",a=e.input.charCodeAt(++e.position)):r="!",t=e.position,o){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):G(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!qt(a);)a===33&&(s?G(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),Vl.test(r)||G(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),Vg.test(i)&&G(e,"tag suffix cannot contain flow indicator characters")}i&&!Gl.test(i)&&G(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{G(e,"tag name is malformed: "+i)}return o?e.tag=i:Te.call(e.tagMap,r)?e.tag=e.tagMap[r]+i:r==="!"?e.tag="!"+i:r==="!!"?e.tag="tag:yaml.org,2002:"+i:G(e,'undeclared tag handle "'+r+'"'),!0}function ch(e){var t,r;if((r=e.input.charCodeAt(e.position))!==38)return!1;for(e.anchor!==null&&G(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!qe(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function dh(e){var t,r,i;if((i=e.input.charCodeAt(e.position))!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!qt(i)&&!qe(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&G(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Te.call(e.anchorMap,r)||G(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],bt(e,!0,-1),!0}function We(e,t,r,i,a){var o,s,n,c,l,h,d,p,g,f=1,m=!1,b=!1;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=n=r===4||r===3,i&&bt(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),f===1)for(;hh(e)||ch(e);)bt(e,!0,-1)?(m=!0,n=o,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):n=!1;if(n&&(n=m||a),f!==1&&r!==4||(p=r===1||r===2?t:t+1,g=e.position-e.lineStart,f===1?n&&(lo(e,g)||lh(e,g,p))||nh(e,p)?b=!0:(s&&sh(e,p)||ah(e,p)||oh(e,p)?b=!0:dh(e)?(b=!0,e.tag===null&&e.anchor===null||G(e,"alias node should not have any properties")):ih(e,p,r===1)&&(b=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):f===0&&(b=n&&lo(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&G(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,l=e.implicitTypes.length;c<l;c+=1)if((d=e.implicitTypes[c]).resolve(e.result)){e.result=d.construct(e.result),e.tag=d.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Te.call(e.typeMap[e.kind||"fallback"],e.tag))d=e.typeMap[e.kind||"fallback"][e.tag];else for(d=null,c=0,l=(h=e.typeMap.multi[e.kind||"fallback"]).length;c<l;c+=1)if(e.tag.slice(0,h[c].tag.length)===h[c].tag){d=h[c];break}d||G(e,"unknown tag !<"+e.tag+">"),e.result!==null&&d.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||b}function uh(e){var t,r,i,a,o=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(bt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),t=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);for(i=[],(r=e.input.slice(t,e.position)).length<1&&G(e,"directive name must not be less than one character in length");a!==0;){for(;Be(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ee(a));break}if(ee(a))break;for(t=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}a!==0&&Fi(e),Te.call(rh,r)?rh[r](e,r,i):Yr(e,'unknown document directive "'+r+'"')}bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,bt(e,!0,-1)):s&&G(e,"directives end mark is expected"),We(e,e.lineIndent-1,4,!1,!0),bt(e,!0,-1),e.checkLineBreaks&&Ug.test(e.input.slice(o,e.position))&&Yr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ur(e)?e.input.charCodeAt(e.position)===46&&(e.position+=3,bt(e,!0,-1)):e.position<e.length-1&&G(e,"end of the stream or a document separator is expected")}function ho(e,t){t=t||{},(e=String(e)).length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new eh(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,G(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)uh(r);return r.documents}function ph(e,t){var r=ho(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new zt("expected a single document in the stream, but found more")}}u(fe,"captureSegment"),u(so,"mergeMappings"),u(ze,"storeMappingPair"),u(Fi,"readLineBreak"),u(bt,"skipSeparationSpace"),u(Ur,"testDocumentSeparator"),u(Ai,"writeFoldedLines"),u(ih,"readPlainScalar"),u(ah,"readSingleQuotedScalar"),u(oh,"readDoubleQuotedScalar"),u(nh,"readFlowCollection"),u(sh,"readBlockScalar"),u(lo,"readBlockSequence"),u(lh,"readBlockMapping"),u(hh,"readTagProperty"),u(ch,"readAnchorProperty"),u(dh,"readAlias"),u(We,"composeNode"),u(uh,"readDocument"),u(ho,"loadDocuments"),u(function(e,t,r){t!==null&&typeof t=="object"&&r===void 0&&(r=t,t=null);var i=ho(e,r);if(typeof t!="function")return i;for(var a=0,o=i.length;a<o;a+=1)t(i[a])},"loadAll$1"),u(ph,"load$1");var Gg={load:ph},gh=Object.prototype.toString,fh=Object.prototype.hasOwnProperty,co=65279,Xg={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Zg=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Kg=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function mh(e,t){var r,i,a,o,s,n,c;if(t===null)return{};for(r={},a=0,o=(i=Object.keys(t)).length;a<o;a+=1)s=i[a],n=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),(c=e.compiledTypeMap.fallback[s])&&fh.call(c.styleAliases,n)&&(n=c.styleAliases[n]),r[s]=n;return r}function yh(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else{if(!(e<=4294967295))throw new zt("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+St.repeat("0",i-t.length)+t}u(mh,"compileStyleMap"),u(yh,"encodeHex");function bh(e){this.schema=e.schema||Ul,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=St.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=mh(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function uo(e,t){for(var r,i=St.repeat(" ",t),a=0,o=-1,s="",n=e.length;a<n;)(o=e.indexOf(`
98
98
  `,a))===-1?(r=e.slice(a),a=n):(r=e.slice(a,o+1),a=o+1),r.length&&r!==`
99
99
  `&&(s+=i),s+=r;return s}function $i(e,t){return`
100
- `+St.repeat(" ",e.indent*t)}function Ch(e,t){var r,i;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function Vr(e){return e===32||e===9}function ir(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==uo||65536<=e&&e<=1114111}function go(e){return ir(e)&&e!==uo&&e!==13&&e!==10}function fo(e,t,r){var i=go(e),a=i&&!Vr(e);return(r?i:i&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!a)||go(t)&&!Vr(t)&&e===35||t===58&&a}function kh(e){return ir(e)&&e!==uo&&!Vr(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}function wh(e){return!Vr(e)&&e!==58}function ar(e,t){var r,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function mo(e){return/^\n* /.test(e)}u(xh,"State"),u(po,"indentString"),u($i,"generateNextLine"),u(Ch,"testImplicitResolving"),u(Vr,"isWhitespace"),u(ir,"isPrintable"),u(go,"isNsCharOrWhitespace"),u(fo,"isPlainSafe"),u(kh,"isPlainSafeFirst"),u(wh,"isPlainSafeLast"),u(ar,"codePointAt"),u(mo,"needIndentIndicator");function Sh(e,t,r,i,a,o,s,n){var c,l=0,h=null,d=!1,p=!1,g=i!==-1,f=-1,m=kh(ar(e,0))&&wh(ar(e,e.length-1));if(t||s)for(c=0;c<e.length;l>=65536?c+=2:c++){if(!ir(l=ar(e,c)))return 5;m=m&&fo(l,h,n),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if((l=ar(e,c))===10)d=!0,g&&(p=p||c-f-1>i&&e[f+1]!==" ",f=c);else if(!ir(l))return 5;m=m&&fo(l,h,n),h=l}p=p||g&&c-f-1>i&&e[f+1]!==" "}return d||p?r>9&&mo(e)?5:s?o===2?5:2:p?4:3:!m||s||a(e)?o===2?5:2:1}function Th(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===2?'""':"''";if(!e.noCompatMode&&(Kg.indexOf(t)!==-1||Qg.test(t)))return e.quotingType===2?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return Ch(e,l)}switch(u(c,"testAmbiguity"),Sh(t,n,e.indent,s,c,e.quotingType,e.forceQuotes&&!i,a)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+yo(t,e.indent)+bo(po(t,o));case 4:return">"+yo(t,e.indent)+bo(po(Bh(t,s),o));case 5:return'"'+vh(t)+'"';default:throw new zt("impossible error: invalid scalar style")}})()}function yo(e,t){var r=mo(e)?String(t):"",i=e[e.length-1]===`
100
+ `+St.repeat(" ",e.indent*t)}function xh(e,t){var r,i;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function Vr(e){return e===32||e===9}function ir(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==co||65536<=e&&e<=1114111}function po(e){return ir(e)&&e!==co&&e!==13&&e!==10}function go(e,t,r){var i=po(e),a=i&&!Vr(e);return(r?i:i&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!a)||po(t)&&!Vr(t)&&e===35||t===58&&a}function Ch(e){return ir(e)&&e!==co&&!Vr(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}function kh(e){return!Vr(e)&&e!==58}function ar(e,t){var r,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function fo(e){return/^\n* /.test(e)}u(bh,"State"),u(uo,"indentString"),u($i,"generateNextLine"),u(xh,"testImplicitResolving"),u(Vr,"isWhitespace"),u(ir,"isPrintable"),u(po,"isNsCharOrWhitespace"),u(go,"isPlainSafe"),u(Ch,"isPlainSafeFirst"),u(kh,"isPlainSafeLast"),u(ar,"codePointAt"),u(fo,"needIndentIndicator");function wh(e,t,r,i,a,o,s,n){var c,l=0,h=null,d=!1,p=!1,g=i!==-1,f=-1,m=Ch(ar(e,0))&&kh(ar(e,e.length-1));if(t||s)for(c=0;c<e.length;l>=65536?c+=2:c++){if(!ir(l=ar(e,c)))return 5;m=m&&go(l,h,n),h=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if((l=ar(e,c))===10)d=!0,g&&(p=p||c-f-1>i&&e[f+1]!==" ",f=c);else if(!ir(l))return 5;m=m&&go(l,h,n),h=l}p=p||g&&c-f-1>i&&e[f+1]!==" "}return d||p?r>9&&fo(e)?5:s?o===2?5:2:p?4:3:!m||s||a(e)?o===2?5:2:1}function Sh(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===2?'""':"''";if(!e.noCompatMode&&(Zg.indexOf(t)!==-1||Kg.test(t)))return e.quotingType===2?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return xh(e,l)}switch(u(c,"testAmbiguity"),wh(t,n,e.indent,s,c,e.quotingType,e.forceQuotes&&!i,a)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+mo(t,e.indent)+yo(uo(t,o));case 4:return">"+mo(t,e.indent)+yo(uo(Th(t,s),o));case 5:return'"'+Bh(t)+'"';default:throw new zt("impossible error: invalid scalar style")}})()}function mo(e,t){var r=fo(e)?String(t):"",i=e[e.length-1]===`
101
101
  `;return r+(i&&(e[e.length-2]===`
102
102
  `||e===`
103
103
  `)?"+":i?"":"-")+`
104
- `}function bo(e){return e[e.length-1]===`
105
- `?e.slice(0,-1):e}function Bh(e,t){for(var r,i,a,o=/(\n+)([^\n]*)/g,s=(r=(r=e.indexOf(`
106
- `))!==-1?r:e.length,o.lastIndex=r,xo(e.slice(0,r),t)),n=e[0]===`
104
+ `}function yo(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}function Th(e,t){for(var r,i,a,o=/(\n+)([^\n]*)/g,s=(r=(r=e.indexOf(`
106
+ `))!==-1?r:e.length,o.lastIndex=r,bo(e.slice(0,r),t)),n=e[0]===`
107
107
  `||e[0]===" ";a=o.exec(e);){var c=a[1],l=a[2];i=l[0]===" ",s+=c+(n||i||l===""?"":`
108
- `)+xo(l,t),n=i}return s}function xo(e,t){if(e===""||e[0]===" ")return e;for(var r,i,a=/ [^ ]/g,o=0,s=0,n=0,c="";r=a.exec(e);)(n=r.index)-o>t&&(i=s>o?s:n,c+=`
108
+ `)+bo(l,t),n=i}return s}function bo(e,t){if(e===""||e[0]===" ")return e;for(var r,i,a=/ [^ ]/g,o=0,s=0,n=0,c="";r=a.exec(e);)(n=r.index)-o>t&&(i=s>o?s:n,c+=`
109
109
  `+e.slice(o,i),o=i+1),s=n;return c+=`
110
110
  `,e.length-o>t&&s>o?c+=e.slice(o,s)+`
111
- `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function vh(e){for(var t,r="",i=0,a=0;a<e.length;i>=65536?a+=2:a++)i=ar(e,a),!(t=Zg[i])&&ir(i)?(r+=e[a],i>=65536&&(r+=e[a+1])):r+=t||bh(i);return r}function Mh(e,t,r){var i,a,o,s="",n=e.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],e.replacer&&(o=e.replacer.call(r,String(i),o)),(ne(e,t,o,!1,!1)||o===void 0&&ne(e,t,null,!1,!1))&&(s!==""&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=n,e.dump="["+s+"]"}function Co(e,t,r,i){var a,o,s,n="",c=e.tag;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(ne(e,t+1,s,!0,!0,!1,!0)||s===void 0&&ne(e,t+1,null,!0,!0,!1,!0))&&(i&&n===""||(n+=$i(e,t)),e.dump&&e.dump.charCodeAt(0)===10?n+="-":n+="- ",n+=e.dump);e.tag=c,e.dump=n||"[]"}function Lh(e,t,r){var i,a,o,s,n,c="",l=e.tag,h=Object.keys(r);for(i=0,a=h.length;i<a;i+=1)n="",c!==""&&(n+=", "),e.condenseFlow&&(n+='"'),s=r[o=h[i]],e.replacer&&(s=e.replacer.call(r,o,s)),ne(e,t,o,!1,!1)&&(e.dump.length>1024&&(n+="? "),n+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ne(e,t,s,!1,!1)&&(c+=n+=e.dump));e.tag=l,e.dump="{"+c+"}"}function _h(e,t,r,i){var a,o,s,n,c,l,h="",d=e.tag,p=Object.keys(r);if(e.sortKeys===!0)p.sort();else if(typeof e.sortKeys=="function")p.sort(e.sortKeys);else if(e.sortKeys)throw new zt("sortKeys must be a boolean or a function");for(a=0,o=p.length;a<o;a+=1)l="",i&&h===""||(l+=$i(e,t)),n=r[s=p[a]],e.replacer&&(n=e.replacer.call(r,s,n)),ne(e,t+1,s,!0,!0,!0)&&((c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024)&&(e.dump&&e.dump.charCodeAt(0)===10?l+="?":l+="? "),l+=e.dump,c&&(l+=$i(e,t)),ne(e,t+1,n,!0,c)&&(e.dump&&e.dump.charCodeAt(0)===10?l+=":":l+=": ",h+=l+=e.dump));e.tag=d,e.dump=h||"{}"}function ko(e,t,r){var i,a,o,s,n,c;for(o=0,s=(a=r?e.explicitTypes:e.implicitTypes).length;o<s;o+=1)if(((n=a[o]).instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(c=e.styleMap[n.tag]||n.defaultStyle,fh.call(n.represent)==="[object Function]")i=n.represent(t,c);else{if(!mh.call(n.represent,c))throw new zt("!<"+n.tag+'> tag resolver accepts not "'+c+'" style');i=n.represent[c](t,c)}e.dump=i}return!0}return!1}function ne(e,t,r,i,a,o,s){e.tag=null,e.dump=r,ko(e,r,!1)||ko(e,r,!0);var n,c=fh.call(e.dump),l=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var h,d,p=c==="[object Object]"||c==="[object Array]";if(p&&(d=(h=e.duplicates.indexOf(r))!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(a=!1),d&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(p&&d&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(_h(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(Lh(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Co(e,t-1,e.dump,a):Co(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(Mh(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else{if(c!=="[object String]"){if(c==="[object Undefined]"||e.skipInvalid)return!1;throw new zt("unacceptable kind of an object to dump "+c)}e.tag!=="?"&&Th(e,e.dump,t,o,l)}e.tag!==null&&e.tag!=="?"&&(n=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),n=e.tag[0]==="!"?"!"+n:n.slice(0,18)==="tag:yaml.org,2002:"?"!!"+n.slice(18):"!<"+n+">",e.dump=n+" "+e.dump)}return!0}function Fh(e,t){var r,i,a=[],o=[];for(Ei(e,a,o),r=0,i=o.length;r<i;r+=1)t.duplicates.push(a[o[r]]);t.usedDuplicates=new Array(i)}function Ei(e,t,r){var i,a,o;if(e!==null&&typeof e=="object")if((a=t.indexOf(e))!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,o=e.length;a<o;a+=1)Ei(e[a],t,r);else for(a=0,o=(i=Object.keys(e)).length;a<o;a+=1)Ei(e[i[a]],t,r)}u(Sh,"chooseScalarStyle"),u(Th,"writeScalar"),u(yo,"blockHeader"),u(bo,"dropEndingNewline"),u(Bh,"foldString"),u(xo,"foldLine"),u(vh,"escapeString"),u(Mh,"writeFlowSequence"),u(Co,"writeBlockSequence"),u(Lh,"writeFlowMapping"),u(_h,"writeBlockMapping"),u(ko,"detectType"),u(ne,"writeNode"),u(Fh,"getDuplicateReferences"),u(Ei,"inspectNode"),u(function(e,t){var r=new xh(t=t||{});r.noRefs||Fh(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ne(r,0,i,!0,!0)?r.dump+`
112
- `:""},"dump$1"),u(function(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}},"renamed");let Ut;_n=Fl,Qn=Xg.load,Ut={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Gr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=mt(e),t=mt(t);const[r,i]=[e.x,e.y],[a,o]=[t.x,t.y],s=a-r,n=o-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}u(Gr,"calculateDeltaAndAngle");let Ah,$h,mt,Eh,je,Oh,H,Dh,or,Tt;mt=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),In=u(e=>({x:u(function(t,r,i){let a=0;const o=mt(i[0]).x<mt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:p,deltaX:g}=Gr(i[0],i[1]);a=Ut[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:p,deltaX:g}=Gr(i[i.length-1],i[i.length-2]);a=Ut[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const s=Math.abs(mt(t).x-mt(i[i.length-1]).x),n=Math.abs(mt(t).y-mt(i[i.length-1]).y),c=Math.abs(mt(t).x-mt(i[0]).x),l=Math.abs(mt(t).y-mt(i[0]).y),h=Ut[e.arrowTypeStart],d=Ut[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="right"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+1-c;p*=o==="right"?-1:1,a+=p}return mt(t).x+a},"x"),y:u(function(t,r,i){let a=0;const o=mt(i[0]).y<mt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:p,deltaY:g}=Gr(i[0],i[1]);a=Ut[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:p,deltaY:g}=Gr(i[i.length-1],i[i.length-2]);a=Ut[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const s=Math.abs(mt(t).y-mt(i[i.length-1]).y),n=Math.abs(mt(t).x-mt(i[i.length-1]).x),c=Math.abs(mt(t).y-mt(i[0]).y),l=Math.abs(mt(t).x-mt(i[0]).x),h=Ut[e.arrowTypeStart],d=Ut[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="up"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+1-c;p*=o==="up"?-1:1,a+=p}return mt(t).y+a},"y")}),"getLineFunctionsWithOffset"),ci=u(({flowchart:e})=>{var i,a;const t=((i=e==null?void 0:e.subGraphTitleMargin)==null?void 0:i.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:t+r}},"getSubGraphTitleMargins"),Eh=u(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),je=u(e=>{const t=Oh([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Oh=u(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),wa=u(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Y=u(e=>{const{stylesArray:t}=je(e),r=[],i=[],a=[],o=[];return t.forEach(s=>{const n=s[0];wa(n)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),n.includes("stroke")&&a.push(s.join(":")+" !important"),n==="fill"&&o.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:o}},"styles2String"),H=u((e,t)=>{var n;const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:s}=je(e);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:((n=s.get("stroke-width"))==null?void 0:n.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Dh(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),Dh=u(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const r=isNaN(t[0])?0:t[0];return[r,r]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},"getStrokeDashArray"),or={},Tt={};let Ih,Ph,Nh,wo,Rh,qh;Vn=(function(){if($h)return or;$h=1,Object.defineProperty(or,"__esModule",{value:!0}),or.sanitizeUrl=void 0;var e=(Ah||(Ah=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0,Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Tt.urlSchemeRegex=/^.+(:|&colon;)/gim,Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Tt.relativeFirstCharacters=[".","/"],Tt.BLANK_URL="about:blank"),Tt);function t(i){return i.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,function(a,o){return String.fromCharCode(o)})}function r(i){try{return decodeURIComponent(i)}catch{return i}}return or.sanitizeUrl=function(i){if(!i)return e.BLANK_URL;var a,o=r(i.trim());do a=(o=r(o=t(o).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||o.match(e.htmlEntitiesRegex)||o.match(e.htmlCtrlEntityRegex)||o.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var s=o;if(!s)return e.BLANK_URL;if((function(p){return e.relativeFirstCharacters.indexOf(p[0])>-1})(s))return s;var n=s.trimStart(),c=n.match(e.urlSchemeRegex);if(!c)return s;var l=c[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(l))return e.BLANK_URL;var h=n.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return h;if(l==="http:"||l==="https:"){if(!(function(p){return URL.canParse(p)})(h))return e.BLANK_URL;var d=new URL(h);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return h},or})(),jp="\u200B",Ih={curveBasis:Bn,curveBasisClosed:Ty,curveBasisOpen:Sy,curveBumpX:is,curveBumpY:as,curveBundle:wy,curveCardinalClosed:ky,curveCardinalOpen:Cy,curveCardinal:qp,curveCatmullRomClosed:xy,curveCatmullRomOpen:by,curveCatmullRom:Rp,curveLinear:Tn,curveLinearClosed:yy,curveMonotoneX:Np,curveMonotoneY:Pp,curveNatural:Ip,curveStep:Dp,curveStepAfter:Op,curveStepBefore:Ep},Ph=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Nh=u(function(e,t){const r=wo(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(n=>n.args);Nr(s),i=kt(i,[...s])}else i=r.args;if(!i)return;let a=mi(e,t);const o="config";return i[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),wo=u(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Ph.source})(?=[}][%]{2}).*
113
- `,"ig");let o;e=e.trim().replace(a,"").replace(/'/gm,'"'),E.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);const s=[];for(;(o=er.exec(e))!==null;)if(o.index===er.lastIndex&&er.lastIndex++,o&&!t||t&&((r=o[1])==null?void 0:r.match(t))||t&&((i=o[2])==null?void 0:i.match(t))){const n=o[1]?o[1]:o[2],c=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;s.push({type:n,args:c})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(a){return E.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Rh=u(function(e){return e.replace(er,"")},"removeDirectives"),qh=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function So(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Ih[r]??t}function zh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Vn.sanitizeUrl(r):r}u(So,"interpolateToCurve"),u(zh,"formatUrl");var Jg=u((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let o=window;for(let s=0;s<i;s++)if(o=o[r[s]],!o)return void E.error(`Function name: ${e} not found in window`);o[a](...t)},"runFunc");function To(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function Wh(e){let t,r=0;return e.forEach(i=>{r+=To(i,t),t=i}),Bo(e,r/2)}function jh(e){return e.length===1?e[0]:Wh(e)}u(To,"distance"),u(Wh,"traverseEdge"),u(jh,"calcLabelPosition");var Hh=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Bo=u((e,t)=>{let r,i=t;for(const a of e){if(r){const o=To(a,r);if(o===0)return r;if(o<i)i-=o;else{const s=i/o;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:Hh((1-s)*r.x+s*a.x,5),y:Hh((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),tf=u((e,t,r)=>{E.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=Bo(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+i.x)/2,s.y=-Math.cos(o)*a+(t[0].y+i.y)/2,s},"calcCardinalityPosition");function Yh(e,t,r){const i=structuredClone(r);E.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=Bo(i,25+e),o=10+.5*e,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),n={x:0,y:0};return t==="start_left"?(n.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(n.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(n.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(n.x=Math.sin(s)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2),n}ka=function(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}},u(Yh,"calcTerminalLabelPosition"),u(ka,"getStylesFromArray");let vo;vo=0,$n=u(()=>(vo++,"id-"+Math.random().toString(36).substr(2,12)+"-"+vo),"generateId");function Uh(e){let t="";const r="0123456789abcdef";for(let i=0;i<e;i++)t+=r.charAt(Math.floor(16*Math.random()));return t}u(Uh,"makeRandomHex");let Vh,Gh,Xh;Ln=u(e=>Uh(e.length),"random"),Vh=u(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"),Gh=u(function(e,t){const r=t.text.replace(Ee.lineBreakRegex," "),[,i]=_r(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const o=a.append("tspan");return o.attr("x",t.x+2*t.textMargin),o.attr("fill",t.fill),o.text(r),a},"drawSimpleText"),Jn=Sn((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ee.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let o="";return i.forEach((s,n)=>{const c=ie(`${s} `,r),l=ie(o,r);if(c>t){const{hyphenatedStrings:h,remainingWord:d}=Xh(s,t,"-",r);a.push(o,...h),o=d}else l+c>=t?(a.push(o),o=s):o=[o,s].filter(Boolean).join(" ");n+1===i.length&&a.push(o)}),a.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Xh=Sn((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],o=[];let s="";return a.forEach((n,c)=>{const l=`${s}${n}`;if(ie(l,i)>=t){const h=c+1,d=a.length===h,p=`${l}${r}`;o.push(d?l:p),s=""}else s=l}),{hyphenatedStrings:o,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`),Ba=function(e,t){return Mo(e,t).height},ie=function(e,t){return Mo(e,t).width},u(Ba,"calculateTextHeight"),u(ie,"calculateTextWidth");var Oi,Mo=Sn((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,o]=_r(r),s=["sans-serif",i],n=e.split(Ee.lineBreakRegex),c=[],l=dt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const d of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const f of n){const m=Vh();m.text=f||"\u200B";const b=Gh(h,m).style("font-size",o).style("font-weight",a).style("font-family",d),y=(b._groups||b)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),p=Math.round(y.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}c.push(g)}return h.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ef=(wr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},u(wr,"InitIDGenerator"),wr),rf=u(function(e){return Oi=Oi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Oi.innerHTML=e,unescape(Oi.textContent)},"entityDecode");function Lo(e){return"str"in e}u(Lo,"isDetailedError");let Zh;Zh=u((e,t,r,i)=>{var o;if(!i)return;const a=(o=e.node())==null?void 0:o.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),_r=u(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize"),li=function(e,t){return fy({},e,t)},u(li,"cleanAndMerge");let Kh;Xt={assignWithDepth:kt,wrapLabel:Jn,calculateTextHeight:Ba,calculateTextWidth:ie,calculateTextDimensions:Mo,cleanAndMerge:li,detectInit:Nh,detectDirective:wo,isSubstringInArray:qh,interpolateToCurve:So,calcLabelPosition:jh,calcCardinalityPosition:tf,calcTerminalLabelPosition:Yh,formatUrl:zh,getStylesFromArray:ka,generateId:$n,random:Ln,runFunc:Jg,entityDecode:rf,insertTitle:Zh,isLabelCoordinateInPath:Qh,parseFontSize:_r,InitIDGenerator:ef},Kh=u(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),ke=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tg=u((e,t,{counter:r=0,prefix:i,suffix:a},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function $t(e){return e??null}function Qh(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(i.toString())}u($t,"handleUndefinedAttr"),u(Qh,"isLabelCoordinateInPath");const af=Object.freeze({left:0,top:0,width:16,height:16}),Di=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jh=Object.freeze({...af,...Di}),of=Object.freeze({...Jh,body:"",hidden:!1}),nf=Object.freeze({width:null,height:null}),sf=Object.freeze({...nf,...Di}),_o=(e,t)=>!!e&&!(!(t&&e.prefix===""||e.prefix)||!e.name);function tc(e,t){const r=(function(i,a){const o={};!i.hFlip!=!a.hFlip&&(o.hFlip=!0),!i.vFlip!=!a.vFlip&&(o.vFlip=!0);const s=((i.rotate||0)+(a.rotate||0))%4;return s&&(o.rotate=s),o})(e,t);for(const i in of)i in Di?i in e&&!(i in r)&&(r[i]=Di[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function ec(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let o={};function s(n){o=tc(i[n]||a[n],o)}return s(t),r.forEach(s),tc(e,o)}function lf(e,t){if(e.icons[t])return ec(e,t,[]);const r=(function(i,a){const o=i.icons,s=i.aliases||Object.create(null),n=Object.create(null);return(a||Object.keys(o).concat(Object.keys(s))).forEach(function c(l){if(o[l])return n[l]=[];if(!(l in n)){n[l]=null;const h=s[l]&&s[l].parent,d=h&&c(h);d&&(n[l]=[h].concat(d))}return n[l]}),n})(e,[t])[t];return r?ec(e,t,r):null}const hf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,cf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function rc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(hf);if(i===null||!i.length)return e;const a=[];let o=i.shift(),s=cf.test(o);for(;;){if(s){const n=parseFloat(o);isNaN(n)?a.push(o):a.push(Math.ceil(n*t*r)/r)}else a.push(o);if(o=i.shift(),o===void 0)return a.join("");s=!s}}const df=/\sid="(\S+)"/g,uf="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let pf=0;function ic(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?n.concat(l.map(function(h){var d,p;return(p=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(a.length){var o=new RegExp(`
111
+ `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function Bh(e){for(var t,r="",i=0,a=0;a<e.length;i>=65536?a+=2:a++)i=ar(e,a),!(t=Xg[i])&&ir(i)?(r+=e[a],i>=65536&&(r+=e[a+1])):r+=t||yh(i);return r}function vh(e,t,r){var i,a,o,s="",n=e.tag;for(i=0,a=r.length;i<a;i+=1)o=r[i],e.replacer&&(o=e.replacer.call(r,String(i),o)),(ne(e,t,o,!1,!1)||o===void 0&&ne(e,t,null,!1,!1))&&(s!==""&&(s+=","+(e.condenseFlow?"":" ")),s+=e.dump);e.tag=n,e.dump="["+s+"]"}function xo(e,t,r,i){var a,o,s,n="",c=e.tag;for(a=0,o=r.length;a<o;a+=1)s=r[a],e.replacer&&(s=e.replacer.call(r,String(a),s)),(ne(e,t+1,s,!0,!0,!1,!0)||s===void 0&&ne(e,t+1,null,!0,!0,!1,!0))&&(i&&n===""||(n+=$i(e,t)),e.dump&&e.dump.charCodeAt(0)===10?n+="-":n+="- ",n+=e.dump);e.tag=c,e.dump=n||"[]"}function Mh(e,t,r){var i,a,o,s,n,c="",l=e.tag,h=Object.keys(r);for(i=0,a=h.length;i<a;i+=1)n="",c!==""&&(n+=", "),e.condenseFlow&&(n+='"'),s=r[o=h[i]],e.replacer&&(s=e.replacer.call(r,o,s)),ne(e,t,o,!1,!1)&&(e.dump.length>1024&&(n+="? "),n+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ne(e,t,s,!1,!1)&&(c+=n+=e.dump));e.tag=l,e.dump="{"+c+"}"}function Lh(e,t,r,i){var a,o,s,n,c,l,h="",d=e.tag,p=Object.keys(r);if(e.sortKeys===!0)p.sort();else if(typeof e.sortKeys=="function")p.sort(e.sortKeys);else if(e.sortKeys)throw new zt("sortKeys must be a boolean or a function");for(a=0,o=p.length;a<o;a+=1)l="",i&&h===""||(l+=$i(e,t)),n=r[s=p[a]],e.replacer&&(n=e.replacer.call(r,s,n)),ne(e,t+1,s,!0,!0,!0)&&((c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024)&&(e.dump&&e.dump.charCodeAt(0)===10?l+="?":l+="? "),l+=e.dump,c&&(l+=$i(e,t)),ne(e,t+1,n,!0,c)&&(e.dump&&e.dump.charCodeAt(0)===10?l+=":":l+=": ",h+=l+=e.dump));e.tag=d,e.dump=h||"{}"}function Co(e,t,r){var i,a,o,s,n,c;for(o=0,s=(a=r?e.explicitTypes:e.implicitTypes).length;o<s;o+=1)if(((n=a[o]).instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(c=e.styleMap[n.tag]||n.defaultStyle,gh.call(n.represent)==="[object Function]")i=n.represent(t,c);else{if(!fh.call(n.represent,c))throw new zt("!<"+n.tag+'> tag resolver accepts not "'+c+'" style');i=n.represent[c](t,c)}e.dump=i}return!0}return!1}function ne(e,t,r,i,a,o,s){e.tag=null,e.dump=r,Co(e,r,!1)||Co(e,r,!0);var n,c=gh.call(e.dump),l=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var h,d,p=c==="[object Object]"||c==="[object Array]";if(p&&(d=(h=e.duplicates.indexOf(r))!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(a=!1),d&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(p&&d&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),c==="[object Object]")i&&Object.keys(e.dump).length!==0?(Lh(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(Mh(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else if(c==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?xo(e,t-1,e.dump,a):xo(e,t,e.dump,a),d&&(e.dump="&ref_"+h+e.dump)):(vh(e,t,e.dump),d&&(e.dump="&ref_"+h+" "+e.dump));else{if(c!=="[object String]"){if(c==="[object Undefined]"||e.skipInvalid)return!1;throw new zt("unacceptable kind of an object to dump "+c)}e.tag!=="?"&&Sh(e,e.dump,t,o,l)}e.tag!==null&&e.tag!=="?"&&(n=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),n=e.tag[0]==="!"?"!"+n:n.slice(0,18)==="tag:yaml.org,2002:"?"!!"+n.slice(18):"!<"+n+">",e.dump=n+" "+e.dump)}return!0}function _h(e,t){var r,i,a=[],o=[];for(Ei(e,a,o),r=0,i=o.length;r<i;r+=1)t.duplicates.push(a[o[r]]);t.usedDuplicates=new Array(i)}function Ei(e,t,r){var i,a,o;if(e!==null&&typeof e=="object")if((a=t.indexOf(e))!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,o=e.length;a<o;a+=1)Ei(e[a],t,r);else for(a=0,o=(i=Object.keys(e)).length;a<o;a+=1)Ei(e[i[a]],t,r)}u(wh,"chooseScalarStyle"),u(Sh,"writeScalar"),u(mo,"blockHeader"),u(yo,"dropEndingNewline"),u(Th,"foldString"),u(bo,"foldLine"),u(Bh,"escapeString"),u(vh,"writeFlowSequence"),u(xo,"writeBlockSequence"),u(Mh,"writeFlowMapping"),u(Lh,"writeBlockMapping"),u(Co,"detectType"),u(ne,"writeNode"),u(_h,"getDuplicateReferences"),u(Ei,"inspectNode"),u(function(e,t){var r=new bh(t=t||{});r.noRefs||_h(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ne(r,0,i,!0,!0)?r.dump+`
112
+ `:""},"dump$1"),u(function(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}},"renamed");let Ut;Ln=_l,Kn=Gg.load,Ut={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Gr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=mt(e),t=mt(t);const[r,i]=[e.x,e.y],[a,o]=[t.x,t.y],s=a-r,n=o-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}u(Gr,"calculateDeltaAndAngle");let Fh,Ah,mt,$h,je,Eh,H,Dh,or,Tt;mt=u(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),On=u(e=>({x:u(function(t,r,i){let a=0;const o=mt(i[0]).x<mt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:p,deltaX:g}=Gr(i[0],i[1]);a=Ut[e.arrowTypeStart]*Math.cos(p)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:p,deltaX:g}=Gr(i[i.length-1],i[i.length-2]);a=Ut[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const s=Math.abs(mt(t).x-mt(i[i.length-1]).x),n=Math.abs(mt(t).y-mt(i[i.length-1]).y),c=Math.abs(mt(t).x-mt(i[0]).x),l=Math.abs(mt(t).y-mt(i[0]).y),h=Ut[e.arrowTypeStart],d=Ut[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="right"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+1-c;p*=o==="right"?-1:1,a+=p}return mt(t).x+a},"x"),y:u(function(t,r,i){let a=0;const o=mt(i[0]).y<mt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ut,e.arrowTypeStart)){const{angle:p,deltaY:g}=Gr(i[0],i[1]);a=Ut[e.arrowTypeStart]*Math.abs(Math.sin(p))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ut,e.arrowTypeEnd)){const{angle:p,deltaY:g}=Gr(i[i.length-1],i[i.length-2]);a=Ut[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const s=Math.abs(mt(t).y-mt(i[i.length-1]).y),n=Math.abs(mt(t).x-mt(i[i.length-1]).x),c=Math.abs(mt(t).y-mt(i[0]).y),l=Math.abs(mt(t).x-mt(i[0]).x),h=Ut[e.arrowTypeStart],d=Ut[e.arrowTypeEnd];if(s<d&&s>0&&n<d){let p=d+1-s;p*=o==="up"?-1:1,a-=p}if(c<h&&c>0&&l<h){let p=h+1-c;p*=o==="up"?-1:1,a+=p}return mt(t).y+a},"y")}),"getLineFunctionsWithOffset"),ci=u(({flowchart:e})=>{var i,a;const t=((i=e==null?void 0:e.subGraphTitleMargin)==null?void 0:i.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:t+r}},"getSubGraphTitleMargins"),$h=u(e=>{const{handDrawnSeed:t}=ut();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),je=u(e=>{const t=Eh([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Eh=u(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),wa=u(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Y=u(e=>{const{stylesArray:t}=je(e),r=[],i=[],a=[],o=[];return t.forEach(s=>{const n=s[0];wa(n)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),n.includes("stroke")&&a.push(s.join(":")+" !important"),n==="fill"&&o.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:o}},"styles2String"),H=u((e,t)=>{var n;const{themeVariables:r,handDrawnSeed:i}=ut(),{nodeBorder:a,mainBkg:o}=r,{stylesMap:s}=je(e);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:i,strokeWidth:((n=s.get("stroke-width"))==null?void 0:n.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Dh(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),Dh=u(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const r=isNaN(t[0])?0:t[0];return[r,r]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},"getStrokeDashArray"),or={},Tt={};let Oh,Ih,Ph,ko,Nh,qh;Un=(function(){if(Ah)return or;Ah=1,Object.defineProperty(or,"__esModule",{value:!0}),or.sanitizeUrl=void 0;var e=(Fh||(Fh=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0,Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Tt.urlSchemeRegex=/^.+(:|&colon;)/gim,Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Tt.relativeFirstCharacters=[".","/"],Tt.BLANK_URL="about:blank"),Tt);function t(i){return i.replace(e.ctrlCharactersRegex,"").replace(e.htmlEntitiesRegex,function(a,o){return String.fromCharCode(o)})}function r(i){try{return decodeURIComponent(i)}catch{return i}}return or.sanitizeUrl=function(i){if(!i)return e.BLANK_URL;var a,o=r(i.trim());do a=(o=r(o=t(o).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim())).match(e.ctrlCharactersRegex)||o.match(e.htmlEntitiesRegex)||o.match(e.htmlCtrlEntityRegex)||o.match(e.whitespaceEscapeCharsRegex);while(a&&a.length>0);var s=o;if(!s)return e.BLANK_URL;if((function(p){return e.relativeFirstCharacters.indexOf(p[0])>-1})(s))return s;var n=s.trimStart(),c=n.match(e.urlSchemeRegex);if(!c)return s;var l=c[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(l))return e.BLANK_URL;var h=n.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return h;if(l==="http:"||l==="https:"){if(!(function(p){return URL.canParse(p)})(h))return e.BLANK_URL;var d=new URL(h);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return h},or})(),jp="\u200B",Oh={curveBasis:Tn,curveBasisClosed:fy,curveBasisOpen:gy,curveBumpX:rs,curveBumpY:is,curveBundle:py,curveCardinalClosed:uy,curveCardinalOpen:dy,curveCardinal:qp,curveCatmullRomClosed:cy,curveCatmullRomOpen:hy,curveCatmullRom:Np,curveLinear:Sn,curveLinearClosed:ly,curveMonotoneX:Pp,curveMonotoneY:Ip,curveNatural:Op,curveStep:Dp,curveStepAfter:Ep,curveStepBefore:$p},Ih=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ph=u(function(e,t){const r=ko(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(n=>n.args);Nr(s),i=kt(i,[...s])}else i=r.args;if(!i)return;let a=mi(e,t);const o="config";return i[o]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[o],delete i[o]),i},"detectInit"),ko=u(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${Ih.source})(?=[}][%]{2}).*
113
+ `,"ig");let o;e=e.trim().replace(a,"").replace(/'/gm,'"'),E.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);const s=[];for(;(o=er.exec(e))!==null;)if(o.index===er.lastIndex&&er.lastIndex++,o&&!t||t&&((r=o[1])==null?void 0:r.match(t))||t&&((i=o[2])==null?void 0:i.match(t))){const n=o[1]?o[1]:o[2],c=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;s.push({type:n,args:c})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(a){return E.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Nh=u(function(e){return e.replace(er,"")},"removeDirectives"),qh=u(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function wo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Oh[r]??t}function Rh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Un.sanitizeUrl(r):r}u(wo,"interpolateToCurve"),u(Rh,"formatUrl");var Qg=u((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let o=window;for(let s=0;s<i;s++)if(o=o[r[s]],!o)return void E.error(`Function name: ${e} not found in window`);o[a](...t)},"runFunc");function So(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function zh(e){let t,r=0;return e.forEach(i=>{r+=So(i,t),t=i}),To(e,r/2)}function Wh(e){return e.length===1?e[0]:zh(e)}u(So,"distance"),u(zh,"traverseEdge"),u(Wh,"calcLabelPosition");var jh=u((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),To=u((e,t)=>{let r,i=t;for(const a of e){if(r){const o=So(a,r);if(o===0)return r;if(o<i)i-=o;else{const s=i/o;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:jh((1-s)*r.x+s*a.x,5),y:jh((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Jg=u((e,t,r)=>{E.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const i=To(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+i.x)/2,s.y=-Math.cos(o)*a+(t[0].y+i.y)/2,s},"calcCardinalityPosition");function Hh(e,t,r){const i=structuredClone(r);E.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=To(i,25+e),o=10+.5*e,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),n={x:0,y:0};return t==="start_left"?(n.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(n.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(n.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(n.x=Math.sin(s)*o+(i[0].x+a.x)/2,n.y=-Math.cos(s)*o+(i[0].y+a.y)/2),n}ka=function(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}},u(Hh,"calcTerminalLabelPosition"),u(ka,"getStylesFromArray");let Bo;Bo=0,An=u(()=>(Bo++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Bo),"generateId");function Yh(e){let t="";const r="0123456789abcdef";for(let i=0;i<e;i++)t+=r.charAt(Math.floor(16*Math.random()));return t}u(Yh,"makeRandomHex");let Uh,Vh,Gh;Mn=u(e=>Yh(e.length),"random"),Uh=u(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"),Vh=u(function(e,t){const r=t.text.replace(Ee.lineBreakRegex," "),[,i]=_r(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const o=a.append("tspan");return o.attr("x",t.x+2*t.textMargin),o.attr("fill",t.fill),o.text(r),a},"drawSimpleText"),Qn=wn((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ee.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let o="";return i.forEach((s,n)=>{const c=ie(`${s} `,r),l=ie(o,r);if(c>t){const{hyphenatedStrings:h,remainingWord:d}=Gh(s,t,"-",r);a.push(o,...h),o=d}else l+c>=t?(a.push(o),o=s):o=[o,s].filter(Boolean).join(" ");n+1===i.length&&a.push(o)}),a.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Gh=wn((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],o=[];let s="";return a.forEach((n,c)=>{const l=`${s}${n}`;if(ie(l,i)>=t){const h=c+1,d=a.length===h,p=`${l}${r}`;o.push(d?l:p),s=""}else s=l}),{hyphenatedStrings:o,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`),Ta=function(e,t){return vo(e,t).height},ie=function(e,t){return vo(e,t).width},u(Ta,"calculateTextHeight"),u(ie,"calculateTextWidth");var Di,vo=wn((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,o]=_r(r),s=["sans-serif",i],n=e.split(Ee.lineBreakRegex),c=[],l=dt("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const h=l.append("svg");for(const d of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const f of n){const m=Uh();m.text=f||"\u200B";const b=Vh(h,m).style("font-size",o).style("font-weight",a).style("font-family",d),y=(b._groups||b)[0][0].getBBox();if(y.width===0&&y.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,y.width)),p=Math.round(y.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}c.push(g)}return h.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),tf=(wr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},u(wr,"InitIDGenerator"),wr),ef=u(function(e){return Di=Di||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Di.innerHTML=e,unescape(Di.textContent)},"entityDecode");function Mo(e){return"str"in e}u(Mo,"isDetailedError");let Xh;Xh=u((e,t,r,i)=>{var o;if(!i)return;const a=(o=e.node())==null?void 0:o.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),_r=u(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize"),li=function(e,t){return ny({},e,t)},u(li,"cleanAndMerge");let Zh;Xt={assignWithDepth:kt,wrapLabel:Qn,calculateTextHeight:Ta,calculateTextWidth:ie,calculateTextDimensions:vo,cleanAndMerge:li,detectInit:Ph,detectDirective:ko,isSubstringInArray:qh,interpolateToCurve:wo,calcLabelPosition:Wh,calcCardinalityPosition:Jg,calcTerminalLabelPosition:Hh,formatUrl:Rh,getStylesFromArray:ka,generateId:An,random:Mn,runFunc:Qg,entityDecode:ef,insertTitle:Xh,isLabelCoordinateInPath:Kh,parseFontSize:_r,InitIDGenerator:tf},Zh=u(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),ke=u(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tg=u((e,t,{counter:r=0,prefix:i,suffix:a},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function $t(e){return e??null}function Kh(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return a.includes(r.toString())||a.includes(i.toString())}u($t,"handleUndefinedAttr"),u(Kh,"isLabelCoordinateInPath");const rf=Object.freeze({left:0,top:0,width:16,height:16}),Oi=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qh=Object.freeze({...rf,...Oi}),af=Object.freeze({...Qh,body:"",hidden:!1}),of=Object.freeze({width:null,height:null}),nf=Object.freeze({...of,...Oi}),Lo=(e,t)=>!!e&&!(!(t&&e.prefix===""||e.prefix)||!e.name);function Jh(e,t){const r=(function(i,a){const o={};!i.hFlip!=!a.hFlip&&(o.hFlip=!0),!i.vFlip!=!a.vFlip&&(o.vFlip=!0);const s=((i.rotate||0)+(a.rotate||0))%4;return s&&(o.rotate=s),o})(e,t);for(const i in af)i in Oi?i in e&&!(i in r)&&(r[i]=Oi[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function tc(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let o={};function s(n){o=Jh(i[n]||a[n],o)}return s(t),r.forEach(s),Jh(e,o)}function sf(e,t){if(e.icons[t])return tc(e,t,[]);const r=(function(i,a){const o=i.icons,s=i.aliases||Object.create(null),n=Object.create(null);return(a||Object.keys(o).concat(Object.keys(s))).forEach(function c(l){if(o[l])return n[l]=[];if(!(l in n)){n[l]=null;const h=s[l]&&s[l].parent,d=h&&c(h);d&&(n[l]=[h].concat(d))}return n[l]}),n})(e,[t])[t];return r?tc(e,t,r):null}const lf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ec(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(lf);if(i===null||!i.length)return e;const a=[];let o=i.shift(),s=hf.test(o);for(;;){if(s){const n=parseFloat(o);isNaN(n)?a.push(o):a.push(Math.ceil(n*t*r)/r)}else a.push(o);if(o=i.shift(),o===void 0)return a.join("");s=!s}}const cf=/\sid="(\S+)"/g,df="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let uf=0;function rc(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,c){var l=c.match(/\n([\t ]+|(?!\s).)/g);return l?n.concat(l.map(function(h){var d,p;return(p=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):n},[]);if(a.length){var o=new RegExp(`
114
114
  [ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(o,`
115
115
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(n,c){var l=s.match(/(?:^|\n)( *)$/),h=l?l[1]:"",d=n;typeof n=="string"&&n.includes(`
116
116
  `)&&(d=String(n).split(`
117
117
  `).map(function(p,g){return g===0?p:""+h+p}).join(`
118
- `)),s+=d+i[c+1]}),s}let Ii,Fo,Ao,ac;jn={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Ii=new Map,Fo=new Map,Wn=u(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(E.debug("Registering icon pack:",t.name),"loader"in t)Fo.set(t.name,t.loader);else{if(!("icons"in t))throw E.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ii.set(t.name,t.icons)}}},"registerIconPacks"),Ao=u(async(e,t)=>{const r=((s,n,c,l="")=>{const h=s.split(":");if(s.slice(0,1)==="@"){if(h.length<2||h.length>3)return null;l=h.shift().slice(1)}if(h.length>3||!h.length)return null;if(h.length>1){const g=h.pop(),f=h.pop(),m={provider:h.length>0?h[0]:l,prefix:f,name:g};return _o(m)?m:null}const d=h[0],p=d.split("-");if(p.length>1){const g={provider:l,prefix:p.shift(),name:p.join("-")};return _o(g)?g:null}if(c&&l===""){const g={provider:l,prefix:"",name:d};return _o(g,c)?g:null}return null})(e,0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=Ii.get(i);if(!a){const s=Fo.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},Ii.set(i,a)}catch(n){throw E.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=lf(a,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),ac=u(async e=>{try{return await Ao(e),!0}catch{return!1}},"isIconAvailable"),Ze=u(async(e,t,r)=>{let i;try{i=await Ao(e,t==null?void 0:t.fallbackPrefix)}catch(s){E.error(s),i=jn}const a=(function(s,n){const c={...Jh,...s},l={...sf,...n},h={left:c.left,top:c.top,width:c.width,height:c.height};let d=c.body;[c,l].forEach(v=>{const C=[],S=v.hFlip,P=v.vFlip;let D,R=v.rotate;switch(S?P?R+=2:(C.push("translate("+(h.width+h.left).toString()+" "+(0-h.top).toString()+")"),C.push("scale(-1 1)"),h.top=h.left=0):P&&(C.push("translate("+(0-h.left).toString()+" "+(h.height+h.top).toString()+")"),C.push("scale(1 -1)"),h.top=h.left=0),R<0&&(R-=4*Math.floor(R/4)),R%=4,R){case 1:D=h.height/2+h.top,C.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:C.unshift("rotate(180 "+(h.width/2+h.left).toString()+" "+(h.height/2+h.top).toString()+")");break;case 3:D=h.width/2+h.left,C.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}R%2==1&&(h.left!==h.top&&(D=h.left,h.left=h.top,h.top=D),h.width!==h.height&&(D=h.width,h.width=h.height,h.height=D)),C.length&&(d=(function(I,F,T){const M=(function($,O="defs"){let tt="";const it=$.indexOf("<"+O);for(;it>=0;){const lt=$.indexOf(">",it),rt=$.indexOf("</"+O);if(lt===-1||rt===-1)break;const xt=$.indexOf(">",rt);if(xt===-1)break;tt+=$.slice(lt+1,rt).trim(),$=$.slice(0,it).trim()+$.slice(xt+1)}return{defs:tt,content:$}})(I);return A=M.defs,_=F+M.content+T,A?"<defs>"+A+"</defs>"+_:_;var A,_})(d,'<g transform="'+C.join(" ")+'">',"</g>"))});const p=l.width,g=l.height,f=h.width,m=h.height;let b,y;p===null?(y=g===null?"1em":g==="auto"?m:g,b=rc(y,f/m)):(b=p==="auto"?f:p,y=g===null?rc(b,m/f):g==="auto"?m:g);const x={},w=(v,C)=>{(S=>S==="unset"||S==="undefined"||S==="none")(C)||(x[v]=C.toString())};w("width",b),w("height",y);const L=[h.left,h.top,f,m];return x.viewBox=L.join(" "),{attributes:x,viewBox:L,body:d}})(i,t),o=(function(s,n){let c=s.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in n)c+=" "+l+'="'+n[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+c+">"+s+"</svg>"})((function(s,n=uf){const c=[];let l;for(;l=df.exec(s);)c.push(l[1]);if(!c.length)return s;const h="suffix"+(16777216*Math.random()|Date.now()).toString(16);return c.forEach(d=>{const p=typeof n=="function"?n(d):n+(pf++).toString(),g=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");s=s.replace(new RegExp('([#;"])('+g+')([")]|\\.[a-z])',"g"),"$1"+p+h+"$3")}),s=s.replace(new RegExp(h,"g"),"")})(a.body),{...a.attributes,...r});return Ht(o,Lt())},"getIconSVG");function oc(e,{markdownAutoWrap:t}){const r=ic(e.replace(/<br\/>/g,`
118
+ `)),s+=d+i[c+1]}),s}let Ii,_o,Fo,ic;Wn={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Ii=new Map,_o=new Map,zn=u(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(E.debug("Registering icon pack:",t.name),"loader"in t)_o.set(t.name,t.loader);else{if(!("icons"in t))throw E.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ii.set(t.name,t.icons)}}},"registerIconPacks"),Fo=u(async(e,t)=>{const r=((s,n,c,l="")=>{const h=s.split(":");if(s.slice(0,1)==="@"){if(h.length<2||h.length>3)return null;l=h.shift().slice(1)}if(h.length>3||!h.length)return null;if(h.length>1){const g=h.pop(),f=h.pop(),m={provider:h.length>0?h[0]:l,prefix:f,name:g};return Lo(m)?m:null}const d=h[0],p=d.split("-");if(p.length>1){const g={provider:l,prefix:p.shift(),name:p.join("-")};return Lo(g)?g:null}if(c&&l===""){const g={provider:l,prefix:"",name:d};return Lo(g,c)?g:null}return null})(e,0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=Ii.get(i);if(!a){const s=_o.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:i},Ii.set(i,a)}catch(n){throw E.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=sf(a,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),ic=u(async e=>{try{return await Fo(e),!0}catch{return!1}},"isIconAvailable"),Ze=u(async(e,t,r)=>{let i;try{i=await Fo(e,t==null?void 0:t.fallbackPrefix)}catch(s){E.error(s),i=Wn}const a=(function(s,n){const c={...Qh,...s},l={...nf,...n},h={left:c.left,top:c.top,width:c.width,height:c.height};let d=c.body;[c,l].forEach(v=>{const C=[],S=v.hFlip,P=v.vFlip;let O,q=v.rotate;switch(S?P?q+=2:(C.push("translate("+(h.width+h.left).toString()+" "+(0-h.top).toString()+")"),C.push("scale(-1 1)"),h.top=h.left=0):P&&(C.push("translate("+(0-h.left).toString()+" "+(h.height+h.top).toString()+")"),C.push("scale(1 -1)"),h.top=h.left=0),q<0&&(q-=4*Math.floor(q/4)),q%=4,q){case 1:O=h.height/2+h.top,C.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:C.unshift("rotate(180 "+(h.width/2+h.left).toString()+" "+(h.height/2+h.top).toString()+")");break;case 3:O=h.width/2+h.left,C.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")")}q%2==1&&(h.left!==h.top&&(O=h.left,h.left=h.top,h.top=O),h.width!==h.height&&(O=h.width,h.width=h.height,h.height=O)),C.length&&(d=(function(I,F,T){const M=(function($,D="defs"){let tt="";const it=$.indexOf("<"+D);for(;it>=0;){const lt=$.indexOf(">",it),rt=$.indexOf("</"+D);if(lt===-1||rt===-1)break;const xt=$.indexOf(">",rt);if(xt===-1)break;tt+=$.slice(lt+1,rt).trim(),$=$.slice(0,it).trim()+$.slice(xt+1)}return{defs:tt,content:$}})(I);return A=M.defs,_=F+M.content+T,A?"<defs>"+A+"</defs>"+_:_;var A,_})(d,'<g transform="'+C.join(" ")+'">',"</g>"))});const p=l.width,g=l.height,f=h.width,m=h.height;let b,y;p===null?(y=g===null?"1em":g==="auto"?m:g,b=ec(y,f/m)):(b=p==="auto"?f:p,y=g===null?ec(b,m/f):g==="auto"?m:g);const x={},w=(v,C)=>{(S=>S==="unset"||S==="undefined"||S==="none")(C)||(x[v]=C.toString())};w("width",b),w("height",y);const L=[h.left,h.top,f,m];return x.viewBox=L.join(" "),{attributes:x,viewBox:L,body:d}})(i,t),o=(function(s,n){let c=s.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in n)c+=" "+l+'="'+n[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+c+">"+s+"</svg>"})((function(s,n=df){const c=[];let l;for(;l=cf.exec(s);)c.push(l[1]);if(!c.length)return s;const h="suffix"+(16777216*Math.random()|Date.now()).toString(16);return c.forEach(d=>{const p=typeof n=="function"?n(d):n+(uf++).toString(),g=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");s=s.replace(new RegExp('([#;"])('+g+')([")]|\\.[a-z])',"g"),"$1"+p+h+"$3")}),s=s.replace(new RegExp(h,"g"),"")})(a.body),{...a.attributes,...r});return Ht(o,Lt())},"getIconSVG");function ac(e,{markdownAutoWrap:t}){const r=rc(e.replace(/<br\/>/g,`
119
119
  `).replace(/\n{2,}/g,`
120
- `));return t===!1?r.replace(/ /g,"&nbsp;"):r}function nc(e,t={}){const r=oc(e,t),i=$p.lexer(r),a=[[]];let o=0;function s(n,c="normal"){n.type==="text"?n.text.split(`
121
- `).forEach((l,h)=>{h!==0&&(o++,a.push([])),l.split(" ").forEach(d=>{(d=d.replace(/&#39;/g,"'"))&&a[o].push({content:d,type:c})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(l=>{s(l,n.type)}):n.type==="html"&&a[o].push({content:n.text,type:"normal"})}return u(s,"processNode"),i.forEach(n=>{var c;n.type==="paragraph"?(c=n.tokens)==null||c.forEach(l=>{s(l)}):n.type==="html"?a[o].push({content:n.text,type:"normal"}):a[o].push({content:n.raw,type:"normal"})}),a}function sc(e,{markdownAutoWrap:t}={}){const r=$p.lexer(e);function i(a){var o,s,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(i).join("")}</strong>`:a.type==="em"?`<em>${(s=a.tokens)==null?void 0:s.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(E.warn(`Unsupported markdown: ${a.type}`),a.raw)}return u(i,"output"),r.map(i).join("")}function lc(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function hc(e,t){return $o(e,[],lc(t.content),t.type)}function $o(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...o]=r,s=[...t,a];return e([{content:s.join(""),type:i}])?$o(e,s,o,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function cc(e,t){if(e.some(({content:r})=>r.includes(`
122
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Pi(e,t)}function Pi(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(o),t(s))return Pi(e,t,r,s);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,c]=hc(t,o);r.push([n]),c.content&&e.unshift(c)}return Pi(e,t,r)}function Eo(e,t){t&&e.attr("style",t)}async function dc(e,t,r,i,a=!1,o=Lt()){const s=e.append("foreignObject");s.attr("width",10*r+"px"),s.attr("height",10*r+"px");const n=s.append("xhtml:div"),c=$e(t.label)?await hi(t.label.replace(Ee.lineBreakRegex,`
123
- `),o):Ht(t.label,o),l=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(c),Eo(h,t.labelStyle),h.attr("class",`${l} ${i}`),Eo(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),n.style("max-width",r+"px"),n.style("text-align","center"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),s.node()}function Ni(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function uc(e,t,r){const i=e.append("text"),a=Ni(i,1,t);Ri(a,r);const o=a.node().getComputedTextLength();return i.remove(),o}Pn=function(e,t,r){var s;const i=e.append("text"),a=Ni(i,1,t);Ri(a,[{content:r,type:"normal"}]);const o=(s=a.node())==null?void 0:s.getBoundingClientRect();return o&&i.remove(),o};function pc(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let n=0;for(const c of r){const l=u(d=>uc(a,1.1,d)<=e,"checkWidth"),h=l(c)?[c]:cc(c,l);for(const d of h)Ri(Ni(s,n,1.1),d),n++}if(i){const c=s.node().getBBox(),l=2;return o.attr("x",c.x-l).attr("y",c.y-l).attr("width",c.width+2*l).attr("height",c.height+2*l),a.node()}return s.node()}function Ri(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}Ca=async function(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,s)=>(r.push((async()=>{const n=`${o}:${s}`;return await ac(n)?await Ze(n,void 0,{class:"label-icon"}):`<i class='${Ht(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")},u(oc,"preprocessMarkdown"),u(nc,"markdownToLines"),u(sc,"markdownToHTML"),u(lc,"splitTextToChars"),u(hc,"splitWordToFitWidth"),u($o,"splitWordToFitWidthRecursion"),u(cc,"splitLineToFitWidth"),u(Pi,"splitLineToFitWidthRecursion"),u(Eo,"applyStyle"),u(dc,"addHtmlSpan"),u(Ni,"createTspan"),u(uc,"computeWidthOfText"),u(Pn,"computeDimensionOfText"),u(pc,"createFormattedText"),u(Ri,"updateTextContentAndStyles"),u(Ca,"replaceIconSubstring"),ue=u(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:o=!0,isNode:s=!0,width:n=200,addSvgBackground:c=!1}={},l)=>{if(E.debug("XYZ createText",t,r,i,a,o,s,"addSvgBackground: ",c),o){const h=sc(t,l),d=await Ca(ke(h),l),p=t.replace(/\\\\/g,"\\"),g={isNode:s,label:$e(t)?p:d,labelStyle:r.replace("fill:","color:")};return await dc(e,g,n,a,c,l)}{const h=pc(n,e,nc(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),l),!!t&&c);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(h).select("rect").attr("style",d.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).select("text").attr("style",p)}return h}},"createText");function Oo(e,t,r){if(e&&e.length){const[i,a]=t,o=Math.PI/180*r,s=Math.cos(o),n=Math.sin(o);for(const c of e){const[l,h]=c;c[0]=(l-i)*s-(h-a)*n+i,c[1]=(l-i)*n+(h-a)*s+a}}}function gf(e,t){return e[0]===t[0]&&e[1]===t[1]}function ff(e,t,r,i=1){const a=r,o=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const l of s)Oo(l,n,a);const c=(function(l,h,d){const p=[];for(const x of l){const w=[...x];gf(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}const g=[];h=Math.max(h,.1);const f=[];for(const x of p)for(let w=0;w<x.length-1;w++){const L=x[w],v=x[w+1];if(L[1]!==v[1]){const C=Math.min(L[1],v[1]);f.push({ymin:C,ymax:Math.max(L[1],v[1]),x:C===L[1]?L[0]:v[0],islope:(v[0]-L[0])/(v[1]-L[1])})}}if(f.sort((x,w)=>x.ymin<w.ymin?-1:x.ymin>w.ymin?1:x.x<w.x?-1:x.x>w.x?1:x.ymax===w.ymax?0:(x.ymax-w.ymax)/Math.abs(x.ymax-w.ymax)),!f.length)return g;let m=[],b=f[0].ymin,y=0;for(;m.length||f.length;){if(f.length){let x=-1;for(let w=0;w<f.length&&!(f[w].ymin>b);w++)x=w;f.splice(0,x+1).forEach(w=>{m.push({s:b,edge:w})})}if(m=m.filter(x=>!(x.edge.ymax<=b)),m.sort((x,w)=>x.edge.x===w.edge.x?0:(x.edge.x-w.edge.x)/Math.abs(x.edge.x-w.edge.x)),(d!==1||y%h==0)&&m.length>1)for(let x=0;x<m.length;x+=2){const w=x+1;if(w>=m.length)break;const L=m[x].edge,v=m[w].edge;g.push([[Math.round(L.x),b],[Math.round(v.x),b]])}b+=d,m.forEach(x=>{x.edge.x=x.edge.x+d*x.edge.islope}),y++}return g})(s,o,i);if(a){for(const l of s)Oo(l,n,-a);(function(l,h,d){const p=[];l.forEach(g=>p.push(...g)),Oo(p,h,d)})(c,n,-a)}return c}function Xr(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),ff(e,a,i,o||1)}class Do{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Xr(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function qi(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class mf extends Do{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Xr(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,s=[],n=.5*i*Math.cos(o),c=.5*i*Math.sin(o);for(const[l,h]of a)qi([l,h])&&s.push([[l[0]-n,l[1]+c],[...h]],[[l[0]+n,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class yf extends Do{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,a);return i.ops=i.ops.concat(o.ops),i}}class bf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Xr(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const s=a/4;for(const n of t){const c=qi(n),l=c/a,h=Math.ceil(l)-1,d=c-h*a,p=(n[0][0]+n[1][0])/2-a/4,g=Math.min(n[0][1],n[1][1]);for(let f=0;f<h;f++){const m=g+d+f*a,b=p-s+2*Math.random()*s,y=m-s+2*Math.random()*s,x=this.helper.ellipse(b,y,o,o,r);i.push(...x.ops)}}return{type:"fillSketch",ops:i}}}class xf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Xr(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach(s=>{const n=qi(s),c=Math.floor(n/(i+a)),l=(n+a-c*(i+a))/2;let h=s[0],d=s[1];h[0]>d[0]&&(h=s[1],d=s[0]);const p=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<c;g++){const f=g*(i+a),m=f+i,b=[h[0]+f*Math.cos(p)+l*Math.cos(p),h[1]+f*Math.sin(p)+l*Math.sin(p)],y=[h[0]+m*Math.cos(p)+l*Math.cos(p),h[1]+m*Math.sin(p)+l*Math.sin(p)];o.push(...this.helper.doubleLineOps(b[0],b[1],y[0],y[1],r))}}),o}}class Cf{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,o=Xr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(o=>{const s=qi(o),n=Math.round(s/(2*r));let c=o[0],l=o[1];c[0]>l[0]&&(c=o[1],l=o[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let d=0;d<n;d++){const p=2*d*r,g=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+p*Math.cos(h),c[1]+p*Math.sin(h)],b=[c[0]+g*Math.cos(h),c[1]+g*Math.sin(h)],y=[m[0]+f*Math.cos(h+Math.PI/4),m[1]+f*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],y[0],y[1],i),...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],i))}}),a}}const Wt={};class kf{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const zi={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Io(e,t){return e.type===t}function Po(e){const t=[],r=(function(s){const n=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:0,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:1,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return n[n.length]={type:2,text:""},n})(e);let i="BOD",a=0,o=r[a];for(;!Io(o,2);){let s=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Po("M0,0"+e);a++,s=zi[o.text],i=o.text}else Io(o,1)?s=zi[i]:(a++,s=zi[o.text],i=o.text);if(!(a+s<r.length))throw new Error("Path data ended short");for(let c=a;c<a+s;c++){const l=r[c];if(!Io(l,1))throw new Error("Param not a number: "+i+","+l.text);n[n.length]=+l.text}if(typeof zi[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:n};t.push(c),a+=s,o=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function gc(e){let t=0,r=0,i=0,a=0;const o=[];for(const{key:s,data:n}of e)switch(s){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=a}return o}function fc(e){const t=[];let r="",i=0,a=0,o=0,s=0,n=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[o,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=a+(a-c)):(d=i,p=a),t.push({key:"C",data:[d,p,...h]}),n=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[d,p]=h;let g=0,f=0;r==="Q"||r==="T"?(g=i+(i-n),f=a+(a-c)):(g=i,f=a);const m=i+2*(g-i)/3,b=a+2*(f-a)/3,y=d+2*(g-d)/3,x=p+2*(f-p)/3;t.push({key:"C",data:[m,b,y,x,d,p]}),n=g,c=f,i=d,a=p;break}case"Q":{const[d,p,g,f]=h,m=i+2*(d-i)/3,b=a+2*(p-a)/3,y=g+2*(d-g)/3,x=f+2*(p-f)/3;t.push({key:"C",data:[m,b,y,x,g,f]}),n=d,c=p,i=g,a=f;break}case"A":{const d=Math.abs(h[0]),p=Math.abs(h[1]),g=h[2],f=h[3],m=h[4],b=h[5],y=h[6];d===0||p===0?(t.push({key:"C",data:[i,a,b,y,b,y]}),i=b,a=y):i===b&&a===y||(mc(i,a,b,y,d,p,g,f,m).forEach(function(x){t.push({key:"C",data:x})}),i=b,a=y);break}case"Z":t.push({key:"Z",data:[]}),i=o,a=s}r=l}return t}function Zr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function mc(e,t,r,i,a,o,s,n,c,l){const h=(d=s,Math.PI*d/180);var d;let p=[],g=0,f=0,m=0,b=0;if(l)[g,f,m,b]=l;else{[e,t]=Zr(e,t,-h),[r,i]=Zr(r,i,-h);const T=(e-r)/2,M=(t-i)/2;let A=T*T/(a*a)+M*M/(o*o);A>1&&(A=Math.sqrt(A),a*=A,o*=A);const _=a*a,$=o*o,O=_*$-_*M*M-$*T*T,tt=_*M*M+$*T*T,it=(n===c?-1:1)*Math.sqrt(Math.abs(O/tt));m=it*a*M/o+(e+r)/2,b=it*-o*T/a+(t+i)/2,g=Math.asin(parseFloat(((t-b)/o).toFixed(9))),f=Math.asin(parseFloat(((i-b)/o).toFixed(9))),e<m&&(g=Math.PI-g),r<m&&(f=Math.PI-f),g<0&&(g=2*Math.PI+g),f<0&&(f=2*Math.PI+f),c&&g>f&&(g-=2*Math.PI),!c&&f>g&&(f-=2*Math.PI)}let y=f-g;if(Math.abs(y)>120*Math.PI/180){const T=f,M=r,A=i;f=c&&f>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,p=mc(r=m+a*Math.cos(f),i=b+o*Math.sin(f),M,A,a,o,s,0,c,[f,T,m,b])}y=f-g;const x=Math.cos(g),w=Math.sin(g),L=Math.cos(f),v=Math.sin(f),C=Math.tan(y/4),S=4/3*a*C,P=4/3*o*C,D=[e,t],R=[e+S*w,t-P*x],I=[r+S*v,i-P*L],F=[r,i];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],l)return[R,I,F].concat(p);{p=[R,I,F].concat(p);const T=[];for(let M=0;M<p.length;M+=3){const A=Zr(p[M][0],p[M][1],h),_=Zr(p[M+1][0],p[M+1][1],h),$=Zr(p[M+2][0],p[M+2][1],h);T.push([A[0],A[1],_[0],_[1],$[0],$[1]])}return T}}const wf={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,r){return ji(e,t,r)},ellipse:function(e,t,r,i,a){return No(e,t,a,xc(r,i,a)).opset},doubleLineOps:function(e,t,r,i,a){return ve(e,t,r,i,a,!0)}};function yc(e,t,r,i,a){return{type:"path",ops:ve(e,t,r,i,a)}}function Wi(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let o=0;o<i-1;o++)a.push(...ve(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&a.push(...ve(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?yc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function bc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Hi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Hi(r[0],1.5*(1+.22*t.roughness),wc(t));for(let o=1;o<r.length;o++){const s=r[o];if(s.length){const n=Hi(s,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Hi(s,1.5*(1+.22*t.roughness),wc(t));for(const l of n)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function xc(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/a;let s=Math.abs(e/2),n=Math.abs(t/2);const c=1-r.curveFitting;return s+=J(s*c,r),n+=J(n*c,r),{increment:o,rx:s,ry:n}}function No(e,t,r,i){const[a,o]=Tc(i.increment,e,t,i.rx,i.ry,1,i.increment*ji(.1,ji(.4,1,r),r),r);let s=Yi(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Tc(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=Yi(n,null,r);s=s.concat(c)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function Cc(e,t,r,i,a,o,s,n,c){const l=e,h=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=J(.01*d,c),p+=J(.01*p,c);let g=a,f=o;for(;g<0;)g+=2*Math.PI,f+=2*Math.PI;f-g>2*Math.PI&&(g=0,f=2*Math.PI);const m=2*Math.PI/c.curveStepCount,b=Math.min(m/2,(f-g)/2),y=Bc(b,l,h,d,p,g,f,1,c);if(!c.disableMultiStroke){const x=Bc(b,l,h,d,p,g,f,1.5,c);y.push(...x)}return s&&(n?y.push(...ve(l,h,l+d*Math.cos(g),h+p*Math.sin(g),c),...ve(l,h,l+d*Math.cos(f),h+p*Math.sin(f),c)):y.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+d*Math.cos(g),h+p*Math.sin(g)]})),{type:"path",ops:y}}function kc(e,t){const r=fc(gc(Po(e))),i=[];let a=[0,0],o=[0,0];for(const{key:s,data:n}of r)switch(s){case"M":o=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...ve(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[c,l,h,d,p,g]=n;i.push(...Sf(c,l,h,d,p,g,o,t)),o=[p,g];break}case"Z":i.push(...ve(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]]}return{type:"path",ops:i}}function Ro(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+J(a,t),i[0][1]+J(a,t)]});for(let s=1;s<o;s++)r.push({op:"lineTo",data:[i[s][0]+J(a,t),i[s][1]+J(a,t)]})}}return{type:"fillPath",ops:r}}function nr(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Wt[a])switch(a){case"zigzag":Wt[a]||(Wt[a]=new mf(i));break;case"cross-hatch":Wt[a]||(Wt[a]=new yf(i));break;case"dots":Wt[a]||(Wt[a]=new bf(i));break;case"dashed":Wt[a]||(Wt[a]=new xf(i));break;case"zigzag-line":Wt[a]||(Wt[a]=new Cf(i));break;default:a="hachure",Wt[a]||(Wt[a]=new Do(i))}return Wt[a]})(t,wf).fillPolygons(e,t)}function wc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sc(e){return e.randomizer||(e.randomizer=new kf(e.seed||0)),e.randomizer.next()}function ji(e,t,r,i=1){return r.roughness*i*(Sc(r)*(t-e)+e)}function J(e,t,r=1){return ji(-e,e,t,r)}function ve(e,t,r,i,a,o=!1){const s=o?a.disableMultiStrokeFill:a.disableMultiStroke,n=qo(e,t,r,i,a,!0,!1);if(s)return n;const c=qo(e,t,r,i,a,!0,!0);return n.concat(c)}function qo(e,t,r,i,a,o,s){const n=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(n);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=c/10);const d=h/2,p=.2+.2*Sc(a);let g=a.bowing*a.maxRandomnessOffset*(i-t)/200,f=a.bowing*a.maxRandomnessOffset*(e-r)/200;g=J(g,a,l),f=J(f,a,l);const m=[],b=()=>J(d,a,l),y=()=>J(h,a,l),x=a.preserveVertices;return s?m.push({op:"move",data:[e+(x?0:b()),t+(x?0:b())]}):m.push({op:"move",data:[e+(x?0:J(h,a,l)),t+(x?0:J(h,a,l))]}),s?m.push({op:"bcurveTo",data:[g+e+(r-e)*p+b(),f+t+(i-t)*p+b(),g+e+2*(r-e)*p+b(),f+t+2*(i-t)*p+b(),r+(x?0:b()),i+(x?0:b())]}):m.push({op:"bcurveTo",data:[g+e+(r-e)*p+y(),f+t+(i-t)*p+y(),g+e+2*(r-e)*p+y(),f+t+2*(i-t)*p+y(),r+(x?0:y()),i+(x?0:y())]}),m}function Hi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]),i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]),a===e.length-1&&i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]);return Yi(i,null,r)}function Yi(e,t,r){const i=e.length,a=[];if(i>3){const o=[],s=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const c=e[n];o[0]=[c[0],c[1]],o[1]=[c[0]+(s*e[n+1][0]-s*e[n-1][0])/6,c[1]+(s*e[n+1][1]-s*e[n-1][1])/6],o[2]=[e[n+1][0]+(s*e[n][0]-s*e[n+2][0])/6,e[n+1][1]+(s*e[n][1]-s*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...qo(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return a}function Tc(e,t,r,i,a,o,s,n){const c=[],l=[];if(n.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+a*Math.sin(h)];c.push(d),l.push(d)}l.push([t+i*Math.cos(0),r+a*Math.sin(0)]),l.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=J(.5,n)-Math.PI/2;l.push([J(o,n)+t+.9*i*Math.cos(h-e),J(o,n)+r+.9*a*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let p=h;p<d;p+=e){const g=[J(o,n)+t+i*Math.cos(p),J(o,n)+r+a*Math.sin(p)];c.push(g),l.push(g)}l.push([J(o,n)+t+i*Math.cos(h+2*Math.PI+.5*s),J(o,n)+r+a*Math.sin(h+2*Math.PI+.5*s)]),l.push([J(o,n)+t+.98*i*Math.cos(h+s),J(o,n)+r+.98*a*Math.sin(h+s)]),l.push([J(o,n)+t+.9*i*Math.cos(h+.5*s),J(o,n)+r+.9*a*Math.sin(h+.5*s)])}return[l,c]}function Bc(e,t,r,i,a,o,s,n,c){const l=o+J(.1,c),h=[];h.push([J(n,c)+t+.9*i*Math.cos(l-e),J(n,c)+r+.9*a*Math.sin(l-e)]);for(let d=l;d<=s;d+=e)h.push([J(n,c)+t+i*Math.cos(d),J(n,c)+r+a*Math.sin(d)]);return h.push([t+i*Math.cos(s),r+a*Math.sin(s)]),h.push([t+i*Math.cos(s),r+a*Math.sin(s)]),Yi(h,0,c)}function Sf(e,t,r,i,a,o,s,n){const c=[],l=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let g=0;g<d;g++)g===0?c.push({op:"move",data:[s[0],s[1]]}):c.push({op:"move",data:[s[0]+(p?0:J(l[0],n)),s[1]+(p?0:J(l[0],n))]}),h=p?[a,o]:[a+J(l[g],n),o+J(l[g],n)],c.push({op:"bcurveTo",data:[e+J(l[g],n),t+J(l[g],n),r+J(l[g],n),i+J(l[g],n),h[0],h[1]]});return c}function Kr(e){return[...e]}function vc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Kr(e[0]),Kr(e[1]),Kr(e[2]),Kr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const o=[],s=1-t;i.push(Kr(a[0]));for(let n=1;n+2<a.length;n++){const c=a[n];o[0]=[c[0],c[1]],o[1]=[c[0]+(s*a[n+1][0]-s*a[n-1][0])/6,c[1]+(s*a[n+1][1]-s*a[n-1][1])/6],o[2]=[a[n+1][0]+(s*a[n][0]-s*a[n+2][0])/6,a[n+1][1]+(s*a[n][1]-s*a[n+2][1])/6],o[3]=[a[n+1][0],a[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Ui(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Tf(e,t,r){const i=Ui(t,r);if(i===0)return Ui(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Ui(e,He(t,r,a))}function He(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function zo(e,t,r,i){const a=i||[];if((function(n,c){const l=n[c+0],h=n[c+1],d=n[c+2],p=n[c+3];let g=3*h[0]-2*l[0]-p[0];g*=g;let f=3*h[1]-2*l[1]-p[1];f*=f;let m=3*d[0]-2*p[0]-l[0];m*=m;let b=3*d[1]-2*p[1]-l[1];return b*=b,g<m&&(g=m),f<b&&(f=b),g+f})(e,t)<r){const n=e[t+0];a.length?(o=a[a.length-1],s=n,Math.sqrt(Ui(o,s))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],d=e[t+3],p=He(c,l,.5),g=He(l,h,.5),f=He(h,d,.5),m=He(p,g,.5),b=He(g,f,.5),y=He(m,b,.5);zo([c,p,m,y],0,r,a),zo([y,b,f,d],0,r,a)}var o,s;return a}function Bf(e,t){return Vi(e,0,e.length,t)}function Vi(e,t,r,i,a){const o=a||[],s=e[t],n=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const d=Tf(e[h],s,n);d>c&&(c=d,l=h)}return Math.sqrt(c)>i?(Vi(e,t,l+1,i,o),Vi(e,l,r,i,o)):(o.length||o.push(s),o.push(n)),o}function Wo(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let o=0;o<a;o++)zo(e,3*o,t,i);return r&&r>0?Vi(i,0,i.length,r):i}const Vt="none";class vf{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,o){const s=this._o(o);return this._d("line",[yc(t,r,i,a,s)],s)}rectangle(t,r,i,a,o){const s=this._o(o),n=[],c=(function(l,h,d,p,g){return(function(f,m){return Wi(f,!0,m)})([[l,h],[l+d,h],[l+d,h+p],[l,h+p]],g)})(t,r,i,a,s);if(s.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];s.fillStyle==="solid"?n.push(Ro([l],s)):n.push(nr([l],s))}return s.stroke!==Vt&&n.push(c),this._d("rectangle",n,s)}ellipse(t,r,i,a,o){const s=this._o(o),n=[],c=xc(i,a,s),l=No(t,r,s,c);if(s.fill)if(s.fillStyle==="solid"){const h=No(t,r,s,c).opset;h.type="fillPath",n.push(h)}else n.push(nr([l.estimatedPoints],s));return s.stroke!==Vt&&n.push(l.opset),this._d("ellipse",n,s)}circle(t,r,i,a){const o=this.ellipse(t,r,i,i,a);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Wi(t,!1,i)],i)}arc(t,r,i,a,o,s,n=!1,c){const l=this._o(c),h=[],d=Cc(t,r,i,a,o,s,n,!0,l);if(n&&l.fill)if(l.fillStyle==="solid"){const p=Object.assign({},l);p.disableMultiStroke=!0;const g=Cc(t,r,i,a,o,s,!0,!1,p);g.type="fillPath",h.push(g)}else h.push((function(p,g,f,m,b,y,x){const w=p,L=g;let v=Math.abs(f/2),C=Math.abs(m/2);v+=J(.01*v,x),C+=J(.01*C,x);let S=b,P=y;for(;S<0;)S+=2*Math.PI,P+=2*Math.PI;P-S>2*Math.PI&&(S=0,P=2*Math.PI);const D=(P-S)/x.curveStepCount,R=[];for(let I=S;I<=P;I+=D)R.push([w+v*Math.cos(I),L+C*Math.sin(I)]);return R.push([w+v*Math.cos(P),L+C*Math.sin(P)]),R.push([w,L]),nr([R],x)})(t,r,i,a,o,s,l));return l.stroke!==Vt&&h.push(d),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],o=bc(t,i);if(i.fill&&i.fill!==Vt)if(i.fillStyle==="solid"){const s=bc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],n=t;if(n.length){const c=typeof n[0][0]=="number"?[n]:n;for(const l of c)l.length<3?s.push(...l):l.length===3?s.push(...Wo(vc([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):s.push(...Wo(vc(l),10,(1+i.roughness)/2))}s.length&&a.push(nr([s],i))}return i.stroke!==Vt&&a.push(o),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],o=Wi(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Ro([t],i)):a.push(nr([t],i))),i.stroke!==Vt&&a.push(o),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Vt,s=i.stroke!==Vt,n=!!(i.simplification&&i.simplification<1),c=(function(h,d,p){const g=fc(gc(Po(h))),f=[];let m=[],b=[0,0],y=[];const x=()=>{y.length>=4&&m.push(...Wo(y,1)),y=[]},w=()=>{x(),m.length&&(f.push(m),m=[])};for(const{key:v,data:C}of g)switch(v){case"M":w(),b=[C[0],C[1]],m.push(b);break;case"L":x(),m.push([C[0],C[1]]);break;case"C":if(!y.length){const S=m.length?m[m.length-1]:b;y.push([S[0],S[1]])}y.push([C[0],C[1]]),y.push([C[2],C[3]]),y.push([C[4],C[5]]);break;case"Z":x(),m.push([b[0],b[1]])}if(w(),!p)return f;const L=[];for(const v of f){const C=Bf(v,p);C.length&&L.push(C)}return L})(t,0,n?4-4*(i.simplification||1):(1+i.roughness)/2),l=kc(t,i);if(o)if(i.fillStyle==="solid")if(c.length===1){const h=kc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(Ro(c,i));else a.push(nr(c,i));return s&&(n?c.forEach(h=>{a.push(Wi(h,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const o=typeof r=="number"&&r>=0?a.data.map(s=>+s.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const o of r){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Vt};break;case"fillPath":s={d:this.opsToPath(o),stroke:Vt,strokeWidth:0,fill:i.fill||Vt};break;case"fillSketch":s=this.fillSketch(o,i)}s&&a.push(s)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Vt,strokeWidth:i,fill:Vt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}const Gi="http://www.w3.org/2000/svg";class Mf{constructor(t,r){this.svg=t,this.gen=new vf(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Gi,"g"),s=t.options.fixedDecimalPlaceDigits;for(const n of r){let c=null;switch(n.type){case"path":c=a.createElementNS(Gi,"path"),c.setAttribute("d",this.opsToPath(n,s)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(Gi,"path"),c.setAttribute("d",this.opsToPath(n,s)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,n,i)}c&&o.appendChild(c)}return o}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const o=t.createElementNS(Gi,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,o){const s=this.gen.line(t,r,i,a,o);return this.draw(s)}rectangle(t,r,i,a,o){const s=this.gen.rectangle(t,r,i,a,o);return this.draw(s)}ellipse(t,r,i,a,o){const s=this.gen.ellipse(t,r,i,a,o);return this.draw(s)}circle(t,r,i,a){const o=this.gen.circle(t,r,i,a);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,o,s,n=!1,c){const l=this.gen.arc(t,r,i,a,o,s,n,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}let j,Q,Xi,K;j=(e,t)=>new Mf(e,t),Q=u(async(e,t,r)=>{var d,p;let i;const a=t.useHtmlLabels||Ct((d=ut())==null?void 0:d.htmlLabels);i=r||"node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",$t(t.labelStyle));let n;n=t.label===void 0?"":typeof t.label=="string"?t.label:t.label[0];const c=await ue(s,Ht(ke(n),ut()),{useHtmlLabels:a,width:t.width||((p=ut().flowchart)==null?void 0:p.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const g=c.children[0],f=dt(c),m=g.getElementsByTagName("img");if(m){const b=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(x=>{function w(){if(y.style.display="flex",y.style.flexDirection="column",b){const L=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,v=5,[C=fa.fontSize]=_r(L),S=C*v+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";x(y)}u(w,"setupImage"),setTimeout(()=>{y.complete&&w()}),y.addEventListener("error",w),y.addEventListener("load",w)})))}l=g.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}return a?s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):s.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:o,bbox:l,halfPadding:h,label:s}},"labelHelper"),Xi=u(async(e,t,r)=>{var c,l,h,d,p,g;const i=r.useHtmlLabels||Ct((l=(c=ut())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ue(a,Ht(ke(t),ut()),{useHtmlLabels:i,width:r.width||((d=(h=ut())==null?void 0:h.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=o.getBBox();const n=r.padding/2;if(Ct((g=(p=ut())==null?void 0:p.flowchart)==null?void 0:g.htmlLabels)){const f=o.children[0],m=dt(o);s=f.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return i?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:n,label:a}},"insertLabel"),U=u((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),K=u((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function nt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Me(e,t,r,i,a,o){const s=[],n=r-e,c=i-t,l=n/o,h=2*Math.PI/l,d=t+c/2;for(let p=0;p<=50;p++){const g=e+p/50*n,f=d+a*Math.sin(h*(g-e));s.push({x:g,y:f})}return s}function Qr(e,t,r,i,a,o){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}u(nt,"createPathFromPoints"),u(Me,"generateFullSineWavePoints"),u(Qr,"generateCirclePoints");var Lf=u((e,t)=>{var r,i,a=e.x,o=e.y,s=t.x-a,n=t.y-o,c=e.width/2,l=e.height/2;return Math.abs(n)*c>Math.abs(s)*l?(n<0&&(l=-l),r=n===0?0:l*s/n,i=l):(s<0&&(c=-c),r=c,i=s===0?0:c*n/s),{x:a+r,y:o+i}},"intersectRect"),sr=Lf;function Mc(e,t){t&&e.attr("style",t)}async function Lc(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ut();let a=e.label;e.label&&$e(e.label)&&(a=await hi(e.label.replace(Ee.lineBreakRegex,`
124
- `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(Ht(o,i)),Mc(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}u(Mc,"applyStyle"),u(Lc,"addHtmlLabel");let _c,Le,me,jo,Fc,Ac,$c,Ec,Oc,Ho;_c=u(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Ct(ut().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),E.info("vertexText"+a);const o={isNode:i,label:ke(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Lc(o)}{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",t.replace("color:","fill:"));let s=[];s=typeof a=="string"?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const n of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=n.trim(),o.appendChild(c)}return o}},"createLabel"),Le=_c,me=u((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),jo=u(async(e,t)=>{E.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=Y(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=Ct(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await ue(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0});let m=f.getBBox();if(Ct(r.flowchart.htmlLabels)){const S=f.children[0],P=dt(f);m=S.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-b/2,w=t.y-y/2;let L;if(E.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=j(d),P=H(t,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:a}),D=S.path(me(x,w,b,y,0),P);L=d.insert(()=>(E.debug("Rough node insert CXC",D),D),":first-child"),L.select("path:nth-child(2)").attr("style",l.join(";")),L.select("path").attr("style",h.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",b).attr("height",y);const{subGraphTitleTopMargin:v}=ci(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const S=g.select("span");S&&S.attr("style",n)}const C=L.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return sr(t,S)},{cluster:d,labelBBox:m}},"rect"),Fc=u((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,o=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(n){return sr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Ac=u(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:n,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),d=l.insert("g").attr("class","cluster-label");let p=l.append("rect");const g=d.node().appendChild(await Le(t.label,t.labelStyle,void 0,!0));let f=g.getBBox();if(Ct(r.flowchart.htmlLabels)){const D=g.children[0],R=dt(g);f=D.getBoundingClientRect(),R.attr("width",f.width),R.attr("height",f.height)}const m=0*t.padding,b=m/2,y=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+m;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height+m,w=t.height+m-f.height-6,L=t.x-y/2,v=t.y-x/2;t.width=y;const C=t.y-t.height/2-b+f.height+2;let S;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),R=j(l),I=t.rx||t.ry?R.path(me(L,v,y,x,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:c,seed:a}):R.rectangle(L,v,y,x,{seed:a});S=l.insert(()=>I,":first-child");const F=R.rectangle(L,C,y,w,{fill:D?o:s,fillStyle:D?"hachure":"solid",stroke:c,seed:a});S=l.insert(()=>I,":first-child"),p=l.insert(()=>F)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",L).attr("y",v).attr("width",y).attr("height",x).attr("data-look",t.look),p.attr("class","inner").attr("x",L).attr("y",C).attr("width",y).attr("height",w);d.attr("transform",`translate(${t.x-f.width/2}, ${v+1-(Ct(r.flowchart.htmlLabels)?0:3)})`);const P=S.node().getBBox();return t.height=P.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(D){return sr(t,D)},{cluster:l,labelBBox:f}},"roundedWithTitle"),$c=u(async(e,t)=>{E.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=Y(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=Ct(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await ue(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=f.getBBox();if(Ct(r.flowchart.htmlLabels)){const S=f.children[0],P=dt(f);m=S.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-b/2,w=t.y-y/2;let L;if(E.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=j(d),P=H(t,{roughness:.7,fill:o,stroke:s,fillWeight:4,seed:a}),D=S.path(me(x,w,b,y,t.rx),P);L=d.insert(()=>(E.debug("Rough node insert CXC",D),D),":first-child"),L.select("path:nth-child(2)").attr("style",l.join(";")),L.select("path").attr("style",h.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",b).attr("height",y);const{subGraphTitleTopMargin:v}=ci(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const S=g.select("span");S&&S.attr("style",n)}const C=L.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return sr(t,S)},{cluster:d,labelBBox:m}},"kanbanSection"),Ec=u((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:o}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=s.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,d=t.x-l/2,p=t.y-h/2;let g;if(t.width=l,t.look==="handDrawn"){const m=j(s).rectangle(d,p,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});g=s.insert(()=>m,":first-child")}else g=n.insert("rect",":first-child"),g.attr("class","divider").attr("x",d).attr("y",p).attr("width",l).attr("height",h).attr("data-look",t.look);const f=g.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return sr(t,m)},{cluster:s,labelBBox:{}}},"divider"),Oc={rect:jo,squareRect:jo,roundedWithTitle:Ac,noteGroup:Fc,divider:Ec,kanbanSection:$c},Ho=new Map,Dn=u(async(e,t)=>{const r=t.shape||"rect",i=await Oc[r](e,t);return Ho.set(t.id,i),i},"insertCluster"),Vp=u(()=>{Ho=new Map},"clear");function Dc(e,t){return e.intersect(t)}u(Dc,"intersectNode");var _f=Dc;function Ic(e,t,r,i){var a=e.x,o=e.y,s=a-i.x,n=o-i.y,c=Math.sqrt(t*t*n*n+r*r*s*s),l=Math.abs(t*r*s/c);i.x<a&&(l=-l);var h=Math.abs(t*r*n/c);return i.y<o&&(h=-h),{x:a+l,y:o+h}}u(Ic,"intersectEllipse");var Pc=Ic;function Nc(e,t,r){return Pc(e,t,t,r)}u(Nc,"intersectCircle");var Ff=Nc;function Rc(e,t,r,i){{const a=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,n=a*r.x+o*r.y+s,c=a*i.x+o*i.y+s,l=1e-6;if(n!==0&&c!==0&&Yo(n,c))return;const h=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,g=h*e.x+d*e.y+p,f=h*t.x+d*t.y+p;if(Math.abs(g)<l&&Math.abs(f)<l&&Yo(g,f))return;const m=a*d-h*o;if(m===0)return;const b=Math.abs(m/2);let y=o*p-d*s;const x=y<0?(y-b)/m:(y+b)/m;return y=h*s-a*p,{x,y:y<0?(y-b)/m:(y+b)/m}}}function Yo(e,t){return e*t>0}u(Rc,"intersectLine"),u(Yo,"sameSign");var Af=Rc;function qc(e,t,r){let i=e.x,a=e.y,o=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),n=Math.min(n,h.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));let c=i-e.width/2-s,l=a-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],p=t[h<t.length-1?h+1:0],g=Af(e,r,{x:c+d.x,y:l+d.y},{x:c+p.x,y:l+p.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(h,d){let p=h.x-r.x,g=h.y-r.y,f=Math.sqrt(p*p+g*g),m=d.x-r.x,b=d.y-r.y,y=Math.sqrt(m*m+b*b);return f<y?-1:f===y?0:1}),o[0]):e}u(qc,"intersectPolygon");var z={node:_f,circle:Ff,ellipse:Pc,polygon:qc,rect:sr};function zc(e,t){const{labelStyles:r}=Y(t);t.labelStyle=r;const i=K(t);let a=i;i||(a="anchor");const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),{cssStyles:s}=t,n=j(o),c=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=n.circle(0,0,2,c),h=o.insert(()=>l,":first-child");return h.attr("class","anchor").attr("style",$t(s)),U(t,h),t.intersect=function(d){return E.info("Circle intersect",t,1,d),z.circle(t,1,d)},o}function Uo(e,t,r,i,a,o,s){const n=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),h=(r-e)/2/a,d=(i-t)/2/o,p=Math.sqrt(h**2+d**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-p**2),f=n+g*o*Math.sin(l)*(s?-1:1),m=c-g*a*Math.cos(l)*(s?-1:1),b=Math.atan2((t-m)/o,(e-f)/a);let y=Math.atan2((i-m)/o,(r-f)/a)-b;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const x=[];for(let w=0;w<20;w++){const L=b+w/19*y,v=f+a*Math.cos(L),C=m+o*Math.sin(L);x.push({x:v,y:C})}return x}async function Wc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.width+t.padding+20,n=o.height+t.padding,c=n/2,l=c/(2.5+n/50),{cssStyles:h}=t,d=[{x:s/2,y:-n/2},{x:-s/2,y:-n/2},...Uo(-s/2,-n/2,-s/2,n/2,l,c,!1),{x:s/2,y:n/2},...Uo(s/2,n/2,s/2,-n/2,l,c,!0)],p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=nt(d),m=p.path(f,g),b=a.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${l/2}, 0)`),U(t,b),t.intersect=function(y){return z.polygon(t,d,y)},a}function _e(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function jc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.height+t.padding,n=o.width+t.padding+12,c=-s,l=[{x:12,y:c},{x:n,y:c},{x:n,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j(a),g=H(t,{}),f=nt(l),m=p.path(f,g);h=a.insert(()=>m,":first-child").attr("transform",`translate(${-n/2}, ${s/2})`),d&&h.attr("style",d)}else h=_e(a,n,s,l);return i&&h.attr("style",i),U(t,h),t.intersect=function(p){return z.polygon(t,l,p)},a}function Hc(e,t){const{nodeStyles:r}=Y(t);t.label="";const i=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=j(i),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=nt(s),h=n.path(l,c),d=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return z.polygon(t,s,p)},i}async function Vo(e,t,r){const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i;const{shapeSvg:o,bbox:s,halfPadding:n}=await Q(e,t,K(t)),c=(r==null?void 0:r.padding)??n,l=s.width/2+c;let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j(o),g=H(t,{}),f=p.circle(0,0,2*l,g);h=o.insert(()=>f,":first-child"),h.attr("class","basic label-container").attr("style",$t(d))}else h=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",l).attr("cx",0).attr("cy",0);return U(t,h),t.calcIntersect=function(p,g){const f=p.width/2;return z.circle(p,f,g)},t.intersect=function(p){return E.info("Circle intersect",t,l,p),z.circle(t,l,p)},o}function Yc(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*e;return`M ${-i/2*t},${i/2*r} L ${i/2*t},${-i/2*r}
125
- M ${i/2*t},${i/2*r} L ${-i/2*t},${-i/2*r}`}function Uc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:s}=t,n=j(a),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=n.circle(0,0,2*o,c),h=Yc(o),d=n.path(h,c),p=a.insert(()=>l,":first-child");return p.insert(()=>d),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),U(t,p),t.intersect=function(g){return E.info("crossedCircle intersect",t,{radius:o,point:g}),z.circle(t,o,g)},a}function ye(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}async function Vc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...ye(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...ye(n/2+2*l,-l,l,20,-180,-270),...ye(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...ye(n/2,c/2,l,20,0,90)],p=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...ye(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...ye(n/2+.1*n,-l,l,20,-180,-270),...ye(n/2+.1*n,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...ye(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2,y:c/2+l}],g=j(a),f=H(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=nt(d).replace("Z",""),b=g.path(m,f),y=nt(p),x=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>x,":first-child").attr("stroke-opacity",0),w.insert(()=>b,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${l}, 0)`),s.attr("transform",`translate(${-n/2+l-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(L){return z.polygon(t,p,L)},a}function be(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:d,y:p})}return s}async function Gc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...be(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...be(n/2+2*l,-l,l,20,-180,-270),...be(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:c/2},...be(n/2,c/2,l,20,0,90)],p=[{x:-n/2,y:-c/2-l},{x:n/2,y:-c/2-l},...be(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...be(n/2+2*l,-l,l,20,-180,-270),...be(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:c/2},...be(n/2,c/2,l,20,0,90),{x:n/2,y:c/2+l},{x:-n/2,y:c/2+l}],g=j(a),f=H(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=nt(d).replace("Z",""),b=g.path(m,f),y=nt(p),x=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>x,":first-child").attr("stroke-opacity",0),w.insert(()=>b,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-l}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(L){return z.polygon(t,p,L)},a}function _t(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}async function Xc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[..._t(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},..._t(n/2+2*l,-l,l,20,-180,-270),..._t(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},..._t(n/2,c/2,l,20,0,90)],p=[..._t(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},..._t(-n/2-l/2,-l,l,20,0,90),..._t(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},..._t(-n/2+l+l/2,c/2,l,30,-180,-270)],g=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},..._t(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},..._t(n/2+2*l,-l,l,20,-180,-270),..._t(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:c/2},..._t(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2-l-l/2,y:c/2+l},..._t(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},..._t(-n/2-l/2,-l,l,20,0,90),..._t(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},..._t(-n/2+l+l/2,c/2,l,30,-180,-270)],f=j(a),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=nt(d).replace("Z",""),y=f.path(b,m),x=nt(p).replace("Z",""),w=f.path(x,m),L=nt(g),v=f.path(L,{...m}),C=a.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>y,":first-child"),C.insert(()=>w,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${l-l/4}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,C),t.intersect=function(S){return z.polygon(t,g,S)},a}async function Zc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(80,1.25*(o.width+2*(t.padding??0)),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=n/2,{cssStyles:l}=t,h=j(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=s-c,g=n/4,f=[{x:p,y:0},{x:g,y:0},{x:0,y:n/2},{x:g,y:n},{x:p,y:n},...Qr(-p,-n/2,c,50,270,90)],m=nt(f),b=h.path(m,d),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(${-s/2}, ${-n/2})`),U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}u(zc,"anchor"),u(Uo,"generateArcPoints"),u(Wc,"bowTieRect"),u(_e,"insertPolygonShape"),u(jc,"card"),u(Hc,"choice"),u(Vo,"circle"),u(Yc,"createLine"),u(Uc,"crossedCircle"),u(ye,"generateCirclePoints"),u(Vc,"curlyBraceLeft"),u(be,"generateCirclePoints"),u(Gc,"curlyBraceRight"),u(_t,"generateCirclePoints"),u(Xc,"curlyBraces"),u(Zc,"curvedTrapezoid");var $f=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),Ef=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),Of=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Kc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+t.padding,t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(o.height+l+t.padding,t.height??0);let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=j(a),f=Ef(0,0,n,h,c,l),m=Of(0,l,n,h,c,l),b=g.path(f,H(t,{})),y=g.path(m,H(t,{fill:"none"}));d=a.insert(()=>y,":first-child"),d=a.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const g=$f(0,0,n,h,c,l);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",$t(p)).attr("style",i)}return d.attr("label-offset-y",l),d.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),U(t,d),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(t.padding??0)/1.5-(o.y-(o.top??0))})`),t.intersect=function(g){const f=z.rect(t,g),m=f.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(f.y-(t.y??0))>(t.height??0)/2-l)){let b=l*l*(1-m*m/(c*c));b>0&&(b=Math.sqrt(b)),b=l-b,g.y-(t.y??0)>0&&(b=-b),f.y+=b}return f},a}async function Qc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+t.padding,c=o.height+t.padding,l=.2*c,h=-n/2,d=-c/2-l/2,{cssStyles:p}=t,g=j(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:h,y:d+l},{x:-h,y:d+l},{x:-h,y:-d},{x:h,y:-d},{x:h,y:d},{x:-h,y:d},{x:-h,y:d+l}],b=g.polygon(m.map(x=>[x.x,x.y]),f),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+l+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.rect(t,x)},a}async function Jc(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s}=await Q(e,t,K(t)),n=o.width/2+s+5,c=o.width/2+s;let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const g=j(a),f=H(t,{roughness:.2,strokeWidth:2.5}),m=H(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,2*n,f),y=g.circle(0,0,2*c,m);l=a.insert("g",":first-child"),l.attr("class",$t(t.cssClasses)).attr("style",$t(h)),(d=l.node())==null||d.appendChild(b),(p=l.node())==null||p.appendChild(y)}else{l=a.insert("g",":first-child");const g=l.insert("circle",":first-child"),f=l.insert("circle");l.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",n).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return U(t,l),t.intersect=function(g){return E.info("DoubleCircle intersect",t,n,g),z.circle(t,n,g)},a}function td(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Y(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,n=j(o),{nodeBorder:c}=r,l=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=n.circle(0,0,14,l),d=o.insert(()=>h,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),U(t,d),t.intersect=function(p){return E.info("filledCircle intersect",t,{radius:7,point:p}),z.circle(t,7,p)},o}async function ed(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=n+o.height,l=n+o.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=nt(h),m=p.path(f,g),b=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=n,t.height=c,U(t,b),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(y){return E.info("Triangle intersect",t,h,y),z.polygon(t,h,y)},a}function rd(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=Y(t);t.label="";const s=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,d=-1*l/2,p=j(s),g=H(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(h,d,c,l,g),m=s.insert(()=>f,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),U(t,m);const b=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(y){return z.rect(t,y)},s}async function id(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(80,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(50,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=n/2,{cssStyles:l}=t,h=j(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-s/2,y:-n/2},{x:s/2-c,y:-n/2},...Qr(-s/2+c,0,c,50,90,270),{x:s/2-c,y:n/2},{x:-s/2,y:n/2}],g=nt(p),f=h.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),U(t,m),t.intersect=function(b){return E.info("Pill intersect",t,{radius:c,point:b}),z.polygon(t,p,b)},a}async function ad(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.height+(t.padding??0),n=o.width+2.5*(t.padding??0),{cssStyles:c}=t,l=j(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let d=n/2;d+=d/6;const p=s/2,g=d-p/2,f=[{x:-g,y:-p},{x:0,y:-p},{x:g,y:-p},{x:d,y:0},{x:g,y:p},{x:0,y:p},{x:-g,y:p},{x:-d,y:0}],m=nt(f),b=l.path(m,h),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=n,t.height=s,U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}async function od(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await Q(e,t,K(t)),o=Math.max(30,(t==null?void 0:t.width)??0),s=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,c=j(a),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],d=nt(h),p=c.path(d,l),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-o/2}, ${-s/2})`),U(t,g),t.intersect=function(f){return E.info("Pill intersect",t,{points:h}),z.polygon(t,h,f)},a}async function nd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:d}=await Q(e,t,"icon-shape default"),p=t.pos==="t",g=n,f=n,{nodeBorder:m}=r,{stylesMap:b}=je(t),y=-f/2,x=-g/2,w=t.label?8:0,L=j(l),v=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=L.rectangle(y,x,f,g,v),S=Math.max(f,h.width),P=g+h.height+w,D=L.rectangle(-S/2,-P/2,S,P,{...v,fill:"transparent",stroke:"none"}),R=l.insert(()=>C,":first-child"),I=l.insert(()=>D);if(t.icon){const F=l.append("g");F.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const T=F.node().getBBox(),M=T.width,A=T.height,_=T.x,$=T.y;F.attr("transform",`translate(${-M/2-_},${p?h.height/2+w/2-A/2-$:-h.height/2-w/2-A/2-$})`),F.attr("style",`color: ${b.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-P/2:P/2-h.height})`),R.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),U(t,I),t.intersect=function(F){if(E.info("iconSquare intersect",t,F),!t.label)return z.rect(t,F);const T=t.x??0,M=t.y??0,A=t.height??0;let _=[];return _=p?[{x:T-h.width/2,y:M-A/2},{x:T+h.width/2,y:M-A/2},{x:T+h.width/2,y:M-A/2+h.height+w},{x:T+f/2,y:M-A/2+h.height+w},{x:T+f/2,y:M+A/2},{x:T-f/2,y:M+A/2},{x:T-f/2,y:M-A/2+h.height+w},{x:T-h.width/2,y:M-A/2+h.height+w}]:[{x:T-f/2,y:M-A/2},{x:T+f/2,y:M-A/2},{x:T+f/2,y:M-A/2+g},{x:T+h.width/2,y:M-A/2+g},{x:T+h.width/2/2,y:M+A/2},{x:T-h.width/2,y:M+A/2},{x:T-h.width/2,y:M-A/2+g},{x:T-f/2,y:M-A/2+g}],z.polygon(t,_,F)},l}async function sd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:d}=await Q(e,t,"icon-shape default"),p=t.label?8:0,g=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:b}=je(t),y=j(l),x=H(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=b.get("fill");x.stroke=w??m;const L=l.append("g");t.icon&&L.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=L.node().getBBox(),C=v.width,S=v.height,P=v.x,D=v.y,R=Math.max(C,S)*Math.SQRT2+40,I=y.circle(0,0,R,x),F=Math.max(R,h.width),T=R+h.height+p,M=y.rectangle(-F/2,-T/2,F,T,{...x,fill:"transparent",stroke:"none"}),A=l.insert(()=>I,":first-child"),_=l.insert(()=>M);return L.attr("transform",`translate(${-C/2-P},${g?h.height/2+p/2-S/2-D:-h.height/2-p/2-S/2-D})`),L.attr("style",`color: ${b.get("stroke")??f};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-T/2:T/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),U(t,_),t.intersect=function($){return E.info("iconSquare intersect",t,$),z.rect(t,$)},l}async function ld(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:p}=await Q(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:b,mainBkg:y}=r,{stylesMap:x}=je(t),w=-m/2,L=-f/2,v=t.label?8:0,C=j(l),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const P=x.get("fill");S.stroke=P??y;const D=C.path(me(w,L,m,f,5),S),R=Math.max(m,h.width),I=f+h.height+v,F=C.rectangle(-R/2,-I/2,R,I,{...S,fill:"transparent",stroke:"none"}),T=l.insert(()=>D,":first-child").attr("class","icon-shape2"),M=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),$=_.width,O=_.height,tt=_.x,it=_.y;A.attr("transform",`translate(${-$/2-tt},${g?h.height/2+v/2-O/2-it:-h.height/2-v/2-O/2-it})`),A.attr("style",`color: ${x.get("stroke")??b};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+v/2:-h.height/2-v/2})`),U(t,M),t.intersect=function(A){if(E.info("iconSquare intersect",t,A),!t.label)return z.rect(t,A);const _=t.x??0,$=t.y??0,O=t.height??0;let tt=[];return tt=g?[{x:_-h.width/2,y:$-O/2},{x:_+h.width/2,y:$-O/2},{x:_+h.width/2,y:$-O/2+h.height+v},{x:_+m/2,y:$-O/2+h.height+v},{x:_+m/2,y:$+O/2},{x:_-m/2,y:$+O/2},{x:_-m/2,y:$-O/2+h.height+v},{x:_-h.width/2,y:$-O/2+h.height+v}]:[{x:_-m/2,y:$-O/2},{x:_+m/2,y:$-O/2},{x:_+m/2,y:$-O/2+f},{x:_+h.width/2,y:$-O/2+f},{x:_+h.width/2/2,y:$+O/2},{x:_-h.width/2,y:$+O/2},{x:_-h.width/2,y:$-O/2+f},{x:_-m/2,y:$-O/2+f}],z.polygon(t,tt,A)},l}async function hd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:p}=await Q(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:b,mainBkg:y}=r,{stylesMap:x}=je(t),w=-m/2,L=-f/2,v=t.label?8:0,C=j(l),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const P=x.get("fill");S.stroke=P??y;const D=C.path(me(w,L,m,f,.1),S),R=Math.max(m,h.width),I=f+h.height+v,F=C.rectangle(-R/2,-I/2,R,I,{...S,fill:"transparent",stroke:"none"}),T=l.insert(()=>D,":first-child"),M=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),$=_.width,O=_.height,tt=_.x,it=_.y;A.attr("transform",`translate(${-$/2-tt},${g?h.height/2+v/2-O/2-it:-h.height/2-v/2-O/2-it})`),A.attr("style",`color: ${x.get("stroke")??b};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+v/2:-h.height/2-v/2})`),U(t,M),t.intersect=function(A){if(E.info("iconSquare intersect",t,A),!t.label)return z.rect(t,A);const _=t.x??0,$=t.y??0,O=t.height??0;let tt=[];return tt=g?[{x:_-h.width/2,y:$-O/2},{x:_+h.width/2,y:$-O/2},{x:_+h.width/2,y:$-O/2+h.height+v},{x:_+m/2,y:$-O/2+h.height+v},{x:_+m/2,y:$+O/2},{x:_-m/2,y:$+O/2},{x:_-m/2,y:$-O/2+h.height+v},{x:_-h.width/2,y:$-O/2+h.height+v}]:[{x:_-m/2,y:$-O/2},{x:_+m/2,y:$-O/2},{x:_+m/2,y:$-O/2+f},{x:_+h.width/2,y:$-O/2+f},{x:_+h.width/2/2,y:$+O/2},{x:_-h.width/2,y:$+O/2},{x:_-h.width/2,y:$-O/2+f},{x:_-m/2,y:$-O/2+f}],z.polygon(t,tt,A)},l}async function cd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/o;const{labelStyles:s}=Y(t);t.labelStyle=s;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??a),l=t.constraint==="on"&&(t!=null&&t.assetHeight)?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(l,n??0);const{shapeSvg:d,bbox:p,label:g}=await Q(e,t,"image-shape default"),f=t.pos==="t",m=-l/2,b=-h/2,y=t.label?8:0,x=j(d),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=x.rectangle(m,b,l,h,w),v=Math.max(l,p.width),C=h+p.height+y,S=x.rectangle(-v/2,-C/2,v,C,{...w,fill:"none",stroke:"none"}),P=d.insert(()=>L,":first-child"),D=d.insert(()=>S);if(t.img){const R=d.append("image");R.attr("href",t.img),R.attr("width",l),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-l/2},${f?C/2-h:-C/2})`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-h/2-p.height/2-y/2:h/2-p.height/2+y/2})`),P.attr("transform",`translate(0,${f?p.height/2+y/2:-p.height/2-y/2})`),U(t,D),t.intersect=function(R){if(E.info("iconSquare intersect",t,R),!t.label)return z.rect(t,R);const I=t.x??0,F=t.y??0,T=t.height??0;let M=[];return M=f?[{x:I-p.width/2,y:F-T/2},{x:I+p.width/2,y:F-T/2},{x:I+p.width/2,y:F-T/2+p.height+y},{x:I+l/2,y:F-T/2+p.height+y},{x:I+l/2,y:F+T/2},{x:I-l/2,y:F+T/2},{x:I-l/2,y:F-T/2+p.height+y},{x:I-p.width/2,y:F-T/2+p.height+y}]:[{x:I-l/2,y:F-T/2},{x:I+l/2,y:F-T/2},{x:I+l/2,y:F-T/2+h},{x:I+p.width/2,y:F-T/2+h},{x:I+p.width/2/2,y:F+T/2},{x:I-p.width/2,y:F+T/2},{x:I-p.width/2,y:F-T/2+h},{x:I-l/2,y:F-T/2+h}],z.polygon(t,M,R)},d}async function dd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}async function Zi(e,t,r){const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i;const{shapeSvg:o,bbox:s}=await Q(e,t,K(t)),n=Math.max(s.width+2*r.labelPaddingX,(t==null?void 0:t.width)||0),c=Math.max(s.height+2*r.labelPaddingY,(t==null?void 0:t.height)||0),l=-n/2,h=-c/2;let d,{rx:p,ry:g}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,g=r.ry),t.look==="handDrawn"){const m=j(o),b=H(t,{}),y=p||g?m.path(me(l,h,n,c,p||0),b):m.rectangle(l,h,n,c,b);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",$t(f))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",$t(p)).attr("ry",$t(g)).attr("x",l).attr("y",h).attr("width",n).attr("height",c);return U(t,d),t.calcIntersect=function(m,b){return z.rect(m,b)},t.intersect=function(m){return z.rect(t,m)},o}async function ud(e,t){const{shapeSvg:r,bbox:i,label:a}=await Q(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),U(t,o),t.intersect=function(s){return z.rect(t,s)},r}async function pd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}async function gd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*n/6,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}function fd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),c=[{x:s,y:0},{x:0,y:n+3.5},{x:s-14,y:n+3.5},{x:0,y:2*n},{x:s,y:n-3.5},{x:14,y:n-3.5}],l=j(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=nt(c),p=l.path(d,h),g=a.insert(()=>p,":first-child");return o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-n})`),U(t,g),t.intersect=function(f){return E.info("lightningBolt intersect",t,f),z.polygon(t,c,f)},a}u(Kc,"cylinder"),u(Qc,"dividedRectangle"),u(Jc,"doublecircle"),u(td,"filledCircle"),u(ed,"flippedTriangle"),u(rd,"forkJoin"),u(id,"halfRoundedRectangle"),u(ad,"hexagon"),u(od,"hourglass"),u(nd,"icon"),u(sd,"iconCircle"),u(ld,"iconRounded"),u(hd,"iconSquare"),u(cd,"imageSquare"),u(dd,"inv_trapezoid"),u(Zi,"drawRect"),u(ud,"labelRect"),u(pd,"lean_left"),u(gd,"lean_right"),u(fd,"lightningBolt");var Df=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),If=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Pf=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function md(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+(t.padding??0),t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(o.height+l+(t.padding??0),t.height??0),d=.1*h;let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=j(a),m=If(0,0,n,h,c,l,d),b=Pf(0,l,n,h,c,l),y=H(t,{}),x=f.path(m,y),w=f.path(b,y);a.insert(()=>w,":first-child").attr("class","line"),p=a.insert(()=>x,":first-child"),p.attr("class","basic label-container"),g&&p.attr("style",g)}else{const f=Df(0,0,n,h,c,l,d);p=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",$t(g)).attr("style",i)}return p.attr("label-offset-y",l),p.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),U(t,p),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+l-(o.y-(o.top??0))})`),t.intersect=function(f){const m=z.rect(t,f),b=m.x-(t.x??0);if(c!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-b*b/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,f.y-(t.y??0)>0&&(y=-y),m.y+=y}return m},a}async function yd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...Me(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,l,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=p.polygon(f.map(y=>[y.x,y.y]),g),b=a.insert(()=>m,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(y){return z.polygon(t,f,y)},a}async function bd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=H(t,{}),f=[{x:l-5,y:h+5},{x:l-5,y:h+c+5},{x:l+n-5,y:h+c+5},{x:l+n-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h+c-5},{x:l+n+5,y:h+c-5},{x:l+n+5,y:h-5},{x:l+5,y:h-5},{x:l+5,y:h},{x:l,y:h},{x:l,y:h+5}],m=[{x:l,y:h+5},{x:l+n-5,y:h+5},{x:l+n-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h},{x:l,y:h}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=nt(f),y=p.path(b,g),x=nt(m),w=p.path(x,{...g,fill:"none"}),L=a.insert(()=>w,":first-child");return L.insert(()=>y,":first-child"),L.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),U(t,L),t.intersect=function(v){return z.polygon(t,f,v)},a}async function xd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,d=-n/2,p=-h/2,{cssStyles:g}=t,f=Me(d-5,p+h+5,d+n-5,p+h+5,l,.8),m=f==null?void 0:f[f.length-1],b=[{x:d-5,y:p+5},{x:d-5,y:p+h+5},...f,{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:m.y-10},{x:d+n+5,y:m.y-10},{x:d+n+5,y:p-5},{x:d+5,y:p-5},{x:d+5,y:p},{x:d,y:p},{x:d,y:p+5}],y=[{x:d,y:p+5},{x:d+n-5,y:p+5},{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:p},{x:d,y:p}],x=j(a),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=nt(b),v=x.path(L,w),C=nt(y),S=x.path(C,w),P=a.insert(()=>v,":first-child");return P.insert(()=>S),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-l/2-(o.y-(o.top??0))})`),U(t,P),t.intersect=function(D){return z.polygon(t,b,D)},a}async function Cd(e,t,{config:{themeVariables:r}}){var y;const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i,t.useHtmlLabels||((y=Lt().flowchart)==null?void 0:y.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:n}=await Q(e,t,K(t)),c=Math.max(s.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(s.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-c/2,d=-l/2,{cssStyles:p}=t,g=j(o),f=H(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=g.rectangle(h,d,c,l,f),b=o.insert(()=>m,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",a),n.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),U(t,b),t.intersect=function(x){return z.rect(t,x)},o}u(md,"linedCylinder"),u(yd,"linedWaveEdgedRect"),u(bd,"multiRect"),u(xd,"multiWaveEdgedRectangle"),u(Cd,"note");var Nf=u((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function kd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.width+t.padding+(o.height+t.padding),n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=H(t,{}),p=Nf(0,0,s),g=h.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),l&&c.attr("style",l)}else c=_e(a,s,s,n),c.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&c.attr("style",i),U(t,c),t.calcIntersect=function(h,d){const p=h.width,g=[{x:p/2,y:0},{x:p,y:-p/2},{x:p/2,y:-p},{x:0,y:-p/2}],f=z.polygon(h,g,d);return{x:f.x-.5,y:f.y-.5}},t.intersect=function(h){return this.calcIntersect(t,h)},a}async function wd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=-Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0)/2,c=-Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0)/2,l=c/2,h=[{x:n+l,y:c},{x:n,y:0},{x:n+l,y:-c},{x:-n,y:-c},{x:-n,y:c}],{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=nt(h),m=p.path(f,g),b=a.insert(()=>m,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-l/2},0)`),s.attr("transform",`translate(${-l/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(y){return z.polygon(t,h,y)},a}async function Sd(e,t){var P,D;const{labelStyles:r,nodeStyles:i}=Y(t);let a;t.labelStyle=r,a=t.cssClasses?"node "+t.cssClasses:"node default";const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=n.node().appendChild(await Le(l,t.labelStyle,!0,!0));let d={width:0,height:0};if(Ct((D=(P=ut())==null?void 0:P.flowchart)==null?void 0:D.htmlLabels)){const R=h.children[0],I=dt(h);d=R.getBoundingClientRect(),I.attr("width",d.width),I.attr("height",d.height)}E.info("Text 2",c);const p=c||[],g=h.getBBox(),f=n.node().appendChild(await Le(p.join?p.join("<br/>"):p,t.labelStyle,!0,!0)),m=f.children[0],b=dt(f);d=m.getBoundingClientRect(),b.attr("width",d.width),b.attr("height",d.height);const y=(t.padding||0)/2;dt(f).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),dt(h).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")");const x=d.width+(t.padding||0),w=d.height+(t.padding||0),L=-d.width/2-y,v=-d.height/2-y;let C,S;if(t.look==="handDrawn"){const R=j(o),I=H(t,{}),F=R.path(me(L,v,x,w,t.rx||0),I),T=R.line(-d.width/2-y,-d.height/2-y+g.height+y,d.width/2+y,-d.height/2-y+g.height+y,I);S=o.insert(()=>(E.debug("Rough node insert CXC",F),T),":first-child"),C=o.insert(()=>(E.debug("Rough node insert CXC",F),F),":first-child")}else C=s.insert("rect",":first-child"),S=s.insert("line"),C.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),S.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y);return U(t,C),t.intersect=function(R){return z.rect(t,R)},o}function Jr(e,t,r,i,a,o,s){const n=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),h=(r-e)/2/a,d=(i-t)/2/o,p=Math.sqrt(h**2+d**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-p**2),f=n+g*o*Math.sin(l)*(s?-1:1),m=c-g*a*Math.cos(l)*(s?-1:1),b=Math.atan2((t-m)/o,(e-f)/a);let y=Math.atan2((i-m)/o,(r-f)/a)-b;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const x=[];for(let w=0;w<20;w++){const L=b+w/19*y,v=f+a*Math.cos(L),C=m+o*Math.sin(L);x.push({x:v,y:C})}return x}async function Td(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=(t==null?void 0:t.padding)??0,n=(t==null?void 0:t.padding)??0,c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+2*s,l=(t!=null&&t.height?t==null?void 0:t.height:o.height)+2*n,h=t.radius||5,d=t.taper||5,{cssStyles:p}=t,g=j(a),f=H(t,{});t.stroke&&(f.stroke=t.stroke),t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2+d,y:-l/2},{x:c/2-d,y:-l/2},...Jr(c/2-d,-l/2,c/2,-l/2+d,h,h,!0),{x:c/2,y:-l/2+d},{x:c/2,y:l/2-d},...Jr(c/2,l/2-d,c/2-d,l/2,h,h,!0),{x:c/2-d,y:l/2},{x:-c/2+d,y:l/2},...Jr(-c/2+d,l/2,-c/2,l/2-d,h,h,!0),{x:-c/2,y:l/2-d},{x:-c/2,y:-l/2+d},...Jr(-c/2,-l/2+d,-c/2+d,-l/2,h,h,!0)],b=nt(m),y=g.path(b,f),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),U(t,x),t.intersect=function(w){return z.polygon(t,m,w)},a}async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=(t==null?void 0:t.padding)??0,c=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-o.width/2-n,d=-o.height/2-n,{cssStyles:p}=t,g=j(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:h,y:d},{x:h+c+8,y:d},{x:h+c+8,y:d+l},{x:h-8,y:d+l},{x:h-8,y:d},{x:h,y:d},{x:h,y:d+l}],b=g.polygon(m.map(x=>[x.x,x.y]),f),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container").attr("style",$t(p)),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-c/2+4+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.rect(t,x)},a}async function vd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:l,y:h},{x:l,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-c/2}],m=nt(f),b=p.path(m,g),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))}, ${-c/4+(t.padding??0)-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}async function Md(e,t){return Zi(e,t,{rx:0,ry:0,labelPaddingX:t.labelPaddingX??2*((t==null?void 0:t.padding)||0),labelPaddingY:1*((t==null?void 0:t.padding)||0)})}async function Ld(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.height+t.padding,n=o.width+s/4+t.padding,c=s/2,{cssStyles:l}=t,h=j(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-n/2+c,y:-s/2},{x:n/2-c,y:-s/2},...Qr(-n/2+c,0,c,50,90,270),{x:n/2-c,y:s/2},...Qr(n/2-c,0,c,50,270,450)],g=nt(p),f=h.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),U(t,m),t.intersect=function(b){return z.polygon(t,p,b)},a}async function _d(e,t){return Zi(e,t,{rx:5,ry:5})}function Fd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:s,stateBorder:n,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j(l),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=h.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),g=n??c,f=h.circle(0,0,5,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>p,":first-child");return m.insert(()=>f),o&&m.selectAll("path").attr("style",o),a&&m.selectAll("path").attr("style",a),U(t,m),t.intersect=function(b){return z.circle(t,7,b)},l}function Ad(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const s=j(a).circle(0,0,14,Eh(i));o=a.insert(()=>s),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return U(t,o),t.intersect=function(s){return z.circle(t,7,s)},a}async function $d(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=((t==null?void 0:t.padding)||0)/2,n=o.width+t.padding,c=o.height+t.padding,l=-o.width/2-s,h=-o.height/2-s,d=[{x:0,y:0},{x:n,y:0},{x:n,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const p=j(a),g=H(t,{}),f=p.rectangle(l-8,h,n+16,c,g),m=p.line(l,h,l,h+c,g),b=p.line(l+n,h,l+n,h+c,g);a.insert(()=>m,":first-child"),a.insert(()=>b,":first-child");const y=a.insert(()=>f,":first-child"),{cssStyles:x}=t;y.attr("class","basic label-container").attr("style",$t(x)),U(t,y)}else{const p=_e(a,n,c,d);i&&p.attr("style",i),U(t,p)}return t.intersect=function(p){return z.polygon(t,d,p)},a}async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,l=-n/2,h=.2*n,d=.2*n,{cssStyles:p}=t,g=j(a),f=H(t,{}),m=[{x:c-h/2,y:l},{x:c+s+h/2,y:l},{x:c+s+h/2,y:l+n},{x:c-h/2,y:l+n}],b=[{x:c+s-h/2,y:l+n},{x:c+s+h/2,y:l+n},{x:c+s+h/2,y:l+n-d}];t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=nt(m),x=g.path(y,f),w=nt(b),L=g.path(w,{...f,fillStyle:"solid"}),v=a.insert(()=>L,":first-child");return v.insert(()=>x,":first-child"),v.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),U(t,v),t.intersect=function(C){return z.polygon(t,m,C)},a}async function Od(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=.2*n,d=.2*c,p=c+l,{cssStyles:g}=t,f=j(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-n/2-n/2*.1,y:p/2},...Me(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,l,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],y=-n/2+n/2*.1,x=-p/2-.4*d,w=[{x:y+n-h,y:1.4*(x+c)},{x:y+n,y:x+c-d},{x:y+n,y:.9*(x+c)},...Me(y+n,1.3*(x+c),y+n-h,1.5*(x+c),.03*-c,.5)],L=nt(b),v=f.path(L,m),C=nt(w),S=f.path(C,{...m,fillStyle:"solid"}),P=a.insert(()=>S,":first-child");return P.insert(()=>v,":first-child"),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),U(t,P),t.intersect=function(D){return z.polygon(t,b,D)},a}async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(o.height+t.padding,(t==null?void 0:t.height)||0),c=-s/2,l=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",s).attr("height",n),U(t,h),t.intersect=function(d){return z.rect(t,d)},a}u(kd,"question"),u(wd,"rect_left_inv_arrow"),u(Sd,"rectWithTitle"),u(Jr,"generateArcPoints"),u(Td,"roundedRect"),u(Bd,"shadedProcess"),u(vd,"slopedRect"),u(Md,"squareRect"),u(Ld,"stadium"),u(_d,"state"),u(Fd,"stateEnd"),u(Ad,"stateStart"),u($d,"subroutine"),u(Ed,"taggedRect"),u(Od,"taggedWaveEdgedRectangle"),u(Dd,"text");var Rf=u((e,t,r,i,a,o)=>`M${e},${t}
120
+ `));return t===!1?r.replace(/ /g,"&nbsp;"):r}function oc(e,t={}){const r=ac(e,t),i=Ap.lexer(r),a=[[]];let o=0;function s(n,c="normal"){n.type==="text"?n.text.split(`
121
+ `).forEach((l,h)=>{h!==0&&(o++,a.push([])),l.split(" ").forEach(d=>{(d=d.replace(/&#39;/g,"'"))&&a[o].push({content:d,type:c})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(l=>{s(l,n.type)}):n.type==="html"&&a[o].push({content:n.text,type:"normal"})}return u(s,"processNode"),i.forEach(n=>{var c;n.type==="paragraph"?(c=n.tokens)==null||c.forEach(l=>{s(l)}):n.type==="html"?a[o].push({content:n.text,type:"normal"}):a[o].push({content:n.raw,type:"normal"})}),a}function nc(e,{markdownAutoWrap:t}={}){const r=Ap.lexer(e);function i(a){var o,s,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(o=a.tokens)==null?void 0:o.map(i).join("")}</strong>`:a.type==="em"?`<em>${(s=a.tokens)==null?void 0:s.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(E.warn(`Unsupported markdown: ${a.type}`),a.raw)}return u(i,"output"),r.map(i).join("")}function sc(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function lc(e,t){return Ao(e,[],sc(t.content),t.type)}function Ao(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...o]=r,s=[...t,a];return e([{content:s.join(""),type:i}])?Ao(e,s,o,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function hc(e,t){if(e.some(({content:r})=>r.includes(`
122
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Pi(e,t)}function Pi(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},s=[...i];if(a!==""&&s.push({content:a,type:"normal"}),s.push(o),t(s))return Pi(e,t,r,s);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,c]=lc(t,o);r.push([n]),c.content&&e.unshift(c)}return Pi(e,t,r)}function $o(e,t){t&&e.attr("style",t)}async function cc(e,t,r,i,a=!1,o=Lt()){const s=e.append("foreignObject");s.attr("width",10*r+"px"),s.attr("height",10*r+"px");const n=s.append("xhtml:div"),c=$e(t.label)?await hi(t.label.replace(Ee.lineBreakRegex,`
123
+ `),o):Ht(t.label,o),l=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(c),$o(h,t.labelStyle),h.attr("class",`${l} ${i}`),$o(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),n.style("max-width",r+"px"),n.style("text-align","center"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),s.node()}function Ni(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function dc(e,t,r){const i=e.append("text"),a=Ni(i,1,t);qi(a,r);const o=a.node().getComputedTextLength();return i.remove(),o}In=function(e,t,r){var s;const i=e.append("text"),a=Ni(i,1,t);qi(a,[{content:r,type:"normal"}]);const o=(s=a.node())==null?void 0:s.getBoundingClientRect();return o&&i.remove(),o};function uc(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let n=0;for(const c of r){const l=u(d=>dc(a,1.1,d)<=e,"checkWidth"),h=l(c)?[c]:hc(c,l);for(const d of h)qi(Ni(s,n,1.1),d),n++}if(i){const c=s.node().getBBox(),l=2;return o.attr("x",c.x-l).attr("y",c.y-l).attr("width",c.width+2*l).attr("height",c.height+2*l),a.node()}return s.node()}function qi(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}Ca=async function(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,o,s)=>(r.push((async()=>{const n=`${o}:${s}`;return await ic(n)?await Ze(n,void 0,{class:"label-icon"}):`<i class='${Ht(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")},u(ac,"preprocessMarkdown"),u(oc,"markdownToLines"),u(nc,"markdownToHTML"),u(sc,"splitTextToChars"),u(lc,"splitWordToFitWidth"),u(Ao,"splitWordToFitWidthRecursion"),u(hc,"splitLineToFitWidth"),u(Pi,"splitLineToFitWidthRecursion"),u($o,"applyStyle"),u(cc,"addHtmlSpan"),u(Ni,"createTspan"),u(dc,"computeWidthOfText"),u(In,"computeDimensionOfText"),u(uc,"createFormattedText"),u(qi,"updateTextContentAndStyles"),u(Ca,"replaceIconSubstring"),ue=u(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:o=!0,isNode:s=!0,width:n=200,addSvgBackground:c=!1}={},l)=>{if(E.debug("XYZ createText",t,r,i,a,o,s,"addSvgBackground: ",c),o){const h=nc(t,l),d=await Ca(ke(h),l),p=t.replace(/\\\\/g,"\\"),g={isNode:s,label:$e(t)?p:d,labelStyle:r.replace("fill:","color:")};return await cc(e,g,n,a,c,l)}{const h=uc(n,e,oc(t.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),l),!!t&&c);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(h).select("rect").attr("style",d.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(h).select("text").attr("style",p)}return h}},"createText");function Eo(e,t,r){if(e&&e.length){const[i,a]=t,o=Math.PI/180*r,s=Math.cos(o),n=Math.sin(o);for(const c of e){const[l,h]=c;c[0]=(l-i)*s-(h-a)*n+i,c[1]=(l-i)*n+(h-a)*s+a}}}function pf(e,t){return e[0]===t[0]&&e[1]===t[1]}function gf(e,t,r,i=1){const a=r,o=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const l of s)Eo(l,n,a);const c=(function(l,h,d){const p=[];for(const x of l){const w=[...x];pf(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}const g=[];h=Math.max(h,.1);const f=[];for(const x of p)for(let w=0;w<x.length-1;w++){const L=x[w],v=x[w+1];if(L[1]!==v[1]){const C=Math.min(L[1],v[1]);f.push({ymin:C,ymax:Math.max(L[1],v[1]),x:C===L[1]?L[0]:v[0],islope:(v[0]-L[0])/(v[1]-L[1])})}}if(f.sort((x,w)=>x.ymin<w.ymin?-1:x.ymin>w.ymin?1:x.x<w.x?-1:x.x>w.x?1:x.ymax===w.ymax?0:(x.ymax-w.ymax)/Math.abs(x.ymax-w.ymax)),!f.length)return g;let m=[],b=f[0].ymin,y=0;for(;m.length||f.length;){if(f.length){let x=-1;for(let w=0;w<f.length&&!(f[w].ymin>b);w++)x=w;f.splice(0,x+1).forEach(w=>{m.push({s:b,edge:w})})}if(m=m.filter(x=>!(x.edge.ymax<=b)),m.sort((x,w)=>x.edge.x===w.edge.x?0:(x.edge.x-w.edge.x)/Math.abs(x.edge.x-w.edge.x)),(d!==1||y%h==0)&&m.length>1)for(let x=0;x<m.length;x+=2){const w=x+1;if(w>=m.length)break;const L=m[x].edge,v=m[w].edge;g.push([[Math.round(L.x),b],[Math.round(v.x),b]])}b+=d,m.forEach(x=>{x.edge.x=x.edge.x+d*x.edge.islope}),y++}return g})(s,o,i);if(a){for(const l of s)Eo(l,n,-a);(function(l,h,d){const p=[];l.forEach(g=>p.push(...g)),Eo(p,h,d)})(c,n,-a)}return c}function Xr(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=a),gf(e,a,i,o||1)}class Do{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Xr(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function Ri(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class ff extends Do{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Xr(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,s=[],n=.5*i*Math.cos(o),c=.5*i*Math.sin(o);for(const[l,h]of a)Ri([l,h])&&s.push([[l[0]-n,l[1]+c],[...h]],[[l[0]+n,l[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class mf extends Do{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,a);return i.ops=i.ops.concat(o.ops),i}}class yf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Xr(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const s=a/4;for(const n of t){const c=Ri(n),l=c/a,h=Math.ceil(l)-1,d=c-h*a,p=(n[0][0]+n[1][0])/2-a/4,g=Math.min(n[0][1],n[1][1]);for(let f=0;f<h;f++){const m=g+d+f*a,b=p-s+2*Math.random()*s,y=m-s+2*Math.random()*s,x=this.helper.ellipse(b,y,o,o,r);i.push(...x.ops)}}return{type:"fillSketch",ops:i}}}class bf{constructor(t){this.helper=t}fillPolygons(t,r){const i=Xr(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach(s=>{const n=Ri(s),c=Math.floor(n/(i+a)),l=(n+a-c*(i+a))/2;let h=s[0],d=s[1];h[0]>d[0]&&(h=s[1],d=s[0]);const p=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<c;g++){const f=g*(i+a),m=f+i,b=[h[0]+f*Math.cos(p)+l*Math.cos(p),h[1]+f*Math.sin(p)+l*Math.sin(p)],y=[h[0]+m*Math.cos(p)+l*Math.cos(p),h[1]+m*Math.sin(p)+l*Math.sin(p)];o.push(...this.helper.doubleLineOps(b[0],b[1],y[0],y[1],r))}}),o}}class xf{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,o=Xr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(o,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach(o=>{const s=Ri(o),n=Math.round(s/(2*r));let c=o[0],l=o[1];c[0]>l[0]&&(c=o[1],l=o[0]);const h=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let d=0;d<n;d++){const p=2*d*r,g=2*(d+1)*r,f=Math.sqrt(2*Math.pow(r,2)),m=[c[0]+p*Math.cos(h),c[1]+p*Math.sin(h)],b=[c[0]+g*Math.cos(h),c[1]+g*Math.sin(h)],y=[m[0]+f*Math.cos(h+Math.PI/4),m[1]+f*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],y[0],y[1],i),...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],i))}}),a}}const Wt={};class Cf{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const zi={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Oo(e,t){return e.type===t}function Io(e){const t=[],r=(function(s){const n=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:0,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:1,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return n[n.length]={type:2,text:""},n})(e);let i="BOD",a=0,o=r[a];for(;!Oo(o,2);){let s=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Io("M0,0"+e);a++,s=zi[o.text],i=o.text}else Oo(o,1)?s=zi[i]:(a++,s=zi[o.text],i=o.text);if(!(a+s<r.length))throw new Error("Path data ended short");for(let c=a;c<a+s;c++){const l=r[c];if(!Oo(l,1))throw new Error("Param not a number: "+i+","+l.text);n[n.length]=+l.text}if(typeof zi[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:n};t.push(c),a+=s,o=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function pc(e){let t=0,r=0,i=0,a=0;const o=[];for(const{key:s,data:n}of e)switch(s){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const c=n.map((l,h)=>h%2?l+r:l+t);o.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=a}return o}function gc(e){const t=[];let r="",i=0,a=0,o=0,s=0,n=0,c=0;for(const{key:l,data:h}of e){switch(l){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[o,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],c=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=i+(i-n),p=a+(a-c)):(d=i,p=a),t.push({key:"C",data:[d,p,...h]}),n=h[0],c=h[1],i=h[2],a=h[3];break}case"T":{const[d,p]=h;let g=0,f=0;r==="Q"||r==="T"?(g=i+(i-n),f=a+(a-c)):(g=i,f=a);const m=i+2*(g-i)/3,b=a+2*(f-a)/3,y=d+2*(g-d)/3,x=p+2*(f-p)/3;t.push({key:"C",data:[m,b,y,x,d,p]}),n=g,c=f,i=d,a=p;break}case"Q":{const[d,p,g,f]=h,m=i+2*(d-i)/3,b=a+2*(p-a)/3,y=g+2*(d-g)/3,x=f+2*(p-f)/3;t.push({key:"C",data:[m,b,y,x,g,f]}),n=d,c=p,i=g,a=f;break}case"A":{const d=Math.abs(h[0]),p=Math.abs(h[1]),g=h[2],f=h[3],m=h[4],b=h[5],y=h[6];d===0||p===0?(t.push({key:"C",data:[i,a,b,y,b,y]}),i=b,a=y):i===b&&a===y||(fc(i,a,b,y,d,p,g,f,m).forEach(function(x){t.push({key:"C",data:x})}),i=b,a=y);break}case"Z":t.push({key:"Z",data:[]}),i=o,a=s}r=l}return t}function Zr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function fc(e,t,r,i,a,o,s,n,c,l){const h=(d=s,Math.PI*d/180);var d;let p=[],g=0,f=0,m=0,b=0;if(l)[g,f,m,b]=l;else{[e,t]=Zr(e,t,-h),[r,i]=Zr(r,i,-h);const T=(e-r)/2,M=(t-i)/2;let A=T*T/(a*a)+M*M/(o*o);A>1&&(A=Math.sqrt(A),a*=A,o*=A);const _=a*a,$=o*o,D=_*$-_*M*M-$*T*T,tt=_*M*M+$*T*T,it=(n===c?-1:1)*Math.sqrt(Math.abs(D/tt));m=it*a*M/o+(e+r)/2,b=it*-o*T/a+(t+i)/2,g=Math.asin(parseFloat(((t-b)/o).toFixed(9))),f=Math.asin(parseFloat(((i-b)/o).toFixed(9))),e<m&&(g=Math.PI-g),r<m&&(f=Math.PI-f),g<0&&(g=2*Math.PI+g),f<0&&(f=2*Math.PI+f),c&&g>f&&(g-=2*Math.PI),!c&&f>g&&(f-=2*Math.PI)}let y=f-g;if(Math.abs(y)>120*Math.PI/180){const T=f,M=r,A=i;f=c&&f>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,p=fc(r=m+a*Math.cos(f),i=b+o*Math.sin(f),M,A,a,o,s,0,c,[f,T,m,b])}y=f-g;const x=Math.cos(g),w=Math.sin(g),L=Math.cos(f),v=Math.sin(f),C=Math.tan(y/4),S=4/3*a*C,P=4/3*o*C,O=[e,t],q=[e+S*w,t-P*x],I=[r+S*v,i-P*L],F=[r,i];if(q[0]=2*O[0]-q[0],q[1]=2*O[1]-q[1],l)return[q,I,F].concat(p);{p=[q,I,F].concat(p);const T=[];for(let M=0;M<p.length;M+=3){const A=Zr(p[M][0],p[M][1],h),_=Zr(p[M+1][0],p[M+1][1],h),$=Zr(p[M+2][0],p[M+2][1],h);T.push([A[0],A[1],_[0],_[1],$[0],$[1]])}return T}}const kf={randOffset:function(e,t){return J(e,t)},randOffsetWithRange:function(e,t,r){return ji(e,t,r)},ellipse:function(e,t,r,i,a){return Po(e,t,a,bc(r,i,a)).opset},doubleLineOps:function(e,t,r,i,a){return ve(e,t,r,i,a,!0)}};function mc(e,t,r,i,a){return{type:"path",ops:ve(e,t,r,i,a)}}function Wi(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let o=0;o<i-1;o++)a.push(...ve(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&a.push(...ve(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?mc(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function yc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Hi(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Hi(r[0],1.5*(1+.22*t.roughness),kc(t));for(let o=1;o<r.length;o++){const s=r[o];if(s.length){const n=Hi(s,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Hi(s,1.5*(1+.22*t.roughness),kc(t));for(const l of n)l.op!=="move"&&i.push(l);for(const l of c)l.op!=="move"&&a.push(l)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function bc(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/a;let s=Math.abs(e/2),n=Math.abs(t/2);const c=1-r.curveFitting;return s+=J(s*c,r),n+=J(n*c,r),{increment:o,rx:s,ry:n}}function Po(e,t,r,i){const[a,o]=Sc(i.increment,e,t,i.rx,i.ry,1,i.increment*ji(.1,ji(.4,1,r),r),r);let s=Yi(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Sc(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=Yi(n,null,r);s=s.concat(c)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function xc(e,t,r,i,a,o,s,n,c){const l=e,h=t;let d=Math.abs(r/2),p=Math.abs(i/2);d+=J(.01*d,c),p+=J(.01*p,c);let g=a,f=o;for(;g<0;)g+=2*Math.PI,f+=2*Math.PI;f-g>2*Math.PI&&(g=0,f=2*Math.PI);const m=2*Math.PI/c.curveStepCount,b=Math.min(m/2,(f-g)/2),y=Tc(b,l,h,d,p,g,f,1,c);if(!c.disableMultiStroke){const x=Tc(b,l,h,d,p,g,f,1.5,c);y.push(...x)}return s&&(n?y.push(...ve(l,h,l+d*Math.cos(g),h+p*Math.sin(g),c),...ve(l,h,l+d*Math.cos(f),h+p*Math.sin(f),c)):y.push({op:"lineTo",data:[l,h]},{op:"lineTo",data:[l+d*Math.cos(g),h+p*Math.sin(g)]})),{type:"path",ops:y}}function Cc(e,t){const r=gc(pc(Io(e))),i=[];let a=[0,0],o=[0,0];for(const{key:s,data:n}of r)switch(s){case"M":o=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...ve(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[c,l,h,d,p,g]=n;i.push(...wf(c,l,h,d,p,g,o,t)),o=[p,g];break}case"Z":i.push(...ve(o[0],o[1],a[0],a[1],t)),o=[a[0],a[1]]}return{type:"path",ops:i}}function No(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+J(a,t),i[0][1]+J(a,t)]});for(let s=1;s<o;s++)r.push({op:"lineTo",data:[i[s][0]+J(a,t),i[s][1]+J(a,t)]})}}return{type:"fillPath",ops:r}}function nr(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Wt[a])switch(a){case"zigzag":Wt[a]||(Wt[a]=new ff(i));break;case"cross-hatch":Wt[a]||(Wt[a]=new mf(i));break;case"dots":Wt[a]||(Wt[a]=new yf(i));break;case"dashed":Wt[a]||(Wt[a]=new bf(i));break;case"zigzag-line":Wt[a]||(Wt[a]=new xf(i));break;default:a="hachure",Wt[a]||(Wt[a]=new Do(i))}return Wt[a]})(t,kf).fillPolygons(e,t)}function kc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function wc(e){return e.randomizer||(e.randomizer=new Cf(e.seed||0)),e.randomizer.next()}function ji(e,t,r,i=1){return r.roughness*i*(wc(r)*(t-e)+e)}function J(e,t,r=1){return ji(-e,e,t,r)}function ve(e,t,r,i,a,o=!1){const s=o?a.disableMultiStrokeFill:a.disableMultiStroke,n=qo(e,t,r,i,a,!0,!1);if(s)return n;const c=qo(e,t,r,i,a,!0,!0);return n.concat(c)}function qo(e,t,r,i,a,o,s){const n=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(n);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=c/10);const d=h/2,p=.2+.2*wc(a);let g=a.bowing*a.maxRandomnessOffset*(i-t)/200,f=a.bowing*a.maxRandomnessOffset*(e-r)/200;g=J(g,a,l),f=J(f,a,l);const m=[],b=()=>J(d,a,l),y=()=>J(h,a,l),x=a.preserveVertices;return s?m.push({op:"move",data:[e+(x?0:b()),t+(x?0:b())]}):m.push({op:"move",data:[e+(x?0:J(h,a,l)),t+(x?0:J(h,a,l))]}),s?m.push({op:"bcurveTo",data:[g+e+(r-e)*p+b(),f+t+(i-t)*p+b(),g+e+2*(r-e)*p+b(),f+t+2*(i-t)*p+b(),r+(x?0:b()),i+(x?0:b())]}):m.push({op:"bcurveTo",data:[g+e+(r-e)*p+y(),f+t+(i-t)*p+y(),g+e+2*(r-e)*p+y(),f+t+2*(i-t)*p+y(),r+(x?0:y()),i+(x?0:y())]}),m}function Hi(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]),i.push([e[0][0]+J(t,r),e[0][1]+J(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]),a===e.length-1&&i.push([e[a][0]+J(t,r),e[a][1]+J(t,r)]);return Yi(i,null,r)}function Yi(e,t,r){const i=e.length,a=[];if(i>3){const o=[],s=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const c=e[n];o[0]=[c[0],c[1]],o[1]=[c[0]+(s*e[n+1][0]-s*e[n-1][0])/6,c[1]+(s*e[n+1][1]-s*e[n-1][1])/6],o[2]=[e[n+1][0]+(s*e[n][0]-s*e[n+2][0])/6,e[n+1][1]+(s*e[n][1]-s*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...qo(e[0][0],e[0][1],e[1][0],e[1][1],r,0,!0));return a}function Sc(e,t,r,i,a,o,s,n){const c=[],l=[];if(n.roughness===0){e/=4,l.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+a*Math.sin(h)];c.push(d),l.push(d)}l.push([t+i*Math.cos(0),r+a*Math.sin(0)]),l.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=J(.5,n)-Math.PI/2;l.push([J(o,n)+t+.9*i*Math.cos(h-e),J(o,n)+r+.9*a*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let p=h;p<d;p+=e){const g=[J(o,n)+t+i*Math.cos(p),J(o,n)+r+a*Math.sin(p)];c.push(g),l.push(g)}l.push([J(o,n)+t+i*Math.cos(h+2*Math.PI+.5*s),J(o,n)+r+a*Math.sin(h+2*Math.PI+.5*s)]),l.push([J(o,n)+t+.98*i*Math.cos(h+s),J(o,n)+r+.98*a*Math.sin(h+s)]),l.push([J(o,n)+t+.9*i*Math.cos(h+.5*s),J(o,n)+r+.9*a*Math.sin(h+.5*s)])}return[l,c]}function Tc(e,t,r,i,a,o,s,n,c){const l=o+J(.1,c),h=[];h.push([J(n,c)+t+.9*i*Math.cos(l-e),J(n,c)+r+.9*a*Math.sin(l-e)]);for(let d=l;d<=s;d+=e)h.push([J(n,c)+t+i*Math.cos(d),J(n,c)+r+a*Math.sin(d)]);return h.push([t+i*Math.cos(s),r+a*Math.sin(s)]),h.push([t+i*Math.cos(s),r+a*Math.sin(s)]),Yi(h,0,c)}function wf(e,t,r,i,a,o,s,n){const c=[],l=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let g=0;g<d;g++)g===0?c.push({op:"move",data:[s[0],s[1]]}):c.push({op:"move",data:[s[0]+(p?0:J(l[0],n)),s[1]+(p?0:J(l[0],n))]}),h=p?[a,o]:[a+J(l[g],n),o+J(l[g],n)],c.push({op:"bcurveTo",data:[e+J(l[g],n),t+J(l[g],n),r+J(l[g],n),i+J(l[g],n),h[0],h[1]]});return c}function Kr(e){return[...e]}function Bc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Kr(e[0]),Kr(e[1]),Kr(e[2]),Kr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const o=[],s=1-t;i.push(Kr(a[0]));for(let n=1;n+2<a.length;n++){const c=a[n];o[0]=[c[0],c[1]],o[1]=[c[0]+(s*a[n+1][0]-s*a[n-1][0])/6,c[1]+(s*a[n+1][1]-s*a[n-1][1])/6],o[2]=[a[n+1][0]+(s*a[n][0]-s*a[n+2][0])/6,a[n+1][1]+(s*a[n][1]-s*a[n+2][1])/6],o[3]=[a[n+1][0],a[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Ui(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Sf(e,t,r){const i=Ui(t,r);if(i===0)return Ui(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Ui(e,He(t,r,a))}function He(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ro(e,t,r,i){const a=i||[];if((function(n,c){const l=n[c+0],h=n[c+1],d=n[c+2],p=n[c+3];let g=3*h[0]-2*l[0]-p[0];g*=g;let f=3*h[1]-2*l[1]-p[1];f*=f;let m=3*d[0]-2*p[0]-l[0];m*=m;let b=3*d[1]-2*p[1]-l[1];return b*=b,g<m&&(g=m),f<b&&(f=b),g+f})(e,t)<r){const n=e[t+0];a.length?(o=a[a.length-1],s=n,Math.sqrt(Ui(o,s))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const c=e[t+0],l=e[t+1],h=e[t+2],d=e[t+3],p=He(c,l,.5),g=He(l,h,.5),f=He(h,d,.5),m=He(p,g,.5),b=He(g,f,.5),y=He(m,b,.5);Ro([c,p,m,y],0,r,a),Ro([y,b,f,d],0,r,a)}var o,s;return a}function Tf(e,t){return Vi(e,0,e.length,t)}function Vi(e,t,r,i,a){const o=a||[],s=e[t],n=e[r-1];let c=0,l=1;for(let h=t+1;h<r-1;++h){const d=Sf(e[h],s,n);d>c&&(c=d,l=h)}return Math.sqrt(c)>i?(Vi(e,t,l+1,i,o),Vi(e,l,r,i,o)):(o.length||o.push(s),o.push(n)),o}function zo(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let o=0;o<a;o++)Ro(e,3*o,t,i);return r&&r>0?Vi(i,0,i.length,r):i}const Vt="none";class Bf{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,o){const s=this._o(o);return this._d("line",[mc(t,r,i,a,s)],s)}rectangle(t,r,i,a,o){const s=this._o(o),n=[],c=(function(l,h,d,p,g){return(function(f,m){return Wi(f,!0,m)})([[l,h],[l+d,h],[l+d,h+p],[l,h+p]],g)})(t,r,i,a,s);if(s.fill){const l=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];s.fillStyle==="solid"?n.push(No([l],s)):n.push(nr([l],s))}return s.stroke!==Vt&&n.push(c),this._d("rectangle",n,s)}ellipse(t,r,i,a,o){const s=this._o(o),n=[],c=bc(i,a,s),l=Po(t,r,s,c);if(s.fill)if(s.fillStyle==="solid"){const h=Po(t,r,s,c).opset;h.type="fillPath",n.push(h)}else n.push(nr([l.estimatedPoints],s));return s.stroke!==Vt&&n.push(l.opset),this._d("ellipse",n,s)}circle(t,r,i,a){const o=this.ellipse(t,r,i,i,a);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Wi(t,!1,i)],i)}arc(t,r,i,a,o,s,n=!1,c){const l=this._o(c),h=[],d=xc(t,r,i,a,o,s,n,!0,l);if(n&&l.fill)if(l.fillStyle==="solid"){const p=Object.assign({},l);p.disableMultiStroke=!0;const g=xc(t,r,i,a,o,s,!0,!1,p);g.type="fillPath",h.push(g)}else h.push((function(p,g,f,m,b,y,x){const w=p,L=g;let v=Math.abs(f/2),C=Math.abs(m/2);v+=J(.01*v,x),C+=J(.01*C,x);let S=b,P=y;for(;S<0;)S+=2*Math.PI,P+=2*Math.PI;P-S>2*Math.PI&&(S=0,P=2*Math.PI);const O=(P-S)/x.curveStepCount,q=[];for(let I=S;I<=P;I+=O)q.push([w+v*Math.cos(I),L+C*Math.sin(I)]);return q.push([w+v*Math.cos(P),L+C*Math.sin(P)]),q.push([w,L]),nr([q],x)})(t,r,i,a,o,s,l));return l.stroke!==Vt&&h.push(d),this._d("arc",h,l)}curve(t,r){const i=this._o(r),a=[],o=yc(t,i);if(i.fill&&i.fill!==Vt)if(i.fillStyle==="solid"){const s=yc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],n=t;if(n.length){const c=typeof n[0][0]=="number"?[n]:n;for(const l of c)l.length<3?s.push(...l):l.length===3?s.push(...zo(Bc([l[0],l[0],l[1],l[2]]),10,(1+i.roughness)/2)):s.push(...zo(Bc(l),10,(1+i.roughness)/2))}s.length&&a.push(nr([s],i))}return i.stroke!==Vt&&a.push(o),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],o=Wi(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(No([t],i)):a.push(nr([t],i))),i.stroke!==Vt&&a.push(o),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Vt,s=i.stroke!==Vt,n=!!(i.simplification&&i.simplification<1),c=(function(h,d,p){const g=gc(pc(Io(h))),f=[];let m=[],b=[0,0],y=[];const x=()=>{y.length>=4&&m.push(...zo(y,1)),y=[]},w=()=>{x(),m.length&&(f.push(m),m=[])};for(const{key:v,data:C}of g)switch(v){case"M":w(),b=[C[0],C[1]],m.push(b);break;case"L":x(),m.push([C[0],C[1]]);break;case"C":if(!y.length){const S=m.length?m[m.length-1]:b;y.push([S[0],S[1]])}y.push([C[0],C[1]]),y.push([C[2],C[3]]),y.push([C[4],C[5]]);break;case"Z":x(),m.push([b[0],b[1]])}if(w(),!p)return f;const L=[];for(const v of f){const C=Tf(v,p);C.length&&L.push(C)}return L})(t,0,n?4-4*(i.simplification||1):(1+i.roughness)/2),l=Cc(t,i);if(o)if(i.fillStyle==="solid")if(c.length===1){const h=Cc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(No(c,i));else a.push(nr(c,i));return s&&(n?c.forEach(h=>{a.push(Wi(h,!1,i))}):a.push(l)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const o=typeof r=="number"&&r>=0?a.data.map(s=>+s.toFixed(r)):a.data;switch(a.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const o of r){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Vt};break;case"fillPath":s={d:this.opsToPath(o),stroke:Vt,strokeWidth:0,fill:i.fill||Vt};break;case"fillSketch":s=this.fillSketch(o,i)}s&&a.push(s)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Vt,strokeWidth:i,fill:Vt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}const Gi="http://www.w3.org/2000/svg";class vf{constructor(t,r){this.svg=t,this.gen=new Bf(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(Gi,"g"),s=t.options.fixedDecimalPlaceDigits;for(const n of r){let c=null;switch(n.type){case"path":c=a.createElementNS(Gi,"path"),c.setAttribute("d",this.opsToPath(n,s)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=a.createElementNS(Gi,"path"),c.setAttribute("d",this.opsToPath(n,s)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(a,n,i)}c&&o.appendChild(c)}return o}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const o=t.createElementNS(Gi,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",a+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,o){const s=this.gen.line(t,r,i,a,o);return this.draw(s)}rectangle(t,r,i,a,o){const s=this.gen.rectangle(t,r,i,a,o);return this.draw(s)}ellipse(t,r,i,a,o){const s=this.gen.ellipse(t,r,i,a,o);return this.draw(s)}circle(t,r,i,a){const o=this.gen.circle(t,r,i,a);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,o,s,n=!1,c){const l=this.gen.arc(t,r,i,a,o,s,n,c);return this.draw(l)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}let j,Q,Xi,K;j=(e,t)=>new vf(e,t),Q=u(async(e,t,r)=>{var d,p;let i;const a=t.useHtmlLabels||Ct((d=ut())==null?void 0:d.htmlLabels);i=r||"node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=o.insert("g").attr("class","label").attr("style",$t(t.labelStyle));let n;n=t.label===void 0?"":typeof t.label=="string"?t.label:t.label[0];const c=await ue(s,Ht(ke(n),ut()),{useHtmlLabels:a,width:t.width||((p=ut().flowchart)==null?void 0:p.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let l=c.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(a){const g=c.children[0],f=dt(c),m=g.getElementsByTagName("img");if(m){const b=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(x=>{function w(){if(y.style.display="flex",y.style.flexDirection="column",b){const L=ut().fontSize?ut().fontSize:window.getComputedStyle(document.body).fontSize,v=5,[C=fa.fontSize]=_r(L),S=C*v+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";x(y)}u(w,"setupImage"),setTimeout(()=>{y.complete&&w()}),y.addEventListener("error",w),y.addEventListener("load",w)})))}l=g.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}return a?s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):s.attr("transform","translate(0, "+-l.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:o,bbox:l,halfPadding:h,label:s}},"labelHelper"),Xi=u(async(e,t,r)=>{var c,l,h,d,p,g;const i=r.useHtmlLabels||Ct((l=(c=ut())==null?void 0:c.flowchart)==null?void 0:l.htmlLabels),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await ue(a,Ht(ke(t),ut()),{useHtmlLabels:i,width:r.width||((d=(h=ut())==null?void 0:h.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=o.getBBox();const n=r.padding/2;if(Ct((g=(p=ut())==null?void 0:p.flowchart)==null?void 0:g.htmlLabels)){const f=o.children[0],m=dt(o);s=f.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return i?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:n,label:a}},"insertLabel"),U=u((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),K=u((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function nt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Me(e,t,r,i,a,o){const s=[],n=r-e,c=i-t,l=n/o,h=2*Math.PI/l,d=t+c/2;for(let p=0;p<=50;p++){const g=e+p/50*n,f=d+a*Math.sin(h*(g-e));s.push({x:g,y:f})}return s}function Qr(e,t,r,i,a,o){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}u(nt,"createPathFromPoints"),u(Me,"generateFullSineWavePoints"),u(Qr,"generateCirclePoints");var Mf=u((e,t)=>{var r,i,a=e.x,o=e.y,s=t.x-a,n=t.y-o,c=e.width/2,l=e.height/2;return Math.abs(n)*c>Math.abs(s)*l?(n<0&&(l=-l),r=n===0?0:l*s/n,i=l):(s<0&&(c=-c),r=c,i=s===0?0:c*n/s),{x:a+r,y:o+i}},"intersectRect"),sr=Mf;function vc(e,t){t&&e.attr("style",t)}async function Mc(e){const t=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ut();let a=e.label;e.label&&$e(e.label)&&(a=await hi(e.label.replace(Ee.lineBreakRegex,`
124
+ `),i));const o='<span class="'+(e.isNode?"nodeLabel":"edgeLabel")+'" '+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+a+"</span>";return r.html(Ht(o,i)),vc(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}u(vc,"applyStyle"),u(Mc,"addHtmlLabel");let Lc,Le,me,Wo,_c,Fc,Ac,$c,Ec,jo;Lc=u(async(e,t,r,i)=>{let a=e||"";if(typeof a=="object"&&(a=a[0]),Ct(ut().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"<br />"),E.info("vertexText"+a);const o={isNode:i,label:ke(a).replace(/fa[blrs]?:fa-[\w-]+/g,s=>`<i class='${s.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await Mc(o)}{const o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",t.replace("color:","fill:"));let s=[];s=typeof a=="string"?a.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(a)?a:[];for(const n of s){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),r?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=n.trim(),o.appendChild(c)}return o}},"createLabel"),Le=Lc,me=u((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Wo=u(async(e,t)=>{E.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=Y(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=Ct(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await ue(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0});let m=f.getBBox();if(Ct(r.flowchart.htmlLabels)){const S=f.children[0],P=dt(f);m=S.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-b/2,w=t.y-y/2;let L;if(E.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=j(d),P=H(t,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:a}),O=S.path(me(x,w,b,y,0),P);L=d.insert(()=>(E.debug("Rough node insert CXC",O),O),":first-child"),L.select("path:nth-child(2)").attr("style",l.join(";")),L.select("path").attr("style",h.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",b).attr("height",y);const{subGraphTitleTopMargin:v}=ci(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const S=g.select("span");S&&S.attr("style",n)}const C=L.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return sr(t,S)},{cluster:d,labelBBox:m}},"rect"),_c=u((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,o=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(n){return sr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Fc=u(async(e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:o,compositeBackground:s,compositeTitleBackground:n,nodeBorder:c}=i,l=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=l.insert("g",":first-child"),d=l.insert("g").attr("class","cluster-label");let p=l.append("rect");const g=d.node().appendChild(await Le(t.label,t.labelStyle,void 0,!0));let f=g.getBBox();if(Ct(r.flowchart.htmlLabels)){const O=g.children[0],q=dt(g);f=O.getBoundingClientRect(),q.attr("width",f.width),q.attr("height",f.height)}const m=0*t.padding,b=m/2,y=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+m;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height+m,w=t.height+m-f.height-6,L=t.x-y/2,v=t.y-x/2;t.width=y;const C=t.y-t.height/2-b+f.height+2;let S;if(t.look==="handDrawn"){const O=t.cssClasses.includes("statediagram-cluster-alt"),q=j(l),I=t.rx||t.ry?q.path(me(L,v,y,x,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:c,seed:a}):q.rectangle(L,v,y,x,{seed:a});S=l.insert(()=>I,":first-child");const F=q.rectangle(L,C,y,w,{fill:O?o:s,fillStyle:O?"hachure":"solid",stroke:c,seed:a});S=l.insert(()=>I,":first-child"),p=l.insert(()=>F)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",L).attr("y",v).attr("width",y).attr("height",x).attr("data-look",t.look),p.attr("class","inner").attr("x",L).attr("y",C).attr("width",y).attr("height",w);d.attr("transform",`translate(${t.x-f.width/2}, ${v+1-(Ct(r.flowchart.htmlLabels)?0:3)})`);const P=S.node().getBBox();return t.height=P.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(O){return sr(t,O)},{cluster:l,labelBBox:f}},"roundedWithTitle"),Ac=u(async(e,t)=>{E.info("Creating subgraph rect for ",t.id,t);const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:o,clusterBorder:s}=i,{labelStyles:n,nodeStyles:c,borderStyles:l,backgroundStyles:h}=Y(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=Ct(r.flowchart.htmlLabels),g=d.insert("g").attr("class","cluster-label "),f=await ue(g,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let m=f.getBBox();if(Ct(r.flowchart.htmlLabels)){const S=f.children[0],P=dt(f);m=S.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}const b=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,x=t.x-b/2,w=t.y-y/2;let L;if(E.trace("Data ",t,JSON.stringify(t)),t.look==="handDrawn"){const S=j(d),P=H(t,{roughness:.7,fill:o,stroke:s,fillWeight:4,seed:a}),O=S.path(me(x,w,b,y,t.rx),P);L=d.insert(()=>(E.debug("Rough node insert CXC",O),O),":first-child"),L.select("path:nth-child(2)").attr("style",l.join(";")),L.select("path").attr("style",h.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",b).attr("height",y);const{subGraphTitleTopMargin:v}=ci(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+v})`),n){const S=g.select("span");S&&S.attr("style",n)}const C=L.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return sr(t,S)},{cluster:d,labelBBox:m}},"kanbanSection"),$c=u((e,t)=>{const r=ut(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:o}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=s.insert("g",":first-child"),c=0*t.padding,l=t.width+c;t.diff=-t.padding;const h=t.height+c,d=t.x-l/2,p=t.y-h/2;let g;if(t.width=l,t.look==="handDrawn"){const m=j(s).rectangle(d,p,l,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});g=s.insert(()=>m,":first-child")}else g=n.insert("rect",":first-child"),g.attr("class","divider").attr("x",d).attr("y",p).attr("width",l).attr("height",h).attr("data-look",t.look);const f=g.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return sr(t,m)},{cluster:s,labelBBox:{}}},"divider"),Ec={rect:Wo,squareRect:Wo,roundedWithTitle:Fc,noteGroup:_c,divider:$c,kanbanSection:Ac},jo=new Map,Dn=u(async(e,t)=>{const r=t.shape||"rect",i=await Ec[r](e,t);return jo.set(t.id,i),i},"insertCluster"),Vp=u(()=>{jo=new Map},"clear");function Dc(e,t){return e.intersect(t)}u(Dc,"intersectNode");var Lf=Dc;function Oc(e,t,r,i){var a=e.x,o=e.y,s=a-i.x,n=o-i.y,c=Math.sqrt(t*t*n*n+r*r*s*s),l=Math.abs(t*r*s/c);i.x<a&&(l=-l);var h=Math.abs(t*r*n/c);return i.y<o&&(h=-h),{x:a+l,y:o+h}}u(Oc,"intersectEllipse");var Ic=Oc;function Pc(e,t,r){return Ic(e,t,t,r)}u(Pc,"intersectCircle");var _f=Pc;function Nc(e,t,r,i){{const a=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,n=a*r.x+o*r.y+s,c=a*i.x+o*i.y+s,l=1e-6;if(n!==0&&c!==0&&Ho(n,c))return;const h=i.y-r.y,d=r.x-i.x,p=i.x*r.y-r.x*i.y,g=h*e.x+d*e.y+p,f=h*t.x+d*t.y+p;if(Math.abs(g)<l&&Math.abs(f)<l&&Ho(g,f))return;const m=a*d-h*o;if(m===0)return;const b=Math.abs(m/2);let y=o*p-d*s;const x=y<0?(y-b)/m:(y+b)/m;return y=h*s-a*p,{x,y:y<0?(y-b)/m:(y+b)/m}}}function Ho(e,t){return e*t>0}u(Nc,"intersectLine"),u(Ho,"sameSign");var Ff=Nc;function qc(e,t,r){let i=e.x,a=e.y,o=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),n=Math.min(n,h.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));let c=i-e.width/2-s,l=a-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],p=t[h<t.length-1?h+1:0],g=Ff(e,r,{x:c+d.x,y:l+d.y},{x:c+p.x,y:l+p.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(h,d){let p=h.x-r.x,g=h.y-r.y,f=Math.sqrt(p*p+g*g),m=d.x-r.x,b=d.y-r.y,y=Math.sqrt(m*m+b*b);return f<y?-1:f===y?0:1}),o[0]):e}u(qc,"intersectPolygon");var z={node:Lf,circle:_f,ellipse:Ic,polygon:qc,rect:sr};function Rc(e,t){const{labelStyles:r}=Y(t);t.labelStyle=r;const i=K(t);let a=i;i||(a="anchor");const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),{cssStyles:s}=t,n=j(o),c=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=n.circle(0,0,2,c),h=o.insert(()=>l,":first-child");return h.attr("class","anchor").attr("style",$t(s)),U(t,h),t.intersect=function(d){return E.info("Circle intersect",t,1,d),z.circle(t,1,d)},o}function Yo(e,t,r,i,a,o,s){const n=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),h=(r-e)/2/a,d=(i-t)/2/o,p=Math.sqrt(h**2+d**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-p**2),f=n+g*o*Math.sin(l)*(s?-1:1),m=c-g*a*Math.cos(l)*(s?-1:1),b=Math.atan2((t-m)/o,(e-f)/a);let y=Math.atan2((i-m)/o,(r-f)/a)-b;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const x=[];for(let w=0;w<20;w++){const L=b+w/19*y,v=f+a*Math.cos(L),C=m+o*Math.sin(L);x.push({x:v,y:C})}return x}async function zc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.width+t.padding+20,n=o.height+t.padding,c=n/2,l=c/(2.5+n/50),{cssStyles:h}=t,d=[{x:s/2,y:-n/2},{x:-s/2,y:-n/2},...Yo(-s/2,-n/2,-s/2,n/2,l,c,!1),{x:s/2,y:n/2},...Yo(s/2,n/2,s/2,-n/2,l,c,!0)],p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=nt(d),m=p.path(f,g),b=a.insert(()=>m,":first-child");return b.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${l/2}, 0)`),U(t,b),t.intersect=function(y){return z.polygon(t,d,y)},a}function _e(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function Wc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.height+t.padding,n=o.width+t.padding+12,c=-s,l=[{x:12,y:c},{x:n,y:c},{x:n,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j(a),g=H(t,{}),f=nt(l),m=p.path(f,g);h=a.insert(()=>m,":first-child").attr("transform",`translate(${-n/2}, ${s/2})`),d&&h.attr("style",d)}else h=_e(a,n,s,l);return i&&h.attr("style",i),U(t,h),t.intersect=function(p){return z.polygon(t,l,p)},a}function jc(e,t){const{nodeStyles:r}=Y(t);t.label="";const i=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=j(i),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=nt(s),h=n.path(l,c),d=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return z.polygon(t,s,p)},i}async function Uo(e,t,r){const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i;const{shapeSvg:o,bbox:s,halfPadding:n}=await Q(e,t,K(t)),c=(r==null?void 0:r.padding)??n,l=s.width/2+c;let h;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=j(o),g=H(t,{}),f=p.circle(0,0,2*l,g);h=o.insert(()=>f,":first-child"),h.attr("class","basic label-container").attr("style",$t(d))}else h=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",l).attr("cx",0).attr("cy",0);return U(t,h),t.calcIntersect=function(p,g){const f=p.width/2;return z.circle(p,f,g)},t.intersect=function(p){return E.info("Circle intersect",t,l,p),z.circle(t,l,p)},o}function Hc(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*e;return`M ${-i/2*t},${i/2*r} L ${i/2*t},${-i/2*r}
125
+ M ${i/2*t},${i/2*r} L ${-i/2*t},${-i/2*r}`}function Yc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:s}=t,n=j(a),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=n.circle(0,0,2*o,c),h=Hc(o),d=n.path(h,c),p=a.insert(()=>l,":first-child");return p.insert(()=>d),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),U(t,p),t.intersect=function(g){return E.info("crossedCircle intersect",t,{radius:o,point:g}),z.circle(t,o,g)},a}function ye(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}async function Uc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...ye(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},...ye(n/2+2*l,-l,l,20,-180,-270),...ye(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},...ye(n/2,c/2,l,20,0,90)],p=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},...ye(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},...ye(n/2+.1*n,-l,l,20,-180,-270),...ye(n/2+.1*n,l,l,20,-90,-180),{x:-n/2-l,y:c/2},...ye(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2,y:c/2+l}],g=j(a),f=H(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=nt(d).replace("Z",""),b=g.path(m,f),y=nt(p),x=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>x,":first-child").attr("stroke-opacity",0),w.insert(()=>b,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${l}, 0)`),s.attr("transform",`translate(${-n/2+l-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(L){return z.polygon(t,p,L)},a}function be(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:d,y:p})}return s}async function Vc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[...be(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...be(n/2+2*l,-l,l,20,-180,-270),...be(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:c/2},...be(n/2,c/2,l,20,0,90)],p=[{x:-n/2,y:-c/2-l},{x:n/2,y:-c/2-l},...be(n/2,-c/2,l,20,-90,0),{x:n/2+l,y:-l},...be(n/2+2*l,-l,l,20,-180,-270),...be(n/2+2*l,l,l,20,-90,-180),{x:n/2+l,y:c/2},...be(n/2,c/2,l,20,0,90),{x:n/2,y:c/2+l},{x:-n/2,y:c/2+l}],g=j(a),f=H(t,{fill:"none"});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=nt(d).replace("Z",""),b=g.path(m,f),y=nt(p),x=g.path(y,{...f}),w=a.insert("g",":first-child");return w.insert(()=>x,":first-child").attr("stroke-opacity",0),w.insert(()=>b,":first-child"),w.attr("class","text"),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-l}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(L){return z.polygon(t,p,L)},a}function _t(e,t,r,i=100,a=0,o=180){const s=[],n=a*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let l=0;l<i;l++){const h=n+l*c,d=e+r*Math.cos(h),p=t+r*Math.sin(h);s.push({x:-d,y:-p})}return s}async function Gc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=o.height+(t.padding??0),l=Math.max(5,.1*c),{cssStyles:h}=t,d=[..._t(n/2,-c/2,l,30,-90,0),{x:-n/2-l,y:l},..._t(n/2+2*l,-l,l,20,-180,-270),..._t(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:-c/2},..._t(n/2,c/2,l,20,0,90)],p=[..._t(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},..._t(-n/2-l/2,-l,l,20,0,90),..._t(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},..._t(-n/2+l+l/2,c/2,l,30,-180,-270)],g=[{x:n/2,y:-c/2-l},{x:-n/2,y:-c/2-l},..._t(n/2,-c/2,l,20,-90,0),{x:-n/2-l,y:-l},..._t(n/2+2*l,-l,l,20,-180,-270),..._t(n/2+2*l,l,l,20,-90,-180),{x:-n/2-l,y:c/2},..._t(n/2,c/2,l,20,0,90),{x:-n/2,y:c/2+l},{x:n/2-l-l/2,y:c/2+l},..._t(-n/2+l+l/2,-c/2,l,20,-90,-180),{x:n/2-l/2,y:l},..._t(-n/2-l/2,-l,l,20,0,90),..._t(-n/2-l/2,l,l,20,-90,0),{x:n/2-l/2,y:-l},..._t(-n/2+l+l/2,c/2,l,30,-180,-270)],f=j(a),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=nt(d).replace("Z",""),y=f.path(b,m),x=nt(p).replace("Z",""),w=f.path(x,m),L=nt(g),v=f.path(L,{...m}),C=a.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>y,":first-child"),C.insert(()=>w,":first-child"),C.attr("class","text"),h&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${l-l/4}, 0)`),s.attr("transform",`translate(${-n/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,C),t.intersect=function(S){return z.polygon(t,g,S)},a}async function Xc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(80,1.25*(o.width+2*(t.padding??0)),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=n/2,{cssStyles:l}=t,h=j(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=s-c,g=n/4,f=[{x:p,y:0},{x:g,y:0},{x:0,y:n/2},{x:g,y:n},{x:p,y:n},...Qr(-p,-n/2,c,50,270,90)],m=nt(f),b=h.path(m,d),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(${-s/2}, ${-n/2})`),U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}u(Rc,"anchor"),u(Yo,"generateArcPoints"),u(zc,"bowTieRect"),u(_e,"insertPolygonShape"),u(Wc,"card"),u(jc,"choice"),u(Uo,"circle"),u(Hc,"createLine"),u(Yc,"crossedCircle"),u(ye,"generateCirclePoints"),u(Uc,"curlyBraceLeft"),u(be,"generateCirclePoints"),u(Vc,"curlyBraceRight"),u(_t,"generateCirclePoints"),u(Gc,"curlyBraces"),u(Xc,"curvedTrapezoid");var Af=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),$f=u((e,t,r,i,a,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),Ef=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Zc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+t.padding,t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(o.height+l+t.padding,t.height??0);let d;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=j(a),f=$f(0,0,n,h,c,l),m=Ef(0,l,n,h,c,l),b=g.path(f,H(t,{})),y=g.path(m,H(t,{fill:"none"}));d=a.insert(()=>y,":first-child"),d=a.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const g=Af(0,0,n,h,c,l);d=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",$t(p)).attr("style",i)}return d.attr("label-offset-y",l),d.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),U(t,d),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(t.padding??0)/1.5-(o.y-(o.top??0))})`),t.intersect=function(g){const f=z.rect(t,g),m=f.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(f.y-(t.y??0))>(t.height??0)/2-l)){let b=l*l*(1-m*m/(c*c));b>0&&(b=Math.sqrt(b)),b=l-b,g.y-(t.y??0)>0&&(b=-b),f.y+=b}return f},a}async function Kc(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+t.padding,c=o.height+t.padding,l=.2*c,h=-n/2,d=-c/2-l/2,{cssStyles:p}=t,g=j(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:h,y:d+l},{x:-h,y:d+l},{x:-h,y:-d},{x:h,y:-d},{x:h,y:d},{x:-h,y:d},{x:-h,y:d+l}],b=g.polygon(m.map(x=>[x.x,x.y]),f),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+l+(t.padding??0)/2-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.rect(t,x)},a}async function Qc(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s}=await Q(e,t,K(t)),n=o.width/2+s+5,c=o.width/2+s;let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const g=j(a),f=H(t,{roughness:.2,strokeWidth:2.5}),m=H(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,2*n,f),y=g.circle(0,0,2*c,m);l=a.insert("g",":first-child"),l.attr("class",$t(t.cssClasses)).attr("style",$t(h)),(d=l.node())==null||d.appendChild(b),(p=l.node())==null||p.appendChild(y)}else{l=a.insert("g",":first-child");const g=l.insert("circle",":first-child"),f=l.insert("circle");l.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",n).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return U(t,l),t.intersect=function(g){return E.info("DoubleCircle intersect",t,n,g),z.circle(t,n,g)},a}function Jc(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Y(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,n=j(o),{nodeBorder:c}=r,l=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const h=n.circle(0,0,14,l),d=o.insert(()=>h,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),U(t,d),t.intersect=function(p){return E.info("filledCircle intersect",t,{radius:7,point:p}),z.circle(t,7,p)},o}async function td(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=o.width+(t.padding??0),c=n+o.height,l=n+o.height,h=[{x:0,y:-c},{x:l,y:-c},{x:l/2,y:0}],{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=nt(h),m=p.path(f,g),b=a.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=n,t.height=c,U(t,b),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-c/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(y){return E.info("Triangle intersect",t,h,y),z.polygon(t,h,y)},a}function ed(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=Y(t);t.label="";const s=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),l=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(c=Math.max(10,(t==null?void 0:t.width)??0),l=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*c/2,d=-1*l/2,p=j(s),g=H(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(h,d,c,l,g),m=s.insert(()=>f,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),U(t,m);const b=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(y){return z.rect(t,y)},s}async function rd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(80,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(50,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=n/2,{cssStyles:l}=t,h=j(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-s/2,y:-n/2},{x:s/2-c,y:-n/2},...Qr(-s/2+c,0,c,50,90,270),{x:s/2-c,y:n/2},{x:-s/2,y:n/2}],g=nt(p),f=h.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),U(t,m),t.intersect=function(b){return E.info("Pill intersect",t,{radius:c,point:b}),z.polygon(t,p,b)},a}async function id(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.height+(t.padding??0),n=o.width+2.5*(t.padding??0),{cssStyles:c}=t,l=j(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let d=n/2;d+=d/6;const p=s/2,g=d-p/2,f=[{x:-g,y:-p},{x:0,y:-p},{x:g,y:-p},{x:d,y:0},{x:g,y:p},{x:0,y:p},{x:-g,y:p},{x:-d,y:0}],m=nt(f),b=l.path(m,h),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=n,t.height=s,U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}async function ad(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await Q(e,t,K(t)),o=Math.max(30,(t==null?void 0:t.width)??0),s=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,c=j(a),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],d=nt(h),p=c.path(d,l),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-o/2}, ${-s/2})`),U(t,g),t.intersect=function(f){return E.info("Pill intersect",t,{points:h}),z.polygon(t,h,f)},a}async function od(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:d}=await Q(e,t,"icon-shape default"),p=t.pos==="t",g=n,f=n,{nodeBorder:m}=r,{stylesMap:b}=je(t),y=-f/2,x=-g/2,w=t.label?8:0,L=j(l),v=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const C=L.rectangle(y,x,f,g,v),S=Math.max(f,h.width),P=g+h.height+w,O=L.rectangle(-S/2,-P/2,S,P,{...v,fill:"transparent",stroke:"none"}),q=l.insert(()=>C,":first-child"),I=l.insert(()=>O);if(t.icon){const F=l.append("g");F.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const T=F.node().getBBox(),M=T.width,A=T.height,_=T.x,$=T.y;F.attr("transform",`translate(${-M/2-_},${p?h.height/2+w/2-A/2-$:-h.height/2-w/2-A/2-$})`),F.attr("style",`color: ${b.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-P/2:P/2-h.height})`),q.attr("transform",`translate(0,${p?h.height/2+w/2:-h.height/2-w/2})`),U(t,I),t.intersect=function(F){if(E.info("iconSquare intersect",t,F),!t.label)return z.rect(t,F);const T=t.x??0,M=t.y??0,A=t.height??0;let _=[];return _=p?[{x:T-h.width/2,y:M-A/2},{x:T+h.width/2,y:M-A/2},{x:T+h.width/2,y:M-A/2+h.height+w},{x:T+f/2,y:M-A/2+h.height+w},{x:T+f/2,y:M+A/2},{x:T-f/2,y:M+A/2},{x:T-f/2,y:M-A/2+h.height+w},{x:T-h.width/2,y:M-A/2+h.height+w}]:[{x:T-f/2,y:M-A/2},{x:T+f/2,y:M-A/2},{x:T+f/2,y:M-A/2+g},{x:T+h.width/2,y:M-A/2+g},{x:T+h.width/2/2,y:M+A/2},{x:T-h.width/2,y:M+A/2},{x:T-h.width/2,y:M-A/2+g},{x:T-f/2,y:M-A/2+g}],z.polygon(t,_,F)},l}async function nd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,label:d}=await Q(e,t,"icon-shape default"),p=t.label?8:0,g=t.pos==="t",{nodeBorder:f,mainBkg:m}=r,{stylesMap:b}=je(t),y=j(l),x=H(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=b.get("fill");x.stroke=w??m;const L=l.append("g");t.icon&&L.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=L.node().getBBox(),C=v.width,S=v.height,P=v.x,O=v.y,q=Math.max(C,S)*Math.SQRT2+40,I=y.circle(0,0,q,x),F=Math.max(q,h.width),T=q+h.height+p,M=y.rectangle(-F/2,-T/2,F,T,{...x,fill:"transparent",stroke:"none"}),A=l.insert(()=>I,":first-child"),_=l.insert(()=>M);return L.attr("transform",`translate(${-C/2-P},${g?h.height/2+p/2-S/2-O:-h.height/2-p/2-S/2-O})`),L.attr("style",`color: ${b.get("stroke")??f};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-T/2:T/2-h.height})`),A.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),U(t,_),t.intersect=function($){return E.info("iconSquare intersect",t,$),z.rect(t,$)},l}async function sd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:p}=await Q(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:b,mainBkg:y}=r,{stylesMap:x}=je(t),w=-m/2,L=-f/2,v=t.label?8:0,C=j(l),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const P=x.get("fill");S.stroke=P??y;const O=C.path(me(w,L,m,f,5),S),q=Math.max(m,h.width),I=f+h.height+v,F=C.rectangle(-q/2,-I/2,q,I,{...S,fill:"transparent",stroke:"none"}),T=l.insert(()=>O,":first-child").attr("class","icon-shape2"),M=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),$=_.width,D=_.height,tt=_.x,it=_.y;A.attr("transform",`translate(${-$/2-tt},${g?h.height/2+v/2-D/2-it:-h.height/2-v/2-D/2-it})`),A.attr("style",`color: ${x.get("stroke")??b};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+v/2:-h.height/2-v/2})`),U(t,M),t.intersect=function(A){if(E.info("iconSquare intersect",t,A),!t.label)return z.rect(t,A);const _=t.x??0,$=t.y??0,D=t.height??0;let tt=[];return tt=g?[{x:_-h.width/2,y:$-D/2},{x:_+h.width/2,y:$-D/2},{x:_+h.width/2,y:$-D/2+h.height+v},{x:_+m/2,y:$-D/2+h.height+v},{x:_+m/2,y:$+D/2},{x:_-m/2,y:$+D/2},{x:_-m/2,y:$-D/2+h.height+v},{x:_-h.width/2,y:$-D/2+h.height+v}]:[{x:_-m/2,y:$-D/2},{x:_+m/2,y:$-D/2},{x:_+m/2,y:$-D/2+f},{x:_+h.width/2,y:$-D/2+f},{x:_+h.width/2/2,y:$+D/2},{x:_-h.width/2,y:$+D/2},{x:_-h.width/2,y:$-D/2+f},{x:_-m/2,y:$-D/2+f}],z.polygon(t,tt,A)},l}async function ld(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=Y(t);t.labelStyle=a;const o=t.assetHeight??48,s=t.assetWidth??48,n=Math.max(o,s),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,c??0);const{shapeSvg:l,bbox:h,halfPadding:d,label:p}=await Q(e,t,"icon-shape default"),g=t.pos==="t",f=n+2*d,m=n+2*d,{nodeBorder:b,mainBkg:y}=r,{stylesMap:x}=je(t),w=-m/2,L=-f/2,v=t.label?8:0,C=j(l),S=H(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const P=x.get("fill");S.stroke=P??y;const O=C.path(me(w,L,m,f,.1),S),q=Math.max(m,h.width),I=f+h.height+v,F=C.rectangle(-q/2,-I/2,q,I,{...S,fill:"transparent",stroke:"none"}),T=l.insert(()=>O,":first-child"),M=l.insert(()=>F);if(t.icon){const A=l.append("g");A.html(`<g>${await Ze(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=A.node().getBBox(),$=_.width,D=_.height,tt=_.x,it=_.y;A.attr("transform",`translate(${-$/2-tt},${g?h.height/2+v/2-D/2-it:-h.height/2-v/2-D/2-it})`),A.attr("style",`color: ${x.get("stroke")??b};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+v/2:-h.height/2-v/2})`),U(t,M),t.intersect=function(A){if(E.info("iconSquare intersect",t,A),!t.label)return z.rect(t,A);const _=t.x??0,$=t.y??0,D=t.height??0;let tt=[];return tt=g?[{x:_-h.width/2,y:$-D/2},{x:_+h.width/2,y:$-D/2},{x:_+h.width/2,y:$-D/2+h.height+v},{x:_+m/2,y:$-D/2+h.height+v},{x:_+m/2,y:$+D/2},{x:_-m/2,y:$+D/2},{x:_-m/2,y:$-D/2+h.height+v},{x:_-h.width/2,y:$-D/2+h.height+v}]:[{x:_-m/2,y:$-D/2},{x:_+m/2,y:$-D/2},{x:_+m/2,y:$-D/2+f},{x:_+h.width/2,y:$-D/2+f},{x:_+h.width/2/2,y:$+D/2},{x:_-h.width/2,y:$+D/2},{x:_-h.width/2,y:$-D/2+f},{x:_-m/2,y:$-D/2+f}],z.polygon(t,tt,A)},l}async function hd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/o;const{labelStyles:s}=Y(t);t.labelStyle=s;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??a),l=t.constraint==="on"&&(t!=null&&t.assetHeight)?t.assetHeight*t.imageAspectRatio:c,h=t.constraint==="on"?l/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(l,n??0);const{shapeSvg:d,bbox:p,label:g}=await Q(e,t,"image-shape default"),f=t.pos==="t",m=-l/2,b=-h/2,y=t.label?8:0,x=j(d),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=x.rectangle(m,b,l,h,w),v=Math.max(l,p.width),C=h+p.height+y,S=x.rectangle(-v/2,-C/2,v,C,{...w,fill:"none",stroke:"none"}),P=d.insert(()=>L,":first-child"),O=d.insert(()=>S);if(t.img){const q=d.append("image");q.attr("href",t.img),q.attr("width",l),q.attr("height",h),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-l/2},${f?C/2-h:-C/2})`)}return g.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${f?-h/2-p.height/2-y/2:h/2-p.height/2+y/2})`),P.attr("transform",`translate(0,${f?p.height/2+y/2:-p.height/2-y/2})`),U(t,O),t.intersect=function(q){if(E.info("iconSquare intersect",t,q),!t.label)return z.rect(t,q);const I=t.x??0,F=t.y??0,T=t.height??0;let M=[];return M=f?[{x:I-p.width/2,y:F-T/2},{x:I+p.width/2,y:F-T/2},{x:I+p.width/2,y:F-T/2+p.height+y},{x:I+l/2,y:F-T/2+p.height+y},{x:I+l/2,y:F+T/2},{x:I-l/2,y:F+T/2},{x:I-l/2,y:F-T/2+p.height+y},{x:I-p.width/2,y:F-T/2+p.height+y}]:[{x:I-l/2,y:F-T/2},{x:I+l/2,y:F-T/2},{x:I+l/2,y:F-T/2+h},{x:I+p.width/2,y:F-T/2+h},{x:I+p.width/2/2,y:F+T/2},{x:I-p.width/2,y:F+T/2},{x:I-p.width/2,y:F-T/2+h},{x:I-l/2,y:F-T/2+h}],z.polygon(t,M,q)},d}async function cd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}async function Zi(e,t,r){const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i;const{shapeSvg:o,bbox:s}=await Q(e,t,K(t)),n=Math.max(s.width+2*r.labelPaddingX,(t==null?void 0:t.width)||0),c=Math.max(s.height+2*r.labelPaddingY,(t==null?void 0:t.height)||0),l=-n/2,h=-c/2;let d,{rx:p,ry:g}=t;const{cssStyles:f}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,g=r.ry),t.look==="handDrawn"){const m=j(o),b=H(t,{}),y=p||g?m.path(me(l,h,n,c,p||0),b):m.rectangle(l,h,n,c,b);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",$t(f))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",a).attr("rx",$t(p)).attr("ry",$t(g)).attr("x",l).attr("y",h).attr("width",n).attr("height",c);return U(t,d),t.calcIntersect=function(m,b){return z.rect(m,b)},t.intersect=function(m){return z.rect(t,m)},o}async function dd(e,t){const{shapeSvg:r,bbox:i,label:a}=await Q(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),U(t,o),t.intersect=function(s){return z.rect(t,s)},r}async function ud(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:0,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:-3*n/6,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}async function pd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0),c=[{x:-3*n/6,y:0},{x:s,y:0},{x:s+3*n/6,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}function gd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",K(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),c=[{x:s,y:0},{x:0,y:n+3.5},{x:s-14,y:n+3.5},{x:0,y:2*n},{x:s,y:n-3.5},{x:14,y:n-3.5}],l=j(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=nt(c),p=l.path(d,h),g=a.insert(()=>p,":first-child");return o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-n})`),U(t,g),t.intersect=function(f){return E.info("lightningBolt intersect",t,f),z.polygon(t,c,f)},a}u(Zc,"cylinder"),u(Kc,"dividedRectangle"),u(Qc,"doublecircle"),u(Jc,"filledCircle"),u(td,"flippedTriangle"),u(ed,"forkJoin"),u(rd,"halfRoundedRectangle"),u(id,"hexagon"),u(ad,"hourglass"),u(od,"icon"),u(nd,"iconCircle"),u(sd,"iconRounded"),u(ld,"iconSquare"),u(hd,"imageSquare"),u(cd,"inv_trapezoid"),u(Zi,"drawRect"),u(dd,"labelRect"),u(ud,"lean_left"),u(pd,"lean_right"),u(gd,"lightningBolt");var Df=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Of=u((e,t,r,i,a,o,s)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${a},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${e},${t+o+s}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),If=u((e,t,r,i,a,o)=>[`M${e-r/2},${-i/2}`,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function fd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+(t.padding??0),t.width??0),c=n/2,l=c/(2.5+n/50),h=Math.max(o.height+l+(t.padding??0),t.height??0),d=.1*h;let p;const{cssStyles:g}=t;if(t.look==="handDrawn"){const f=j(a),m=Of(0,0,n,h,c,l,d),b=If(0,l,n,h,c,l),y=H(t,{}),x=f.path(m,y),w=f.path(b,y);a.insert(()=>w,":first-child").attr("class","line"),p=a.insert(()=>x,":first-child"),p.attr("class","basic label-container"),g&&p.attr("style",g)}else{const f=Df(0,0,n,h,c,l,d);p=a.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",$t(g)).attr("style",i)}return p.attr("label-offset-y",l),p.attr("transform",`translate(${-n/2}, ${-(h/2+l)})`),U(t,p),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+l-(o.y-(o.top??0))})`),t.intersect=function(f){const m=z.rect(t,f),b=m.x-(t.x??0);if(c!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-l)){let y=l*l*(1-b*b/(c*c));y>0&&(y=Math.sqrt(y)),y=l-y,f.y-(t.y??0)>0&&(y=-y),m.y+=y}return m},a}async function md(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...Me(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,l,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=p.polygon(f.map(y=>[y.x,y.y]),g),b=a.insert(()=>m,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(y){return z.polygon(t,f,y)},a}async function yd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=H(t,{}),f=[{x:l-5,y:h+5},{x:l-5,y:h+c+5},{x:l+n-5,y:h+c+5},{x:l+n-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h+c-5},{x:l+n+5,y:h+c-5},{x:l+n+5,y:h-5},{x:l+5,y:h-5},{x:l+5,y:h},{x:l,y:h},{x:l,y:h+5}],m=[{x:l,y:h+5},{x:l+n-5,y:h+5},{x:l+n-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h},{x:l,y:h}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=nt(f),y=p.path(b,g),x=nt(m),w=p.path(x,{...g,fill:"none"}),L=a.insert(()=>w,":first-child");return L.insert(()=>y,":first-child"),L.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),U(t,L),t.intersect=function(v){return z.polygon(t,f,v)},a}async function bd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=c+l,d=-n/2,p=-h/2,{cssStyles:g}=t,f=Me(d-5,p+h+5,d+n-5,p+h+5,l,.8),m=f==null?void 0:f[f.length-1],b=[{x:d-5,y:p+5},{x:d-5,y:p+h+5},...f,{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:m.y-10},{x:d+n+5,y:m.y-10},{x:d+n+5,y:p-5},{x:d+5,y:p-5},{x:d+5,y:p},{x:d,y:p},{x:d,y:p+5}],y=[{x:d,y:p+5},{x:d+n-5,y:p+5},{x:d+n-5,y:m.y-5},{x:d+n,y:m.y-5},{x:d+n,y:p},{x:d,y:p}],x=j(a),w=H(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=nt(b),v=x.path(L,w),C=nt(y),S=x.path(C,w),P=a.insert(()=>v,":first-child");return P.insert(()=>S),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-l/2-(o.y-(o.top??0))})`),U(t,P),t.intersect=function(O){return z.polygon(t,b,O)},a}async function xd(e,t,{config:{themeVariables:r}}){var y;const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i,t.useHtmlLabels||((y=Lt().flowchart)==null?void 0:y.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s,label:n}=await Q(e,t,K(t)),c=Math.max(s.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(s.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-c/2,d=-l/2,{cssStyles:p}=t,g=j(o),f=H(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=g.rectangle(h,d,c,l,f),b=o.insert(()=>m,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),a&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",a),n.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),U(t,b),t.intersect=function(x){return z.rect(t,x)},o}u(fd,"linedCylinder"),u(md,"linedWaveEdgedRect"),u(yd,"multiRect"),u(bd,"multiWaveEdgedRectangle"),u(xd,"note");var Pf=u((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.width+t.padding+(o.height+t.padding),n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:l}=t;if(t.look==="handDrawn"){const h=j(a),d=H(t,{}),p=Pf(0,0,s),g=h.path(p,d);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),l&&c.attr("style",l)}else c=_e(a,s,s,n),c.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&c.attr("style",i),U(t,c),t.calcIntersect=function(h,d){const p=h.width,g=[{x:p/2,y:0},{x:p,y:-p/2},{x:p/2,y:-p},{x:0,y:-p/2}],f=z.polygon(h,g,d);return{x:f.x-.5,y:f.y-.5}},t.intersect=function(h){return this.calcIntersect(t,h)},a}async function kd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=-Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)??0)/2,c=-Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)??0)/2,l=c/2,h=[{x:n+l,y:c},{x:n,y:0},{x:n+l,y:-c},{x:-n,y:-c},{x:-n,y:c}],{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=nt(h),m=p.path(f,g),b=a.insert(()=>m,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-l/2},0)`),s.attr("transform",`translate(${-l/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),U(t,b),t.intersect=function(y){return z.polygon(t,h,y)},a}async function wd(e,t){var P,O;const{labelStyles:r,nodeStyles:i}=Y(t);let a;t.labelStyle=r,a=t.cssClasses?"node "+t.cssClasses:"node default";const o=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),c=t.description,l=t.label,h=n.node().appendChild(await Le(l,t.labelStyle,!0,!0));let d={width:0,height:0};if(Ct((O=(P=ut())==null?void 0:P.flowchart)==null?void 0:O.htmlLabels)){const q=h.children[0],I=dt(h);d=q.getBoundingClientRect(),I.attr("width",d.width),I.attr("height",d.height)}E.info("Text 2",c);const p=c||[],g=h.getBBox(),f=n.node().appendChild(await Le(p.join?p.join("<br/>"):p,t.labelStyle,!0,!0)),m=f.children[0],b=dt(f);d=m.getBoundingClientRect(),b.attr("width",d.width),b.attr("height",d.height);const y=(t.padding||0)/2;dt(f).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),dt(h).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")");const x=d.width+(t.padding||0),w=d.height+(t.padding||0),L=-d.width/2-y,v=-d.height/2-y;let C,S;if(t.look==="handDrawn"){const q=j(o),I=H(t,{}),F=q.path(me(L,v,x,w,t.rx||0),I),T=q.line(-d.width/2-y,-d.height/2-y+g.height+y,d.width/2+y,-d.height/2-y+g.height+y,I);S=o.insert(()=>(E.debug("Rough node insert CXC",F),T),":first-child"),C=o.insert(()=>(E.debug("Rough node insert CXC",F),F),":first-child")}else C=s.insert("rect",":first-child"),S=s.insert("line"),C.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),S.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y);return U(t,C),t.intersect=function(q){return z.rect(t,q)},o}function Jr(e,t,r,i,a,o,s){const n=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),h=(r-e)/2/a,d=(i-t)/2/o,p=Math.sqrt(h**2+d**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const g=Math.sqrt(1-p**2),f=n+g*o*Math.sin(l)*(s?-1:1),m=c-g*a*Math.cos(l)*(s?-1:1),b=Math.atan2((t-m)/o,(e-f)/a);let y=Math.atan2((i-m)/o,(r-f)/a)-b;s&&y<0&&(y+=2*Math.PI),!s&&y>0&&(y-=2*Math.PI);const x=[];for(let w=0;w<20;w++){const L=b+w/19*y,v=f+a*Math.cos(L),C=m+o*Math.sin(L);x.push({x:v,y:C})}return x}async function Sd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=(t==null?void 0:t.padding)??0,n=(t==null?void 0:t.padding)??0,c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+2*s,l=(t!=null&&t.height?t==null?void 0:t.height:o.height)+2*n,h=t.radius||5,d=t.taper||5,{cssStyles:p}=t,g=j(a),f=H(t,{});t.stroke&&(f.stroke=t.stroke),t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:-c/2+d,y:-l/2},{x:c/2-d,y:-l/2},...Jr(c/2-d,-l/2,c/2,-l/2+d,h,h,!0),{x:c/2,y:-l/2+d},{x:c/2,y:l/2-d},...Jr(c/2,l/2-d,c/2-d,l/2,h,h,!0),{x:c/2-d,y:l/2},{x:-c/2+d,y:l/2},...Jr(-c/2+d,l/2,-c/2,l/2-d,h,h,!0),{x:-c/2,y:l/2-d},{x:-c/2,y:-l/2+d},...Jr(-c/2,-l/2+d,-c/2+d,-l/2,h,h,!0)],b=nt(m),y=g.path(b,f),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),U(t,x),t.intersect=function(w){return z.polygon(t,m,w)},a}async function Td(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=(t==null?void 0:t.padding)??0,c=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),h=-o.width/2-n,d=-o.height/2-n,{cssStyles:p}=t,g=j(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=[{x:h,y:d},{x:h+c+8,y:d},{x:h+c+8,y:d+l},{x:h-8,y:d+l},{x:h-8,y:d},{x:h,y:d},{x:h,y:d+l}],b=g.polygon(m.map(x=>[x.x,x.y]),f),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container").attr("style",$t(p)),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),p&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-c/2+4+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.rect(t,x)},a}async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const f=[{x:l,y:h},{x:l,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-c/2}],m=nt(f),b=p.path(m,g),y=a.insert(()=>b,":first-child");return y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),y.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))}, ${-c/4+(t.padding??0)-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}async function vd(e,t){return Zi(e,t,{rx:0,ry:0,labelPaddingX:t.labelPaddingX??2*((t==null?void 0:t.padding)||0),labelPaddingY:1*((t==null?void 0:t.padding)||0)})}async function Md(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.height+t.padding,n=o.width+s/4+t.padding,c=s/2,{cssStyles:l}=t,h=j(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-n/2+c,y:-s/2},{x:n/2-c,y:-s/2},...Qr(-n/2+c,0,c,50,90,270),{x:n/2-c,y:s/2},...Qr(n/2-c,0,c,50,270,450)],g=nt(p),f=h.path(g,d),m=a.insert(()=>f,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),U(t,m),t.intersect=function(b){return z.polygon(t,p,b)},a}async function Ld(e,t){return Zi(e,t,{rx:5,ry:5})}function _d(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:s,stateBorder:n,nodeBorder:c}=r,l=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j(l),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=h.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),g=n??c,f=h.circle(0,0,5,{...d,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=l.insert(()=>p,":first-child");return m.insert(()=>f),o&&m.selectAll("path").attr("style",o),a&&m.selectAll("path").attr("style",a),U(t,m),t.intersect=function(b){return z.circle(t,7,b)},l}function Fd(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const s=j(a).circle(0,0,14,$h(i));o=a.insert(()=>s),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return U(t,o),t.intersect=function(s){return z.circle(t,7,s)},a}async function Ad(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=((t==null?void 0:t.padding)||0)/2,n=o.width+t.padding,c=o.height+t.padding,l=-o.width/2-s,h=-o.height/2-s,d=[{x:0,y:0},{x:n,y:0},{x:n,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){const p=j(a),g=H(t,{}),f=p.rectangle(l-8,h,n+16,c,g),m=p.line(l,h,l,h+c,g),b=p.line(l+n,h,l+n,h+c,g);a.insert(()=>m,":first-child"),a.insert(()=>b,":first-child");const y=a.insert(()=>f,":first-child"),{cssStyles:x}=t;y.attr("class","basic label-container").attr("style",$t(x)),U(t,y)}else{const p=_e(a,n,c,d);i&&p.attr("style",i),U(t,p)}return t.intersect=function(p){return z.polygon(t,d,p)},a}async function $d(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,l=-n/2,h=.2*n,d=.2*n,{cssStyles:p}=t,g=j(a),f=H(t,{}),m=[{x:c-h/2,y:l},{x:c+s+h/2,y:l},{x:c+s+h/2,y:l+n},{x:c-h/2,y:l+n}],b=[{x:c+s-h/2,y:l+n},{x:c+s+h/2,y:l+n},{x:c+s+h/2,y:l+n-d}];t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=nt(m),x=g.path(y,f),w=nt(b),L=g.path(w,{...f,fillStyle:"solid"}),v=a.insert(()=>L,":first-child");return v.insert(()=>x,":first-child"),v.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),U(t,v),t.intersect=function(C){return z.polygon(t,m,C)},a}async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/4,h=.2*n,d=.2*c,p=c+l,{cssStyles:g}=t,f=j(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-n/2-n/2*.1,y:p/2},...Me(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,l,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],y=-n/2+n/2*.1,x=-p/2-.4*d,w=[{x:y+n-h,y:1.4*(x+c)},{x:y+n,y:x+c-d},{x:y+n,y:.9*(x+c)},...Me(y+n,1.3*(x+c),y+n-h,1.5*(x+c),.03*-c,.5)],L=nt(b),v=f.path(L,m),C=nt(w),S=f.path(C,{...m,fillStyle:"solid"}),P=a.insert(()=>S,":first-child");return P.insert(()=>v,":first-child"),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l/2-(o.y-(o.top??0))})`),U(t,P),t.intersect=function(O){return z.polygon(t,b,O)},a}async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+t.padding,(t==null?void 0:t.width)||0),n=Math.max(o.height+t.padding,(t==null?void 0:t.height)||0),c=-s/2,l=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",l).attr("width",s).attr("height",n),U(t,h),t.intersect=function(d){return z.rect(t,d)},a}u(Cd,"question"),u(kd,"rect_left_inv_arrow"),u(wd,"rectWithTitle"),u(Jr,"generateArcPoints"),u(Sd,"roundedRect"),u(Td,"shadedProcess"),u(Bd,"slopedRect"),u(vd,"squareRect"),u(Md,"stadium"),u(Ld,"state"),u(_d,"stateEnd"),u(Fd,"stateStart"),u(Ad,"subroutine"),u($d,"taggedRect"),u(Ed,"taggedWaveEdgedRectangle"),u(Dd,"text");var Nf=u((e,t,r,i,a,o)=>`M${e},${t}
126
126
  a${a},${o} 0,0,1 0,${-i}
127
127
  l${r},0
128
128
  a${a},${o} 0,0,1 0,${i}
129
129
  M${r},${-i}
130
130
  a${a},${o} 0,0,0 0,${i}
131
- l${-r},0`,"createCylinderPathD"),qf=u((e,t,r,i,a,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),zf=u((e,t,r,i,a,o)=>[`M${e+r/2},${-i/2}`,`a${a},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s,halfPadding:n}=await Q(e,t,K(t)),c=t.look==="neo"?2*n:n,l=o.height+c,h=l/2,d=h/(2.5+l/50),p=o.width+d+c,{cssStyles:g}=t;let f;if(t.look==="handDrawn"){const m=j(a),b=qf(0,0,p,l,d,h),y=zf(0,0,p,l,d,h),x=m.path(b,H(t,{})),w=m.path(y,H(t,{fill:"none"}));f=a.insert(()=>w,":first-child"),f=a.insert(()=>x,":first-child"),f.attr("class","basic label-container"),g&&f.attr("style",g)}else{const m=Rf(0,0,p,l,d,h);f=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",$t(g)).attr("style",i),f.attr("class","basic label-container"),g&&f.selectAll("path").attr("style",g),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",d),f.attr("transform",`translate(${-p/2}, ${l/2} )`),s.attr("transform",`translate(${-o.width/2-d-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),U(t,f),t.intersect=function(m){const b=z.rect(t,m),y=b.y-(t.y??0);if(h!=0&&(Math.abs(y)<(t.height??0)/2||Math.abs(y)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-d)){let x=d*d*(1-y*y/(h*h));x!=0&&(x=Math.sqrt(Math.abs(x))),x=d-x,m.x-(t.x??0)>0&&(x=-x),b.x+=x}return b},a}async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.width+t.padding,n=o.height+t.padding,c=[{x:-3*n/6,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}async function Nd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(60,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),{cssStyles:c}=t,l=j(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-s/2*.8,y:-n/2},{x:s/2*.8,y:-n/2},{x:s/2,y:-n/2*.6},{x:s/2,y:n/2},{x:-s/2,y:n/2},{x:-s/2,y:-n/2*.6}],p=nt(d),g=l.path(p,h),f=a.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),U(t,f),t.intersect=function(m){return z.polygon(t,d,m)},a}async function Rd(e,t){var x;const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Ct((x=ut().flowchart)==null?void 0:x.htmlLabels),c=o.width+(t.padding??0),l=c+o.height,h=c+o.height,d=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:p}=t,g=j(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=nt(d),b=g.path(m,f),y=a.insert(()=>b,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return p&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=c,t.height=l,U(t,y),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${l/2-(o.height+(t.padding??0)/(n?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return E.info("Triangle intersect",t,d,w),z.polygon(t,d,w)},a}async function qd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:d}=t,p=70-n,g=p>0?p/2:0,f=j(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-n/2-g,y:h/2},...Me(-n/2-g,h/2,n/2+g,h/2,l,.8),{x:n/2+g,y:-h/2},{x:-n/2-g,y:-h/2}],y=nt(b),x=f.path(y,m),w=a.insert(()=>x,":first-child");return w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(L){return z.polygon(t,b,L)},a}async function zd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=s/n;let l=s,h=n;l>h*c?h=l/c:l=h*c,l=Math.max(l,100),h=Math.max(h,50);const d=Math.min(.2*h,h/4),p=h+2*d,{cssStyles:g}=t,f=j(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-l/2,y:p/2},...Me(-l/2,p/2,l/2,p/2,d,1),{x:l/2,y:-p/2},...Me(l/2,-p/2,-l/2,-p/2,d,-1)],y=nt(b),x=f.path(y,m),w=a.insert(()=>x,":first-child");return w.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),U(t,w),t.intersect=function(L){return z.polygon(t,b,L)},a}async function Wd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=H(t,{}),f=[{x:l-5,y:h-5},{x:l-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-5}],m=`M${l-5},${h-5} L${l+n},${h-5} L${l+n},${h+c} L${l-5},${h+c} L${l-5},${h-5}
131
+ l${-r},0`,"createCylinderPathD"),qf=u((e,t,r,i,a,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Rf=u((e,t,r,i,a,o)=>[`M${e+r/2},${-i/2}`,`a${a},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Od(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s,halfPadding:n}=await Q(e,t,K(t)),c=t.look==="neo"?2*n:n,l=o.height+c,h=l/2,d=h/(2.5+l/50),p=o.width+d+c,{cssStyles:g}=t;let f;if(t.look==="handDrawn"){const m=j(a),b=qf(0,0,p,l,d,h),y=Rf(0,0,p,l,d,h),x=m.path(b,H(t,{})),w=m.path(y,H(t,{fill:"none"}));f=a.insert(()=>w,":first-child"),f=a.insert(()=>x,":first-child"),f.attr("class","basic label-container"),g&&f.attr("style",g)}else{const m=Nf(0,0,p,l,d,h);f=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",$t(g)).attr("style",i),f.attr("class","basic label-container"),g&&f.selectAll("path").attr("style",g),i&&f.selectAll("path").attr("style",i)}return f.attr("label-offset-x",d),f.attr("transform",`translate(${-p/2}, ${l/2} )`),s.attr("transform",`translate(${-o.width/2-d-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),U(t,f),t.intersect=function(m){const b=z.rect(t,m),y=b.y-(t.y??0);if(h!=0&&(Math.abs(y)<(t.height??0)/2||Math.abs(y)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-d)){let x=d*d*(1-y*y/(h*h));x!=0&&(x=Math.sqrt(Math.abs(x))),x=d-x,m.x-(t.x??0)>0&&(x=-x),b.x+=x}return b},a}async function Id(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=o.width+t.padding,n=o.height+t.padding,c=[{x:-3*n/6,y:0},{x:s+3*n/6,y:0},{x:s,y:-n},{x:0,y:-n}];let l;const{cssStyles:h}=t;if(t.look==="handDrawn"){const d=j(a),p=H(t,{}),g=nt(c),f=d.path(g,p);l=a.insert(()=>f,":first-child").attr("transform",`translate(${-s/2}, ${n/2})`),h&&l.attr("style",h)}else l=_e(a,s,n,c);return i&&l.attr("style",i),t.width=s,t.height=n,U(t,l),t.intersect=function(d){return z.polygon(t,c,d)},a}async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(60,o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(20,o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),{cssStyles:c}=t,l=j(a),h=H(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-s/2*.8,y:-n/2},{x:s/2*.8,y:-n/2},{x:s/2,y:-n/2*.6},{x:s/2,y:n/2},{x:-s/2,y:n/2},{x:-s/2,y:-n/2*.6}],p=nt(d),g=l.path(p,h),f=a.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),U(t,f),t.intersect=function(m){return z.polygon(t,d,m)},a}async function Nd(e,t){var x;const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Ct((x=ut().flowchart)==null?void 0:x.htmlLabels),c=o.width+(t.padding??0),l=c+o.height,h=c+o.height,d=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-l}],{cssStyles:p}=t,g=j(a),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=nt(d),b=g.path(m,f),y=a.insert(()=>b,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return p&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=c,t.height=l,U(t,y),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${l/2-(o.height+(t.padding??0)/(n?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(w){return E.info("Triangle intersect",t,d,w),z.polygon(t,d,w)},a}async function qd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=c/8,h=c+l,{cssStyles:d}=t,p=70-n,g=p>0?p/2:0,f=j(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-n/2-g,y:h/2},...Me(-n/2-g,h/2,n/2+g,h/2,l,.8),{x:n/2+g,y:-h/2},{x:-n/2-g,y:-h/2}],y=nt(b),x=f.path(y,m),w=a.insert(()=>x,":first-child");return w.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-l/2})`),s.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-c/2+(t.padding??0)-l-(o.y-(o.top??0))})`),U(t,w),t.intersect=function(L){return z.polygon(t,b,L)},a}async function Rd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o}=await Q(e,t,K(t)),s=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),n=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),c=s/n;let l=s,h=n;l>h*c?h=l/c:l=h*c,l=Math.max(l,100),h=Math.max(h,50);const d=Math.min(.2*h,h/4),p=h+2*d,{cssStyles:g}=t,f=j(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=[{x:-l/2,y:p/2},...Me(-l/2,p/2,l/2,p/2,d,1),{x:l/2,y:-p/2},...Me(l/2,-p/2,-l/2,-p/2,d,-1)],y=nt(b),x=f.path(y,m),w=a.insert(()=>x,":first-child");return w.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),U(t,w),t.intersect=function(L){return z.polygon(t,b,L)},a}async function zd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await Q(e,t,K(t)),n=Math.max(o.width+2*(t.padding??0),(t==null?void 0:t.width)??0),c=Math.max(o.height+2*(t.padding??0),(t==null?void 0:t.height)??0),l=-n/2,h=-c/2,{cssStyles:d}=t,p=j(a),g=H(t,{}),f=[{x:l-5,y:h-5},{x:l-5,y:h+c},{x:l+n,y:h+c},{x:l+n,y:h-5}],m=`M${l-5},${h-5} L${l+n},${h-5} L${l+n},${h+c} L${l-5},${h+c} L${l-5},${h-5}
132
132
  M${l-5},${h} L${l+n},${h}
133
- M${l},${h-5} L${l},${h+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=p.path(m,g),y=a.insert(()=>b,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}async function Go(e,t){var rt,xt,ft,Gt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Z}=Lt(),{background:st}=Z,ht={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${st}`]};await Go(e,ht)}const i=Lt();t.useHtmlLabels=i.htmlLabels;let a=((rt=i.er)==null?void 0:rt.diagramPadding)??10,o=((xt=i.er)==null?void 0:xt.entityPadding)??6;const{cssStyles:s}=t,{labelStyles:n,nodeStyles:c}=Y(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a};ie(t.label,i)+2*Z.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const st=await Zi(e,t,Z);if(!Ct(i.htmlLabels)){const ht=st.select("text"),yt=(ft=ht.node())==null?void 0:ft.getBBox();ht.attr("transform",`translate(${-yt.width/2}, 0)`)}return st}i.htmlLabels||(a*=1.25,o*=1.25);let l=K(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),d=await lr(h,t.label??"",i,0,0,["name"],n);d.height+=o;let p=0;const g=[],f=[];let m=0,b=0,y=0,x=0,w=!0,L=!0;for(const Z of r.attributes){const st=await lr(h,Z.type,i,0,p,["attribute-type"],n);m=Math.max(m,st.width+a);const ht=await lr(h,Z.name,i,0,p,["attribute-name"],n);b=Math.max(b,ht.width+a);const yt=await lr(h,Z.keys.join(),i,0,p,["attribute-keys"],n);y=Math.max(y,yt.width+a);const qt=await lr(h,Z.comment,i,0,p,["attribute-comment"],n);x=Math.max(x,qt.width+a);const Et=Math.max(st.height,ht.height,yt.height,qt.height)+o;f.push({yOffset:p,rowHeight:Et}),p+=Et}let v=4;y<=a&&(w=!1,y=0,v--),x<=a&&(L=!1,x=0,v--);const C=h.node().getBBox();if(d.width+2*a-(m+b+y+x)>0){const Z=d.width+2*a-(m+b+y+x);m+=Z/v,b+=Z/v,y>0&&(y+=Z/v),x>0&&(x+=Z/v)}const S=m+b+y+x,P=j(h),D=H(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let R=0;f.length>0&&(R=f.reduce((Z,st)=>Z+((st==null?void 0:st.rowHeight)??0),0));const I=Math.max(C.width+2*a,(t==null?void 0:t.width)||0,S),F=Math.max((R??0)+d.height,(t==null?void 0:t.height)||0),T=-I/2,M=-F/2;h.selectAll("g:not(:first-child)").each((Z,st,ht)=>{const yt=dt(ht[st]),qt=yt.attr("transform");let Et=0,oi=0;if(qt){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);he&&(Et=parseFloat(he[1]),oi=parseFloat(he[2]),yt.attr("class").includes("attribute-name")?Et+=m:yt.attr("class").includes("attribute-keys")?Et+=m+b:yt.attr("class").includes("attribute-comment")&&(Et+=m+b+y))}yt.attr("transform",`translate(${T+a/2+Et}, ${oi+M+d.height+o/2})`)}),h.select(".name").attr("transform","translate("+-d.width/2+", "+(M+o/2)+")");const A=P.rectangle(T,M,I,F,D),_=h.insert(()=>A,":first-child").attr("style",s.join("")),{themeVariables:$}=Lt(),{rowEven:O,rowOdd:tt,nodeBorder:it}=$;g.push(0);for(const[Z,st]of f.entries()){const ht=(Z+1)%2==0&&st.yOffset!==0,yt=P.rectangle(T,d.height+M+(st==null?void 0:st.yOffset),I,st==null?void 0:st.rowHeight,{...D,fill:ht?O:tt,stroke:it});h.insert(()=>yt,"g.label").attr("style",s.join("")).attr("class","row-rect-"+(ht?"even":"odd"))}let lt=P.line(T,d.height+M,I+T,d.height+M,D);h.insert(()=>lt).attr("class","divider"),lt=P.line(m+T,d.height+M,m+T,F+M,D),h.insert(()=>lt).attr("class","divider"),w&&(lt=P.line(m+b+T,d.height+M,m+b+T,F+M,D),h.insert(()=>lt).attr("class","divider")),L&&(lt=P.line(m+b+y+T,d.height+M,m+b+y+T,F+M,D),h.insert(()=>lt).attr("class","divider"));for(const Z of g)lt=P.line(T,d.height+M+Z,I+T,d.height+M+Z,D),h.insert(()=>lt).attr("class","divider");if(U(t,_),c&&t.look!=="handDrawn"){const Z=c.split(";"),st=(Gt=Z==null?void 0:Z.filter(ht=>ht.includes("stroke")))==null?void 0:Gt.map(ht=>`${ht}`).join("; ");h.selectAll("path").attr("style",st??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(Z){return z.rect(t,Z)},h}async function lr(e,t,r,i=0,a=0,o=[],s=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);t!==ba(t)&&(t=(t=ba(t)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=n.node().appendChild(await ue(n,t,{width:ie(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let l=c.getBBox();if(Ct(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const d=dt(c);l=h.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}return l}async function jd(e,t,r,i,a=r.class.padding??12){const o=i?0:3,s=e.insert("g").attr("class",K(t)).attr("id",t.domId||t.id);let n=null,c=null,l=null,h=null,d=0,p=0,g=0;if(n=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const x=t.annotations[0];await ti(n,{text:`\xAB${x}\xBB`},0),d=n.node().getBBox().height}c=s.insert("g").attr("class","label-group text"),await ti(c,t,0,["font-weight: bolder"]);const f=c.node().getBBox();p=f.height,l=s.insert("g").attr("class","members-group text");let m=0;for(const x of t.members)m+=await ti(l,x,m,[x.parseClassifier()])+o;g=l.node().getBBox().height,g<=0&&(g=a/2),h=s.insert("g").attr("class","methods-group text");let b=0;for(const x of t.methods)b+=await ti(h,x,b,[x.parseClassifier()])+o;let y=s.node().getBBox();if(n!==null){const x=n.node().getBBox();n.attr("transform",`translate(${-x.width/2})`)}return c.attr("transform",`translate(${-f.width/2}, ${d})`),y=s.node().getBBox(),l.attr("transform",`translate(0, ${d+p+2*a})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+(g?g+4*a:2*a)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function ti(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Lt();let s="useHtmlLabels"in t?t.useHtmlLabels:Ct(o.htmlLabels)??!0,n="";n="text"in t?t.text:t.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),$e(n)&&(s=!0);const c=await ue(a,Bi(ke(n)),{width:ie(n,o)+50,classes:"markdown-node-label",useHtmlLabels:s},o);let l,h=1;if(s){const d=c.children[0],p=dt(c);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const g=d.getElementsByTagName("img");if(g){const f=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(m=>new Promise(b=>{function y(){var x;if(m.style.display="flex",m.style.flexDirection="column",f){const w=((x=o.fontSize)==null?void 0:x.toString())??window.getComputedStyle(document.body).fontSize,L=5,v=parseInt(w,10)*L+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";b(m)}u(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}else{i.includes("font-weight: bolder")&&dt(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const d=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),l=c.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}async function Hd(e,t){var D,R;const r=ut(),i=r.class.padding??12,a=i,o=t.useHtmlLabels??Ct(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:n,bbox:c}=await jd(e,t,r,o,a),{labelStyles:l,nodeStyles:h}=Y(t);t.labelStyle=l,t.cssStyles=s.styles||"";const d=((D=s.styles)==null?void 0:D.join(";"))||h||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const p=s.members.length===0&&s.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),g=j(n),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=c.width;let b=c.height;s.members.length===0&&s.methods.length===0?b+=a:s.members.length>0&&s.methods.length===0&&(b+=2*a);const y=-m/2,x=-b/2,w=g.rectangle(y-i,x-i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,b+2*i+(p?2*i:s.members.length===0&&s.methods.length===0?-i:0),f),L=n.insert(()=>w,":first-child");L.attr("class","basic label-container");const v=L.node().getBBox();n.selectAll(".text").each((I,F,T)=>{var tt;const M=dt(T[F]),A=M.attr("transform");let _=0;if(A){const it=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);it&&(_=parseFloat(it[2]))}let $=_+x+i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0);o||($-=4);let O=y;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(O=-((tt=M.node())==null?void 0:tt.getBBox().width)/2||0,n.selectAll("text").each(function(it,lt,rt){window.getComputedStyle(rt[lt]).textAnchor==="middle"&&(O=0)})),M.attr("transform",`translate(${O}, ${$})`)});const C=n.select(".annotation-group").node().getBBox().height-(p?i/2:0)||0,S=n.select(".label-group").node().getBBox().height-(p?i/2:0)||0,P=n.select(".members-group").node().getBBox().height-(p?i/2:0)||0;if(s.members.length>0||s.methods.length>0||p){const I=g.line(v.x,C+S+x+i,v.x+v.width,C+S+x+i,f);n.insert(()=>I).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){const I=g.line(v.x,C+S+P+x+2*a+i,v.x+v.width,C+S+P+x+i+2*a,f);n.insert(()=>I).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&n.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),n.selectAll(".divider").select("path").attr("style",d),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",d),!o){const I=RegExp(/color\s*:\s*([^;]*)/),F=I.exec(d);if(F){const T=F[0].replace("color","fill");n.selectAll("tspan").attr("style",T)}else if(l){const T=I.exec(l);if(T){const M=T[0].replace("color","fill");n.selectAll("tspan").attr("style",M)}}}return U(t,L),t.intersect=function(I){return z.rect(t,I)},n}async function Yd(e,t){var L,v;const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const a=t,o=t,s="verifyMethod"in t,n=K(t),c=e.insert("g").attr("class",n).attr("id",t.domId??t.id);let l;l=s?await se(c,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):await se(c,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let h=l;const d=await se(c,a.name,h,t.labelStyle+"; font-weight: bold;");h+=d+20,s?(h+=await se(c,a.requirementId?`ID: ${a.requirementId}`:"",h,t.labelStyle),h+=await se(c,a.text?`Text: ${a.text}`:"",h,t.labelStyle),h+=await se(c,a.risk?`Risk: ${a.risk}`:"",h,t.labelStyle),await se(c,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",h,t.labelStyle)):(h+=await se(c,o.type?`Type: ${o.type}`:"",h,t.labelStyle),await se(c,o.docRef?`Doc Ref: ${o.docRef}`:"",h,t.labelStyle));const p=(((L=c.node())==null?void 0:L.getBBox().width)??200)+20,g=(((v=c.node())==null?void 0:v.getBBox().height)??200)+20,f=-p/2,m=-g/2,b=j(c),y=H(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=b.rectangle(f,m,p,g,y),w=c.insert(()=>x,":first-child");if(w.attr("class","basic label-container").attr("style",i),c.selectAll(".label").each((C,S,P)=>{const D=dt(P[S]),R=D.attr("transform");let I=0,F=0;if(R){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);A&&(I=parseFloat(A[1]),F=parseFloat(A[2]))}const T=F-g/2;let M=f+10;S!==0&&S!==1||(M=I),D.attr("transform",`translate(${M}, ${T+20})`)}),h>l+d+20){const C=b.line(f,m+l+d+20,f+p,m+l+d+20,y);c.insert(()=>C).attr("style",i)}return U(t,w),t.intersect=function(C){return z.rect(t,C)},c}async function se(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=ut(),s=o.htmlLabels??!0,n=await ue(a,Bi(ke(t)),{width:ie(t,o)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},o);let c;if(s){const l=n.children[0],h=dt(n);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=n.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);c=n.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}u(Id,"tiltedCylinder"),u(Pd,"trapezoid"),u(Nd,"trapezoidalPentagon"),u(Rd,"triangle"),u(qd,"waveEdgedRectangle"),u(zd,"waveRectangle"),u(Wd,"windowPane"),u(Go,"erBox"),u(lr,"addText"),u(jd,"textHelper"),u(ti,"addText"),u(Hd,"classBox"),u(Yd,"requirementBox"),u(se,"addText");var Wf=u(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Ud(e,t,{config:r}){var R,I;const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i||"";const o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:n,label:c}=await Q(e,t,K(t)),l=t.padding||10;let h,d="";"ticket"in t&&t.ticket&&((R=r==null?void 0:r.kanban)!=null&&R.ticketBaseUrl)&&(d=(I=r==null?void 0:r.kanban)==null?void 0:I.ticketBaseUrl.replace("#TICKET#",t.ticket),h=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,f;({label:g,bbox:f}=h?await Xi(h,"ticket"in t&&t.ticket||"",p):await Xi(s,"ticket"in t&&t.ticket||"",p));const{label:m,bbox:b}=await Xi(s,"assigned"in t&&t.assigned||"",p);t.width=o;const y=(t==null?void 0:t.width)||0,x=Math.max(f.height,b.height)/2,w=Math.max(n.height+20,(t==null?void 0:t.height)||0)+x,L=-y/2,v=-w/2;let C;c.attr("transform","translate("+(l-y/2)+", "+(-x-n.height/2)+")"),g.attr("transform","translate("+(l-y/2)+", "+(-x+n.height/2)+")"),m.attr("transform","translate("+(l+y/2-b.width-20)+", "+(-x+n.height/2)+")");const{rx:S,ry:P}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){const F=j(s),T=H(t,{}),M=S||P?F.path(me(L,v,y,w,S||0),T):F.rectangle(L,v,y,w,T);C=s.insert(()=>M,":first-child"),C.attr("class","basic label-container").attr("style",D||null)}else{C=s.insert("rect",":first-child"),C.attr("class","basic label-container __APA__").attr("style",a).attr("rx",S??5).attr("ry",P??5).attr("x",L).attr("y",v).attr("width",y).attr("height",w);const F="priority"in t&&t.priority;if(F){const T=s.append("line"),M=L+2,A=v+Math.floor((S??0)/2),_=v+w-Math.floor((S??0)/2);T.attr("x1",M).attr("y1",A).attr("x2",M).attr("y2",_).attr("stroke-width","4").attr("stroke",Wf(F))}}return U(t,C),t.height=w,t.intersect=function(F){return z.rect(t,F)},s}async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await Q(e,t,K(t)),c=o.width+10*s,l=o.height+8*s,h=.15*c,{cssStyles:d}=t,p=o.width+20,g=o.height+20,f=Math.max(c,p),m=Math.max(l,g);let b;n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);const y=`M0 0
133
+ M${l},${h-5} L${l},${h+c}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=p.path(m,g),y=a.insert(()=>b,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),U(t,y),t.intersect=function(x){return z.polygon(t,f,x)},a}async function Vo(e,t){var rt,xt,ft,Gt;const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:Z}=Lt(),{background:st}=Z,ht={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${st}`]};await Vo(e,ht)}const i=Lt();t.useHtmlLabels=i.htmlLabels;let a=((rt=i.er)==null?void 0:rt.diagramPadding)??10,o=((xt=i.er)==null?void 0:xt.entityPadding)??6;const{cssStyles:s}=t,{labelStyles:n,nodeStyles:c}=Y(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a};ie(t.label,i)+2*Z.labelPaddingX<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const st=await Zi(e,t,Z);if(!Ct(i.htmlLabels)){const ht=st.select("text"),yt=(ft=ht.node())==null?void 0:ft.getBBox();ht.attr("transform",`translate(${-yt.width/2}, 0)`)}return st}i.htmlLabels||(a*=1.25,o*=1.25);let l=K(t);l||(l="node default");const h=e.insert("g").attr("class",l).attr("id",t.domId||t.id),d=await lr(h,t.label??"",i,0,0,["name"],n);d.height+=o;let p=0;const g=[],f=[];let m=0,b=0,y=0,x=0,w=!0,L=!0;for(const Z of r.attributes){const st=await lr(h,Z.type,i,0,p,["attribute-type"],n);m=Math.max(m,st.width+a);const ht=await lr(h,Z.name,i,0,p,["attribute-name"],n);b=Math.max(b,ht.width+a);const yt=await lr(h,Z.keys.join(),i,0,p,["attribute-keys"],n);y=Math.max(y,yt.width+a);const Rt=await lr(h,Z.comment,i,0,p,["attribute-comment"],n);x=Math.max(x,Rt.width+a);const Et=Math.max(st.height,ht.height,yt.height,Rt.height)+o;f.push({yOffset:p,rowHeight:Et}),p+=Et}let v=4;y<=a&&(w=!1,y=0,v--),x<=a&&(L=!1,x=0,v--);const C=h.node().getBBox();if(d.width+2*a-(m+b+y+x)>0){const Z=d.width+2*a-(m+b+y+x);m+=Z/v,b+=Z/v,y>0&&(y+=Z/v),x>0&&(x+=Z/v)}const S=m+b+y+x,P=j(h),O=H(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let q=0;f.length>0&&(q=f.reduce((Z,st)=>Z+((st==null?void 0:st.rowHeight)??0),0));const I=Math.max(C.width+2*a,(t==null?void 0:t.width)||0,S),F=Math.max((q??0)+d.height,(t==null?void 0:t.height)||0),T=-I/2,M=-F/2;h.selectAll("g:not(:first-child)").each((Z,st,ht)=>{const yt=dt(ht[st]),Rt=yt.attr("transform");let Et=0,oi=0;if(Rt){const he=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Rt);he&&(Et=parseFloat(he[1]),oi=parseFloat(he[2]),yt.attr("class").includes("attribute-name")?Et+=m:yt.attr("class").includes("attribute-keys")?Et+=m+b:yt.attr("class").includes("attribute-comment")&&(Et+=m+b+y))}yt.attr("transform",`translate(${T+a/2+Et}, ${oi+M+d.height+o/2})`)}),h.select(".name").attr("transform","translate("+-d.width/2+", "+(M+o/2)+")");const A=P.rectangle(T,M,I,F,O),_=h.insert(()=>A,":first-child").attr("style",s.join("")),{themeVariables:$}=Lt(),{rowEven:D,rowOdd:tt,nodeBorder:it}=$;g.push(0);for(const[Z,st]of f.entries()){const ht=(Z+1)%2==0&&st.yOffset!==0,yt=P.rectangle(T,d.height+M+(st==null?void 0:st.yOffset),I,st==null?void 0:st.rowHeight,{...O,fill:ht?D:tt,stroke:it});h.insert(()=>yt,"g.label").attr("style",s.join("")).attr("class","row-rect-"+(ht?"even":"odd"))}let lt=P.line(T,d.height+M,I+T,d.height+M,O);h.insert(()=>lt).attr("class","divider"),lt=P.line(m+T,d.height+M,m+T,F+M,O),h.insert(()=>lt).attr("class","divider"),w&&(lt=P.line(m+b+T,d.height+M,m+b+T,F+M,O),h.insert(()=>lt).attr("class","divider")),L&&(lt=P.line(m+b+y+T,d.height+M,m+b+y+T,F+M,O),h.insert(()=>lt).attr("class","divider"));for(const Z of g)lt=P.line(T,d.height+M+Z,I+T,d.height+M+Z,O),h.insert(()=>lt).attr("class","divider");if(U(t,_),c&&t.look!=="handDrawn"){const Z=c.split(";"),st=(Gt=Z==null?void 0:Z.filter(ht=>ht.includes("stroke")))==null?void 0:Gt.map(ht=>`${ht}`).join("; ");h.selectAll("path").attr("style",st??""),h.selectAll(".row-rect-even path").attr("style",c)}return t.intersect=function(Z){return z.rect(t,Z)},h}async function lr(e,t,r,i=0,a=0,o=[],s=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",s);t!==ba(t)&&(t=(t=ba(t)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const c=n.node().appendChild(await ue(n,t,{width:ie(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=c.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let l=c.getBBox();if(Ct(r.htmlLabels)){const h=c.children[0];h.style.textAlign="start";const d=dt(c);l=h.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}return l}async function Wd(e,t,r,i,a=r.class.padding??12){const o=i?0:3,s=e.insert("g").attr("class",K(t)).attr("id",t.domId||t.id);let n=null,c=null,l=null,h=null,d=0,p=0,g=0;if(n=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const x=t.annotations[0];await ti(n,{text:`\xAB${x}\xBB`},0),d=n.node().getBBox().height}c=s.insert("g").attr("class","label-group text"),await ti(c,t,0,["font-weight: bolder"]);const f=c.node().getBBox();p=f.height,l=s.insert("g").attr("class","members-group text");let m=0;for(const x of t.members)m+=await ti(l,x,m,[x.parseClassifier()])+o;g=l.node().getBBox().height,g<=0&&(g=a/2),h=s.insert("g").attr("class","methods-group text");let b=0;for(const x of t.methods)b+=await ti(h,x,b,[x.parseClassifier()])+o;let y=s.node().getBBox();if(n!==null){const x=n.node().getBBox();n.attr("transform",`translate(${-x.width/2})`)}return c.attr("transform",`translate(${-f.width/2}, ${d})`),y=s.node().getBBox(),l.attr("transform",`translate(0, ${d+p+2*a})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+(g?g+4*a:2*a)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function ti(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Lt();let s="useHtmlLabels"in t?t.useHtmlLabels:Ct(o.htmlLabels)??!0,n="";n="text"in t?t.text:t.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),$e(n)&&(s=!0);const c=await ue(a,Bi(ke(n)),{width:ie(n,o)+50,classes:"markdown-node-label",useHtmlLabels:s},o);let l,h=1;if(s){const d=c.children[0],p=dt(c);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const g=d.getElementsByTagName("img");if(g){const f=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...g].map(m=>new Promise(b=>{function y(){var x;if(m.style.display="flex",m.style.flexDirection="column",f){const w=((x=o.fontSize)==null?void 0:x.toString())??window.getComputedStyle(document.body).fontSize,L=5,v=parseInt(w,10)*L+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";b(m)}u(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}else{i.includes("font-weight: bolder")&&dt(c).selectAll("tspan").attr("font-weight",""),h=c.children.length;const d=c.children[0];(c.textContent===""||c.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),l=c.getBBox()}return a.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}async function jd(e,t){var O,q;const r=ut(),i=r.class.padding??12,a=i,o=t.useHtmlLabels??Ct(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:n,bbox:c}=await Wd(e,t,r,o,a),{labelStyles:l,nodeStyles:h}=Y(t);t.labelStyle=l,t.cssStyles=s.styles||"";const d=((O=s.styles)==null?void 0:O.join(";"))||h||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const p=s.members.length===0&&s.methods.length===0&&!((q=r.class)!=null&&q.hideEmptyMembersBox),g=j(n),f=H(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=c.width;let b=c.height;s.members.length===0&&s.methods.length===0?b+=a:s.members.length>0&&s.methods.length===0&&(b+=2*a);const y=-m/2,x=-b/2,w=g.rectangle(y-i,x-i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,b+2*i+(p?2*i:s.members.length===0&&s.methods.length===0?-i:0),f),L=n.insert(()=>w,":first-child");L.attr("class","basic label-container");const v=L.node().getBBox();n.selectAll(".text").each((I,F,T)=>{var tt;const M=dt(T[F]),A=M.attr("transform");let _=0;if(A){const it=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);it&&(_=parseFloat(it[2]))}let $=_+x+i-(p?i:s.members.length===0&&s.methods.length===0?-i/2:0);o||($-=4);let D=y;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(D=-((tt=M.node())==null?void 0:tt.getBBox().width)/2||0,n.selectAll("text").each(function(it,lt,rt){window.getComputedStyle(rt[lt]).textAnchor==="middle"&&(D=0)})),M.attr("transform",`translate(${D}, ${$})`)});const C=n.select(".annotation-group").node().getBBox().height-(p?i/2:0)||0,S=n.select(".label-group").node().getBBox().height-(p?i/2:0)||0,P=n.select(".members-group").node().getBBox().height-(p?i/2:0)||0;if(s.members.length>0||s.methods.length>0||p){const I=g.line(v.x,C+S+x+i,v.x+v.width,C+S+x+i,f);n.insert(()=>I).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){const I=g.line(v.x,C+S+P+x+2*a+i,v.x+v.width,C+S+P+x+i+2*a,f);n.insert(()=>I).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&n.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),n.selectAll(".divider").select("path").attr("style",d),t.labelStyle?n.selectAll("span").attr("style",t.labelStyle):n.selectAll("span").attr("style",d),!o){const I=RegExp(/color\s*:\s*([^;]*)/),F=I.exec(d);if(F){const T=F[0].replace("color","fill");n.selectAll("tspan").attr("style",T)}else if(l){const T=I.exec(l);if(T){const M=T[0].replace("color","fill");n.selectAll("tspan").attr("style",M)}}}return U(t,L),t.intersect=function(I){return z.rect(t,I)},n}async function Hd(e,t){var L,v;const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const a=t,o=t,s="verifyMethod"in t,n=K(t),c=e.insert("g").attr("class",n).attr("id",t.domId??t.id);let l;l=s?await se(c,`&lt;&lt;${a.type}&gt;&gt;`,0,t.labelStyle):await se(c,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let h=l;const d=await se(c,a.name,h,t.labelStyle+"; font-weight: bold;");h+=d+20,s?(h+=await se(c,a.requirementId?`ID: ${a.requirementId}`:"",h,t.labelStyle),h+=await se(c,a.text?`Text: ${a.text}`:"",h,t.labelStyle),h+=await se(c,a.risk?`Risk: ${a.risk}`:"",h,t.labelStyle),await se(c,a.verifyMethod?`Verification: ${a.verifyMethod}`:"",h,t.labelStyle)):(h+=await se(c,o.type?`Type: ${o.type}`:"",h,t.labelStyle),await se(c,o.docRef?`Doc Ref: ${o.docRef}`:"",h,t.labelStyle));const p=(((L=c.node())==null?void 0:L.getBBox().width)??200)+20,g=(((v=c.node())==null?void 0:v.getBBox().height)??200)+20,f=-p/2,m=-g/2,b=j(c),y=H(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=b.rectangle(f,m,p,g,y),w=c.insert(()=>x,":first-child");if(w.attr("class","basic label-container").attr("style",i),c.selectAll(".label").each((C,S,P)=>{const O=dt(P[S]),q=O.attr("transform");let I=0,F=0;if(q){const A=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);A&&(I=parseFloat(A[1]),F=parseFloat(A[2]))}const T=F-g/2;let M=f+10;S!==0&&S!==1||(M=I),O.attr("transform",`translate(${M}, ${T+20})`)}),h>l+d+20){const C=b.line(f,m+l+d+20,f+p,m+l+d+20,y);c.insert(()=>C).attr("style",i)}return U(t,w),t.intersect=function(C){return z.rect(t,C)},c}async function se(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=ut(),s=o.htmlLabels??!0,n=await ue(a,Bi(ke(t)),{width:ie(t,o)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},o);let c;if(s){const l=n.children[0],h=dt(n);c=l.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const l=n.children[0];for(const h of l.children)h.textContent=h.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),i&&h.setAttribute("style",i);c=n.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}u(Od,"tiltedCylinder"),u(Id,"trapezoid"),u(Pd,"trapezoidalPentagon"),u(Nd,"triangle"),u(qd,"waveEdgedRectangle"),u(Rd,"waveRectangle"),u(zd,"windowPane"),u(Vo,"erBox"),u(lr,"addText"),u(Wd,"textHelper"),u(ti,"addText"),u(jd,"classBox"),u(Hd,"requirementBox"),u(se,"addText");var zf=u(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Yd(e,t,{config:r}){var q,I;const{labelStyles:i,nodeStyles:a}=Y(t);t.labelStyle=i||"";const o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:n,label:c}=await Q(e,t,K(t)),l=t.padding||10;let h,d="";"ticket"in t&&t.ticket&&((q=r==null?void 0:r.kanban)!=null&&q.ticketBaseUrl)&&(d=(I=r==null?void 0:r.kanban)==null?void 0:I.ticketBaseUrl.replace("#TICKET#",t.ticket),h=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,f;({label:g,bbox:f}=h?await Xi(h,"ticket"in t&&t.ticket||"",p):await Xi(s,"ticket"in t&&t.ticket||"",p));const{label:m,bbox:b}=await Xi(s,"assigned"in t&&t.assigned||"",p);t.width=o;const y=(t==null?void 0:t.width)||0,x=Math.max(f.height,b.height)/2,w=Math.max(n.height+20,(t==null?void 0:t.height)||0)+x,L=-y/2,v=-w/2;let C;c.attr("transform","translate("+(l-y/2)+", "+(-x-n.height/2)+")"),g.attr("transform","translate("+(l-y/2)+", "+(-x+n.height/2)+")"),m.attr("transform","translate("+(l+y/2-b.width-20)+", "+(-x+n.height/2)+")");const{rx:S,ry:P}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const F=j(s),T=H(t,{}),M=S||P?F.path(me(L,v,y,w,S||0),T):F.rectangle(L,v,y,w,T);C=s.insert(()=>M,":first-child"),C.attr("class","basic label-container").attr("style",O||null)}else{C=s.insert("rect",":first-child"),C.attr("class","basic label-container __APA__").attr("style",a).attr("rx",S??5).attr("ry",P??5).attr("x",L).attr("y",v).attr("width",y).attr("height",w);const F="priority"in t&&t.priority;if(F){const T=s.append("line"),M=L+2,A=v+Math.floor((S??0)/2),_=v+w-Math.floor((S??0)/2);T.attr("x1",M).attr("y1",A).attr("x2",M).attr("y2",_).attr("stroke-width","4").attr("stroke",zf(F))}}return U(t,C),t.height=w,t.intersect=function(F){return z.rect(t,F)},s}async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await Q(e,t,K(t)),c=o.width+10*s,l=o.height+8*s,h=.15*c,{cssStyles:d}=t,p=o.width+20,g=o.height+20,f=Math.max(c,p),m=Math.max(l,g);let b;n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);const y=`M0 0
134
134
  a${h},${h} 1 0,0 ${.25*f},${-1*m*.1}
135
135
  a${h},${h} 1 0,0 ${.25*f},0
136
136
  a${h},${h} 1 0,0 ${.25*f},0
@@ -148,7 +148,7 @@ import{A as ny,aY as sy,fo as ly,fF as hy,fG as cy,fl as dy,fH as uy,fI as py,a9
148
148
  a${h},${h} 1 0,0 ${-1*f*.1},${-1*m*.33}
149
149
  a${.8*h},${.8*h} 1 0,0 0,${-1*m*.34}
150
150
  a${h},${h} 1 0,0 ${.1*f},${-1*m*.33}
151
- H0 V0 Z`;if(t.look==="handDrawn"){const x=j(a),w=H(t,{}),L=x.path(y,w);b=a.insert(()=>L,":first-child"),b.attr("class","basic label-container").attr("style",$t(d))}else b=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return b.attr("transform",`translate(${-f/2}, ${-m/2})`),U(t,b),t.calcIntersect=function(x,w){return z.rect(x,w)},t.intersect=function(x){return E.info("Bang intersect",t,x),z.rect(t,x)},a}async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await Q(e,t,K(t)),c=o.width+2*s,l=o.height+2*s,h=.15*c,d=.25*c,p=.35*c,g=.2*c,{cssStyles:f}=t;let m;const b=`M0 0
151
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=j(a),w=H(t,{}),L=x.path(y,w);b=a.insert(()=>L,":first-child"),b.attr("class","basic label-container").attr("style",$t(d))}else b=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return b.attr("transform",`translate(${-f/2}, ${-m/2})`),U(t,b),t.calcIntersect=function(x,w){return z.rect(x,w)},t.intersect=function(x){return E.info("Bang intersect",t,x),z.rect(t,x)},a}async function Vd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await Q(e,t,K(t)),c=o.width+2*s,l=o.height+2*s,h=.15*c,d=.25*c,p=.35*c,g=.2*c,{cssStyles:f}=t;let m;const b=`M0 0
152
152
  a${h},${h} 0 0,1 ${.25*c},${-1*c*.1}
153
153
  a${p},${p} 1 0,1 ${.4*c},${-1*c*.1}
154
154
  a${d},${d} 1 0,1 ${.35*c},${.2*c}
@@ -162,7 +162,7 @@ import{A as ny,aY as sy,fo as ly,fF as hy,fG as cy,fl as dy,fH as uy,fI as py,a9
162
162
 
163
163
  a${h},${h} 1 0,1 ${-1*c*.1},${-1*l*.35}
164
164
  a${g},${g} 1 0,1 ${.1*c},${-1*l*.65}
165
- H0 V0 Z`;if(t.look==="handDrawn"){const y=j(a),x=H(t,{}),w=y.path(b,x);m=a.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",$t(f))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),m.attr("transform",`translate(${-c/2}, ${-l/2})`),U(t,m),t.calcIntersect=function(y,x){return z.rect(y,x)},t.intersect=function(y){return E.info("Cloud intersect",t,y),z.rect(t,y)},a}async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await Q(e,t,K(t)),c=o.width+8*s,l=o.height+2*s,h=`
165
+ H0 V0 Z`;if(t.look==="handDrawn"){const y=j(a),x=H(t,{}),w=y.path(b,x);m=a.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",$t(f))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),m.attr("transform",`translate(${-c/2}, ${-l/2})`),U(t,m),t.calcIntersect=function(y,x){return z.rect(y,x)},t.intersect=function(y){return E.info("Cloud intersect",t,y),z.rect(t,y)},a}async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=Y(t);t.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await Q(e,t,K(t)),c=o.width+8*s,l=o.height+2*s,h=`
166
166
  M${-c/2} ${l/2-5}
167
167
  v${10-l}
168
168
  q0,-5 5,-5
@@ -173,19 +173,19 @@ import{A as ny,aY as sy,fo as ly,fF as hy,fG as cy,fl as dy,fH as uy,fI as py,a9
173
173
  h${10-c}
174
174
  q-5,0 -5,-5
175
175
  Z
176
- `,d=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",h);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",l/2).attr("x2",c/2).attr("y2",l/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>n.node()),U(t,d),t.calcIntersect=function(p,g){return z.rect(p,g)},t.intersect=function(p){return z.rect(t,p)},a}async function Zd(e,t){return Vo(e,t,{padding:t.padding??0})}u(Ud,"kanbanItem"),u(Vd,"bang"),u(Gd,"cloud"),u(Xd,"defaultMindmapNode"),u(Zd,"mindmapCircle");var jf=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Md},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Td},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ld},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$d},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Kc},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Vo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Vd},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Gd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:kd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ad},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:gd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:pd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Pd},{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:dd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Jc},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Dd},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:jc},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Bd},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ad},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fd},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:rd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:od},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Vc},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Gc},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Xc},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:fd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qd},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:id},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Id},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:md},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Zc},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Qc},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Rd},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Wd},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:td},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Nd},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ed},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:vd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:xd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:bd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Wc},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Uc},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Od},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ed},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:zd},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:wd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:yd}],Hf=u(()=>{const e={state:_d,choice:Hc,note:Cd,rectWithTitle:Sd,labelRect:ud,iconSquare:hd,iconCircle:sd,icon:nd,iconRounded:ld,imageSquare:cd,anchor:zc,kanbanItem:Ud,mindmapCircle:Zd,defaultMindmapNode:Xd,classBox:Hd,erBox:Go,requirementBox:Yd},t=[...Object.entries(e),...jf.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Kd=Hf();ts=function(e){return e in Kd},u(ts,"isValidShape");var Ki=new Map;xa=async function(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Kd[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),a=await o(i,t,r)}else a=await o(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Ki.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i},u(xa,"insertNode");let Qd,Jd,Xo,ei,vt,hr;Gp=u((e,t)=>{Ki.set(t.id,e)},"setNodeElem"),Yp=u(()=>{Ki.clear()},"clear"),Hp=u(e=>{const t=Ki.get(e.id);E.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode"),Qd=u((e,t,r,i,a,o)=>{t.arrowTypeStart&&Xo(e,"start",t.arrowTypeStart,r,i,a,o),t.arrowTypeEnd&&Xo(e,"end",t.arrowTypeEnd,r,i,a,o)},"addEdgeMarkers"),Jd={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Xo=u((e,t,r,i,a,o,s)=>{var l;const n=Jd[r];if(!n)return void E.warn(`Unknown arrow type: ${r}`);const c=`${a}_${o}-${n.type}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const h=`${c}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(h)){const d=document.getElementById(c);if(d){const p=d.cloneNode(!0);p.id=h,p.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),n.fill&&g.setAttribute("fill",s)}),(l=d.parentNode)==null||l.appendChild(p)}}e.attr(`marker-${t}`,`url(${i}#${h})`)}else e.attr(`marker-${t}`,`url(${i}#${c})`)},"addEdgeMarker"),ei=new Map,vt=new Map,Up=u(()=>{ei.clear(),vt.clear()},"clear"),hr=u(e=>e?e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),zn=u(async(e,t)=>{let r=Ct(ut().flowchart.htmlLabels);const i=await ue(e,t.label,{style:hr(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});E.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let s,n=i.getBBox();if(r){const c=i.children[0],l=dt(i);n=c.getBoundingClientRect(),l.attr("width",n.width),l.attr("height",n.height)}if(o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),ei.set(t.id,a),t.width=n.width,t.height=n.height,t.startLabelLeft){const c=await Le(t.startLabelLeft,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startLeft=l,ri(s,t.startLabelLeft)}if(t.startLabelRight){const c=await Le(t.startLabelRight,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=l.node().appendChild(c),h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startRight=l,ri(s,t.startLabelRight)}if(t.endLabelLeft){const c=await Le(t.endLabelLeft,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(c),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endLeft=l,ri(s,t.endLabelLeft)}if(t.endLabelRight){const c=await Le(t.endLabelRight,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(c),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endRight=l,ri(s,t.endLabelRight)}return i},"insertEdgeLabel");function ri(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}u(ri,"setTerminalWidth");let tu,eu,Zo;qn=u((e,t)=>{E.debug("Moving label abc88 ",e.id,e.label,ei.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:a}=ci(i);if(e.label){const o=ei.get(e.id);let s=e.x,n=e.y;if(r){const c=Xt.calcLabelPosition(r);E.debug("Moving label "+e.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}o.attr("transform",`translate(${s}, ${n+a/2})`)}if(e.startLabelLeft){const o=vt.get(e.id).startLeft;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const o=vt.get(e.id).startRight;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const o=vt.get(e.id).endLeft;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const o=vt.get(e.id).endRight;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),tu=u((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),o=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return a>=s||o>=n},"outsideNode"),eu=u((e,t,r)=>{E.debug(`intersection calc abc89:
176
+ `,d=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",h);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",l/2).attr("x2",c/2).attr("y2",l/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>n.node()),U(t,d),t.calcIntersect=function(p,g){return z.rect(p,g)},t.intersect=function(p){return z.rect(t,p)},a}async function Xd(e,t){return Uo(e,t,{padding:t.padding??0})}u(Yd,"kanbanItem"),u(Ud,"bang"),u(Vd,"cloud"),u(Gd,"defaultMindmapNode"),u(Xd,"mindmapCircle");var Wf=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:vd},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Sd},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Md},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ad},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Zc},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Uo},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ud},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Vd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Cd},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:id},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ud},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Id},{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:cd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Qc},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Dd},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Wc},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Td},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Fd},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:_d},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ed},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ad},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Uc},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Vc},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Gc},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:gd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qd},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:rd},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Od},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:fd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Xc},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Kc},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Nd},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:zd},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Jc},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Pd},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:td},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Bd},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:bd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:yd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:zc},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Yc},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Ed},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:$d},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Rd},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kd},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:md}],jf=u(()=>{const e={state:Ld,choice:jc,note:xd,rectWithTitle:wd,labelRect:dd,iconSquare:ld,iconCircle:nd,icon:od,iconRounded:sd,imageSquare:hd,anchor:Rc,kanbanItem:Yd,mindmapCircle:Xd,defaultMindmapNode:Gd,classBox:jd,erBox:Vo,requirementBox:Hd},t=[...Object.entries(e),...Wf.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Zd=jf();Jn=function(e){return e in Zd},u(Jn,"isValidShape");var Ki=new Map;xa=async function(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Zd[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),a=await o(i,t,r)}else a=await o(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),Ki.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i},u(xa,"insertNode");let Kd,Qd,Go,ei,vt,hr;Gp=u((e,t)=>{Ki.set(t.id,e)},"setNodeElem"),Yp=u(()=>{Ki.clear()},"clear"),Hp=u(e=>{const t=Ki.get(e.id);E.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode"),Kd=u((e,t,r,i,a,o)=>{t.arrowTypeStart&&Go(e,"start",t.arrowTypeStart,r,i,a,o),t.arrowTypeEnd&&Go(e,"end",t.arrowTypeEnd,r,i,a,o)},"addEdgeMarkers"),Qd={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Go=u((e,t,r,i,a,o,s)=>{var l;const n=Qd[r];if(!n)return void E.warn(`Unknown arrow type: ${r}`);const c=`${a}_${o}-${n.type}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const h=`${c}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(h)){const d=document.getElementById(c);if(d){const p=d.cloneNode(!0);p.id=h,p.querySelectorAll("path, circle, line").forEach(g=>{g.setAttribute("stroke",s),n.fill&&g.setAttribute("fill",s)}),(l=d.parentNode)==null||l.appendChild(p)}}e.attr(`marker-${t}`,`url(${i}#${h})`)}else e.attr(`marker-${t}`,`url(${i}#${c})`)},"addEdgeMarker"),ei=new Map,vt=new Map,Up=u(()=>{ei.clear(),vt.clear()},"clear"),hr=u(e=>e?e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Rn=u(async(e,t)=>{let r=Ct(ut().flowchart.htmlLabels);const i=await ue(e,t.label,{style:hr(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});E.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let s,n=i.getBBox();if(r){const c=i.children[0],l=dt(i);n=c.getBoundingClientRect(),l.attr("width",n.width),l.attr("height",n.height)}if(o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),ei.set(t.id,a),t.width=n.width,t.height=n.height,t.startLabelLeft){const c=await Le(t.startLabelLeft,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startLeft=l,ri(s,t.startLabelLeft)}if(t.startLabelRight){const c=await Le(t.startLabelRight,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=l.node().appendChild(c),h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).startRight=l,ri(s,t.startLabelRight)}if(t.endLabelLeft){const c=await Le(t.endLabelLeft,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(c),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endLeft=l,ri(s,t.endLabelLeft)}if(t.endLabelRight){const c=await Le(t.endLabelRight,hr(t.labelStyle)),l=e.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");s=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(c),vt.get(t.id)||vt.set(t.id,{}),vt.get(t.id).endRight=l,ri(s,t.endLabelRight)}return i},"insertEdgeLabel");function ri(e,t){ut().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}u(ri,"setTerminalWidth");let Jd,tu,Xo;qn=u((e,t)=>{E.debug("Moving label abc88 ",e.id,e.label,ei.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ut(),{subGraphTitleTotalMargin:a}=ci(i);if(e.label){const o=ei.get(e.id);let s=e.x,n=e.y;if(r){const c=Xt.calcLabelPosition(r);E.debug("Moving label "+e.label+" from (",s,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(s=c.x,n=c.y)}o.attr("transform",`translate(${s}, ${n+a/2})`)}if(e.startLabelLeft){const o=vt.get(e.id).startLeft;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const o=vt.get(e.id).startRight;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const o=vt.get(e.id).endLeft;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const o=vt.get(e.id).endRight;let s=e.x,n=e.y;if(r){const c=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=c.x,n=c.y}o.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),Jd=u((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),o=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return a>=s||o>=n},"outsideNode"),tu=u((e,t,r)=>{E.debug(`intersection calc abc89:
177
177
  outsidePoint: ${JSON.stringify(t)}
178
178
  insidePoint : ${JSON.stringify(r)}
179
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2;let n=r.x<t.x?s-o:s+o;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*s>Math.abs(i-t.x)*c){let d=r.y<t.y?t.y-c-a:a-c-t.y;n=h*d/l;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+l-d:r.y-l+d};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),l===0&&(p.y=t.y),E.debug(`abc89 top/bottom calc, Q ${l}, q ${d}, R ${h}, r ${n}`,p),p}{n=r.x<t.x?t.x-s-i:i-s-t.x;let d=l*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,g=r.y<t.y?r.y+d:r.y-d;return E.debug(`sides calc abc89, Q ${l}, q ${d}, R ${h}, r ${n}`,{_x:p,_y:g}),n===0&&(p=t.x,g=t.y),h===0&&(p=t.x),l===0&&(g=t.y),{x:p,y:g}}},"intersection"),Zo=u((e,t)=>{E.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(o=>{if(E.info("abc88 checking point",o,t),tu(t,o)||a)E.warn("abc88 outside",o,i),i=o,a||r.push(o);else{const s=eu(t,i,o);E.debug("abc88 inside",o,i,s),E.debug("abc88 intersection",s,t);let n=!1;r.forEach(c=>{n=n||c.x===s.x&&c.y===s.y}),r.some(c=>c.x===s.x&&c.y===s.y)?E.warn("abc88 no intersect",s,r):r.push(s),a=!0}}),E.debug("returning points",r),r},"cutPathAtIntersect");function ru(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],o=e[i],s=e[i+1];(a.x===o.x&&o.y===s.y&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===s.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(ru,"extractCornerPoints");let Ko,iu,au,ou,nu,su,lu,hu,cu,du,uu,pu,gu,fu,mu,yu,bu,xu,Cu,ku,cr,Qo;Ko=u(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,o=r/Math.sqrt(i*i+a*a);return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),iu=u(function(e){const{cornerPointPositions:t}=ru(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],o=e[i+1],s=e[i],n=Ko(a,s,5),c=Ko(o,s,5),l=c.x-n.x,h=c.y-n.y;r.push(n);const d=2*Math.sqrt(2);let p={x:s.x,y:s.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){E.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const g=5;p=s.x===n.x?{x:l<0?n.x-g+d:n.x+g-d,y:h<0?n.y-d:n.y+d}:{x:l<0?n.x-d:n.x+d,y:h<0?n.y-g+d:n.y+g-d}}else E.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(p,c)}else r.push(e[i]);return r},"fixCorners"),Rn=u(function(e,t,r,i,a,o,s){var R;const{handDrawnSeed:n}=ut();let c=t.points,l=!1;const h=a;var d=o;const p=[];for(const I in t.cssCompiledStyles)wa(I)||p.push(t.cssCompiledStyles[I]);d.intersect&&h.intersect&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),E.debug("Last point APA12",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),t.toCluster&&(E.info("to cluster abc88",r.get(t.toCluster)),c=Zo(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&(E.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Zo(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let g=c.filter(I=>!Number.isNaN(I.y));g=iu(g);let f=Bn;switch(f=Tn,t.curve){case"linear":f=Tn;break;case"basis":default:f=Bn;break;case"cardinal":f=qp;break;case"bumpX":f=is;break;case"bumpY":f=as;break;case"catmullRom":f=Rp;break;case"monotoneX":f=Np;break;case"monotoneY":f=Pp;break;case"natural":f=Ip;break;case"step":f=Dp;break;case"stepAfter":f=Op;break;case"stepBefore":f=Ep}const{x:m,y:b}=In(t),y=By().x(m).y(b).curve(f);let x,w;switch(t.thickness){case"normal":default:x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible"}switch(t.pattern){case"solid":default:x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}let L=y(g);const v=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let C=v.find(I=>I==null?void 0:I.startsWith("stroke:"));if(t.look==="handDrawn"){const I=j(e);Object.assign([],g);const F=I.path(L,{roughness:.3,seed:n});x+=" transition",w=dt(F).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((M,A)=>M+";"+A,""):"");let T=w.attr("d");w.attr("d",T),e.node().appendChild(w.node())}else{const I=p.join(";"),F=v?v.reduce((A,_)=>A+_+";",""):"";let T="";t.animate&&(T=" edge-animation-fast"),t.animation&&(T=" edge-animation-"+t.animation);const M=I?I+";"+F+";":F;w=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")+(T??"")).attr("style",M),C=(R=M.match(/stroke:([^;]+)/))==null?void 0:R[1]}let S="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(S=ya(!0)),E.info("arrowTypeStart",t.arrowTypeStart),E.info("arrowTypeEnd",t.arrowTypeEnd),Qd(w,t,S,s,i,C);const P=c[Math.floor(c.length/2)];Xt.isLabelCoordinateInPath(P,w.attr("d"))||(l=!0);let D={};return l&&(D.updatedPath=c),D.originalPath=t.points,D},"insertEdge"),au=u((e,t,r,i)=>{t.forEach(a=>{Cu[a](e,r,i)})},"insertMarkers"),ou=u((e,t,r)=>{E.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),nu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),su=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),lu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),hu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),cu=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),du=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),uu=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),pu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),gu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),fu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),mu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),yu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),bu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
179
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2;let n=r.x<t.x?s-o:s+o;const c=e.height/2,l=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*s>Math.abs(i-t.x)*c){let d=r.y<t.y?t.y-c-a:a-c-t.y;n=h*d/l;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+l-d:r.y-l+d};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),l===0&&(p.y=t.y),E.debug(`abc89 top/bottom calc, Q ${l}, q ${d}, R ${h}, r ${n}`,p),p}{n=r.x<t.x?t.x-s-i:i-s-t.x;let d=l*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,g=r.y<t.y?r.y+d:r.y-d;return E.debug(`sides calc abc89, Q ${l}, q ${d}, R ${h}, r ${n}`,{_x:p,_y:g}),n===0&&(p=t.x,g=t.y),h===0&&(p=t.x),l===0&&(g=t.y),{x:p,y:g}}},"intersection"),Xo=u((e,t)=>{E.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(o=>{if(E.info("abc88 checking point",o,t),Jd(t,o)||a)E.warn("abc88 outside",o,i),i=o,a||r.push(o);else{const s=tu(t,i,o);E.debug("abc88 inside",o,i,s),E.debug("abc88 intersection",s,t);let n=!1;r.forEach(c=>{n=n||c.x===s.x&&c.y===s.y}),r.some(c=>c.x===s.x&&c.y===s.y)?E.warn("abc88 no intersect",s,r):r.push(s),a=!0}}),E.debug("returning points",r),r},"cutPathAtIntersect");function eu(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],o=e[i],s=e[i+1];(a.x===o.x&&o.y===s.y&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5||a.y===o.y&&o.x===s.x&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}u(eu,"extractCornerPoints");let Zo,ru,iu,au,ou,nu,su,lu,hu,cu,du,uu,pu,gu,fu,mu,yu,bu,xu,Cu,cr,Ko;Zo=u(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,o=r/Math.sqrt(i*i+a*a);return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),ru=u(function(e){const{cornerPointPositions:t}=eu(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],o=e[i+1],s=e[i],n=Zo(a,s,5),c=Zo(o,s,5),l=c.x-n.x,h=c.y-n.y;r.push(n);const d=2*Math.sqrt(2);let p={x:s.x,y:s.y};if(Math.abs(o.x-a.x)>10&&Math.abs(o.y-a.y)>=10){E.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));const g=5;p=s.x===n.x?{x:l<0?n.x-g+d:n.x+g-d,y:h<0?n.y-d:n.y+d}:{x:l<0?n.x-d:n.x+d,y:h<0?n.y-g+d:n.y+g-d}}else E.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y));r.push(p,c)}else r.push(e[i]);return r},"fixCorners"),Nn=u(function(e,t,r,i,a,o,s){var q;const{handDrawnSeed:n}=ut();let c=t.points,l=!1;const h=a;var d=o;const p=[];for(const I in t.cssCompiledStyles)wa(I)||p.push(t.cssCompiledStyles[I]);d.intersect&&h.intersect&&(c=c.slice(1,t.points.length-1),c.unshift(h.intersect(c[0])),E.debug("Last point APA12",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),t.toCluster&&(E.info("to cluster abc88",r.get(t.toCluster)),c=Xo(t.points,r.get(t.toCluster).node),l=!0),t.fromCluster&&(E.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Xo(c.reverse(),r.get(t.fromCluster).node).reverse(),l=!0);let g=c.filter(I=>!Number.isNaN(I.y));g=ru(g);let f=Tn;switch(f=Sn,t.curve){case"linear":f=Sn;break;case"basis":default:f=Tn;break;case"cardinal":f=qp;break;case"bumpX":f=rs;break;case"bumpY":f=is;break;case"catmullRom":f=Np;break;case"monotoneX":f=Pp;break;case"monotoneY":f=Ip;break;case"natural":f=Op;break;case"step":f=Dp;break;case"stepAfter":f=Ep;break;case"stepBefore":f=$p}const{x:m,y:b}=On(t),y=my().x(m).y(b).curve(f);let x,w;switch(t.thickness){case"normal":default:x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible"}switch(t.pattern){case"solid":default:x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}let L=y(g);const v=Array.isArray(t.style)?t.style:t.style?[t.style]:[];let C=v.find(I=>I==null?void 0:I.startsWith("stroke:"));if(t.look==="handDrawn"){const I=j(e);Object.assign([],g);const F=I.path(L,{roughness:.3,seed:n});x+=" transition",w=dt(F).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((M,A)=>M+";"+A,""):"");let T=w.attr("d");w.attr("d",T),e.node().appendChild(w.node())}else{const I=p.join(";"),F=v?v.reduce((A,_)=>A+_+";",""):"";let T="";t.animate&&(T=" edge-animation-fast"),t.animation&&(T=" edge-animation-"+t.animation);const M=I?I+";"+F+";":F;w=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")+(T??"")).attr("style",M),C=(q=M.match(/stroke:([^;]+)/))==null?void 0:q[1]}let S="";(ut().flowchart.arrowMarkerAbsolute||ut().state.arrowMarkerAbsolute)&&(S=ya(!0)),E.info("arrowTypeStart",t.arrowTypeStart),E.info("arrowTypeEnd",t.arrowTypeEnd),Kd(w,t,S,s,i,C);const P=c[Math.floor(c.length/2)];Xt.isLabelCoordinateInPath(P,w.attr("d"))||(l=!0);let O={};return l&&(O.updatedPath=c),O.originalPath=t.points,O},"insertEdge"),iu=u((e,t,r,i)=>{t.forEach(a=>{xu[a](e,r,i)})},"insertMarkers"),au=u((e,t,r)=>{E.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),ou=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),nu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),su=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),hu=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),cu=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),du=u((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),uu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),pu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),gu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),fu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),mu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),yu=u((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
180
180
  L20,10
181
181
  M20,10
182
- L0,20`)},"requirement_arrow"),xu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Cu={extension:ou,composition:nu,aggregation:su,dependency:lu,lollipop:hu,point:cu,circle:du,cross:uu,barb:pu,only_one:gu,zero_or_one:fu,one_or_more:mu,zero_or_more:yu,requirement_arrow:bu,requirement_contains:xu},Nn=au,ku={common:Ee,getConfig:Lt,insertCluster:Dn,insertEdge:Rn,insertEdgeLabel:zn,insertMarkers:Nn,insertNode:xa,interpolateToCurve:So,labelHelper:Q,log:E,positionEdgeLabel:qn},cr={},Qo=u(e=>{for(const t of e)cr[t.name]=t},"registerLayoutLoaders"),u(()=>{Qo([{name:"dagre",loader:u(async()=>await gt(()=>import("./dagre-5GWH7T2D-BfpcVBgq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),"loader")},{name:"cose-bilkent",loader:u(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-wz1Sfx7j.js"),__vite__mapDeps([14,15,2,3,11,12,13]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")();let Jo,tn,en,rn,Qi;Jp=u(async(e,t)=>{if(!(e.layoutAlgorithm in cr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=cr[e.layoutAlgorithm];return(await r.loader()).render(e,t,ku,{algorithm:r.algorithm})},"render"),Qp=u((e="",{fallback:t="dagre"}={})=>{if(e in cr)return e;if(t in cr)return E.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Jo="comm",tn="rule",en="decl",rn=Math.abs,Qi=String.fromCharCode;function wu(e){return e.trim()}function Ji(e,t,r){return e.replace(t,r)}function Yf(e,t,r){return e.indexOf(t,r)}function dr(e,t){return 0|e.charCodeAt(t)}function ur(e,t,r){return e.slice(t,r)}function le(e){return e.length}function ta(e,t){return t.push(e),e}var ea=1,pr=1,Su=0,Kt=0,wt=0,gr="";function an(e,t,r,i,a,o,s,n){return{value:e,root:t,parent:r,type:i,props:a,children:o,line:ea,column:pr,length:s,return:"",siblings:n}}function Uf(){return wt=Kt>0?dr(gr,--Kt):0,pr--,wt===10&&(pr=1,ea--),wt}function re(){return wt=Kt<Su?dr(gr,Kt++):0,pr++,wt===10&&(pr=1,ea++),wt}function Fe(){return dr(gr,Kt)}function ra(){return Kt}function ia(e,t){return ur(gr,e,t)}function ii(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function on(e){return wu(ia(Kt-1,nn(e===91?e+2:e===40?e+1:e)))}function Vf(e){for(;(wt=Fe())&&wt<33;)re();return ii(e)>2||ii(wt)>3?"":" "}function Gf(e,t){for(;--t&&re()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return ia(e,ra()+(t<6&&Fe()==32&&re()==32))}function nn(e){for(;re();)switch(wt){case e:return Kt;case 34:case 39:e!==34&&e!==39&&nn(wt);break;case 40:e===41&&nn(e);break;case 92:re()}return Kt}function Xf(e,t){for(;re()&&e+wt!==57&&(e+wt!==84||Fe()!==47););return"/*"+ia(t,Kt-1)+"*"+Qi(e===47?e:re())}function Zf(e){for(;!ii(Fe());)re();return ia(e,Kt)}function Kf(e){return(function(t){return gr="",t})(aa("",null,null,null,[""],e=(function(t){return ea=pr=1,Su=le(gr=t),Kt=0,[]})(e),0,[0],e))}function aa(e,t,r,i,a,o,s,n,c){for(var l=0,h=0,d=s,p=0,g=0,f=0,m=1,b=1,y=1,x=0,w="",L=a,v=o,C=i,S=w;b;)switch(f=x,x=re()){case 40:if(f!=108&&dr(S,d-1)==58){Yf(S+=Ji(on(x),"&","&\f"),"&\f",rn(l?n[l-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:S+=on(x);break;case 9:case 10:case 13:case 32:S+=Vf(f);break;case 92:S+=Gf(ra()-1,7);continue;case 47:switch(Fe()){case 42:case 47:ta(Qf(Xf(re(),ra()),t,r,c),c),ii(f||1)!=5&&ii(Fe()||1)!=5||!le(S)||ur(S,-1,void 0)===" "||(S+=" ");break;default:S+="/"}break;case 123*m:n[l++]=le(S)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:b=0;case 59+h:y==-1&&(S=Ji(S,/\f/g,"")),g>0&&(le(S)-d||m===0&&f===47)&&ta(g>32?Bu(S+";",i,r,d-1,c):Bu(Ji(S," ","")+";",i,r,d-2,c),c);break;case 59:S+=";";default:if(ta(C=Tu(S,t,r,l,h,a,n,w,L=[],v=[],d,o),o),x===123)if(h===0)aa(S,t,C,C,L,o,d,n,v);else{switch(p){case 99:if(dr(S,3)===110)break;case 108:if(dr(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?aa(e,C,C,i&&ta(Tu(e,C,C,0,0,a,n,w,a,L=[],d,v),v),a,v,d,n,i?L:v):aa(S,C,C,C,[""],v,0,n,v)}}l=h=g=0,m=y=1,w=S="",d=s;break;case 58:d=1+le(S),g=f;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Uf()==125)continue}switch(S+=Qi(x),x*m){case 38:y=h>0?1:(S+="\f",-1);break;case 44:n[l++]=(le(S)-1)*y,y=1;break;case 64:Fe()===45&&(S+=on(re())),p=Fe(),h=d=le(w=S+=Zf(ra())),x++;break;case 45:f===45&&le(S)==2&&(m=0)}}return o}function Tu(e,t,r,i,a,o,s,n,c,l,h,d){for(var p=a-1,g=a===0?o:[""],f=(function(v){return v.length})(g),m=0,b=0,y=0;m<i;++m)for(var x=0,w=ur(e,p+1,p=rn(b=s[m])),L=e;x<f;++x)(L=wu(b>0?g[x]+" "+w:Ji(w,/&\f/g,g[x])))&&(c[y++]=L);return an(e,t,r,a===0?tn:n,c,l,h,d)}function Qf(e,t,r,i){return an(e,t,r,Jo,Qi(wt),ur(e,2,-2),0,i)}function Bu(e,t,r,i,a){return an(e,t,r,en,ur(e,0,i),ur(e,i+1,-1),i,a)}function sn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Jf(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case en:return e.return=e.return||e.value;case Jo:return"";case"@keyframes":return e.return=e.value+"{"+sn(e.children,i)+"}";case tn:if(!le(e.value=e.props.join(",")))return""}return le(r=sn(e.children,i))?e.return=e.value+"{"+r+"}":""}var tm={id:"c4",detector:u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-FPNF74CW-BHPzDxE2.js");return{diagram:t}},__vite__mapDeps([16,17,11,12,2,3,13]),import.meta.url);return{id:"c4",diagram:e}},"loader")},vu="flowchart",em=u((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)!=="elk"&&/^\s*graph/.test(e)},"detector"),rm={id:vu,detector:em,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PVAE7QVJ-DfbIRSAW.js");return{diagram:t}},__vite__mapDeps([18,19,20,11,12,21,22,2,3,13]),import.meta.url);return{id:vu,diagram:e}},"loader")},Mu="flowchart-v2",im=u((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-d3"&&(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),!(!/^\s*graph/.test(e)||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)!=="dagre-wrapper")||/^\s*flowchart/.test(e))},"detector"),am={id:Mu,detector:im,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PVAE7QVJ-DfbIRSAW.js");return{diagram:t}},__vite__mapDeps([18,19,20,11,12,21,22,2,3,13]),import.meta.url);return{id:Mu,diagram:e}},"loader")},om={id:"er",detector:u(e=>/^\s*erDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-AWTI2OKA-E84mAle_.js");return{diagram:t}},__vite__mapDeps([23,20,11,12,21,22,2,3,13]),import.meta.url);return{id:"er",diagram:e}},"loader")},Lu="gitGraph",nm={id:Lu,detector:u(e=>/^\s*gitGraph/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-C1t6QtVa.js");return{diagram:t}},__vite__mapDeps([24,25,26,27,2,3,5,4,7,8,10,28,11,12,13]),import.meta.url);return{id:Lu,diagram:e}},"loader")},_u="gantt",sm={id:_u,detector:u(e=>/^\s*gantt/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-OWAHRB6G-DR4HZ1z_.js");return{diagram:t}},__vite__mapDeps([29,2,3,11,12,30,31,32,13]),import.meta.url);return{id:_u,diagram:e}},"loader")},Fu="info",lm={id:Fu,detector:u(e=>/^\s*info/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-STP46IZ2-CwiAoz9f.js");return{diagram:t}},__vite__mapDeps([33,27,2,3,5,4,7,8,10,28,11,12,13]),import.meta.url);return{id:Fu,diagram:e}},"loader")},hm={id:"pie",detector:u(e=>/^\s*pie/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-C5IQ5DBZ.js");return{diagram:t}},__vite__mapDeps([34,25,27,2,3,5,4,7,8,10,28,11,12,35,13,36,32]),import.meta.url);return{id:"pie",diagram:e}},"loader")},Au="quadrantChart",cm={id:Au,detector:u(e=>/^\s*quadrantChart/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-LMRXKWRM-CFXFnQxx.js");return{diagram:t}},__vite__mapDeps([37,11,12,31,2,3,32,13]),import.meta.url);return{id:Au,diagram:e}},"loader")},$u="xychart",dm={id:$u,detector:u(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-6GGTOJPD-Dcz3O-A3.js");return{diagram:t}},__vite__mapDeps([38,11,12,32,36,39,31,2,3,13]),import.meta.url);return{id:$u,diagram:e}},"loader")},Eu="requirement",um={id:Eu,detector:u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4UW4RH46-D9bPC89T.js");return{diagram:t}},__vite__mapDeps([40,20,11,12,21,2,3,13]),import.meta.url);return{id:Eu,diagram:e}},"loader")},Ou="sequence",pm={id:Ou,detector:u(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-C3RYC4MD-6N7_hY4k.js");return{diagram:t}},__vite__mapDeps([41,17,26,11,12,2,3,13]),import.meta.url);return{id:Ou,diagram:e}},"loader")},Du="class",gm=u((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*classDiagram/.test(e)},"detector"),fm={id:Du,detector:gm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-KNZD7YFC-DHs5cFzy.js");return{diagram:t}},__vite__mapDeps([42,43,19,20,11,12,21,2,3,13]),import.meta.url);return{id:Du,diagram:e}},"loader")},Iu="classDiagram",mm=u((e,t)=>{var r;return!(!/^\s*classDiagram/.test(e)||((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")||/^\s*classDiagram-v2/.test(e)},"detector"),ym={id:Iu,detector:mm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-RKCZMP56-DHs5cFzy.js");return{diagram:t}},__vite__mapDeps([44,43,19,20,11,12,21,2,3,13]),import.meta.url);return{id:Iu,diagram:e}},"loader")},Pu="state",bm=u((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*stateDiagram/.test(e)},"detector"),xm={id:Pu,detector:bm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-KXAO66HF-Bd68WT3b.js");return{diagram:t}},__vite__mapDeps([45,46,20,11,12,21,1,2,3,4,5,6,7,8,9,13]),import.meta.url);return{id:Pu,diagram:e}},"loader")},Nu="stateDiagram",Cm=u((e,t)=>{var r;return!!/^\s*stateDiagram-v2/.test(e)||!(!/^\s*stateDiagram/.test(e)||((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")},"detector"),km={id:Nu,detector:Cm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js");return{diagram:t}},__vite__mapDeps([47,46,20,11,12,21,2,3,13]),import.meta.url);return{id:Nu,diagram:e}},"loader")},Ru="journey",wm={id:Ru,detector:u(e=>/^\s*journey/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-BIP6EPQ6-BBiFyygf.js");return{diagram:t}},__vite__mapDeps([48,17,19,11,12,35,13,2,3]),import.meta.url);return{id:Ru,diagram:e}},"loader")},Sm=u((e,t,r)=>{E.debug(`rendering svg for syntax error
183
- `);const i=Fn(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Ta(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),qu={draw:Sm},Tm=qu,Bm={db:{},renderer:qu,parser:{parse:u(()=>{},"parse")}},zu="flowchart-elk",vm=u((e,t={})=>{var r;return!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk")&&(t.layout="elk",!0)},"detector"),Mm={id:zu,detector:vm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PVAE7QVJ-DfbIRSAW.js");return{diagram:t}},__vite__mapDeps([18,19,20,11,12,21,22,2,3,13]),import.meta.url);return{id:zu,diagram:e}},"loader")},Wu="timeline",Lm={id:Wu,detector:u(e=>/^\s*timeline/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-XQNQX7LJ-BEaynAiY.js");return{diagram:t}},__vite__mapDeps([49,11,12,35,13,2,3]),import.meta.url);return{id:Wu,diagram:e}},"loader")},ju="mindmap",_m={id:ju,detector:u(e=>/^\s*mindmap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-Q6HEUPPD-CVLQNn1q.js");return{diagram:t}},__vite__mapDeps([50,20,11,12,21,2,3,13]),import.meta.url);return{id:ju,diagram:e}},"loader")},Hu="kanban",Fm={id:Hu,detector:u(e=>/^\s*kanban/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-6OIFK2YF-DhgA6Nt6.js");return{diagram:t}},__vite__mapDeps([51,19,2,3,11,12,13]),import.meta.url);return{id:Hu,diagram:e}},"loader")},Yu="sankey",Am={id:Yu,detector:u(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-GR3RE2ED-BSJOau8E.js");return{diagram:t}},__vite__mapDeps([52,11,12,36,32,53,2,3,13]),import.meta.url);return{id:Yu,diagram:e}},"loader")},Uu="packet",$m={id:Uu,detector:u(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-tLScBy7Z.js");return{diagram:t}},__vite__mapDeps([54,25,27,2,3,5,4,7,8,10,28,11,12,13]),import.meta.url);return{id:Uu,diagram:e}},"loader")},Vu="radar",Em={id:Vu,detector:u(e=>/^\s*radar-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-ZTc3qikh.js");return{diagram:t}},__vite__mapDeps([55,25,27,2,3,5,4,7,8,10,28,11,12,13]),import.meta.url);return{id:Vu,diagram:e}},"loader")},Gu="block",Om={id:Gu,detector:u(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-QIGZ2CNN-BrOkAf_c.js");return{diagram:t}},__vite__mapDeps([56,19,10,4,2,3,5,11,12,1,22,13]),import.meta.url);return{id:Gu,diagram:e}},"loader")},Xu="architecture",Dm={id:Xu,detector:u(e=>/^\s*architecture/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-W76B3OCA-DBzWQKKu.js");return{diagram:t}},__vite__mapDeps([57,25,27,2,3,5,4,7,8,10,28,15,11,12,13]),import.meta.url);return{id:Xu,diagram:e}},"loader")},Zu="treemap",Im={id:Zu,detector:u(e=>/^\s*treemap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-N5W7TBWH-Bf0oqqQh.js");return{diagram:t}},__vite__mapDeps([58,21,25,27,2,3,5,4,7,8,10,28,11,12,36,32,59,13]),import.meta.url);return{id:Zu,diagram:e}},"loader")},Ku=!1,oa=u(()=>{Ku||(Ku=!0,Hr("error",Bm,e=>e.toLowerCase().trim()==="error"),Hr("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),yi(Mm,_m,Dm),yi(tm,Fm,ym,fm,om,sm,lm,hm,um,pm,am,rm,Lm,nm,km,xm,wm,cm,Am,$m,dm,Om,Em,Im))},"addDiagrams"),Pm=u(async()=>{E.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Se).map(async([t,{detector:r,loader:i}])=>{if(i)try{vi(t)}catch{try{const{diagram:a,id:o}=await i();Hr(o,a,r)}catch(a){throw E.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Se[t],a}}}))).filter(t=>t.status==="rejected");if(e.length>0){E.error(`Failed to load ${e.length} external diagrams`);for(const t of e)E.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function Qu(e,t){e.attr("role","graphics-document document"),t!==""&&e.attr("aria-roledescription",t)}function Ju(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}u(Qu,"setA11yDiagramInfo"),u(Ju,"addSVGa11yTitleDescription");var ln=(Ue=class{constructor(t,r,i,a,o){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=o}static async fromText(t,r={}){var l,h;const i=Lt(),a=mi(t,i);t=Kh(t)+`
184
- `;try{vi(a)}catch{const d=ws(a);if(!d)throw new za(`Diagram ${a} not found.`);const{id:p,diagram:g}=await d();Hr(p,g)}const{db:o,parser:s,renderer:n,init:c}=vi(a);return s.parser&&(s.parser.yy=o),(l=o.clear)==null||l.call(o),c==null||c(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await s.parse(t),new Ue(a,t,o,s,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},u(Ue,"Diagram"),Ue),tp=[],Nm=u(()=>{tp.forEach(e=>{e()}),tp=[]},"attachFunctions"),Rm=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function ep(e){const t=e.match(qa);if(!t)return{text:e,metadata:{}};let r=Qn(t[1],{schema:_n})??{};r=typeof r!="object"||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}u(ep,"extractFrontMatter");var qm=u(e=>e.replace(/\r\n?/g,`
185
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),zm=u(e=>{const{text:t,metadata:r}=ep(e),{displayMode:i,title:a,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:a,config:o,text:t}},"processFrontmatter"),Wm=u(e=>{const t=Xt.detectInit(e)??{},r=Xt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Rh(e),directive:t}},"processDirectives");function hn(e){const t=qm(e),r=zm(t),i=Wm(r.text),a=li(r.config,i.directive);return{code:e=Rm(i.text),title:r.title,config:a}}function rp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(hn,"preprocessDiagram"),u(rp,"toBase64");var jm=["foreignobject"],Hm=["dominant-baseline"];function cn(e){const t=hn(e);return zr(),Is(t.config??{}),t}async function ip(e,t){oa();try{const{code:r,config:i}=cn(e);return{diagramType:(await sp(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}u(cn,"processAndSetConfigs"),u(ip,"parse");var ap=u((e,t,r=[])=>`
186
- .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Ym=u((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
182
+ L0,20`)},"requirement_arrow"),bu=u((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),xu={extension:au,composition:ou,aggregation:nu,dependency:su,lollipop:lu,point:hu,circle:cu,cross:du,barb:uu,only_one:pu,zero_or_one:gu,one_or_more:fu,zero_or_more:mu,requirement_arrow:yu,requirement_contains:bu},Pn=iu,Cu={common:Ee,getConfig:Lt,insertCluster:Dn,insertEdge:Nn,insertEdgeLabel:Rn,insertMarkers:Pn,insertNode:xa,interpolateToCurve:wo,labelHelper:Q,log:E,positionEdgeLabel:qn},cr={},Ko=u(e=>{for(const t of e)cr[t.name]=t},"registerLayoutLoaders"),u(()=>{Ko([{name:"dagre",loader:u(async()=>await gt(()=>import("./dagre-5GWH7T2D-ouQPkxT3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),"loader")},{name:"cose-bilkent",loader:u(async()=>await gt(()=>import("./cose-bilkent-S5V4N54A-CVM83SqK.js"),__vite__mapDeps([15,16,2,3,12,13,14,6]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders")();let Qo,Jo,tn,en,Qi;Jp=u(async(e,t)=>{if(!(e.layoutAlgorithm in cr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=cr[e.layoutAlgorithm];return(await r.loader()).render(e,t,Cu,{algorithm:r.algorithm})},"render"),Qp=u((e="",{fallback:t="dagre"}={})=>{if(e in cr)return e;if(t in cr)return E.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Qo="comm",Jo="rule",tn="decl",en=Math.abs,Qi=String.fromCharCode;function ku(e){return e.trim()}function Ji(e,t,r){return e.replace(t,r)}function Hf(e,t,r){return e.indexOf(t,r)}function dr(e,t){return 0|e.charCodeAt(t)}function ur(e,t,r){return e.slice(t,r)}function le(e){return e.length}function ta(e,t){return t.push(e),e}var ea=1,pr=1,wu=0,Kt=0,wt=0,gr="";function rn(e,t,r,i,a,o,s,n){return{value:e,root:t,parent:r,type:i,props:a,children:o,line:ea,column:pr,length:s,return:"",siblings:n}}function Yf(){return wt=Kt>0?dr(gr,--Kt):0,pr--,wt===10&&(pr=1,ea--),wt}function re(){return wt=Kt<wu?dr(gr,Kt++):0,pr++,wt===10&&(pr=1,ea++),wt}function Fe(){return dr(gr,Kt)}function ra(){return Kt}function ia(e,t){return ur(gr,e,t)}function ii(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function an(e){return ku(ia(Kt-1,on(e===91?e+2:e===40?e+1:e)))}function Uf(e){for(;(wt=Fe())&&wt<33;)re();return ii(e)>2||ii(wt)>3?"":" "}function Vf(e,t){for(;--t&&re()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return ia(e,ra()+(t<6&&Fe()==32&&re()==32))}function on(e){for(;re();)switch(wt){case e:return Kt;case 34:case 39:e!==34&&e!==39&&on(wt);break;case 40:e===41&&on(e);break;case 92:re()}return Kt}function Gf(e,t){for(;re()&&e+wt!==57&&(e+wt!==84||Fe()!==47););return"/*"+ia(t,Kt-1)+"*"+Qi(e===47?e:re())}function Xf(e){for(;!ii(Fe());)re();return ia(e,Kt)}function Zf(e){return(function(t){return gr="",t})(aa("",null,null,null,[""],e=(function(t){return ea=pr=1,wu=le(gr=t),Kt=0,[]})(e),0,[0],e))}function aa(e,t,r,i,a,o,s,n,c){for(var l=0,h=0,d=s,p=0,g=0,f=0,m=1,b=1,y=1,x=0,w="",L=a,v=o,C=i,S=w;b;)switch(f=x,x=re()){case 40:if(f!=108&&dr(S,d-1)==58){Hf(S+=Ji(an(x),"&","&\f"),"&\f",en(l?n[l-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:S+=an(x);break;case 9:case 10:case 13:case 32:S+=Uf(f);break;case 92:S+=Vf(ra()-1,7);continue;case 47:switch(Fe()){case 42:case 47:ta(Kf(Gf(re(),ra()),t,r,c),c),ii(f||1)!=5&&ii(Fe()||1)!=5||!le(S)||ur(S,-1,void 0)===" "||(S+=" ");break;default:S+="/"}break;case 123*m:n[l++]=le(S)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:b=0;case 59+h:y==-1&&(S=Ji(S,/\f/g,"")),g>0&&(le(S)-d||m===0&&f===47)&&ta(g>32?Tu(S+";",i,r,d-1,c):Tu(Ji(S," ","")+";",i,r,d-2,c),c);break;case 59:S+=";";default:if(ta(C=Su(S,t,r,l,h,a,n,w,L=[],v=[],d,o),o),x===123)if(h===0)aa(S,t,C,C,L,o,d,n,v);else{switch(p){case 99:if(dr(S,3)===110)break;case 108:if(dr(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?aa(e,C,C,i&&ta(Su(e,C,C,0,0,a,n,w,a,L=[],d,v),v),a,v,d,n,i?L:v):aa(S,C,C,C,[""],v,0,n,v)}}l=h=g=0,m=y=1,w=S="",d=s;break;case 58:d=1+le(S),g=f;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Yf()==125)continue}switch(S+=Qi(x),x*m){case 38:y=h>0?1:(S+="\f",-1);break;case 44:n[l++]=(le(S)-1)*y,y=1;break;case 64:Fe()===45&&(S+=an(re())),p=Fe(),h=d=le(w=S+=Xf(ra())),x++;break;case 45:f===45&&le(S)==2&&(m=0)}}return o}function Su(e,t,r,i,a,o,s,n,c,l,h,d){for(var p=a-1,g=a===0?o:[""],f=(function(v){return v.length})(g),m=0,b=0,y=0;m<i;++m)for(var x=0,w=ur(e,p+1,p=en(b=s[m])),L=e;x<f;++x)(L=ku(b>0?g[x]+" "+w:Ji(w,/&\f/g,g[x])))&&(c[y++]=L);return rn(e,t,r,a===0?Jo:n,c,l,h,d)}function Kf(e,t,r,i){return rn(e,t,r,Qo,Qi(wt),ur(e,2,-2),0,i)}function Tu(e,t,r,i,a){return rn(e,t,r,tn,ur(e,0,i),ur(e,i+1,-1),i,a)}function nn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Qf(e,t,r,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case tn:return e.return=e.return||e.value;case Qo:return"";case"@keyframes":return e.return=e.value+"{"+nn(e.children,i)+"}";case Jo:if(!le(e.value=e.props.join(",")))return""}return le(r=nn(e.children,i))?e.return=e.value+"{"+r+"}":""}var Jf={id:"c4",detector:u(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./c4Diagram-FPNF74CW-DjmldG_J.js");return{diagram:t}},__vite__mapDeps([17,18,12,13,2,3,14,6]),import.meta.url);return{id:"c4",diagram:e}},"loader")},Bu="flowchart",tm=u((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)!=="elk"&&/^\s*graph/.test(e)},"detector"),em={id:Bu,detector:tm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PVAE7QVJ-CmvW5iTb.js");return{diagram:t}},__vite__mapDeps([19,20,21,12,13,22,23,2,3,14,6]),import.meta.url);return{id:Bu,diagram:e}},"loader")},vu="flowchart-v2",rm=u((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)!=="dagre-d3"&&(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),!(!/^\s*graph/.test(e)||((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)!=="dagre-wrapper")||/^\s*flowchart/.test(e))},"detector"),im={id:vu,detector:rm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PVAE7QVJ-CmvW5iTb.js");return{diagram:t}},__vite__mapDeps([19,20,21,12,13,22,23,2,3,14,6]),import.meta.url);return{id:vu,diagram:e}},"loader")},am={id:"er",detector:u(e=>/^\s*erDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./erDiagram-AWTI2OKA-DYu8cEdc.js");return{diagram:t}},__vite__mapDeps([24,21,12,13,22,23,2,3,14,6]),import.meta.url);return{id:"er",diagram:e}},"loader")},Mu="gitGraph",om={id:Mu,detector:u(e=>/^\s*gitGraph/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX-CWO24eP6.js");return{diagram:t}},__vite__mapDeps([25,26,27,28,2,3,5,4,8,9,6,11,29,12,13,14]),import.meta.url);return{id:Mu,diagram:e}},"loader")},Lu="gantt",nm={id:Lu,detector:u(e=>/^\s*gantt/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./ganttDiagram-OWAHRB6G-BaKQlCaT.js");return{diagram:t}},__vite__mapDeps([30,2,3,12,13,31,32,33,14,6]),import.meta.url);return{id:Lu,diagram:e}},"loader")},_u="info",sm={id:_u,detector:u(e=>/^\s*info/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./infoDiagram-STP46IZ2-CAuVVehw.js");return{diagram:t}},__vite__mapDeps([34,28,2,3,5,4,8,9,6,11,29,12,13,14]),import.meta.url);return{id:_u,diagram:e}},"loader")},lm={id:"pie",detector:u(e=>/^\s*pie/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX-D8JFQcWR.js");return{diagram:t}},__vite__mapDeps([35,26,28,2,3,5,4,8,9,6,11,29,12,13,36,14,37,33]),import.meta.url);return{id:"pie",diagram:e}},"loader")},Fu="quadrantChart",hm={id:Fu,detector:u(e=>/^\s*quadrantChart/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./quadrantDiagram-LMRXKWRM-Nf8GzxXG.js");return{diagram:t}},__vite__mapDeps([38,12,13,32,2,3,33,14,6]),import.meta.url);return{id:Fu,diagram:e}},"loader")},Au="xychart",cm={id:Au,detector:u(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./xychartDiagram-6GGTOJPD-jdLZsMb2.js");return{diagram:t}},__vite__mapDeps([39,12,13,33,37,40,32,2,3,14,6]),import.meta.url);return{id:Au,diagram:e}},"loader")},$u="requirement",dm={id:$u,detector:u(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./requirementDiagram-4UW4RH46-CCUxF8BZ.js");return{diagram:t}},__vite__mapDeps([41,21,12,13,22,2,3,14,6]),import.meta.url);return{id:$u,diagram:e}},"loader")},Eu="sequence",um={id:Eu,detector:u(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sequenceDiagram-C3RYC4MD-CBJ152Q3.js");return{diagram:t}},__vite__mapDeps([42,18,27,12,13,2,3,14,6]),import.meta.url);return{id:Eu,diagram:e}},"loader")},Du="class",pm=u((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*classDiagram/.test(e)},"detector"),gm={id:Du,detector:pm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-KNZD7YFC-D-xwLnlX.js");return{diagram:t}},__vite__mapDeps([43,44,20,21,12,13,22,2,3,14,6]),import.meta.url);return{id:Du,diagram:e}},"loader")},Ou="classDiagram",fm=u((e,t)=>{var r;return!(!/^\s*classDiagram/.test(e)||((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")||/^\s*classDiagram-v2/.test(e)},"detector"),mm={id:Ou,detector:fm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./classDiagram-v2-RKCZMP56-D-xwLnlX.js");return{diagram:t}},__vite__mapDeps([45,44,20,21,12,13,22,2,3,14,6]),import.meta.url);return{id:Ou,diagram:e}},"loader")},Iu="state",ym=u((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper"&&/^\s*stateDiagram/.test(e)},"detector"),bm={id:Iu,detector:ym,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-KXAO66HF-BlBFSAZr.js");return{diagram:t}},__vite__mapDeps([46,47,21,12,13,22,1,2,3,4,5,6,7,8,9,10,14]),import.meta.url);return{id:Iu,diagram:e}},"loader")},Pu="stateDiagram",xm=u((e,t)=>{var r;return!!/^\s*stateDiagram-v2/.test(e)||!(!/^\s*stateDiagram/.test(e)||((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)!=="dagre-wrapper")},"detector"),Cm={id:Pu,detector:xm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-UMBNRL4Z-DbA-iToo.js");return{diagram:t}},__vite__mapDeps([48,47,21,12,13,22,2,3,14,6]),import.meta.url);return{id:Pu,diagram:e}},"loader")},Nu="journey",km={id:Nu,detector:u(e=>/^\s*journey/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./journeyDiagram-BIP6EPQ6-D4Rp6H_h.js");return{diagram:t}},__vite__mapDeps([49,18,20,12,13,36,14,2,3,6]),import.meta.url);return{id:Nu,diagram:e}},"loader")},wm=u((e,t,r)=>{E.debug(`rendering svg for syntax error
183
+ `);const i=_n(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Sa(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),qu={draw:wm},Sm=qu,Tm={db:{},renderer:qu,parser:{parse:u(()=>{},"parse")}},Ru="flowchart-elk",Bm=u((e,t={})=>{var r;return!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk")&&(t.layout="elk",!0)},"detector"),vm={id:Ru,detector:Bm,loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./flowDiagram-PVAE7QVJ-CmvW5iTb.js");return{diagram:t}},__vite__mapDeps([19,20,21,12,13,22,23,2,3,14,6]),import.meta.url);return{id:Ru,diagram:e}},"loader")},zu="timeline",Mm={id:zu,detector:u(e=>/^\s*timeline/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./timeline-definition-XQNQX7LJ-CGrhjuAs.js");return{diagram:t}},__vite__mapDeps([50,12,13,36,14,2,3,6]),import.meta.url);return{id:zu,diagram:e}},"loader")},Wu="mindmap",Lm={id:Wu,detector:u(e=>/^\s*mindmap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./mindmap-definition-Q6HEUPPD-kyvIY8Dg.js");return{diagram:t}},__vite__mapDeps([51,21,12,13,22,2,3,14,6]),import.meta.url);return{id:Wu,diagram:e}},"loader")},ju="kanban",_m={id:ju,detector:u(e=>/^\s*kanban/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./kanban-definition-6OIFK2YF-DFt9DftA.js");return{diagram:t}},__vite__mapDeps([52,20,2,3,12,13,14,6]),import.meta.url);return{id:ju,diagram:e}},"loader")},Hu="sankey",Fm={id:Hu,detector:u(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./sankeyDiagram-GR3RE2ED-Sr8kDwP1.js");return{diagram:t}},__vite__mapDeps([53,12,13,37,33,54,2,3,14,6]),import.meta.url);return{id:Hu,diagram:e}},"loader")},Yu="packet",Am={id:Yu,detector:u(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG-CVljmOW8.js");return{diagram:t}},__vite__mapDeps([55,26,28,2,3,5,4,8,9,6,11,29,12,13,14]),import.meta.url);return{id:Yu,diagram:e}},"loader")},Uu="radar",$m={id:Uu,detector:u(e=>/^\s*radar-beta/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R-DOK_psUO.js");return{diagram:t}},__vite__mapDeps([56,26,28,2,3,5,4,8,9,6,11,29,12,13,14]),import.meta.url);return{id:Uu,diagram:e}},"loader")},Vu="block",Em={id:Vu,detector:u(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./blockDiagram-QIGZ2CNN-DzxZjE7B.js");return{diagram:t}},__vite__mapDeps([57,20,11,4,2,3,5,12,13,1,6,23,14]),import.meta.url);return{id:Vu,diagram:e}},"loader")},Gu="architecture",Dm={id:Gu,detector:u(e=>/^\s*architecture/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./architectureDiagram-W76B3OCA-BJmVXUoW.js");return{diagram:t}},__vite__mapDeps([58,26,28,2,3,5,4,8,9,6,11,29,16,12,13,14]),import.meta.url);return{id:Gu,diagram:e}},"loader")},Xu="treemap",Om={id:Xu,detector:u(e=>/^\s*treemap/.test(e),"detector"),loader:u(async()=>{const{diagram:e}=await gt(async()=>{const{diagram:t}=await import("./diagram-N5W7TBWH-CQ817ZdR.js");return{diagram:t}},__vite__mapDeps([59,22,26,28,2,3,5,4,8,9,6,11,29,12,13,37,33,60,14]),import.meta.url);return{id:Xu,diagram:e}},"loader")},Zu=!1,oa=u(()=>{Zu||(Zu=!0,Hr("error",Tm,e=>e.toLowerCase().trim()==="error"),Hr("---",{db:{clear:u(()=>{},"clear")},styles:{},renderer:{draw:u(()=>{},"draw")},parser:{parse:u(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:u(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),yi(vm,Lm,Dm),yi(Jf,_m,mm,gm,am,nm,sm,lm,dm,um,im,em,Mm,om,Cm,bm,km,hm,Fm,Am,cm,Em,$m,Om))},"addDiagrams"),Im=u(async()=>{E.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Se).map(async([t,{detector:r,loader:i}])=>{if(i)try{vi(t)}catch{try{const{diagram:a,id:o}=await i();Hr(o,a,r)}catch(a){throw E.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Se[t],a}}}))).filter(t=>t.status==="rejected");if(e.length>0){E.error(`Failed to load ${e.length} external diagrams`);for(const t of e)E.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");function Ku(e,t){e.attr("role","graphics-document document"),t!==""&&e.attr("aria-roledescription",t)}function Qu(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}u(Ku,"setA11yDiagramInfo"),u(Qu,"addSVGa11yTitleDescription");var sn=(Ue=class{constructor(t,r,i,a,o){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=o}static async fromText(t,r={}){var l,h;const i=Lt(),a=mi(t,i);t=Zh(t)+`
184
+ `;try{vi(a)}catch{const d=ks(a);if(!d)throw new Ra(`Diagram ${a} not found.`);const{id:p,diagram:g}=await d();Hr(p,g)}const{db:o,parser:s,renderer:n,init:c}=vi(a);return s.parser&&(s.parser.yy=o),(l=o.clear)==null||l.call(o),c==null||c(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await s.parse(t),new Ue(a,t,o,s,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},u(Ue,"Diagram"),Ue),Ju=[],Pm=u(()=>{Ju.forEach(e=>{e()}),Ju=[]},"attachFunctions"),Nm=u(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function tp(e){const t=e.match(qa);if(!t)return{text:e,metadata:{}};let r=Kn(t[1],{schema:Ln})??{};r=typeof r!="object"||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}u(tp,"extractFrontMatter");var qm=u(e=>e.replace(/\r\n?/g,`
185
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Rm=u(e=>{const{text:t,metadata:r}=tp(e),{displayMode:i,title:a,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:a,config:o,text:t}},"processFrontmatter"),zm=u(e=>{const t=Xt.detectInit(e)??{},r=Xt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Nh(e),directive:t}},"processDirectives");function ln(e){const t=qm(e),r=Rm(t),i=zm(r.text),a=li(r.config,i.directive);return{code:e=Nm(i.text),title:r.title,config:a}}function ep(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}u(ln,"preprocessDiagram"),u(ep,"toBase64");var Wm=["foreignobject"],jm=["dominant-baseline"];function hn(e){const t=ln(e);return zr(),Os(t.config??{}),t}async function rp(e,t){oa();try{const{code:r,config:i}=hn(e);return{diagramType:(await np(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}u(hn,"processAndSetConfigs"),u(rp,"parse");var ip=u((e,t,r=[])=>`
186
+ .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Hm=u((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=`
187
187
  ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
188
188
  :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
189
- :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const a=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Sa(o.styles)||a.forEach(s=>{r+=ap(o.id,s,o.styles)}),Sa(o.textStyles)||(r+=ap(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),Um=u((e,t,r,i)=>{const a=Ym(e,r);return sn(Kf(`${i}{${el(t,a,e.themeVariables)}}`),Jf)},"createUserStyles"),Vm=u((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ke(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Gm=u((e="",t)=>{var r,i;return`<iframe style="width:100%;height:${(i=(r=t==null?void 0:t.viewBox)==null?void 0:r.baseVal)!=null&&i.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${rp(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
189
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const a=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{Rp(o.styles)||a.forEach(s=>{r+=ip(o.id,s,o.styles)}),Rp(o.textStyles)||(r+=ip(o.id,"tspan",((o==null?void 0:o.textStyles)||[]).map(s=>s.replace("color","fill"))))})}return r},"createCssStyles"),Ym=u((e,t,r,i)=>{const a=Hm(e,r);return nn(Zf(`${i}{${tl(t,a,e.themeVariables)}}`),Qf)},"createUserStyles"),Um=u((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ke(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Vm=u((e="",t)=>{var r,i;return`<iframe style="width:100%;height:${(i=(r=t==null?void 0:t.viewBox)==null?void 0:r.baseVal)!=null&&i.height?t.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${ep(`<body style="margin:0">${e}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
190
190
  The "iframe" tag is not supported by your browser.
191
- </iframe>`},"putIntoIFrame"),op=u((e,t,r,i,a)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const s=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&s.attr("xmlns:xlink",a),s.append("g"),e},"appendDivSvgG");function dn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(dn,"sandboxedIframe");var Xm=u((e,t,r,i)=>{var a,o,s;(a=e.getElementById(t))==null||a.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(i))==null||s.remove()},"removeExistingElements"),Zm=u(async function(e,t,r){var F,T,M,A,_,$;oa();const i=cn(t);t=i.code;const a=Lt();E.debug(a),t.length>((a==null?void 0:a.maxTextSize)??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+e,s="i"+e,n="#"+s,c="d"+e,l="#"+c,h=u(()=>{const O=dt(p?n:l).node();O&&"remove"in O&&O.remove()},"removeTempElements");let d=dt("body");const p=a.securityLevel==="sandbox",g=a.securityLevel==="loose",f=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const O=dn(dt(r),s);d=dt(O.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt(r);op(d,e,c,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(Xm(document,e,c,s),p){const O=dn(dt("body"),s);d=dt(O.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt("body");op(d,e,c)}let m,b;try{m=await ln.fromText(t,{title:i.title})}catch(O){if(a.suppressErrorRendering)throw h(),O;m=await ln.fromText("error"),b=O}const y=d.select(l).node(),x=m.type,w=y.firstChild,L=w.firstChild,v=(T=(F=m.renderer).getClasses)==null?void 0:T.call(F,t,m),C=Um(a,x,v,o),S=document.createElement("style");S.innerHTML=C,w.insertBefore(S,L);try{await m.renderer.draw(t,e,ma.version,m)}catch(O){throw a.suppressErrorRendering?h():Tm.draw(t,e,ma.version),O}const P=d.select(`${l} svg`),D=(A=(M=m.db).getAccTitle)==null?void 0:A.call(M),R=($=(_=m.db).getAccDescription)==null?void 0:$.call(_);lp(x,P,D,R),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let I=d.select(l).node().innerHTML;if(E.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),I=Vm(I,p,Ct(a.arrowMarkerAbsolute)),p){const O=d.select(l+" svg").node();I=Gm(I,O)}else g||(I=Ie.sanitize(I,{ADD_TAGS:jm,ADD_ATTR:Hm,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Nm(),b)throw b;return h(),{diagramType:x,svg:I,bindFunctions:m.db.bindFunctions}},"render");function np(e={}){var i;const t=kt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Os(t),t!=null&&t.theme&&t.theme in oe?t.themeVariables=oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Es(t):Ya();di(r.logLevel),oa()}u(np,"initialize");var sp=u((e,t={})=>{const{code:r}=hn(e);return ln.fromText(r,t)},"getDiagramFromText");function lp(e,t,r,i){Qu(t,e),Ju(t,r,i,t.attr("id"))}u(lp,"addA11yInfo");var Ye=Object.freeze({render:Zm,parse:ip,getDiagramFromText:sp,initialize:np,getConfig:Lt,setConfig:Ua,getSiteConfig:Ya,updateSiteConfig:Ds,reset:u(()=>{zr()},"reset"),globalReset:u(()=>{zr(Pe)},"globalReset"),defaultConfig:Pe});di(Lt().logLevel),zr(Lt());var Km=u((e,t,r)=>{E.warn(e),Lo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),hp=u(async function(e={querySelector:".mermaid"}){try{await Qm(e)}catch(t){if(Lo(t)&&E.error(t.str),jt.parseError&&jt.parseError(t),!e.suppressErrors)throw E.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Qm=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ye.getConfig();let a;if(E.debug((e?"":"No ")+"Callback function found"),r)a=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(t)}E.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(E.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ye.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new Xt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];for(const c of Array.from(a)){if(E.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${o.next()}`;s=c.innerHTML,s=ic(Xt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Xt.detectInit(s);h&&E.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:p}=await pn(l,s,c);c.innerHTML=d,e&&await e(l),p&&p(c)}catch(d){Km(d,n,jt.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),cp=u(function(e){Ye.initialize(e)},"initialize"),Jm=u(async function(e,t,r){E.warn("mermaid.init is deprecated. Please use run instead."),e&&cp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await hp(i)},"init"),ty=u(async(e,{lazyLoad:t=!0}={})=>{oa(),yi(...e),t===!1&&await Pm()},"registerExternalDiagrams"),dp=u(function(){if(jt.startOnLoad){const{startOnLoad:e}=Ye.getConfig();e&&jt.run().catch(t=>E.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",dp,!1);let up,ai,na,un,pp,pn,jt;up=u(function(e){jt.parseError=e},"setParseErrorHandler"),ai=[],na=!1,un=u(async()=>{if(!na){for(na=!0;ai.length>0;){const e=ai.shift();if(e)try{await e()}catch(t){E.error("Error executing queue",t)}}na=!1}},"executeQueue"),pp=u(async(e,t)=>new Promise((r,i)=>{const a=u(()=>new Promise((o,s)=>{Ye.parse(e,t).then(n=>{o(n),r(n)},n=>{var c;E.error("Error parsing",n),(c=jt.parseError)==null||c.call(jt,n),s(n),i(n)})}),"performCall");ai.push(a),un().catch(i)}),"parse"),pn=u((e,t,r)=>new Promise((i,a)=>{const o=u(()=>new Promise((s,n)=>{Ye.render(e,t,r).then(c=>{s(c),i(c)},c=>{var l;E.error("Error parsing",c),(l=jt.parseError)==null||l.call(jt,c),n(c),a(c)})}),"performCall");ai.push(o),un().catch(a)}),"render"),jt={startOnLoad:!0,mermaidAPI:Ye,parse:pp,render:pn,init:Jm,run:hp,registerExternalDiagrams:ty,registerLayoutLoaders:Qo,initialize:cp,parseError:void 0,contentLoaded:dp,setParseErrorHandler:up,detectType:mi,registerIconPacks:Wn,getRegisteredDiagramsMetadata:u(()=>Object.keys(Se).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},Gn=jt,Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Gn},Symbol.toStringTag,{value:"Module"}))});export{ga as $,zp as A,Ge as B,Qt as C,vn as D,Mn as E,li as F,Lt as G,fa as H,Ln as I,_n as J,Fn as K,ma as L,An as M,$e as N,Wp as O,_r as P,ya as Q,hi as R,ba as S,$n as T,et as U,En as V,Xe as W,W as X,X as Y,jp as Z,u as _,vy as __tla,On as a,Dn as a0,xa as a1,Hp as a2,In as a3,Ct as a4,ue as a5,ci as a6,Ca as a7,ke as a8,ka as a9,Y as aa,wa as ab,Pn as ac,Sa as ad,Nn as ae,Yp as af,Up as ag,Vp as ah,U as ai,Gp as aj,Rn as ak,qn as al,zn as am,Xp as an,Ze as ao,Wn as ap,jn as aq,Hn as ar,Zp as as,Yn as b,ut as c,Ta as d,kt as e,ie as f,Un as g,Ht as h,Vn as i,Ee as j,Ba as k,E as l,Gn as m,Ke as n,Kp as o,Qp as p,Xn as q,Jp as r,Zn as s,Kn as t,Xt as u,Qn as v,Jn as w,ts as x,tg as y,es as z};
191
+ </iframe>`},"putIntoIFrame"),ap=u((e,t,r,i,a)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const s=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&s.attr("xmlns:xlink",a),s.append("g"),e},"appendDivSvgG");function cn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}u(cn,"sandboxedIframe");var Gm=u((e,t,r,i)=>{var a,o,s;(a=e.getElementById(t))==null||a.remove(),(o=e.getElementById(r))==null||o.remove(),(s=e.getElementById(i))==null||s.remove()},"removeExistingElements"),Xm=u(async function(e,t,r){var F,T,M,A,_,$;oa();const i=hn(t);t=i.code;const a=Lt();E.debug(a),t.length>((a==null?void 0:a.maxTextSize)??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+e,s="i"+e,n="#"+s,c="d"+e,l="#"+c,h=u(()=>{const D=dt(p?n:l).node();D&&"remove"in D&&D.remove()},"removeTempElements");let d=dt("body");const p=a.securityLevel==="sandbox",g=a.securityLevel==="loose",f=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const D=cn(dt(r),s);d=dt(D.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt(r);ap(d,e,c,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(Gm(document,e,c,s),p){const D=cn(dt("body"),s);d=dt(D.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=dt("body");ap(d,e,c)}let m,b;try{m=await sn.fromText(t,{title:i.title})}catch(D){if(a.suppressErrorRendering)throw h(),D;m=await sn.fromText("error"),b=D}const y=d.select(l).node(),x=m.type,w=y.firstChild,L=w.firstChild,v=(T=(F=m.renderer).getClasses)==null?void 0:T.call(F,t,m),C=Ym(a,x,v,o),S=document.createElement("style");S.innerHTML=C,w.insertBefore(S,L);try{await m.renderer.draw(t,e,ma.version,m)}catch(D){throw a.suppressErrorRendering?h():Sm.draw(t,e,ma.version),D}const P=d.select(`${l} svg`),O=(A=(M=m.db).getAccTitle)==null?void 0:A.call(M),q=($=(_=m.db).getAccDescription)==null?void 0:$.call(_);sp(x,P,O,q),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let I=d.select(l).node().innerHTML;if(E.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),I=Um(I,p,Ct(a.arrowMarkerAbsolute)),p){const D=d.select(l+" svg").node();I=Vm(I,D)}else g||(I=Ie.sanitize(I,{ADD_TAGS:Wm,ADD_ATTR:jm,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Pm(),b)throw b;return h(),{diagramType:x,svg:I,bindFunctions:m.db.bindFunctions}},"render");function op(e={}){var i;const t=kt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Es(t),t!=null&&t.theme&&t.theme in oe?t.themeVariables=oe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=oe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?$s(t):Ha();di(r.logLevel),oa()}u(op,"initialize");var np=u((e,t={})=>{const{code:r}=ln(e);return sn.fromText(r,t)},"getDiagramFromText");function sp(e,t,r,i){Ku(t,e),Qu(t,r,i,t.attr("id"))}u(sp,"addA11yInfo");var Ye=Object.freeze({render:Xm,parse:rp,getDiagramFromText:np,initialize:op,getConfig:Lt,setConfig:Ya,getSiteConfig:Ha,updateSiteConfig:Ds,reset:u(()=>{zr()},"reset"),globalReset:u(()=>{zr(Pe)},"globalReset"),defaultConfig:Pe});di(Lt().logLevel),zr(Lt());var Zm=u((e,t,r)=>{E.warn(e),Mo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),lp=u(async function(e={querySelector:".mermaid"}){try{await Km(e)}catch(t){if(Mo(t)&&E.error(t.str),jt.parseError&&jt.parseError(t),!e.suppressErrors)throw E.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Km=u(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ye.getConfig();let a;if(E.debug((e?"":"No ")+"Callback function found"),r)a=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(t)}E.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(E.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ye.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new Xt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];for(const c of Array.from(a)){if(E.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const l=`mermaid-${o.next()}`;s=c.innerHTML,s=rc(Xt.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Xt.detectInit(s);h&&E.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:p}=await un(l,s,c);c.innerHTML=d,e&&await e(l),p&&p(c)}catch(d){Zm(d,n,jt.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),hp=u(function(e){Ye.initialize(e)},"initialize"),Qm=u(async function(e,t,r){E.warn("mermaid.init is deprecated. Please use run instead."),e&&hp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await lp(i)},"init"),Jm=u(async(e,{lazyLoad:t=!0}={})=>{oa(),yi(...e),t===!1&&await Im()},"registerExternalDiagrams"),cp=u(function(){if(jt.startOnLoad){const{startOnLoad:e}=Ye.getConfig();e&&jt.run().catch(t=>E.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",cp,!1);let dp,ai,na,dn,up,un,jt;dp=u(function(e){jt.parseError=e},"setParseErrorHandler"),ai=[],na=!1,dn=u(async()=>{if(!na){for(na=!0;ai.length>0;){const e=ai.shift();if(e)try{await e()}catch(t){E.error("Error executing queue",t)}}na=!1}},"executeQueue"),up=u(async(e,t)=>new Promise((r,i)=>{const a=u(()=>new Promise((o,s)=>{Ye.parse(e,t).then(n=>{o(n),r(n)},n=>{var c;E.error("Error parsing",n),(c=jt.parseError)==null||c.call(jt,n),s(n),i(n)})}),"performCall");ai.push(a),dn().catch(i)}),"parse"),un=u((e,t,r)=>new Promise((i,a)=>{const o=u(()=>new Promise((s,n)=>{Ye.render(e,t,r).then(c=>{s(c),i(c)},c=>{var l;E.error("Error parsing",c),(l=jt.parseError)==null||l.call(jt,c),n(c),a(c)})}),"performCall");ai.push(o),dn().catch(a)}),"render"),jt={startOnLoad:!0,mermaidAPI:Ye,parse:up,render:un,init:Qm,run:lp,registerExternalDiagrams:Jm,registerLayoutLoaders:Ko,initialize:hp,parseError:void 0,contentLoaded:cp,setParseErrorHandler:dp,detectType:mi,registerIconPacks:zn,getRegisteredDiagramsMetadata:u(()=>Object.keys(Se).map(e=>({id:e})),"getRegisteredDiagramsMetadata")},Vn=jt,Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"}))});export{ga as $,zp as A,Ge as B,Qt as C,Bn as D,vn as E,li as F,Lt as G,fa as H,Mn as I,Ln as J,_n as K,ma as L,Fn as M,$e as N,Wp as O,_r as P,ya as Q,hi as R,ba as S,An as T,et as U,$n as V,Xe as W,W as X,X as Y,jp as Z,u as _,yy as __tla,En as a,Dn as a0,xa as a1,Hp as a2,On as a3,Ct as a4,ue as a5,ci as a6,Ca as a7,ke as a8,ka as a9,Y as aa,wa as ab,In as ac,Pn as ad,Yp as ae,Up as af,Vp as ag,U as ah,Gp as ai,Nn as aj,qn as ak,Rn as al,Xp as am,Ze as an,zn as ao,Wn as ap,jn as aq,Zp as ar,Hn as b,ut as c,Sa as d,kt as e,ie as f,Yn as g,Ht as h,Un as i,Ee as j,Ta as k,E as l,Vn as m,Ke as n,Kp as o,Qp as p,Gn as q,Jp as r,Xn as s,Zn as t,Xt as u,Kn as v,Qn as w,Jn as x,tg as y,ts as z};