pmx-canvas 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/.github/extensions/pmx-canvas/extension.mjs +4 -1
  2. package/.github/extensions/pmx-canvas/runtime.json +1 -1
  3. package/.github/extensions/pmx-canvas/tools.json +440 -18
  4. package/CHANGELOG.md +51 -0
  5. package/dist/amp-plugin/pmx-canvas/LICENSE +21 -0
  6. package/dist/amp-plugin/pmx-canvas/THIRD_PARTY_LICENSES.txt +331 -0
  7. package/dist/amp-plugin/pmx-canvas/index.js +5445 -0
  8. package/dist/amp-plugin/pmx-canvas/runtime.json +3 -0
  9. package/dist/amp-plugin/pmx-canvas/shared-runtime.mjs +194 -0
  10. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/SKILL.md +267 -0
  11. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/evals.json +1168 -0
  12. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/jwt.ts +17 -0
  13. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/login.ts +12 -0
  14. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/middleware.ts +13 -0
  15. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/routes/auth.ts +13 -0
  16. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/investigation-board/src/handlers/users.ts +27 -0
  17. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/mcp.json +36 -0
  18. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/ax-html-control-surface.md +101 -0
  19. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/codex-app-adapter.md +151 -0
  20. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +150 -0
  21. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/full-reference.md +1839 -0
  22. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/github-copilot-app-adapter.md +223 -0
  23. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/html-primitives.md +139 -0
  24. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/importing-context.md +132 -0
  25. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/installing-pmx-canvas.md +301 -0
  26. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/tours-and-recording.md +117 -0
  27. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/workbench-workflows.md +908 -0
  28. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-orchestration/SKILL.md +141 -0
  29. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-testing/SKILL.md +266 -0
  30. package/dist/amp-plugin/pmx-canvas/start-mcp.mjs +14857 -0
  31. package/dist/amp-plugin/pmx-canvas/tools.json +10963 -0
  32. package/dist/canvas/chunks/{abnfDiagram-N423BO3Z-p8dtp6va.js → abnfDiagram-N423BO3Z-cwtsds5d.js} +1 -1
  33. package/dist/canvas/chunks/architecture-TIHT7OUA-x63cwejs.js +1 -0
  34. package/dist/canvas/chunks/{architectureDiagram-T3A2C74G-5jhmxrzf.js → architectureDiagram-T3A2C74G-b4xc9tpz.js} +3 -3
  35. package/dist/canvas/chunks/{blockDiagram-VBNYF7ZC-pw1fa9yb.js → blockDiagram-VBNYF7ZC-ahp3yxxs.js} +7 -7
  36. package/dist/canvas/chunks/{c4Diagram-5PPSVZJV-x07nq0tt.js → c4Diagram-5PPSVZJV-nappnay7.js} +4 -4
  37. package/dist/canvas/chunks/classDiagram-JCYQIIEL-k1j2xc1t.js +1 -0
  38. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-33x08xf2.js +1 -0
  39. package/dist/canvas/chunks/{cose-bilkent-JH36ORCC-nm39npq0.js → cose-bilkent-JH36ORCC-a428syda.js} +1 -1
  40. package/dist/canvas/chunks/cynefin-VYW2F7L2-8v6jxfz8.js +1 -0
  41. package/dist/canvas/chunks/{cynefinDiagram-MW4NZA55-vdxrwahz.js → cynefinDiagram-MW4NZA55-nspsqebj.js} +1 -1
  42. package/dist/canvas/chunks/{dagre-VZM6K2ZE-bqdm7wpd.js → dagre-VZM6K2ZE-8y6177fh.js} +2 -2
  43. package/dist/canvas/chunks/{diagram-7IWD3JNH-gs5gpr93.js → diagram-7IWD3JNH-vym028wn.js} +4 -4
  44. package/dist/canvas/chunks/{diagram-B4RE2ZJO-cgwjg47s.js → diagram-B4RE2ZJO-jddqb8sy.js} +1 -1
  45. package/dist/canvas/chunks/{diagram-LBJQPF4R-w3vahpav.js → diagram-LBJQPF4R-bjwbpkrn.js} +1 -1
  46. package/dist/canvas/chunks/{diagram-Q27KOJAE-42837z6h.js → diagram-Q27KOJAE-j6ph6hcx.js} +2 -2
  47. package/dist/canvas/chunks/{diagram-UB23O5K3-4fz83q59.js → diagram-UB23O5K3-p09w8jej.js} +1 -1
  48. package/dist/canvas/chunks/{ebnfDiagram-BXEA7PRR-zphtgegj.js → ebnfDiagram-BXEA7PRR-j975ycq5.js} +1 -1
  49. package/dist/canvas/chunks/{erDiagram-JOGREHBK-zvbbdxp4.js → erDiagram-JOGREHBK-sxp6hjn8.js} +5 -5
  50. package/dist/canvas/chunks/eventmodeling-45OFAUF4-xzfgn6xg.js +1 -0
  51. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-2nsmkskb.js +1 -0
  52. package/dist/canvas/chunks/{ganttDiagram-PKOTCBZU-282jzycm.js → ganttDiagram-PKOTCBZU-4tv230y2.js} +2 -2
  53. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-macbhand.js +1 -0
  54. package/dist/canvas/chunks/{gitGraphDiagram-DS77QQ5N-vqqy6p1b.js → gitGraphDiagram-DS77QQ5N-mqgmnw9g.js} +1 -1
  55. package/dist/canvas/chunks/{index-wgv7en21.js → index-037z5dz2.js} +2 -2
  56. package/dist/canvas/chunks/{index-w2mra17t.js → index-081n3har.js} +1 -1
  57. package/dist/canvas/chunks/{index-353m7b0p.js → index-5n03dmb9.js} +1 -1
  58. package/dist/canvas/chunks/{index-yw8h9vha.js → index-60pgzdqe.js} +1 -1
  59. package/dist/canvas/chunks/index-8g1vb57n.js +2 -0
  60. package/dist/canvas/chunks/{index-vv56h019.js → index-8rjes9r6.js} +1 -1
  61. package/dist/canvas/chunks/{index-nprm96xp.js → index-9022d1n9.js} +1 -1
  62. package/dist/canvas/chunks/{index-194m3hc3.js → index-9b02042t.js} +1 -1
  63. package/dist/canvas/chunks/{index-0rk4gp1g.js → index-ap4q4vez.js} +1 -1
  64. package/dist/canvas/chunks/{index-rh7nv68n.js → index-dyp2nhd3.js} +1 -1
  65. package/dist/canvas/chunks/index-frvta4tm.js +2 -0
  66. package/dist/canvas/chunks/{index-s4j678gj.js → index-h9ycj8n2.js} +1 -1
  67. package/dist/canvas/chunks/{index-fjtdggjn.js → index-mergmj97.js} +2 -2
  68. package/dist/canvas/chunks/index-nwsya6dj.js +301 -0
  69. package/dist/canvas/chunks/{index-3cy1bzwh.js → index-nz8qbd1p.js} +1 -1
  70. package/dist/canvas/chunks/{index-d3b3gqe9.js → index-qhfrazv3.js} +1 -1
  71. package/dist/canvas/chunks/{index-6qmsnxwy.js → index-v119nznk.js} +4 -4
  72. package/dist/canvas/chunks/{index-r2fyc9w1.js → index-vpt37m3d.js} +6 -6
  73. package/dist/canvas/chunks/{index-qj8fxwsf.js → index-y9ma6azy.js} +1 -1
  74. package/dist/canvas/chunks/{index-tb1wf525.js → index-zx0j3a2z.js} +26 -26
  75. package/dist/canvas/chunks/info-DKCQHKI2-a0ykzs9z.js +1 -0
  76. package/dist/canvas/chunks/{infoDiagram-6WML65LV-v1yvggqj.js → infoDiagram-6WML65LV-qv97qq6a.js} +2 -2
  77. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-p9306gh0.js +70 -0
  78. package/dist/canvas/chunks/{journeyDiagram-NVQOT4AX-zjcffveh.js → journeyDiagram-NVQOT4AX-sv67zats.js} +5 -5
  79. package/dist/canvas/chunks/{kanban-definition-27J2QSJJ-dakqtfp1.js → kanban-definition-27J2QSJJ-k2pfam6p.js} +1 -1
  80. package/dist/canvas/chunks/{mermaid.core-j2geswrd.js → mermaid.core-83r0fdce.js} +4 -4
  81. package/dist/canvas/chunks/{mindmap-definition-FAOFIHXS-142xhr3k.js → mindmap-definition-FAOFIHXS-vg2newm1.js} +1 -1
  82. package/dist/canvas/chunks/packet-7NZHBO7P-tqnabcdv.js +1 -0
  83. package/dist/canvas/chunks/{pegDiagram-VL7TDLO6-5wvk7vsd.js → pegDiagram-VL7TDLO6-k2h7zc5n.js} +1 -1
  84. package/dist/canvas/chunks/pie-RZYD4A2V-wke6gyhe.js +1 -0
  85. package/dist/canvas/chunks/{pieDiagram-7S7Q4E2Y-ztdhwycc.js → pieDiagram-7S7Q4E2Y-hg169p1v.js} +2 -2
  86. package/dist/canvas/chunks/{quadrantDiagram-CIZ2JOQS-c5p9gmg6.js → quadrantDiagram-CIZ2JOQS-bxtvsq0b.js} +5 -5
  87. package/dist/canvas/chunks/radar-I7S5WNFK-w7ka0drw.js +1 -0
  88. package/dist/canvas/chunks/railroad-3IZDKUUU-y3vg318x.js +1 -0
  89. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-6hqvcz3c.js +1 -0
  90. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-vcae260m.js +1 -0
  91. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-0dbyme23.js +1 -0
  92. package/dist/canvas/chunks/{railroadDiagram-AXF67PYL-xkmqkjwf.js → railroadDiagram-AXF67PYL-njyhcp4p.js} +1 -1
  93. package/dist/canvas/chunks/{requirementDiagram-LRYGKXZP-9wm2dyaw.js → requirementDiagram-LRYGKXZP-2z6v09gm.js} +4 -4
  94. package/dist/canvas/chunks/{sankeyDiagram-W5VNT64P-2w19etgb.js → sankeyDiagram-W5VNT64P-15mzam0e.js} +1 -1
  95. package/dist/canvas/chunks/{sequenceDiagram-SI44F4Z6-0jn0vwmz.js → sequenceDiagram-SI44F4Z6-rbshyd2c.js} +12 -12
  96. package/dist/canvas/chunks/{sizeCapture-X5ZJPWSS-x75epwdq.js → sizeCapture-X5ZJPWSS-sg26xwts.js} +1 -1
  97. package/dist/canvas/chunks/{stateDiagram-OKZ733FA-schjpy6d.js → stateDiagram-OKZ733FA-6eahp98e.js} +1 -1
  98. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-tty0ggn5.js +1 -0
  99. package/dist/canvas/chunks/{swimlanes-SLNWSIFB-gkw4xce3.js → swimlanes-SLNWSIFB-ze5db10t.js} +1 -1
  100. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-thze75gq.js +8 -0
  101. package/dist/canvas/chunks/{timeline-definition-Z64GVDOM-x7nkcy01.js → timeline-definition-Z64GVDOM-vnp7jyy8.js} +3 -3
  102. package/dist/canvas/chunks/treeView-QDETBFTQ-6ysffnm6.js +1 -0
  103. package/dist/canvas/chunks/treemap-6X3UGDF4-m3h9p066.js +1 -0
  104. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-0qrnb7mj.js +34 -0
  105. package/dist/canvas/chunks/wardley-OPB4EBWU-dp37drwx.js +1 -0
  106. package/dist/canvas/chunks/{wardleyDiagram-T6FBY63Y-t1j52t9r.js → wardleyDiagram-T6FBY63Y-8nxg8wqt.js} +4 -4
  107. package/dist/canvas/chunks/{xychartDiagram-ELKLHX3M-38t16pme.js → xychartDiagram-ELKLHX3M-nj921e7s.js} +5 -5
  108. package/dist/canvas/global.css +94 -1
  109. package/dist/canvas/index.js +154 -145
  110. package/dist/canvas/mcp-app.html +600 -498
  111. package/dist/json-render/index.css +1 -1
  112. package/dist/types/client/canvas/BoardMoveDialog.d.ts +2 -0
  113. package/dist/types/client/canvas/EdgeEditor.d.ts +19 -0
  114. package/dist/types/client/canvas/GroupNavigation.d.ts +2 -0
  115. package/dist/types/client/canvas/TextPrompt.d.ts +4 -0
  116. package/dist/types/client/nodes/PromptNode.d.ts +1 -0
  117. package/dist/types/client/nodes/ViewerFrame.d.ts +1 -1
  118. package/dist/types/client/nodes/WorkCard.d.ts +7 -0
  119. package/dist/types/client/nodes/use-ax-surface-bridge.d.ts +1 -0
  120. package/dist/types/client/state/canvas-store.d.ts +15 -0
  121. package/dist/types/client/state/human-store.d.ts +2 -0
  122. package/dist/types/client/state/intent-bridge.d.ts +4 -2
  123. package/dist/types/client/state/relation-store.d.ts +11 -0
  124. package/dist/types/client/types.d.ts +1 -1
  125. package/dist/types/json-render/catalog.d.ts +2 -2
  126. package/dist/types/server/agent-presence.d.ts +1 -0
  127. package/dist/types/server/ax-interaction.d.ts +1 -0
  128. package/dist/types/server/ax-state-manager.d.ts +10 -2
  129. package/dist/types/server/board-local.d.ts +4 -0
  130. package/dist/types/server/board-move.d.ts +38 -0
  131. package/dist/types/server/canvas-db.d.ts +12 -2
  132. package/dist/types/server/canvas-operations.d.ts +5 -6
  133. package/dist/types/server/canvas-provenance.d.ts +1 -1
  134. package/dist/types/server/canvas-serialization.d.ts +1 -0
  135. package/dist/types/server/canvas-state.d.ts +84 -20
  136. package/dist/types/server/card-relocation.d.ts +6 -0
  137. package/dist/types/server/context-reads.d.ts +3 -1
  138. package/dist/types/server/human-presence.d.ts +1 -1
  139. package/dist/types/server/index.d.ts +16 -5
  140. package/dist/types/server/intent-registry.d.ts +8 -4
  141. package/dist/types/server/knowledge-lifecycle.d.ts +4 -2
  142. package/dist/types/server/mutation-history.d.ts +7 -5
  143. package/dist/types/server/operations/registry.d.ts +2 -0
  144. package/dist/types/server/trace-manager.d.ts +1 -0
  145. package/dist/types/shared/ax-kinds.d.ts +6 -0
  146. package/dist/types/shared/ax-surface-protocol.d.ts +8 -0
  147. package/dist/types/shared/human-presence.d.ts +1 -0
  148. package/dist/types/shared/lifecycle-status.d.ts +2 -0
  149. package/docs/RELEASE.md +21 -14
  150. package/docs/agent-plugin.md +22 -2
  151. package/docs/amp-plugin.md +270 -0
  152. package/docs/cli.md +42 -3
  153. package/docs/design/GuestName.dc.html +50 -0
  154. package/docs/design/PluginLogo.svg +7 -0
  155. package/docs/design/WorkCards.dc.html +39 -0
  156. package/docs/design/canvas.json +16 -0
  157. package/docs/design/plugin-logo.png +0 -0
  158. package/docs/design.md +111 -8
  159. package/docs/evals/agents-md-sections.md +38 -0
  160. package/docs/http-api.md +128 -10
  161. package/docs/mcp.md +61 -9
  162. package/docs/node-types.md +71 -1
  163. package/docs/plans/plan-009-tech-debt-backlog.md +1 -1
  164. package/docs/plans/plan-019-post-0.9-roadmap.md +44 -20
  165. package/docs/plans/plan-020-wave-5-work-planning.md +553 -0
  166. package/docs/product-vision-2026-09.md +33 -17
  167. package/docs/sdk.md +18 -0
  168. package/package.json +6 -3
  169. package/plugins/pmx-canvas/assets/preview.png +0 -0
  170. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/extension.mjs +4 -1
  171. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
  172. package/plugins/pmx-canvas/plugin.json +2 -2
  173. package/plugins/pmx-canvas/runtime.json +1 -1
  174. package/plugins/pmx-canvas/tools.json +440 -18
  175. package/skills/data-analysis/SKILL.md +13 -26
  176. package/skills/frontend-design/LICENSE.txt +177 -0
  177. package/skills/frontend-design/SKILL.md +3 -0
  178. package/skills/pmx-canvas/SKILL.md +248 -842
  179. package/skills/pmx-canvas/evals/evals.json +110 -5
  180. package/skills/pmx-canvas/references/full-reference.md +142 -28
  181. package/skills/pmx-canvas/references/html-primitives.md +7 -0
  182. package/skills/pmx-canvas/references/installing-pmx-canvas.md +61 -11
  183. package/skills/pmx-canvas/references/tours-and-recording.md +39 -6
  184. package/skills/pmx-canvas/references/workbench-workflows.md +908 -0
  185. package/skills/pmx-canvas-testing/SKILL.md +7 -5
  186. package/skills/published-consumer-e2e/SKILL.md +25 -8
  187. package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +51 -75
  188. package/skills/web-artifacts-builder/LICENSE.txt +202 -0
  189. package/skills/web-artifacts-builder/SKILL.md +6 -0
  190. package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +2 -2
  191. package/skills/web-artifacts-builder/scripts/init-artifact.sh +8 -8
  192. package/src/cli/commands/apps.ts +1 -0
  193. package/src/cli/commands/boards.ts +30 -0
  194. package/src/client/App.tsx +20 -4
  195. package/src/client/canvas/AttentionHistory.tsx +10 -2
  196. package/src/client/canvas/BoardMoveDialog.tsx +225 -0
  197. package/src/client/canvas/CanvasNode.tsx +45 -2
  198. package/src/client/canvas/CanvasViewport.tsx +38 -9
  199. package/src/client/canvas/ContextMenu.tsx +34 -12
  200. package/src/client/canvas/EdgeEditor.tsx +149 -0
  201. package/src/client/canvas/EdgeLayer.tsx +87 -16
  202. package/src/client/canvas/ExpandedNodeOverlay.tsx +4 -0
  203. package/src/client/canvas/GroupNavigation.tsx +85 -0
  204. package/src/client/canvas/RelationsPanel.tsx +9 -0
  205. package/src/client/canvas/SelectionBar.tsx +21 -0
  206. package/src/client/canvas/SessionPanel.tsx +35 -1
  207. package/src/client/canvas/TextPrompt.tsx +18 -1
  208. package/src/client/canvas/TopBar.tsx +30 -0
  209. package/src/client/canvas/canvas-area.ts +1 -1
  210. package/src/client/nodes/ExtAppFrame.tsx +26 -10
  211. package/src/client/nodes/MarkdownNode.tsx +6 -7
  212. package/src/client/nodes/PromptNode.tsx +32 -3
  213. package/src/client/nodes/StatusNode.tsx +12 -0
  214. package/src/client/nodes/StatusSummary.tsx +11 -0
  215. package/src/client/nodes/ViewerFrame.tsx +21 -10
  216. package/src/client/nodes/WorkCard.tsx +175 -0
  217. package/src/client/nodes/use-ax-surface-bridge.ts +18 -14
  218. package/src/client/state/attention-bridge.ts +5 -0
  219. package/src/client/state/attention-store.ts +1 -0
  220. package/src/client/state/canvas-store.ts +185 -15
  221. package/src/client/state/human-store.ts +22 -2
  222. package/src/client/state/intent-bridge.ts +19 -5
  223. package/src/client/state/relation-store.ts +127 -1
  224. package/src/client/theme/global.css +94 -1
  225. package/src/client/types.ts +1 -0
  226. package/src/mcp/server.ts +13 -3
  227. package/src/server/agent-presence.ts +43 -23
  228. package/src/server/ax-flow-loop.ts +6 -0
  229. package/src/server/ax-gate-ttl.ts +8 -1
  230. package/src/server/ax-interaction.ts +16 -10
  231. package/src/server/ax-state-manager.ts +17 -4
  232. package/src/server/ax-wait.ts +20 -6
  233. package/src/server/board-export.ts +19 -6
  234. package/src/server/board-local.ts +20 -0
  235. package/src/server/board-move.ts +297 -0
  236. package/src/server/canvas-db.ts +262 -160
  237. package/src/server/canvas-operations.ts +139 -109
  238. package/src/server/canvas-schema.ts +21 -0
  239. package/src/server/canvas-serialization.ts +2 -0
  240. package/src/server/canvas-state.ts +792 -159
  241. package/src/server/card-relocation.ts +53 -0
  242. package/src/server/code-graph.ts +4 -3
  243. package/src/server/context-reads.ts +83 -55
  244. package/src/server/demo-state.json +35 -15
  245. package/src/server/file-watcher.ts +30 -10
  246. package/src/server/human-presence.ts +18 -5
  247. package/src/server/index.ts +35 -15
  248. package/src/server/intent-registry.ts +43 -5
  249. package/src/server/knowledge-lifecycle.ts +32 -9
  250. package/src/server/lifecycle-status.ts +29 -1
  251. package/src/server/mcp-app-runtime.ts +26 -7
  252. package/src/server/mutation-history.ts +37 -8
  253. package/src/server/operations/composites.ts +6 -3
  254. package/src/server/operations/mcp-contracts.ts +15 -0
  255. package/src/server/operations/mcp.ts +36 -9
  256. package/src/server/operations/ops/annotation.ts +22 -1
  257. package/src/server/operations/ops/ax-await.ts +1 -0
  258. package/src/server/operations/ops/ax-timeline.ts +28 -2
  259. package/src/server/operations/ops/batch.ts +25 -11
  260. package/src/server/operations/ops/boards.ts +44 -3
  261. package/src/server/operations/ops/nodes.ts +70 -0
  262. package/src/server/operations/ops/query.ts +32 -3
  263. package/src/server/operations/ops/snapshots.ts +1 -0
  264. package/src/server/operations/registry.ts +49 -4
  265. package/src/server/server.ts +62 -16
  266. package/src/server/tour-control.ts +37 -12
  267. package/src/server/trace-manager.ts +4 -0
  268. package/src/server/web-artifacts/scripts/bundle-artifact.sh +2 -2
  269. package/src/server/web-artifacts/scripts/init-artifact.sh +8 -8
  270. package/src/shared/agent-context.ts +7 -1
  271. package/src/shared/auto-arrange.ts +5 -4
  272. package/src/shared/ax-kinds.ts +13 -0
  273. package/src/shared/ax-surface-protocol.ts +22 -0
  274. package/src/shared/human-presence.ts +1 -0
  275. package/src/shared/lifecycle-status.ts +2 -0
  276. package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +0 -1
  277. package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +0 -1
  278. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +0 -1
  279. package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +0 -1
  280. package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +0 -1
  281. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +0 -1
  282. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +0 -1
  283. package/dist/canvas/chunks/index-1r72hdzb.js +0 -301
  284. package/dist/canvas/chunks/index-g3pwnqeb.js +0 -2
  285. package/dist/canvas/chunks/index-rft2hcz5.js +0 -2
  286. package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +0 -1
  287. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +0 -70
  288. package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +0 -1
  289. package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +0 -1
  290. package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +0 -1
  291. package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +0 -1
  292. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +0 -1
  293. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +0 -1
  294. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +0 -1
  295. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +0 -1
  296. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +0 -8
  297. package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +0 -1
  298. package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +0 -1
  299. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +0 -34
  300. package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +0 -1
@@ -1,301 +0,0 @@
1
- import{K,se,T,V}from"./index-6qmsnxwy.js";var Ln=se(function(Ka,Qa){(function(c,s){typeof Ka=="object"&&typeof Qa<"u"?Qa.exports=s():typeof define=="function"&&define.amd?define(s):(c=typeof globalThis<"u"?globalThis:c||self).dayjs=s()})(Ka,function(){var c=1000,s=60000,B=3600000,L="millisecond",_="second",I="minute",O="hour",D="day",P="week",W="month",R="quarter",Y="year",G="date",U="Invalid Date",J=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,tt=/\[([^\]]+)]|YYYY|YY|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,et={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(It){var bt=["th","st","nd","rd"],Ct=It%100;return"["+It+(bt[(Ct-20)%10]||bt[Ct]||bt[0])+"]"}},it=function(It,bt,Ct){var Tt=String(It);return!Tt||Tt.length>=bt?It:""+Array(bt+1-Tt.length).join(Ct)+It},at={s:it,z:function(It){var bt=-It.utcOffset(),Ct=Math.abs(bt),Tt=Math.floor(Ct/60),wt=Ct%60;return(bt<=0?"+":"-")+it(Tt,2,"0")+":"+it(wt,2,"0")},m:function It(bt,Ct){if(bt.date()<Ct.date())return-It(Ct,bt);var Tt=12*(Ct.year()-bt.year())+(Ct.month()-bt.month()),wt=bt.clone().add(Tt,W),Et=Ct-wt<0,At=bt.clone().add(Tt+(Et?-1:1),W);return+(-(Tt+(Ct-wt)/(Et?wt-At:At-wt))||0)},a:function(It){return It<0?Math.ceil(It)||0:Math.floor(It)},p:function(It){return{M:W,y:Y,w:P,d:D,D:G,h:O,m:I,s:_,ms:L,Q:R}[It]||String(It||"").toLowerCase().replace(/s$/,"")},u:function(It){return It===void 0}},nt="en",ut={};ut[nt]=et;var dt="$isDayjsObject",kt=function(It){return It instanceof Rt||!(!It||!It[dt])},St=function It(bt,Ct,Tt){var wt;if(!bt)return nt;if(typeof bt=="string"){var Et=bt.toLowerCase();ut[Et]&&(wt=Et),Ct&&(ut[Et]=Ct,wt=Et);var At=bt.split("-");if(!wt&&At.length>1)return It(At[0])}else{var Zt=bt.name;ut[Zt]=bt,wt=Zt}return!Tt&&wt&&(nt=wt),wt||!Tt&&nt},vt=function(It,bt){if(kt(It))return It.clone();var Ct=typeof bt=="object"?bt:{};return Ct.date=It,Ct.args=arguments,new Rt(Ct)},_t=at;_t.l=St,_t.i=kt,_t.w=function(It,bt){return vt(It,{locale:bt.$L,utc:bt.$u,x:bt.$x,$offset:bt.$offset})};var Rt=function(){function It(Ct){this.$L=St(Ct.locale,null,!0),this.parse(Ct),this.$x=this.$x||Ct.x||{},this[dt]=!0}var bt=It.prototype;return bt.parse=function(Ct){this.$d=function(Tt){var{date:wt,utc:Et}=Tt;if(wt===null)return new Date(NaN);if(_t.u(wt))return new Date;if(wt instanceof Date)return new Date(wt);if(typeof wt=="string"&&!/Z$/i.test(wt)){var At=wt.match(J);if(At){var Zt=At[2]-1||0,Qt=(At[7]||"0").substring(0,3);return Et?new Date(Date.UTC(At[1],Zt,At[3]||1,At[4]||0,At[5]||0,At[6]||0,Qt)):new Date(At[1],Zt,At[3]||1,At[4]||0,At[5]||0,At[6]||0,Qt)}}return new Date(wt)}(Ct),this.init()},bt.init=function(){var Ct=this.$d;this.$y=Ct.getFullYear(),this.$M=Ct.getMonth(),this.$D=Ct.getDate(),this.$W=Ct.getDay(),this.$H=Ct.getHours(),this.$m=Ct.getMinutes(),this.$s=Ct.getSeconds(),this.$ms=Ct.getMilliseconds()},bt.$utils=function(){return _t},bt.isValid=function(){return this.$d.toString()!==U},bt.isSame=function(Ct,Tt){var wt=vt(Ct);return this.startOf(Tt)<=wt&&wt<=this.endOf(Tt)},bt.isAfter=function(Ct,Tt){return vt(Ct)<this.startOf(Tt)},bt.isBefore=function(Ct,Tt){return this.endOf(Tt)<vt(Ct)},bt.$g=function(Ct,Tt,wt){return _t.u(Ct)?this[Tt]:this.set(wt,Ct)},bt.unix=function(){return Math.floor(this.valueOf()/1000)},bt.valueOf=function(){return this.$d.getTime()},bt.startOf=function(Ct,Tt){var wt=this,Et=!!_t.u(Tt)||Tt,At=_t.p(Ct),Zt=function(me,xe){var De=_t.w(wt.$u?Date.UTC(wt.$y,xe,me):new Date(wt.$y,xe,me),wt);return Et?De:De.endOf(D)},Qt=function(me,xe){return _t.w(wt.toDate()[me].apply(wt.toDate("s"),(Et?[0,0,0,0]:[23,59,59,999]).slice(xe)),wt)},be=this.$W,we=this.$M,Se=this.$D,Ae="set"+(this.$u?"UTC":"");switch(At){case Y:return Et?Zt(1,0):Zt(31,11);case W:return Et?Zt(1,we):Zt(0,we+1);case P:var Ee=this.$locale().weekStart||0,ne=(be<Ee?be+7:be)-Ee;return Zt(Et?Se-ne:Se+(6-ne),we);case D:case G:return Qt(Ae+"Hours",0);case O:return Qt(Ae+"Minutes",1);case I:return Qt(Ae+"Seconds",2);case _:return Qt(Ae+"Milliseconds",3);default:return this.clone()}},bt.endOf=function(Ct){return this.startOf(Ct,!1)},bt.$set=function(Ct,Tt){var wt,Et=_t.p(Ct),At="set"+(this.$u?"UTC":""),Zt=(wt={},wt[D]=At+"Date",wt[G]=At+"Date",wt[W]=At+"Month",wt[Y]=At+"FullYear",wt[O]=At+"Hours",wt[I]=At+"Minutes",wt[_]=At+"Seconds",wt[L]=At+"Milliseconds",wt)[Et],Qt=Et===D?this.$D+(Tt-this.$W):Tt;if(Et===W||Et===Y){var be=this.clone().set(G,1);be.$d[Zt](Qt),be.init(),this.$d=be.set(G,Math.min(this.$D,be.daysInMonth())).$d}else Zt&&this.$d[Zt](Qt);return this.init(),this},bt.set=function(Ct,Tt){return this.clone().$set(Ct,Tt)},bt.get=function(Ct){return this[_t.p(Ct)]()},bt.add=function(Ct,Tt){var wt,Et=this;Ct=Number(Ct);var At=_t.p(Tt),Zt=function(we){var Se=vt(Et);return _t.w(Se.date(Se.date()+Math.round(we*Ct)),Et)};if(At===W)return this.set(W,this.$M+Ct);if(At===Y)return this.set(Y,this.$y+Ct);if(At===D)return Zt(1);if(At===P)return Zt(7);var Qt=(wt={},wt[I]=s,wt[O]=B,wt[_]=c,wt)[At]||1,be=this.$d.getTime()+Ct*Qt;return _t.w(be,this)},bt.subtract=function(Ct,Tt){return this.add(-1*Ct,Tt)},bt.format=function(Ct){var Tt=this,wt=this.$locale();if(!this.isValid())return wt.invalidDate||U;var Et=Ct||"YYYY-MM-DDTHH:mm:ssZ",At=_t.z(this),Zt=this.$H,Qt=this.$m,be=this.$M,{weekdays:we,months:Se,meridiem:Ae}=wt,Ee=function(xe,De,lr,hr){return xe&&(xe[De]||xe(Tt,Et))||lr[De].slice(0,hr)},ne=function(xe){return _t.s(Zt%12||12,xe,"0")},me=Ae||function(xe,De,lr){var hr=xe<12?"AM":"PM";return lr?hr.toLowerCase():hr};return Et.replace(tt,function(xe,De){return De||function(lr){switch(lr){case"YY":return String(Tt.$y).slice(-2);case"YYYY":return _t.s(Tt.$y,4,"0");case"M":return be+1;case"MM":return _t.s(be+1,2,"0");case"MMM":return Ee(wt.monthsShort,be,Se,3);case"MMMM":return Ee(Se,be);case"D":return Tt.$D;case"DD":return _t.s(Tt.$D,2,"0");case"d":return String(Tt.$W);case"dd":return Ee(wt.weekdaysMin,Tt.$W,we,2);case"ddd":return Ee(wt.weekdaysShort,Tt.$W,we,3);case"dddd":return we[Tt.$W];case"H":return String(Zt);case"HH":return _t.s(Zt,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return me(Zt,Qt,!0);case"A":return me(Zt,Qt,!1);case"m":return String(Qt);case"mm":return _t.s(Qt,2,"0");case"s":return String(Tt.$s);case"ss":return _t.s(Tt.$s,2,"0");case"SSS":return _t.s(Tt.$ms,3,"0");case"Z":return At}return null}(xe)||At.replace(":","")})},bt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},bt.diff=function(Ct,Tt,wt){var Et,At=this,Zt=_t.p(Tt),Qt=vt(Ct),be=(Qt.utcOffset()-this.utcOffset())*s,we=this-Qt,Se=function(){return _t.m(At,Qt)};switch(Zt){case Y:Et=Se()/12;break;case W:Et=Se();break;case R:Et=Se()/3;break;case P:Et=(we-be)/604800000;break;case D:Et=(we-be)/86400000;break;case O:Et=we/B;break;case I:Et=we/s;break;case _:Et=we/c;break;default:Et=we}return wt?Et:_t.a(Et)},bt.daysInMonth=function(){return this.endOf(W).$D},bt.$locale=function(){return ut[this.$L]},bt.locale=function(Ct,Tt){if(!Ct)return this.$L;var wt=this.clone(),Et=St(Ct,Tt,!0);return Et&&(wt.$L=Et),wt},bt.clone=function(){return _t.w(this.$d,this)},bt.toDate=function(){return new Date(this.valueOf())},bt.toJSON=function(){return this.isValid()?this.toISOString():null},bt.toISOString=function(){return this.$d.toISOString()},bt.toString=function(){return this.$d.toUTCString()},It}(),zt=Rt.prototype;return vt.prototype=zt,[["$ms",L],["$s",_],["$m",I],["$H",O],["$W",D],["$M",W],["$y",Y],["$D",G]].forEach(function(It){zt[It[1]]=function(bt){return this.$g(bt,It[0],It[1])}}),vt.extend=function(It,bt){return It.$i||(It(bt,Rt,vt),It.$i=!0),vt},vt.locale=St,vt.isDayjs=kt,vt.unix=function(It){return vt(1000*It)},vt.en=ut[nt],vt.Ls=ut,vt.p={},vt})});var Hp=se(function(Wp){Object.defineProperty(Wp,"__esModule",{value:!0});Wp.BLANK_URL=Wp.relativeFirstCharacters=Wp.whitespaceEscapeCharsRegex=Wp.urlSchemeRegex=Wp.ctrlCharactersRegex=Wp.htmlCtrlEntityRegex=Wp.htmlEntitiesRegex=Wp.invalidProtocolRegex=void 0;Wp.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Wp.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Wp.htmlCtrlEntityRegex=/&(newline|tab);/gi;Wp.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Wp.urlSchemeRegex=/^.+(:|&colon;)/gim;Wp.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Wp.relativeFirstCharacters=[".","/"];Wp.BLANK_URL="about:blank"});var pt=se(function(jp){Object.defineProperty(jp,"__esModule",{value:!0});jp.sanitizeUrl=Mb;var er=Hp();function vb(c){return er.relativeFirstCharacters.indexOf(c[0])>-1}function Lb(c){var s=c.replace(er.ctrlCharactersRegex,"");return s.replace(er.htmlEntitiesRegex,function(B,L){return String.fromCharCode(L)})}function Fb(c){return URL.canParse(c)}function Yp(c){try{return decodeURIComponent(c)}catch(s){return c}}function Mb(c){if(!c)return er.BLANK_URL;var s,B=Yp(c.trim());do B=Lb(B).replace(er.htmlCtrlEntityRegex,"").replace(er.ctrlCharactersRegex,"").replace(er.whitespaceEscapeCharsRegex,"").trim(),B=Yp(B),s=B.match(er.ctrlCharactersRegex)||B.match(er.htmlEntitiesRegex)||B.match(er.htmlCtrlEntityRegex)||B.match(er.whitespaceEscapeCharsRegex);while(s&&s.length>0);var L=B;if(!L)return er.BLANK_URL;if(vb(L))return L;var _=L.trimStart(),I=_.match(er.urlSchemeRegex);if(!I)return L;var O=I[0].toLowerCase().trim();if(er.invalidProtocolRegex.test(O))return er.BLANK_URL;var D=_.replace(/\\/g,"/");if(O==="mailto:"||O.includes("://"))return D;if(O==="http:"||O==="https:"){if(!Fb(D))return er.BLANK_URL;var P=new URL(D);return P.protocol=P.protocol.toLowerCase(),P.hostname=P.hostname.toLowerCase(),P.toString()}return D}});var Lc=Object.defineProperty,e=(c,s)=>Lc(c,"name",{value:s,configurable:!0}),st=(c,s)=>{for(var B in s)Lc(c,B,{get:s[B],enumerable:!0})};var Fc=K(Ln(),1),Rr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},t={trace:e((...c)=>{},"trace"),debug:e((...c)=>{},"debug"),info:e((...c)=>{},"info"),warn:e((...c)=>{},"warn"),error:e((...c)=>{},"error"),fatal:e((...c)=>{},"fatal")},Fr=e(function(c="fatal"){let s=Rr.fatal;if(typeof c==="string"){if(c.toLowerCase()in Rr)s=Rr[c]}else if(typeof c==="number")s=c;if(t.trace=()=>{},t.debug=()=>{},t.info=()=>{},t.warn=()=>{},t.error=()=>{},t.fatal=()=>{},s<=Rr.fatal)t.fatal=console.error?console.error.bind(console,dr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",dr("FATAL"));if(s<=Rr.error)t.error=console.error?console.error.bind(console,dr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",dr("ERROR"));if(s<=Rr.warn)t.warn=console.warn?console.warn.bind(console,dr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",dr("WARN"));if(s<=Rr.info)t.info=console.info?console.info.bind(console,dr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",dr("INFO"));if(s<=Rr.debug)t.debug=console.debug?console.debug.bind(console,dr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",dr("DEBUG"));if(s<=Rr.trace)t.trace=console.debug?console.debug.bind(console,dr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",dr("TRACE"))},"setLogLevel"),dr=e((c)=>`%c${Fc.default().format("ss.SSS")} : ${c} : `,"format");var Ms={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:(c)=>c>=255?255:c<0?0:c,g:(c)=>c>=255?255:c<0?0:c,b:(c)=>c>=255?255:c<0?0:c,h:(c)=>c%360,s:(c)=>c>=100?100:c<0?0:c,l:(c)=>c>=100?100:c<0?0:c,a:(c)=>c>=1?1:c<0?0:c},toLinear:(c)=>{let s=c/255;return c>0.03928?Math.pow((s+0.055)/1.055,2.4):s/12.92},hue2rgb:(c,s,B)=>{if(B<0)B+=1;if(B>1)B-=1;if(B<0.16666666666666666)return c+(s-c)*6*B;if(B<0.5)return s;if(B<0.6666666666666666)return c+(s-c)*(0.6666666666666666-B)*6;return c},hsl2rgb:({h:c,s,l:B},L)=>{if(!s)return B*2.55;c/=360,s/=100,B/=100;let _=B<0.5?B*(1+s):B+s-B*s,I=2*B-_;switch(L){case"r":return Ms.hue2rgb(I,_,c+0.3333333333333333)*255;case"g":return Ms.hue2rgb(I,_,c)*255;case"b":return Ms.hue2rgb(I,_,c-0.3333333333333333)*255}},rgb2hsl:({r:c,g:s,b:B},L)=>{c/=255,s/=255,B/=255;let _=Math.max(c,s,B),I=Math.min(c,s,B),O=(_+I)/2;if(L==="l")return O*100;if(_===I)return 0;let D=_-I,P=O>0.5?D/(2-_-I):D/(_+I);if(L==="s")return P*100;switch(_){case c:return((s-B)/D+(s<B?6:0))*60;case s:return((B-c)/D+2)*60;case B:return((c-s)/D+4)*60;default:return-1}}},Mc=Ms;var ix={clamp:(c,s,B)=>{if(s>B)return Math.min(s,Math.max(B,c));return Math.min(B,Math.max(s,c))},round:(c)=>Math.round(c*10000000000)/10000000000},Ac=ix;var ox={dec2hex:(c)=>{let s=Math.round(c).toString(16);return s.length>1?s:`0${s}`}},Ec=ox;var sx={channel:Mc,lang:Ac,unit:Ec},S=sx;var Nr={};for(let c=0;c<=255;c++)Nr[c]=S.unit.dec2hex(c);var We={ALL:0,RGB:1,HSL:2};class $c{constructor(){this.type=We.ALL}get(){return this.type}set(c){if(this.type&&this.type!==c)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=c}reset(){this.type=We.ALL}is(c){return this.type===c}}var Ic=$c;class Oc{constructor(c,s){this.color=s,this.changed=!1,this.data=c,this.type=new Ic}set(c,s){return this.color=s,this.changed=!1,this.data=c,this.type.type=We.ALL,this}_ensureHSL(){let c=this.data,{h:s,s:B,l:L}=c;if(s===void 0)c.h=S.channel.rgb2hsl(c,"h");if(B===void 0)c.s=S.channel.rgb2hsl(c,"s");if(L===void 0)c.l=S.channel.rgb2hsl(c,"l")}_ensureRGB(){let c=this.data,{r:s,g:B,b:L}=c;if(s===void 0)c.r=S.channel.hsl2rgb(c,"r");if(B===void 0)c.g=S.channel.hsl2rgb(c,"g");if(L===void 0)c.b=S.channel.hsl2rgb(c,"b")}get r(){let c=this.data,s=c.r;if(!this.type.is(We.HSL)&&s!==void 0)return s;return this._ensureHSL(),S.channel.hsl2rgb(c,"r")}get g(){let c=this.data,s=c.g;if(!this.type.is(We.HSL)&&s!==void 0)return s;return this._ensureHSL(),S.channel.hsl2rgb(c,"g")}get b(){let c=this.data,s=c.b;if(!this.type.is(We.HSL)&&s!==void 0)return s;return this._ensureHSL(),S.channel.hsl2rgb(c,"b")}get h(){let c=this.data,s=c.h;if(!this.type.is(We.RGB)&&s!==void 0)return s;return this._ensureRGB(),S.channel.rgb2hsl(c,"h")}get s(){let c=this.data,s=c.s;if(!this.type.is(We.RGB)&&s!==void 0)return s;return this._ensureRGB(),S.channel.rgb2hsl(c,"s")}get l(){let c=this.data,s=c.l;if(!this.type.is(We.RGB)&&s!==void 0)return s;return this._ensureRGB(),S.channel.rgb2hsl(c,"l")}get a(){return this.data.a}set r(c){this.type.set(We.RGB),this.changed=!0,this.data.r=c}set g(c){this.type.set(We.RGB),this.changed=!0,this.data.g=c}set b(c){this.type.set(We.RGB),this.changed=!0,this.data.b=c}set h(c){this.type.set(We.HSL),this.changed=!0,this.data.h=c}set s(c){this.type.set(We.HSL),this.changed=!0,this.data.s=c}set l(c){this.type.set(We.HSL),this.changed=!0,this.data.l=c}set a(c){this.changed=!0,this.data.a=c}}var Dc=Oc;var ax=new Dc({r:0,g:0,b:0,a:0},"transparent"),li=ax;var Pc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(c)=>{if(c.charCodeAt(0)!==35)return;let s=c.match(Pc.re);if(!s)return;let B=s[1],L=parseInt(B,16),_=B.length,I=_%4===0,O=_>4,D=O?1:17,P=O?8:4,W=I?0:-1,R=O?255:15;return li.set({r:(L>>P*(W+3)&R)*D,g:(L>>P*(W+2)&R)*D,b:(L>>P*(W+1)&R)*D,a:I?(L&R)*D/255:1},c)},stringify:(c)=>{let{r:s,g:B,b:L,a:_}=c;if(_<1)return`#${Nr[Math.round(s)]}${Nr[Math.round(B)]}${Nr[Math.round(L)]}${Nr[Math.round(_*255)]}`;else return`#${Nr[Math.round(s)]}${Nr[Math.round(B)]}${Nr[Math.round(L)]}`}},Ri=Pc;var As={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:(c)=>{let s=c.match(As.hueRe);if(s){let[,B,L]=s;switch(L){case"grad":return S.channel.clamp.h(parseFloat(B)*0.9);case"rad":return S.channel.clamp.h(parseFloat(B)*180/Math.PI);case"turn":return S.channel.clamp.h(parseFloat(B)*360)}}return S.channel.clamp.h(parseFloat(c))},parse:(c)=>{let s=c.charCodeAt(0);if(s!==104&&s!==72)return;let B=c.match(As.re);if(!B)return;let[,L,_,I,O,D]=B;return li.set({h:As._hue2deg(L),s:S.channel.clamp.s(parseFloat(_)),l:S.channel.clamp.l(parseFloat(I)),a:O?S.channel.clamp.a(D?parseFloat(O)/100:parseFloat(O)):1},c)},stringify:(c)=>{let{h:s,s:B,l:L,a:_}=c;if(_<1)return`hsla(${S.lang.round(s)}, ${S.lang.round(B)}%, ${S.lang.round(L)}%, ${_})`;else return`hsl(${S.lang.round(s)}, ${S.lang.round(B)}%, ${S.lang.round(L)}%)`}},Ao=As;var Es={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:(c)=>{c=c.toLowerCase();let s=Es.colors[c];if(!s)return;return Ri.parse(s)},stringify:(c)=>{let s=Ri.stringify(c);for(let B in Es.colors)if(Es.colors[B]===s)return B;return}},Ja=Es;var Rc={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:(c)=>{let s=c.charCodeAt(0);if(s!==114&&s!==82)return;let B=c.match(Rc.re);if(!B)return;let[,L,_,I,O,D,P,W,R]=B;return li.set({r:S.channel.clamp.r(_?parseFloat(L)*2.55:parseFloat(L)),g:S.channel.clamp.g(O?parseFloat(I)*2.55:parseFloat(I)),b:S.channel.clamp.b(P?parseFloat(D)*2.55:parseFloat(D)),a:W?S.channel.clamp.a(R?parseFloat(W)/100:parseFloat(W)):1},c)},stringify:(c)=>{let{r:s,g:B,b:L,a:_}=c;if(_<1)return`rgba(${S.lang.round(s)}, ${S.lang.round(B)}, ${S.lang.round(L)}, ${S.lang.round(_)})`;else return`rgb(${S.lang.round(s)}, ${S.lang.round(B)}, ${S.lang.round(L)})`}},Eo=Rc;var nx={format:{keyword:Ja,hex:Ri,rgb:Eo,rgba:Eo,hsl:Ao,hsla:Ao},parse:(c)=>{if(typeof c!=="string")return c;let s=Ri.parse(c)||Eo.parse(c)||Ao.parse(c)||Ja.parse(c);if(s)return s;throw Error(`Unsupported color format: "${c}"`)},stringify:(c)=>{if(!c.changed&&c.color)return c.color;if(c.type.is(We.HSL)||c.data.r===void 0)return Ao.stringify(c);else if(c.a<1||!Number.isInteger(c.r)||!Number.isInteger(c.g)||!Number.isInteger(c.b))return Eo.stringify(c);else return Ri.stringify(c)}},te=nx;var lx=(c,s)=>{let B=te.parse(c);for(let L in s)B[L]=S.channel.clamp[L](s[L]);return te.stringify(B)},$s=lx;var hx=(c,s,B=0,L=1)=>{if(typeof c!=="number")return $s(c,{a:s});let _=li.set({r:S.channel.clamp.r(c),g:S.channel.clamp.g(s),b:S.channel.clamp.b(B),a:S.channel.clamp.a(L)});return te.stringify(_)},q=hx;var cx=(c)=>{let{r:s,g:B,b:L}=te.parse(c),_=0.2126*S.channel.toLinear(s)+0.7152*S.channel.toLinear(B)+0.0722*S.channel.toLinear(L);return S.lang.round(_)},qc=cx;var ux=(c)=>qc(c)>=0.5,zc=ux;var dx=(c)=>!zc(c),N=dx;var px=(c,s,B)=>{let L=te.parse(c),_=L[s],I=S.channel.clamp[s](_+B);if(_!==I)L[s]=I;return te.stringify(L)},fr=px;var fx=(c,s)=>fr(c,"l",s),i=fx;var gx=(c,s)=>fr(c,"l",-s),a=gx;var mx=(c,s)=>{let B=te.parse(c),L={};for(let _ in s){if(!s[_])continue;L[_]=B[_]+s[_]}return $s(c,L)},rt=mx;var xx=(c,s,B=50)=>{let{r:L,g:_,b:I,a:O}=te.parse(c),{r:D,g:P,b:W,a:R}=te.parse(s),Y=B/100,G=Y*2-1,U=O-R,tt=((G*U===-1?G:(G+U)/(1+G*U))+1)/2,et=1-tt,it=L*tt+D*et,at=_*tt+P*et,nt=I*tt+W*et,ut=O*Y+R*(1-Y);return q(it,at,nt,ut)},Wc=xx;var yx=(c,s=100)=>{let B=te.parse(c);return B.r=255-B.r,B.g=255-B.g,B.b=255-B.b,Wc(B,c,s)},xt=yx;var hn=e((c,s,{depth:B=2}={})=>{let L={depth:B};if(Array.isArray(s)&&!Array.isArray(c))return s.forEach((_)=>hn(c,_,L)),c;else if(Array.isArray(s)&&Array.isArray(c))return s.forEach((_)=>{if(!c.includes(_))c.push(_)}),c;if(c===void 0||c===null||B<=0)if(c!==void 0&&c!==null&&typeof c==="object"&&typeof s==="object")return Object.assign(c,s);else return s;if(s!==void 0&&s!==null&&typeof c==="object"&&typeof s==="object"){let _=c;Object.entries(s).forEach(([I,O])=>{if(typeof O==="object"){if(O===null)return;if(!Object.hasOwn(c,I))Object.defineProperty(c,I,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(_[I]===void 0)_[I]=Array.isArray(O)?[]:{};if(typeof _[I]==="object")_[I]=hn(_[I],O,{depth:B-1})}else if(typeof _[I]!=="object")if(Object.hasOwn(c,I))_[I]=O;else Object.defineProperty(c,I,{value:O,writable:!0,enumerable:!0,configurable:!0})})}return c},"assignWithDepth"),F=hn,Mr="#ffffff",Ar="#f2f2f2",ge=e((c,s)=>s?rt(c,{s:-40,l:10}):rt(c,{s:-40,l:-10}),"mkBorder"),Cx=class{static{e(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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?a(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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||i(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode)this.rowOdd=this.rowOdd||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||a(this.mainBkg,10);else this.rowOdd=this.rowOdd||i(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||i(this.mainBkg,5);if(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||rt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||rt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||rt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||rt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||rt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||rt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||rt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||rt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||rt(this.primaryColor,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=a(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=a(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||xt(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)if(this.darkMode)this["cScalePeer"+s]=this["cScalePeer"+s]||i(this["cScale"+s],10);else this["cScalePeer"+s]=this["cScalePeer"+s]||a(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;let c=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(8+s*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||rt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||rt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||rt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||rt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||rt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||rt(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||rt(this.primaryColor,{l:-10}),this.pie5=this.pie5||rt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||rt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||rt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||rt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||rt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||rt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||rt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||rt(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.venn1=this.venn1??rt(this.primaryColor,{l:-30}),this.venn2=this.venn2??rt(this.secondaryColor,{l:-30}),this.venn3=this.venn3??rt(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??rt(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??rt(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??rt(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??rt(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??rt(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?a(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||rt(this.primaryColor,{h:-30}),this.git4=this.git4||rt(this.primaryColor,{h:-60}),this.git5=this.git5||rt(this.primaryColor,{h:-90}),this.git6=this.git6||rt(this.primaryColor,{h:60}),this.git7=this.git7||rt(this.primaryColor,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},bx=e((c)=>{let s=new Cx;return s.calculate(c),s},"getThemeVariables"),kx=class{static{e(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=i(this.primaryColor,16),this.tertiaryColor=rt(this.primaryColor,{h:-160}),this.primaryBorderColor=xt(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.lineColor=xt(this.background),this.textColor=xt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=i(xt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=q(255,255,255,0.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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=a("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=a(this.sectionBkgColor,10),this.taskBorderColor=q(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=q(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||i(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||a(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=i(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=i(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=i(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=xt(this.doneTaskBkgColor),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=rt(this.primaryColor,{h:64}),this.fillType3=rt(this.secondaryColor,{h:64}),this.fillType4=rt(this.primaryColor,{h:-64}),this.fillType5=rt(this.secondaryColor,{h:-64}),this.fillType6=rt(this.primaryColor,{h:128}),this.fillType7=rt(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||rt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||rt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||rt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||rt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||rt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||rt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||rt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||rt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||rt(this.primaryColor,{h:330});for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||xt(this["cScale"+c]);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScalePeer"+c]=this["cScalePeer"+c]||i(this["cScale"+c],10);for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||rt(this.mainBkg,{h:30,s:-30,l:-(-10+c*4)}),this["surfacePeer"+c]=this["surfacePeer"+c]||rt(this.mainBkg,{h:30,s:-30,l:-(-7+c*4)});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.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,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";for(let c=0;c<8;c++)this["venn"+(c+1)]=this["venn"+(c+1)]??i(this["cScale"+c],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},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?a(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=i(this.secondaryColor,20),this.git1=i(this.pie2||this.secondaryColor,20),this.git2=i(this.pie3||this.tertiaryColor,20),this.git3=i(this.pie4||rt(this.primaryColor,{h:-30}),20),this.git4=i(this.pie5||rt(this.primaryColor,{h:-60}),20),this.git5=i(this.pie6||rt(this.primaryColor,{h:-90}),10),this.git6=i(this.pie7||rt(this.primaryColor,{h:60}),10),this.git7=i(this.pie8||rt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||xt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||xt(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||i("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||i("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||i("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||i("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||i(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||i(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||i(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||i(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},wx=e((c)=>{let s=new kx;return s.calculate(c),s},"getThemeVariables"),Sx=class{static{e(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=rt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=rt(this.primaryColor,{h:-160}),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.lineColor=xt(this.background),this.textColor=xt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ge(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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=q(102,102,255,0.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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||rt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||rt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||rt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||rt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||rt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||rt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||rt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||rt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||rt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||a(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||a(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=a(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||a(this["cScale"+c],25);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||rt(this["cScale"+c],{h:180});for(let c=0;c<5;c++)this["surface"+c]=this["surface"+c]||rt(this.mainBkg,{h:30,l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||rt(this.mainBkg,{h:30,l:-(7+c*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||xt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||xt(this.labelTextColor);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleLabel"+c]=this["cScaleLabel"+c]||this.labelTextColor}if(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=this.border1,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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||i(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||i(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=rt(this.primaryColor,{h:64}),this.fillType3=rt(this.secondaryColor,{h:64}),this.fillType4=rt(this.primaryColor,{h:-64}),this.fillType5=rt(this.secondaryColor,{h:-64}),this.fillType6=rt(this.primaryColor,{h:128}),this.fillType7=rt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||rt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||rt(this.primaryColor,{l:-10}),this.pie5=this.pie5||rt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||rt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||rt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||rt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||rt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||rt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||rt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||rt(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.venn1=this.venn1??rt(this.primaryColor,{l:-30}),this.venn2=this.venn2??rt(this.secondaryColor,{l:-30}),this.venn3=this.venn3??rt(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??rt(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??rt(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??rt(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??rt(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??rt(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||rt(this.primaryColor,{h:-30}),this.git4=this.git4||rt(this.primaryColor,{h:-60}),this.git5=this.git5||rt(this.primaryColor,{h:-90}),this.git6=this.git6||rt(this.primaryColor,{h:60}),this.git7=this.git7||rt(this.primaryColor,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||a(xt(this.git0),25),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||xt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||xt(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(Object.keys(this).forEach((B)=>{if(this[B]==="calculated")this[B]=void 0}),typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},j=e((c)=>{let s=new Sx;return s.calculate(c),s},"getThemeVariables"),Tx=class{static{e(this,"Theme")}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=i("#cde498",10),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.primaryColor),this.lineColor=xt(this.background),this.textColor=xt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=a(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||rt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||rt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||rt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||rt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||rt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||rt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||rt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||rt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||rt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||a(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||a(this.tertiaryColor,40);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScale"+c]=a(this["cScale"+c],10),this["cScalePeer"+c]=this["cScalePeer"+c]||a(this["cScale"+c],25);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)this["cScaleInv"+c]=this["cScaleInv"+c]||rt(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]||rt(this.mainBkg,{h:30,s:-30,l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||rt(this.mainBkg,{h:30,s:-30,l:-(8+c*5)});if(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||i(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||i(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=rt(this.primaryColor,{h:64}),this.fillType3=rt(this.secondaryColor,{h:64}),this.fillType4=rt(this.primaryColor,{h:-64}),this.fillType5=rt(this.secondaryColor,{h:-64}),this.fillType6=rt(this.primaryColor,{h:128}),this.fillType7=rt(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||rt(this.primaryColor,{l:-30}),this.pie5=this.pie5||rt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||rt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||rt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||rt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||rt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||rt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||rt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||rt(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.venn1=this.venn1??rt(this.primaryColor,{l:-30}),this.venn2=this.venn2??rt(this.secondaryColor,{l:-30}),this.venn3=this.venn3??rt(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??rt(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??rt(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??rt(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??rt(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??rt(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||rt(this.primaryColor,{h:-30}),this.git4=this.git4||rt(this.primaryColor,{h:-60}),this.git5=this.git5||rt(this.primaryColor,{h:-90}),this.git6=this.git6||rt(this.primaryColor,{h:60}),this.git7=this.git7||rt(this.primaryColor,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||xt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||xt(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},Bx=e((c)=>{let s=new Tx;return s.calculate(c),s},"getThemeVariables"),_x=class{static{e(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=i(this.contrast,55),this.background="#ffffff",this.tertiaryColor=rt(this.primaryColor,{h:-160}),this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.lineColor=xt(this.background),this.textColor=xt(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.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||i(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=i(this.contrast,55),this.border2=this.contrast,this.actorBorder=i(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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]||xt(this["cScale"+c]);for(let c=0;c<this.THEME_COLOR_LIMIT;c++)if(this.darkMode)this["cScalePeer"+c]=this["cScalePeer"+c]||i(this["cScale"+c],10);else this["cScalePeer"+c]=this["cScalePeer"+c]||a(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]||rt(this.mainBkg,{l:-(5+c*5)}),this["surfacePeer"+c]=this["surfacePeer"+c]||rt(this.mainBkg,{l:-(8+c*5)});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=i(this.contrast,30),this.sectionBkgColor2=i(this.contrast,30),this.taskBorderColor=a(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=i(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=a(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=rt(this.primaryColor,{h:64}),this.fillType3=rt(this.secondaryColor,{h:64}),this.fillType4=rt(this.primaryColor,{h:-64}),this.fillType5=rt(this.secondaryColor,{h:-64}),this.fillType6=rt(this.primaryColor,{h:128}),this.fillType7=rt(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";for(let c=0;c<8;c++)this["venn"+(c+1)]=this["venn"+(c+1)]??this["cScale"+c];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||0.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||0.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},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=a(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||rt(this.primaryColor,{h:-30}),this.git4=this.pie5||rt(this.primaryColor,{h:-60}),this.git5=this.pie6||rt(this.primaryColor,{h:-90}),this.git6=this.pie7||rt(this.primaryColor,{h:60}),this.git7=this.pie8||rt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},vx=e((c)=>{let s=new _x;return s.calculate(c),s},"getThemeVariables"),Lx=class{static{e(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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?a(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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let c="#ECECFE",s="#E9E9F1",B=rt(c,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||B,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||s,this.sectionBkgColor2=this.sectionBkgColor2||c,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||c,this.activeTaskBorderColor=this.activeTaskBorderColor||c,this.activeTaskBkgColor=this.activeTaskBkgColor||i(c,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.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||c,this.cScale1=this.cScale1||s,this.cScale2=this.cScale2||B,this.cScale3=this.cScale3||rt(c,{h:30}),this.cScale4=this.cScale4||rt(c,{h:60}),this.cScale5=this.cScale5||rt(c,{h:90}),this.cScale6=this.cScale6||rt(c,{h:120}),this.cScale7=this.cScale7||rt(c,{h:150}),this.cScale8=this.cScale8||rt(c,{h:210,l:150}),this.cScale9=this.cScale9||rt(c,{h:270}),this.cScale10=this.cScale10||rt(c,{h:300}),this.cScale11=this.cScale11||rt(c,{h:330}),this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=a(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=a(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||xt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)if(this.darkMode)this["cScalePeer"+_]=this["cScalePeer"+_]||i(this["cScale"+_],10);else this["cScalePeer"+_]=this["cScalePeer"+_]||a(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;let L=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||rt(this.mainBkg,{h:180,s:-15,l:L*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||rt(this.mainBkg,{h:180,s:-15,l:L*(8+_*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||c,this.fillType1=this.fillType1||s,this.fillType2=this.fillType2||rt(c,{h:64}),this.fillType3=this.fillType3||rt(s,{h:64}),this.fillType4=this.fillType4||rt(c,{h:-64}),this.fillType5=this.fillType5||rt(s,{h:-64}),this.fillType6=this.fillType6||rt(c,{h:128}),this.fillType7=this.fillType7||rt(s,{h:128}),this.pie1=this.pie1||c,this.pie2=this.pie2||s,this.pie3=this.pie3||B,this.pie4=this.pie4||rt(c,{l:-10}),this.pie5=this.pie5||rt(s,{l:-10}),this.pie6=this.pie6||rt(B,{l:-10}),this.pie7=this.pie7||rt(c,{h:60,l:-10}),this.pie8=this.pie8||rt(c,{h:-60,l:-10}),this.pie9=this.pie9||rt(c,{h:120,l:0}),this.pie10=this.pie10||rt(c,{h:60,l:-20}),this.pie11=this.pie11||rt(c,{h:-60,l:-20}),this.pie12=this.pie12||rt(c,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||c,this.quadrant2Fill=this.quadrant2Fill||rt(c,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(c,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(c,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||c,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?a(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||c,this.git1=this.git1||s,this.git2=this.git2||B,this.git3=this.git3||rt(c,{h:-30}),this.git4=this.git4||rt(c,{h:-60}),this.git5=this.git5||rt(c,{h:-90}),this.git6=this.git6||rt(c,{h:60}),this.git7=this.git7||rt(c,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},Fx=e((c)=>{let s=new Lx;return s.calculate(c),s},"getThemeVariables"),Mx=class{static{e(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=i(this.primaryColor,16),this.tertiaryColor=rt(this.primaryColor,{h:-160}),this.primaryBorderColor=xt(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=i(xt("#323D47"),10),this.border1="#ccc",this.border2=q(255,255,255,0.25),this.arrowheadColor=xt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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.border1,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?a(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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||i(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||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||rt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||rt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||rt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||rt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||rt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||rt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||rt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||rt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||rt(this.primaryColor,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=a(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=a(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||xt(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)if(this.darkMode)this["cScalePeer"+s]=this["cScalePeer"+s]||i(this["cScale"+s],10);else this["cScalePeer"+s]=this["cScalePeer"+s]||a(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;let c=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(8+s*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||rt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||rt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||rt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||rt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||rt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||rt(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||rt(this.primaryColor,{l:-10}),this.pie5=this.pie5||rt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||rt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||rt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||rt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||rt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||rt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||rt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||rt(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?a(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}};var Ax=e((c)=>{let s=new Mx;return s.calculate(c),s},"getThemeVariables"),Ex=class{static{e(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ge("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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?a(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let c="#ECECFE",s="#E9E9F1",B=rt(c,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||B,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||s,this.sectionBkgColor2=this.sectionBkgColor2||c,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||c,this.activeTaskBorderColor=this.activeTaskBorderColor||c,this.activeTaskBkgColor=this.activeTaskBkgColor||i(c,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,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.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=this.mainBkg;if(this.darkMode)for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=a(this["cScale"+_],75);else for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScale"+_]=a(this["cScale"+_],25);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||xt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)if(this.darkMode)this["cScalePeer"+_]=this["cScalePeer"+_]||i(this["cScale"+_],10);else this["cScalePeer"+_]=this["cScalePeer"+_]||a(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;let L=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||rt(this.mainBkg,{h:180,s:-15,l:L*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||rt(this.mainBkg,{h:180,s:-15,l:L*(8+_*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||c,this.fillType1=this.fillType1||s,this.fillType2=this.fillType2||rt(c,{h:64}),this.fillType3=this.fillType3||rt(s,{h:64}),this.fillType4=this.fillType4||rt(c,{h:-64}),this.fillType5=this.fillType5||rt(s,{h:-64}),this.fillType6=this.fillType6||rt(c,{h:128}),this.fillType7=this.fillType7||rt(s,{h:128}),this.pie1=this.pie1||c,this.pie2=this.pie2||s,this.pie3=this.pie3||B,this.pie4=this.pie4||rt(c,{l:-10}),this.pie5=this.pie5||rt(s,{l:-10}),this.pie6=this.pie6||rt(B,{l:-10}),this.pie7=this.pie7||rt(c,{h:60,l:-10}),this.pie8=this.pie8||rt(c,{h:-60,l:-10}),this.pie9=this.pie9||rt(c,{h:120,l:0}),this.pie10=this.pie10||rt(c,{h:60,l:-20}),this.pie11=this.pie11||rt(c,{h:-60,l:-20}),this.pie12=this.pie12||rt(c,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||c,this.quadrant2Fill=this.quadrant2Fill||rt(c,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(c,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(c,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||c,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?a(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||c,this.git1=this.git1||s,this.git2=this.git2||B,this.git3=this.git3||rt(c,{h:-30}),this.git4=this.git4||rt(c,{h:-60}),this.git5=this.git5||rt(c,{h:-90}),this.git6=this.git6||rt(c,{h:60}),this.git7=this.git7||rt(c,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},$x=e((c)=>{let s=new Ex;return s.calculate(c),s},"getThemeVariables"),Ix=class{static{e(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=i(this.primaryColor,16),this.tertiaryColor=rt(this.primaryColor,{h:-160}),this.primaryBorderColor=xt(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=i(xt("#323D47"),10),this.border1="#ccc",this.border2=q(255,255,255,0.25),this.arrowheadColor=xt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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.border1,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?a(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||i(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.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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,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.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||rt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||rt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||rt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||rt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||rt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||rt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||rt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||rt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||rt(this.primaryColor,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=a(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=a(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||xt(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)if(this.darkMode)this["cScalePeer"+s]=this["cScalePeer"+s]||i(this["cScale"+s],10);else this["cScalePeer"+s]=this["cScalePeer"+s]||a(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;let c=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(8+s*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||rt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||rt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||rt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||rt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||rt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||rt(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||rt(this.primaryColor,{l:-10}),this.pie5=this.pie5||rt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||rt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||rt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||rt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||rt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||rt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||rt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||rt(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?a(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||rt(this.primaryColor,{h:-30}),this.git4=this.git4||rt(this.primaryColor,{h:-60}),this.git5=this.git5||rt(this.primaryColor,{h:-90}),this.git6=this.git6||rt(this.primaryColor,{h:60}),this.git7=this.git7||rt(this.primaryColor,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},Ox=e((c)=>{let s=new Ix;return s.calculate(c),s},"getThemeVariables"),Dx=class{static{e(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=ge(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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?a(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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let c="#ECECFE",s="#E9E9F1",B=rt(c,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||B,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||s,this.sectionBkgColor2=this.sectionBkgColor2||c,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||c,this.activeTaskBorderColor=this.activeTaskBorderColor||c,this.activeTaskBkgColor=this.activeTaskBkgColor||i(c,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleInv"+_]=this["cScaleInv"+_]||xt(this["cScale"+_]);for(let _=0;_<this.THEME_COLOR_LIMIT;_++)if(this.darkMode)this["cScalePeer"+_]=this["cScalePeer"+_]||i(this["cScale"+_],10);else this["cScalePeer"+_]=this["cScalePeer"+_]||a(this["cScale"+_],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let _=0;_<this.THEME_COLOR_LIMIT;_++)this["cScaleLabel"+_]=this["cScaleLabel"+_]||this.scaleLabelColor;let L=this.darkMode?-4:-1;for(let _=0;_<5;_++)this["surface"+_]=this["surface"+_]||rt(this.mainBkg,{h:180,s:-15,l:L*(5+_*3)}),this["surfacePeer"+_]=this["surfacePeer"+_]||rt(this.mainBkg,{h:180,s:-15,l:L*(8+_*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||c,this.fillType1=this.fillType1||s,this.fillType2=this.fillType2||rt(c,{h:64}),this.fillType3=this.fillType3||rt(s,{h:64}),this.fillType4=this.fillType4||rt(c,{h:-64}),this.fillType5=this.fillType5||rt(s,{h:-64}),this.fillType6=this.fillType6||rt(c,{h:128}),this.fillType7=this.fillType7||rt(s,{h:128}),this.pie1=this.pie1||c,this.pie2=this.pie2||s,this.pie3=this.pie3||B,this.pie4=this.pie4||rt(c,{l:-10}),this.pie5=this.pie5||rt(s,{l:-10}),this.pie6=this.pie6||rt(B,{l:-10}),this.pie7=this.pie7||rt(c,{h:60,l:-10}),this.pie8=this.pie8||rt(c,{h:-60,l:-10}),this.pie9=this.pie9||rt(c,{h:120,l:0}),this.pie10=this.pie10||rt(c,{h:60,l:-20}),this.pie11=this.pie11||rt(c,{h:-60,l:-20}),this.pie12=this.pie12||rt(c,{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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||c,this.quadrant2Fill=this.quadrant2Fill||rt(c,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(c,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(c,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||c,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?a(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||c,this.git1=this.git1||s,this.git2=this.git2||B,this.git3=this.git3||rt(c,{h:-30}),this.git4=this.git4||rt(c,{h:-60}),this.git5=this.git5||rt(c,{h:-90}),this.git6=this.git6||rt(c,{h:60}),this.git7=this.git7||rt(c,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},Px=e((c)=>{let s=new Dx;return s.calculate(c),s},"getThemeVariables"),Rx=class{static{e(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=i(this.primaryColor,16),this.tertiaryColor=rt(this.primaryColor,{h:-160}),this.primaryBorderColor=xt(this.background),this.secondaryBorderColor=ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ge(this.tertiaryColor,this.darkMode),this.primaryTextColor=xt(this.primaryColor),this.secondaryTextColor=xt(this.secondaryColor),this.tertiaryTextColor=xt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=i(xt("#323D47"),10),this.border1="#ccc",this.border2=q(255,255,255,0.25),this.arrowheadColor=xt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||rt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||rt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ge(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ge(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ge(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ge(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||xt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||xt(this.tertiaryColor),this.lineColor=this.lineColor||xt(this.background),this.arrowheadColor=this.arrowheadColor||xt(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.border1,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?a(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||a(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||xt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||i(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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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.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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||xt(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)if(this.darkMode)this["cScalePeer"+s]=this["cScalePeer"+s]||i(this["cScale"+s],10);else this["cScalePeer"+s]=this["cScalePeer"+s]||a(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=a(this["cScale"+s],75);let c=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||rt(this.mainBkg,{h:180,s:-15,l:c*(8+s*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||rt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||rt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||rt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||rt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||rt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||rt(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||rt(this.primaryColor,{l:-10}),this.pie5=this.pie5||rt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||rt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||rt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||rt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||rt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||rt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||rt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||rt(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.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||rt(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||rt(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||rt(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||rt(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||rt(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||rt(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||N(this.quadrant1Fill)?i(this.quadrant1Fill):a(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?a(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||rt(this.primaryColor,{h:-30}),this.git4=this.git4||rt(this.primaryColor,{h:-60}),this.git5=this.git5||rt(this.primaryColor,{h:-90}),this.git6=this.git6||rt(this.primaryColor,{h:60}),this.git7=this.git7||rt(this.primaryColor,{h:120}),this.darkMode)this.git0=i(this.git0,25),this.git1=i(this.git1,25),this.git2=i(this.git2,25),this.git3=i(this.git3,25),this.git4=i(this.git4,25),this.git5=i(this.git5,25),this.git6=i(this.git6,25),this.git7=i(this.git7,25);else this.git0=a(this.git0,25),this.git1=a(this.git1,25),this.git2=a(this.git2,25),this.git3=a(this.git3,25),this.git4=a(this.git4,25),this.git5=a(this.git5,25),this.git6=a(this.git6,25),this.git7=a(this.git7,25);this.gitInv0=this.gitInv0||xt(this.git0),this.gitInv1=this.gitInv1||xt(this.git1),this.gitInv2=this.gitInv2||xt(this.git2),this.gitInv3=this.gitInv3||xt(this.git3),this.gitInv4=this.gitInv4||xt(this.git4),this.gitInv5=this.gitInv5||xt(this.git5),this.gitInv6=this.gitInv6||xt(this.git6),this.gitInv7=this.gitInv7||xt(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Mr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ar}calculate(c){if(typeof c!=="object"){this.updateColors();return}let s=Object.keys(c);s.forEach((B)=>{this[B]=c[B]}),this.updateColors(),s.forEach((B)=>{this[B]=c[B]})}},qx=e((c)=>{let s=new Rx;return s.calculate(c),s},"getThemeVariables"),ot={base:{getThemeVariables:bx},dark:{getThemeVariables:wx},default:{getThemeVariables:j},forest:{getThemeVariables:Bx},neutral:{getThemeVariables:vx},neo:{getThemeVariables:Fx},"neo-dark":{getThemeVariables:Ax},redux:{getThemeVariables:$x},"redux-dark":{getThemeVariables:Ox},"redux-color":{getThemeVariables:Px},"redux-dark-color":{getThemeVariables:qx}},je={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,hierarchicalNamespaces:!0},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:0.75,donutHole:0,legendPosition:"right",highlightSlice:""},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,showDataLabelOutsideBar:!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,labelRotation:0},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,labelRotation:0},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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:0.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:0.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:50000,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},Xc={...je,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:ot.default.getThemeVariables(),sequence:{...je.sequence,messageFont:e(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:e(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:e(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...je.gantt,tickInterval:void 0,useWidth:void 0},c4:{...je.c4,useWidth:void 0,personFont:e(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...je.flowchart,inheritDir:!1},external_personFont:e(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:e(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:e(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:e(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:e(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:e(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:e(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:e(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:e(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:e(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:e(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:e(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:e(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:e(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:e(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:e(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:e(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:e(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:e(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:e(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:e(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...je.pie,useWidth:984},xyChart:{...je.xyChart,useWidth:void 0},requirement:{...je.requirement,useWidth:void 0},packet:{...je.packet},eventmodeling:{...je.eventmodeling},treeView:{...je.treeView,useWidth:void 0},radar:{...je.radar},railroad:{...je.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...je.ishikawa},sankey:{...je.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...je.venn},cynefin:{...je.cynefin}},Uc=e((c,s="")=>Object.keys(c).reduce((B,L)=>{if(Array.isArray(c[L]))return B;else if(typeof c[L]==="object"&&c[L]!==null)return[...B,s+L,...Uc(c[L],"")];return[...B,s+L]},[]),"keyify"),zx=new Set(Uc(Xc,"")),x=Xc,Wx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Nx=e((c,s)=>{for(let B of Object.keys(c)){let L=c[B];if(B.startsWith("__")||B.includes("proto")||B.includes("constr")||typeof L!=="string"||!s.test(L))t.debug("sanitize deleting dictionary entry:",B,L),delete c[B]}},"sanitizeDictionaryConfig"),Io=e((c)=>{if(t.debug("sanitizeDirective called with",c),typeof c!=="object"||c==null)return;if(Array.isArray(c)){c.forEach((s)=>Io(s));return}for(let s of Object.keys(c)){if(t.debug("Checking key",s),s.startsWith("__")||s.includes("proto")||s.includes("constr")||!zx.has(s)||c[s]==null){t.debug("sanitize deleting key: ",s),delete c[s];continue}if(typeof c[s]==="object"){let L=Wx[s];if(L)Nx(c[s],L);else t.debug("sanitizing object",s),Io(c[s]);continue}let B=["themeCSS","fontFamily","altFontFamily"];for(let L of B)if(s.includes(L))t.debug("sanitizing css option",s),c[s]=fi(c[s])}if(c.themeVariables)for(let s of Object.keys(c.themeVariables)){let B=c.themeVariables[s];if(B?.match&&!B.match(/^[\d "#%(),.;A-Za-z]+$/))c.themeVariables[s]=""}t.debug("After sanitization",c)},"sanitizeDirective"),fi=e((c)=>{let s=0,B=0;for(let L of c){if(s<B)return"{ /* ERROR: Unbalanced CSS */ }";if(L==="{")s++;else if(L==="}")B++}if(s!==B)return"{ /* ERROR: Unbalanced CSS */ }";return c},"sanitizeCss"),Gt=Object.freeze(x),$e=e((c)=>c===!1||["false","null","0"].includes(String(c).trim().toLowerCase())?!1:!0,"evaluate"),sr=F({},Gt),Ds,qi=[],$o=F({},Gt),Oo=e((c,s)=>{let B=F({},c),L={};for(let _ of s)Gc(_),L=F(L,_);if(B=F(B,L),L.theme&&L.theme in ot){let _=F({},Ds),I=F(_.themeVariables||{},L.themeVariables);if(B.theme&&B.theme in ot)B.themeVariables=ot[B.theme].getThemeVariables(I)}return $o=B,Yx($o),$o},"updateCurrentConfig"),Ni=e((c)=>{if(sr=F({},Gt),sr=F(sr,c),c.theme&&ot[c.theme])sr.themeVariables=ot[c.theme].getThemeVariables(c.themeVariables);return Oo(sr,qi),sr},"setSiteConfig"),Di=e((c)=>{Ds=F({},c)},"saveConfigFromInitialize"),Pi=e((c)=>(sr=F(sr,c),Oo(sr,qi),sr),"updateSiteConfig"),pi=e(()=>F({},sr),"getSiteConfig"),mi=e((c)=>(Oo($o,[c]),u()),"setConfig"),u=e(()=>F({},$o),"getConfig"),Gc=e((c)=>{if(!c)return;["secure",...sr.secure??[]].forEach((s)=>{if(Object.hasOwn(c,s))t.debug(`Denied attempt to modify a secure key ${s}`,c[s]),delete c[s]}),Object.keys(c).forEach((s)=>{if(s.startsWith("__"))delete c[s]}),Object.keys(c).forEach((s)=>{if(typeof c[s]==="string"&&(c[s].includes("<")||c[s].includes(">")||c[s].includes("url(data:")))delete c[s];if(typeof c[s]==="object")Gc(c[s])})},"sanitize"),Oi=e((c)=>{if(Io(c),c.fontFamily&&!c.themeVariables?.fontFamily)c.themeVariables={...c.themeVariables,fontFamily:c.fontFamily};qi.push(c),Oo(sr,qi)},"addDirective"),zr=e((c=sr)=>{qi=[],Oo(c,qi)},"reset"),Hx={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Nc={},Vc=e((c)=>{if(Nc[c])return;t.warn(Hx[c]),Nc[c]=!0},"issueWarning"),Yx=e((c)=>{if(!c)return;if(c.lazyLoadedDiagrams||c.loadExternalDiagramsAtStartup)Vc("LAZY_LOAD_DEPRECATED")},"checkConfig"),Gr=e(()=>{let c={};if(Ds)c=F(c,Ds);for(let s of qi)c=F(c,s);return c},"getUserDefinedConfig"),M=e((c)=>{if(c.flowchart?.htmlLabels!=null)Vc("FLOWCHART_HTML_LABELS_DEPRECATED");return $e(c.htmlLabels??c.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),gi=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,ao=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,jx=/\s*%%.*\n/gm,yi=class extends Error{static{e(this,"UnknownDiagramError")}constructor(c){super(c);this.name="UnknownDiagramError"}},Lt={},Hr=e(function(c,s){c=c.replace(gi,"").replace(ao,"").replace(jx,`
2
- `);for(let[B,{detector:L}]of Object.entries(Lt))if(L(c,s))return B;throw new yi(`No diagram type detected matching given configuration for text: ${c}`)},"detectType"),Mn=e((...c)=>{for(let{id:s,detector:B,loader:L}of c)Zc(s,B,L)},"registerLazyLoadedDiagrams"),Zc=e((c,s,B)=>{if(Lt[c])t.warn(`Detector with key ${c} already exists. Overwriting.`);Lt[c]={detector:s,loader:B},t.debug(`Detector with key ${c} added${B?" with loader":""}`)},"addDetector"),$i=e((c)=>Lt[c].loader,"getDiagramLoader"),Ht=/<br\s*\/?>/gi,Xx=e((c)=>{if(!c)return[""];return Jc(c).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Ux=(()=>{let c=!1;return()=>{if(!c)Kc(),c=!0}})();function Kc(){V.addHook("beforeSanitizeAttributes",(s)=>{if(s.tagName==="A"&&s.hasAttribute("target"))s.setAttribute("data-temp-href-target",s.getAttribute("target")??"")}),V.addHook("afterSanitizeAttributes",(s)=>{if(s.tagName==="A"&&s.hasAttribute("data-temp-href-target")){if(s.setAttribute("target",s.getAttribute("data-temp-href-target")??""),s.removeAttribute("data-temp-href-target"),s.getAttribute("target")==="_blank")s.setAttribute("rel","noopener")}})}e(Kc,"setupDompurifyHooks");var Qc=e((c)=>(Ux(),V.sanitize(c)),"removeScript"),Hc=e((c,s)=>{if(M(s)){let B=s.securityLevel;if(B==="antiscript"||B==="strict"||B==="sandbox")c=Qc(c);else if(B!=="loose")c=Jc(c),c=c.replace(/</g,"&lt;").replace(/>/g,"&gt;"),c=c.replace(/=/g,"&equals;"),c=Kx(c)}return c},"sanitizeMore"),w=e((c,s)=>{if(!c)return c;if(s.dompurifyConfig)c=V.sanitize(Hc(c,s),s.dompurifyConfig).toString();else c=V.sanitize(Hc(c,s),{FORBID_TAGS:["style"]}).toString();return c},"sanitizeText"),Gx=e((c,s)=>{if(typeof c==="string")return w(c,s);return c.flat().map((B)=>w(B,s))},"sanitizeTextOrArray"),Vx=e((c)=>Ht.test(c),"hasBreaks"),Zx=e((c)=>c.split(Ht),"splitBreaks"),Kx=e((c)=>c.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Jc=e((c)=>c.replace(Ht,"#br#"),"breakToPlaceholder"),ht=e((c)=>{let s="";if(c)s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,s=CSS.escape(s);return s},"getUrl"),Qx=e(function(...c){let s=c.filter((B)=>!isNaN(B));return Math.max(...s)},"getMax"),Jx=e(function(...c){let s=c.filter((B)=>!isNaN(B));return Math.min(...s)},"getMin"),lt=e(function(c){let s=c.split(/(,)/),B=[];for(let L=0;L<s.length;L++){let _=s[L];if(_===","&&L>0&&L+1<s.length){let I=s[L-1],O=s[L+1];if(ty(I,O))_=I+","+O,L++,B.pop()}B.push(ey(_))}return B.join("")},"parseGenericTypes"),cn=e((c,s)=>Math.max(0,c.split(s).length-1),"countOccurrence"),ty=e((c,s)=>{let B=cn(c,"~"),L=cn(s,"~");return B===1&&L===1},"shouldCombineSets"),ey=e((c)=>{let s=cn(c,"~"),B=!1;if(s<=1)return c;if(s%2!==0&&c.startsWith("~"))c=c.substring(1),B=!0;let L=[...c],_=L.indexOf("~"),I=L.lastIndexOf("~");while(_!==-1&&I!==-1&&_!==I)L[_]="<",L[I]=">",_=L.indexOf("~"),I=L.lastIndexOf("~");if(B)L.unshift("~");return L.join("")},"processSet"),Yc=e(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Is=/\$\$(.*?)\$\$/g,H=e((c)=>(c.match(Is)?.length??0)>0,"hasKatex"),pr=e(async(c,s)=>{let B=document.createElement("div");B.innerHTML=await mr(c,s),B.id="katex-temp",B.style.visibility="hidden",B.style.position="absolute",B.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",B);let _={width:B.clientWidth,height:B.clientHeight};return B.remove(),_},"calculateMathMLDimensions"),ry=e(async(c,s)=>{if(!H(c))return c;if(!(Yc()||s.legacyMathML||s.forceLegacyMathML))return c.replace(Is,"MathML is unsupported in this environment.");{let{default:B}=await (T("dmg8k4zm"),import("./katex-dmg8k4zm.js")),L=s.forceLegacyMathML||!Yc()&&s.legacyMathML?"htmlAndMathml":"mathml";return c.split(Ht).map((_)=>H(_)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${_}</div>`:`<div>${_}</div>`).join("").replace(Is,(_,I)=>B.renderToString(I,{throwOnError:!0,displayMode:!0,output:L}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return c.replace(Is,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),mr=e(async(c,s)=>w(await ry(c,s),s),"renderKatexSanitized"),l={getRows:Xx,sanitizeText:w,sanitizeTextOrArray:Gx,hasBreaks:Vx,splitBreaks:Zx,lineBreakRegex:Ht,removeScript:Qc,getUrl:ht,evaluate:$e,getMax:Qx,getMin:Jx},iy=e(function(c,s){for(let B of s)c.attr(B[0],B[1])},"d3Attrs"),oy=e(function(c,s,B){let L=new Map;if(B)L.set("width","100%"),L.set("style",`max-width: ${s}px;`);else L.set("height",c),L.set("width",s);return L},"calculateSvgSizeAttrs"),k=e(function(c,s,B,L){let _=oy(s,B,L);iy(c,_)},"configureSvgSize"),Ie=e(function(c,s,B,L){let _=s.node().getBBox(),{width:I,height:O}=_;t.info(`SVG bounds: ${I}x${O}`,_);let D=0,P=0;t.info(`Graph bounds: ${D}x${P}`,c),D=I+B*2,P=O+B*2,t.info(`Calculated bounds: ${D}x${P}`),k(s,P,D,L);let W=`${_.x-B} ${_.y-B} ${_.width+2*B} ${_.height+2*B}`;s.attr("viewBox",W)},"setupGraphViewbox"),Os={};function Nn(c){return[...c.cssRules].map((s)=>s.cssText).join(`
3
- `)}e(Nn,"cssStyleSheetToString");var sy=e((c,s,B,L)=>{let _="";if(c in Os&&Os[c])_=Os[c]({...B,svgId:L});else t.warn(`No theme found for ${c}`);return`& {
4
- font-family: ${B.fontFamily};
5
- font-size: ${B.fontSize};
6
- fill: ${B.textColor}
7
- }
8
- @keyframes edge-animation-frame {
9
- from {
10
- stroke-dashoffset: 0;
11
- }
12
- }
13
- @keyframes dash {
14
- to {
15
- stroke-dashoffset: 0;
16
- }
17
- }
18
- & .edge-animation-slow {
19
- stroke-dasharray: 9,5 !important;
20
- stroke-dashoffset: 900;
21
- animation: dash 50s linear infinite;
22
- stroke-linecap: round;
23
- }
24
- & .edge-animation-fast {
25
- stroke-dasharray: 9,5 !important;
26
- stroke-dashoffset: 900;
27
- animation: dash 20s linear infinite;
28
- stroke-linecap: round;
29
- }
30
- /* Classes common for multiple diagrams */
31
-
32
- & .error-icon {
33
- fill: ${B.errorBkgColor};
34
- }
35
- & .error-text {
36
- fill: ${B.errorTextColor};
37
- stroke: ${B.errorTextColor};
38
- }
39
-
40
- & .edge-thickness-normal {
41
- stroke-width: ${B.strokeWidth??1}px;
42
- }
43
- & .edge-thickness-thick {
44
- stroke-width: 3.5px
45
- }
46
- & .edge-pattern-solid {
47
- stroke-dasharray: 0;
48
- }
49
- & .edge-thickness-invisible {
50
- stroke-width: 0;
51
- fill: none;
52
- }
53
- & .edge-pattern-dashed{
54
- stroke-dasharray: 3;
55
- }
56
- .edge-pattern-dotted {
57
- stroke-dasharray: 2;
58
- }
59
-
60
- & .marker {
61
- fill: ${B.lineColor};
62
- stroke: ${B.lineColor};
63
- }
64
- & .marker.cross {
65
- stroke: ${B.lineColor};
66
- }
67
-
68
- & svg {
69
- font-family: ${B.fontFamily};
70
- font-size: ${B.fontSize};
71
- }
72
- & p {
73
- margin: 0
74
- }
75
-
76
- ${_}
77
- .node .neo-node {
78
- stroke: ${B.nodeBorder};
79
- }
80
-
81
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
82
- stroke: ${B.useGradient?"url("+L+"-gradient)":B.nodeBorder};
83
- filter: ${B.dropShadow?B.dropShadow.replace("url(#drop-shadow)",`url(${L}-drop-shadow)`):"none"};
84
- }
85
- [data-look="neo"].swimlane.cluster rect {
86
- filter: none;
87
- }
88
-
89
-
90
- [data-look="neo"].node path {
91
- stroke: ${B.useGradient?"url("+L+"-gradient)":B.nodeBorder};
92
- stroke-width: ${B.strokeWidth??1}px;
93
- }
94
-
95
- [data-look="neo"].node .outer-path {
96
- filter: ${B.dropShadow?B.dropShadow.replace("url(#drop-shadow)",`url(${L}-drop-shadow)`):"none"};
97
- }
98
-
99
- [data-look="neo"].node .neo-line path {
100
- stroke: ${B.nodeBorder};
101
- filter: none;
102
- }
103
-
104
- [data-look="neo"].node circle{
105
- stroke: ${B.useGradient?"url("+L+"-gradient)":B.nodeBorder};
106
- filter: ${B.dropShadow?B.dropShadow.replace("url(#drop-shadow)",`url(${L}-drop-shadow)`):"none"};
107
- }
108
-
109
- [data-look="neo"].node circle .state-start{
110
- fill: #000000;
111
- }
112
-
113
- [data-look="neo"].icon-shape .icon {
114
- fill: ${B.useGradient?"url("+L+"-gradient)":B.nodeBorder};
115
- filter: ${B.dropShadow?B.dropShadow.replace("url(#drop-shadow)",`url(${L}-drop-shadow)`):"none"};
116
- }
117
-
118
- [data-look="neo"].icon-shape .icon-neo path {
119
- stroke: ${B.useGradient?"url("+L+"-gradient)":B.nodeBorder};
120
- filter: ${B.dropShadow?B.dropShadow.replace("url(#drop-shadow)",`url(${L}-drop-shadow)`):"none"};
121
- }
122
-
123
- ${s}
124
- `},"getStyles"),ay=e((c,s)=>{if(s!==void 0)Os[c]=s},"addStylesForDiagram"),Bi=sy,Dn={};st(Dn,{clear:()=>d,getAccDescription:()=>g,getAccTitle:()=>p,getDiagramTitle:()=>v,setAccDescription:()=>m,setAccTitle:()=>f,setDiagramTitle:()=>b});var un="",dn="",pn="",fn=e((c)=>w(c,u()),"sanitizeText"),d=e(()=>{un="",pn="",dn=""},"clear"),f=e((c)=>{un=fn(c).replace(/^\s+/g,"")},"setAccTitle"),p=e(()=>un,"getAccTitle"),m=e((c)=>{pn=fn(c).replace(/\n\s+/g,`
125
- `)},"setAccDescription"),g=e(()=>pn,"getAccDescription"),b=e((c)=>{dn=fn(c)},"setDiagramTitle"),v=e(()=>dn,"getDiagramTitle"),jc=t,ny=Fr,r=u,gr=mi,Wr=Gt,Rs=e((c)=>w(c,r()),"sanitizeText"),yr=Ie,ly=e(()=>Dn,"getCommonDb"),Ps={},Ur=e((c,s,B)=>{if(Ps[c])jc.warn(`Diagram with id ${c} already registered. Overwriting.`);if(Ps[c]=s,B)Zc(c,B);ay(c,s.styles),s.injectUtils?.(jc,ny,r,Rs,yr,ly(),()=>{})},"registerDiagram"),Pn=e((c)=>{if(c in Ps)return Ps[c];throw new hy(c)},"getDiagram"),hy=class extends Error{static{e(this,"DiagramNotFoundError")}constructor(c){super(`Diagram ${c} not found.`)}};var cy={value:()=>{}};function eu(){for(var c=0,s=arguments.length,B={},L;c<s;++c){if(!(L=arguments[c]+"")||L in B||/[\s.]/.test(L))throw Error("illegal type: "+L);B[L]=[]}return new qs(B)}function qs(c){this._=c}function uy(c,s){return c.trim().split(/^|\s+/).map(function(B){var L="",_=B.indexOf(".");if(_>=0)L=B.slice(_+1),B=B.slice(0,_);if(B&&!s.hasOwnProperty(B))throw Error("unknown type: "+B);return{type:B,name:L}})}qs.prototype=eu.prototype={constructor:qs,on:function(c,s){var B=this._,L=uy(c+"",B),_,I=-1,O=L.length;if(arguments.length<2){while(++I<O)if((_=(c=L[I]).type)&&(_=dy(B[_],c.name)))return _;return}if(s!=null&&typeof s!=="function")throw Error("invalid callback: "+s);while(++I<O)if(_=(c=L[I]).type)B[_]=tu(B[_],c.name,s);else if(s==null)for(_ in B)B[_]=tu(B[_],c.name,null);return this},copy:function(){var c={},s=this._;for(var B in s)c[B]=s[B].slice();return new qs(c)},call:function(c,s){if((_=arguments.length-2)>0)for(var B=Array(_),L=0,_,I;L<_;++L)B[L]=arguments[L+2];if(!this._.hasOwnProperty(c))throw Error("unknown type: "+c);for(I=this._[c],L=0,_=I.length;L<_;++L)I[L].value.apply(s,B)},apply:function(c,s,B){if(!this._.hasOwnProperty(c))throw Error("unknown type: "+c);for(var L=this._[c],_=0,I=L.length;_<I;++_)L[_].value.apply(s,B)}};function dy(c,s){for(var B=0,L=c.length,_;B<L;++B)if((_=c[B]).name===s)return _.value}function tu(c,s,B){for(var L=0,_=c.length;L<_;++L)if(c[L].name===s){c[L]=cy,c=c.slice(0,L).concat(c.slice(L+1));break}if(B!=null)c.push({name:s,value:B});return c}var gn=eu;var zs="http://www.w3.org/1999/xhtml",mn={svg:"http://www.w3.org/2000/svg",xhtml:zs,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Er(c){var s=c+="",B=s.indexOf(":");if(B>=0&&(s=c.slice(0,B))!=="xmlns")c=c.slice(B+1);return mn.hasOwnProperty(s)?{space:mn[s],local:c}:c}function py(c){return function(){var s=this.ownerDocument,B=this.namespaceURI;return B===zs&&s.documentElement.namespaceURI===zs?s.createElement(c):s.createElementNS(B,c)}}function fy(c){return function(){return this.ownerDocument.createElementNS(c.space,c.local)}}function Do(c){var s=Er(c);return(s.local?fy:py)(s)}function gy(){}function hi(c){return c==null?gy:function(){return this.querySelector(c)}}function xn(c){if(typeof c!=="function")c=hi(c);for(var s=this._groups,B=s.length,L=Array(B),_=0;_<B;++_)for(var I=s[_],O=I.length,D=L[_]=Array(O),P,W,R=0;R<O;++R)if((P=I[R])&&(W=c.call(P,P.__data__,R,I))){if("__data__"in P)W.__data__=P.__data__;D[R]=W}return new Pe(L,this._parents)}function yn(c){return c==null?[]:Array.isArray(c)?c:Array.from(c)}function my(){return[]}function no(c){return c==null?my:function(){return this.querySelectorAll(c)}}function xy(c){return function(){return yn(c.apply(this,arguments))}}function Cn(c){if(typeof c==="function")c=xy(c);else c=no(c);for(var s=this._groups,B=s.length,L=[],_=[],I=0;I<B;++I)for(var O=s[I],D=O.length,P,W=0;W<D;++W)if(P=O[W])L.push(c.call(P,P.__data__,W,O)),_.push(P);return new Pe(L,_)}function lo(c){return function(){return this.matches(c)}}function Ws(c){return function(s){return s.matches(c)}}var yy=Array.prototype.find;function Cy(c){return function(){return yy.call(this.children,c)}}function by(){return this.firstElementChild}function bn(c){return this.select(c==null?by:Cy(typeof c==="function"?c:Ws(c)))}var ky=Array.prototype.filter;function wy(){return Array.from(this.children)}function Sy(c){return function(){return ky.call(this.children,c)}}function kn(c){return this.selectAll(c==null?wy:Sy(typeof c==="function"?c:Ws(c)))}function wn(c){if(typeof c!=="function")c=lo(c);for(var s=this._groups,B=s.length,L=Array(B),_=0;_<B;++_)for(var I=s[_],O=I.length,D=L[_]=[],P,W=0;W<O;++W)if((P=I[W])&&c.call(P,P.__data__,W,I))D.push(P);return new Pe(L,this._parents)}function Po(c){return Array(c.length)}function Sn(){return new Pe(this._enter||this._groups.map(Po),this._parents)}function Ro(c,s){this.ownerDocument=c.ownerDocument,this.namespaceURI=c.namespaceURI,this._next=null,this._parent=c,this.__data__=s}Ro.prototype={constructor:Ro,appendChild:function(c){return this._parent.insertBefore(c,this._next)},insertBefore:function(c,s){return this._parent.insertBefore(c,s)},querySelector:function(c){return this._parent.querySelector(c)},querySelectorAll:function(c){return this._parent.querySelectorAll(c)}};function Tn(c){return function(){return c}}function Ty(c,s,B,L,_,I){var O=0,D,P=s.length,W=I.length;for(;O<W;++O)if(D=s[O])D.__data__=I[O],L[O]=D;else B[O]=new Ro(c,I[O]);for(;O<P;++O)if(D=s[O])_[O]=D}function By(c,s,B,L,_,I,O){var D,P,W=new Map,R=s.length,Y=I.length,G=Array(R),U;for(D=0;D<R;++D)if(P=s[D])if(G[D]=U=O.call(P,P.__data__,D,s)+"",W.has(U))_[D]=P;else W.set(U,P);for(D=0;D<Y;++D)if(U=O.call(c,I[D],D,I)+"",P=W.get(U))L[D]=P,P.__data__=I[D],W.delete(U);else B[D]=new Ro(c,I[D]);for(D=0;D<R;++D)if((P=s[D])&&W.get(G[D])===P)_[D]=P}function _y(c){return c.__data__}function _n(c,s){if(!arguments.length)return Array.from(this,_y);var B=s?By:Ty,L=this._parents,_=this._groups;if(typeof c!=="function")c=Tn(c);for(var I=_.length,O=Array(I),D=Array(I),P=Array(I),W=0;W<I;++W){var R=L[W],Y=_[W],G=Y.length,U=vy(c.call(R,R&&R.__data__,W,L)),J=U.length,tt=D[W]=Array(J),et=O[W]=Array(J),it=P[W]=Array(G);B(R,Y,tt,et,it,U,s);for(var at=0,nt=0,ut,dt;at<J;++at)if(ut=tt[at]){if(at>=nt)nt=at+1;while(!(dt=et[nt])&&++nt<J);ut._next=dt||null}}return O=new Pe(O,L),O._enter=D,O._exit=P,O}function vy(c){return typeof c==="object"&&"length"in c?c:Array.from(c)}function vn(){return new Pe(this._exit||this._groups.map(Po),this._parents)}function An(c,s,B){var L=this.enter(),_=this,I=this.exit();if(typeof c==="function"){if(L=c(L),L)L=L.selection()}else L=L.append(c+"");if(s!=null){if(_=s(_),_)_=_.selection()}if(B==null)I.remove();else B(I);return L&&_?L.merge(_).order():_}function En(c){var s=c.selection?c.selection():c;for(var B=this._groups,L=s._groups,_=B.length,I=L.length,O=Math.min(_,I),D=Array(_),P=0;P<O;++P)for(var W=B[P],R=L[P],Y=W.length,G=D[P]=Array(Y),U,J=0;J<Y;++J)if(U=W[J]||R[J])G[J]=U;for(;P<_;++P)D[P]=B[P];return new Pe(D,this._parents)}function In(){for(var c=this._groups,s=-1,B=c.length;++s<B;)for(var L=c[s],_=L.length-1,I=L[_],O;--_>=0;)if(O=L[_]){if(I&&O.compareDocumentPosition(I)^4)I.parentNode.insertBefore(O,I);I=O}return this}function Rn(c){if(!c)c=Ly;function s(Y,G){return Y&&G?c(Y.__data__,G.__data__):!Y-!G}for(var B=this._groups,L=B.length,_=Array(L),I=0;I<L;++I){for(var O=B[I],D=O.length,P=_[I]=Array(D),W,R=0;R<D;++R)if(W=O[R])P[R]=W;P.sort(s)}return new Pe(_,this._parents).order()}function Ly(c,s){return c<s?-1:c>s?1:c>=s?0:NaN}function tl(){var c=arguments[0];return arguments[0]=this,c.apply(null,arguments),this}function el(){return Array.from(this)}function rl(){for(var c=this._groups,s=0,B=c.length;s<B;++s)for(var L=c[s],_=0,I=L.length;_<I;++_){var O=L[_];if(O)return O}return null}function il(){let c=0;for(let s of this)++c;return c}function ol(){return!this.node()}function sl(c){for(var s=this._groups,B=0,L=s.length;B<L;++B)for(var _=s[B],I=0,O=_.length,D;I<O;++I)if(D=_[I])c.call(D,D.__data__,I,_);return this}function Fy(c){return function(){this.removeAttribute(c)}}function My(c){return function(){this.removeAttributeNS(c.space,c.local)}}function Ay(c,s){return function(){this.setAttribute(c,s)}}function Ey(c,s){return function(){this.setAttributeNS(c.space,c.local,s)}}function $y(c,s){return function(){var B=s.apply(this,arguments);if(B==null)this.removeAttribute(c);else this.setAttribute(c,B)}}function Iy(c,s){return function(){var B=s.apply(this,arguments);if(B==null)this.removeAttributeNS(c.space,c.local);else this.setAttributeNS(c.space,c.local,B)}}function al(c,s){var B=Er(c);if(arguments.length<2){var L=this.node();return B.local?L.getAttributeNS(B.space,B.local):L.getAttribute(B)}return this.each((s==null?B.local?My:Fy:typeof s==="function"?B.local?Iy:$y:B.local?Ey:Ay)(B,s))}function qo(c){return c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView}function Oy(c){return function(){this.style.removeProperty(c)}}function Dy(c,s,B){return function(){this.style.setProperty(c,s,B)}}function Py(c,s,B){return function(){var L=s.apply(this,arguments);if(L==null)this.style.removeProperty(c);else this.style.setProperty(c,L,B)}}function nl(c,s,B){return arguments.length>1?this.each((s==null?Oy:typeof s==="function"?Py:Dy)(c,s,B==null?"":B)):ci(this.node(),c)}function ci(c,s){return c.style.getPropertyValue(s)||qo(c).getComputedStyle(c,null).getPropertyValue(s)}function Ry(c){return function(){delete this[c]}}function qy(c,s){return function(){this[c]=s}}function zy(c,s){return function(){var B=s.apply(this,arguments);if(B==null)delete this[c];else this[c]=B}}function ll(c,s){return arguments.length>1?this.each((s==null?Ry:typeof s==="function"?zy:qy)(c,s)):this.node()[c]}function ru(c){return c.trim().split(/^|\s+/)}function hl(c){return c.classList||new iu(c)}function iu(c){this._node=c,this._names=ru(c.getAttribute("class")||"")}iu.prototype={add:function(c){var s=this._names.indexOf(c);if(s<0)this._names.push(c),this._node.setAttribute("class",this._names.join(" "))},remove:function(c){var s=this._names.indexOf(c);if(s>=0)this._names.splice(s,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(c){return this._names.indexOf(c)>=0}};function ou(c,s){var B=hl(c),L=-1,_=s.length;while(++L<_)B.add(s[L])}function su(c,s){var B=hl(c),L=-1,_=s.length;while(++L<_)B.remove(s[L])}function Wy(c){return function(){ou(this,c)}}function Ny(c){return function(){su(this,c)}}function Hy(c,s){return function(){(s.apply(this,arguments)?ou:su)(this,c)}}function cl(c,s){var B=ru(c+"");if(arguments.length<2){var L=hl(this.node()),_=-1,I=B.length;while(++_<I)if(!L.contains(B[_]))return!1;return!0}return this.each((typeof s==="function"?Hy:s?Wy:Ny)(B,s))}function Yy(){this.textContent=""}function jy(c){return function(){this.textContent=c}}function Xy(c){return function(){var s=c.apply(this,arguments);this.textContent=s==null?"":s}}function ul(c){return arguments.length?this.each(c==null?Yy:(typeof c==="function"?Xy:jy)(c)):this.node().textContent}function Uy(){this.innerHTML=""}function Gy(c){return function(){this.innerHTML=c}}function Vy(c){return function(){var s=c.apply(this,arguments);this.innerHTML=s==null?"":s}}function dl(c){return arguments.length?this.each(c==null?Uy:(typeof c==="function"?Vy:Gy)(c)):this.node().innerHTML}function Zy(){if(this.nextSibling)this.parentNode.appendChild(this)}function pl(){return this.each(Zy)}function Ky(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fl(){return this.each(Ky)}function gl(c){var s=typeof c==="function"?c:Do(c);return this.select(function(){return this.appendChild(s.apply(this,arguments))})}function Qy(){return null}function ml(c,s){var B=typeof c==="function"?c:Do(c),L=s==null?Qy:typeof s==="function"?s:hi(s);return this.select(function(){return this.insertBefore(B.apply(this,arguments),L.apply(this,arguments)||null)})}function Jy(){var c=this.parentNode;if(c)c.removeChild(this)}function xl(){return this.each(Jy)}function t0(){var c=this.cloneNode(!1),s=this.parentNode;return s?s.insertBefore(c,this.nextSibling):c}function e0(){var c=this.cloneNode(!0),s=this.parentNode;return s?s.insertBefore(c,this.nextSibling):c}function yl(c){return this.select(c?e0:t0)}function Cl(c){return arguments.length?this.property("__data__",c):this.node().__data__}function r0(c){return function(s){c.call(this,s,this.__data__)}}function i0(c){return c.trim().split(/^|\s+/).map(function(s){var B="",L=s.indexOf(".");if(L>=0)B=s.slice(L+1),s=s.slice(0,L);return{type:s,name:B}})}function o0(c){return function(){var s=this.__on;if(!s)return;for(var B=0,L=-1,_=s.length,I;B<_;++B)if(I=s[B],(!c.type||I.type===c.type)&&I.name===c.name)this.removeEventListener(I.type,I.listener,I.options);else s[++L]=I;if(++L)s.length=L;else delete this.__on}}function s0(c,s,B){return function(){var L=this.__on,_,I=r0(s);if(L){for(var O=0,D=L.length;O<D;++O)if((_=L[O]).type===c.type&&_.name===c.name){this.removeEventListener(_.type,_.listener,_.options),this.addEventListener(_.type,_.listener=I,_.options=B),_.value=s;return}}if(this.addEventListener(c.type,I,B),_={type:c.type,name:c.name,value:s,listener:I,options:B},!L)this.__on=[_];else L.push(_)}}function bl(c,s,B){var L=i0(c+""),_,I=L.length,O;if(arguments.length<2){var D=this.node().__on;if(D){for(var P=0,W=D.length,R;P<W;++P)for(_=0,R=D[P];_<I;++_)if((O=L[_]).type===R.type&&O.name===R.name)return R.value}return}D=s?s0:o0;for(_=0;_<I;++_)this.each(D(L[_],s,B));return this}function au(c,s,B){var L=qo(c),_=L.CustomEvent;if(typeof _==="function")_=new _(s,B);else if(_=L.document.createEvent("Event"),B)_.initEvent(s,B.bubbles,B.cancelable),_.detail=B.detail;else _.initEvent(s,!1,!1);c.dispatchEvent(_)}function a0(c,s){return function(){return au(this,c,s)}}function n0(c,s){return function(){return au(this,c,s.apply(this,arguments))}}function kl(c,s){return this.each((typeof s==="function"?n0:a0)(c,s))}function*wl(){for(var c=this._groups,s=0,B=c.length;s<B;++s)for(var L=c[s],_=0,I=L.length,O;_<I;++_)if(O=L[_])yield O}var Sl=[null];function Pe(c,s){this._groups=c,this._parents=s}function nu(){return new Pe([[document.documentElement]],Sl)}function l0(){return this}Pe.prototype=nu.prototype={constructor:Pe,select:xn,selectAll:Cn,selectChild:bn,selectChildren:kn,filter:wn,data:_n,enter:Sn,exit:vn,join:An,merge:En,selection:l0,order:In,sort:Rn,call:tl,nodes:el,node:rl,size:il,empty:ol,each:sl,attr:al,style:nl,property:ll,classed:cl,text:ul,html:dl,raise:pl,lower:fl,append:gl,insert:ml,remove:xl,clone:yl,datum:Cl,on:bl,dispatch:kl,[Symbol.iterator]:wl};var ti=nu;function n(c){return typeof c==="string"?new Pe([[document.querySelector(c)]],[document.documentElement]):new Pe([[c]],Sl)}function Mt(c,s,B){c.prototype=s.prototype=B,B.constructor=c}function vr(c,s){var B=Object.create(c.prototype);for(var L in s)B[L]=s[L];return B}function Nt(){}var zo=0.7,Ys=1/zo,ho="\\s*([+-]?\\d+)\\s*",Wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h0=/^#([0-9a-f]{3,8})$/,c0=new RegExp(`^rgb\\(${ho},${ho},${ho}\\)$`),u0=new RegExp(`^rgb\\(${$r},${$r},${$r}\\)$`),d0=new RegExp(`^rgba\\(${ho},${ho},${ho},${Wo}\\)$`),p0=new RegExp(`^rgba\\(${$r},${$r},${$r},${Wo}\\)$`),f0=new RegExp(`^hsl\\(${Wo},${$r},${$r}\\)$`),g0=new RegExp(`^hsla\\(${Wo},${$r},${$r},${Wo}\\)$`),lu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Mt(Nt,Xe,{copy(c){return Object.assign(new this.constructor,this,c)},displayable(){return this.rgb().displayable()},hex:hu,formatHex:hu,formatHex8:m0,formatHsl:x0,formatRgb:cu,toString:cu});function hu(){return this.rgb().formatHex()}function m0(){return this.rgb().formatHex8()}function x0(){return mu(this).formatHsl()}function cu(){return this.rgb().formatRgb()}function Xe(c){var s,B;return c=(c+"").trim().toLowerCase(),(s=h0.exec(c))?(B=s[1].length,s=parseInt(s[1],16),B===6?uu(s):B===3?new ce(s>>8&15|s>>4&240,s>>4&15|s&240,(s&15)<<4|s&15,1):B===8?Ns(s>>24&255,s>>16&255,s>>8&255,(s&255)/255):B===4?Ns(s>>12&15|s>>8&240,s>>8&15|s>>4&240,s>>4&15|s&240,((s&15)<<4|s&15)/255):null):(s=c0.exec(c))?new ce(s[1],s[2],s[3],1):(s=u0.exec(c))?new ce(s[1]*255/100,s[2]*255/100,s[3]*255/100,1):(s=d0.exec(c))?Ns(s[1],s[2],s[3],s[4]):(s=p0.exec(c))?Ns(s[1]*255/100,s[2]*255/100,s[3]*255/100,s[4]):(s=f0.exec(c))?fu(s[1],s[2]/100,s[3]/100,1):(s=g0.exec(c))?fu(s[1],s[2]/100,s[3]/100,s[4]):lu.hasOwnProperty(c)?uu(lu[c]):c==="transparent"?new ce(NaN,NaN,NaN,0):null}function uu(c){return new ce(c>>16&255,c>>8&255,c&255,1)}function Ns(c,s,B,L){if(L<=0)c=s=B=NaN;return new ce(c,s,B,L)}function bi(c){if(!(c instanceof Nt))c=Xe(c);if(!c)return new ce;return c=c.rgb(),new ce(c.r,c.g,c.b,c.opacity)}function co(c,s,B,L){return arguments.length===1?bi(c):new ce(c,s,B,L==null?1:L)}function ce(c,s,B,L){this.r=+c,this.g=+s,this.b=+B,this.opacity=+L}Mt(ce,co,vr(Nt,{brighter(c){return c=c==null?Ys:Math.pow(Ys,c),new ce(this.r*c,this.g*c,this.b*c,this.opacity)},darker(c){return c=c==null?zo:Math.pow(zo,c),new ce(this.r*c,this.g*c,this.b*c,this.opacity)},rgb(){return this},clamp(){return new ce(ji(this.r),ji(this.g),ji(this.b),js(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:du,formatHex:du,formatHex8:y0,formatRgb:pu,toString:pu}));function du(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}`}function y0(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}${Yi((isNaN(this.opacity)?1:this.opacity)*255)}`}function pu(){let c=js(this.opacity);return`${c===1?"rgb(":"rgba("}${ji(this.r)}, ${ji(this.g)}, ${ji(this.b)}${c===1?")":`, ${c})`}`}function js(c){return isNaN(c)?1:Math.max(0,Math.min(1,c))}function ji(c){return Math.max(0,Math.min(255,Math.round(c)||0))}function Yi(c){return c=ji(c),(c<16?"0":"")+c.toString(16)}function fu(c,s,B,L){if(L<=0)c=s=B=NaN;else if(B<=0||B>=1)c=s=NaN;else if(s<=0)c=NaN;return new Sr(c,s,B,L)}function mu(c){if(c instanceof Sr)return new Sr(c.h,c.s,c.l,c.opacity);if(!(c instanceof Nt))c=Xe(c);if(!c)return new Sr;if(c instanceof Sr)return c;c=c.rgb();var s=c.r/255,B=c.g/255,L=c.b/255,_=Math.min(s,B,L),I=Math.max(s,B,L),O=NaN,D=I-_,P=(I+_)/2;if(D){if(s===I)O=(B-L)/D+(B<L)*6;else if(B===I)O=(L-s)/D+2;else O=(s-B)/D+4;D/=P<0.5?I+_:2-I-_,O*=60}else D=P>0&&P<1?0:O;return new Sr(O,D,P,c.opacity)}function xu(c,s,B,L){return arguments.length===1?mu(c):new Sr(c,s,B,L==null?1:L)}function Sr(c,s,B,L){this.h=+c,this.s=+s,this.l=+B,this.opacity=+L}Mt(Sr,xu,vr(Nt,{brighter(c){return c=c==null?Ys:Math.pow(Ys,c),new Sr(this.h,this.s,this.l*c,this.opacity)},darker(c){return c=c==null?zo:Math.pow(zo,c),new Sr(this.h,this.s,this.l*c,this.opacity)},rgb(){var c=this.h%360+(this.h<0)*360,s=isNaN(c)||isNaN(this.s)?0:this.s,B=this.l,L=B+(B<0.5?B:1-B)*s,_=2*B-L;return new ce(Tl(c>=240?c-240:c+120,_,L),Tl(c,_,L),Tl(c<120?c+240:c-120,_,L),this.opacity)},clamp(){return new Sr(gu(this.h),Hs(this.s),Hs(this.l),js(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let c=js(this.opacity);return`${c===1?"hsl(":"hsla("}${gu(this.h)}, ${Hs(this.s)*100}%, ${Hs(this.l)*100}%${c===1?")":`, ${c})`}`}}));function gu(c){return c=(c||0)%360,c<0?c+360:c}function Hs(c){return Math.max(0,Math.min(1,c||0))}function Tl(c,s,B){return(c<60?s+(B-s)*c/60:c<180?B:c<240?s+(B-s)*(240-c)/60:s)*255}function Bl(c,s,B,L,_){var I=c*c,O=I*c;return((1-3*c+3*I-O)*s+(4-6*I+3*O)*B+(1+3*c+3*I-3*O)*L+O*_)/6}function _l(c){var s=c.length-1;return function(B){var L=B<=0?B=0:B>=1?(B=1,s-1):Math.floor(B*s),_=c[L],I=c[L+1],O=L>0?c[L-1]:2*_-I,D=L<s-1?c[L+2]:2*I-_;return Bl((B-L/s)*s,O,_,I,D)}}function vl(c){var s=c.length;return function(B){var L=Math.floor(((B%=1)<0?++B:B)*s),_=c[(L+s-1)%s],I=c[L%s],O=c[(L+1)%s],D=c[(L+2)%s];return Bl((B-L/s)*s,_,I,O,D)}}var br=(c)=>()=>c;function yu(c,s){return function(B){return c+B*s}}function C0(c,s,B){return c=Math.pow(c,B),s=Math.pow(s,B)-c,B=1/B,function(L){return Math.pow(c+L*s,B)}}function Fi(c,s){var B=s-c;return B?yu(c,B>180||B<-180?B-360*Math.round(B/360):B):br(isNaN(c)?s:c)}function Cu(c){return(c=+c)===1?ft:function(s,B){return B-s?C0(s,B,c):br(isNaN(s)?B:s)}}function ft(c,s){var B=s-c;return B?yu(c,B):br(isNaN(c)?s:c)}var Wt=function c(s){var B=Cu(s);function L(_,I){var O=B((_=co(_)).r,(I=co(I)).r),D=B(_.g,I.g),P=B(_.b,I.b),W=ft(_.opacity,I.opacity);return function(R){return _.r=O(R),_.g=D(R),_.b=P(R),_.opacity=W(R),_+""}}return L.gamma=c,L}(1);function bu(c){return function(s){var B=s.length,L=Array(B),_=Array(B),I=Array(B),O,D;for(O=0;O<B;++O)D=co(s[O]),L[O]=D.r||0,_[O]=D.g||0,I[O]=D.b||0;return L=c(L),_=c(_),I=c(I),D.opacity=1,function(P){return D.r=L(P),D.g=_(P),D.b=I(P),D+""}}}var b0=bu(_l),k0=bu(vl);function ie(c,s){return c=+c,s=+s,function(B){return c*(1-B)+s*B}}var Fl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ll=new RegExp(Fl.source,"g");function w0(c){return function(){return c}}function S0(c){return function(s){return c(s)+""}}function xr(c,s){var B=Fl.lastIndex=Ll.lastIndex=0,L,_,I,O=-1,D=[],P=[];c=c+"",s=s+"";while((L=Fl.exec(c))&&(_=Ll.exec(s))){if((I=_.index)>B)if(I=s.slice(B,I),D[O])D[O]+=I;else D[++O]=I;if((L=L[0])===(_=_[0]))if(D[O])D[O]+=_;else D[++O]=_;else D[++O]=null,P.push({i:O,x:ie(L,_)});B=Ll.lastIndex}if(B<s.length)if(I=s.slice(B),D[O])D[O]+=I;else D[++O]=I;return D.length<2?P[0]?S0(P[0].x):w0(s):(s=P.length,function(W){for(var R=0,Y;R<s;++R)D[(Y=P[R]).i]=Y.x(W);return D.join("")})}var ku=180/Math.PI,Xs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Us(c,s,B,L,_,I){var O,D,P;if(O=Math.sqrt(c*c+s*s))c/=O,s/=O;if(P=c*B+s*L)B-=c*P,L-=s*P;if(D=Math.sqrt(B*B+L*L))B/=D,L/=D,P/=D;if(c*L<s*B)c=-c,s=-s,P=-P,O=-O;return{translateX:_,translateY:I,rotate:Math.atan2(s,c)*ku,skewX:Math.atan(P)*ku,scaleX:O,scaleY:D}}var Gs;function wu(c){let s=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(c+"");return s.isIdentity?Xs:Us(s.a,s.b,s.c,s.d,s.e,s.f)}function Su(c){if(c==null)return Xs;if(!Gs)Gs=document.createElementNS("http://www.w3.org/2000/svg","g");if(Gs.setAttribute("transform",c),!(c=Gs.transform.baseVal.consolidate()))return Xs;return c=c.matrix,Us(c.a,c.b,c.c,c.d,c.e,c.f)}function Tu(c,s,B,L){function _(W){return W.length?W.pop()+" ":""}function I(W,R,Y,G,U,J){if(W!==Y||R!==G){var tt=U.push("translate(",null,s,null,B);J.push({i:tt-4,x:ie(W,Y)},{i:tt-2,x:ie(R,G)})}else if(Y||G)U.push("translate("+Y+s+G+B)}function O(W,R,Y,G){if(W!==R){if(W-R>180)R+=360;else if(R-W>180)W+=360;G.push({i:Y.push(_(Y)+"rotate(",null,L)-2,x:ie(W,R)})}else if(R)Y.push(_(Y)+"rotate("+R+L)}function D(W,R,Y,G){if(W!==R)G.push({i:Y.push(_(Y)+"skewX(",null,L)-2,x:ie(W,R)});else if(R)Y.push(_(Y)+"skewX("+R+L)}function P(W,R,Y,G,U,J){if(W!==Y||R!==G){var tt=U.push(_(U)+"scale(",null,",",null,")");J.push({i:tt-4,x:ie(W,Y)},{i:tt-2,x:ie(R,G)})}else if(Y!==1||G!==1)U.push(_(U)+"scale("+Y+","+G+")")}return function(W,R){var Y=[],G=[];return W=c(W),R=c(R),I(W.translateX,W.translateY,R.translateX,R.translateY,Y,G),O(W.rotate,R.rotate,Y,G),D(W.skewX,R.skewX,Y,G),P(W.scaleX,W.scaleY,R.scaleX,R.scaleY,Y,G),W=R=null,function(U){var J=-1,tt=G.length,et;while(++J<tt)Y[(et=G[J]).i]=et.x(U);return Y.join("")}}}var Ml=Tu(wu,"px, ","px)","deg)"),Al=Tu(Su,", ",")",")");var uo=0,Ho=0,No=0,_u=1000,Vs,Yo,Zs=0,Xi=0,Ks=0,jo=typeof performance==="object"&&performance.now?performance:Date,vu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(c){setTimeout(c,17)};function Uo(){return Xi||(vu(T0),Xi=jo.now()+Ks)}function T0(){Xi=0}function Xo(){this._call=this._time=this._next=null}Xo.prototype=Qs.prototype={constructor:Xo,restart:function(c,s,B){if(typeof c!=="function")throw TypeError("callback is not a function");if(B=(B==null?Uo():+B)+(s==null?0:+s),!this._next&&Yo!==this){if(Yo)Yo._next=this;else Vs=this;Yo=this}this._call=c,this._time=B,El()},stop:function(){if(this._call)this._call=null,this._time=1/0,El()}};function Qs(c,s,B){var L=new Xo;return L.restart(c,s,B),L}function Lu(){Uo(),++uo;var c=Vs,s;while(c){if((s=Xi-c._time)>=0)c._call.call(void 0,s);c=c._next}--uo}function Bu(){Xi=(Zs=jo.now())+Ks,uo=Ho=0;try{Lu()}finally{uo=0,_0(),Xi=0}}function B0(){var c=jo.now(),s=c-Zs;if(s>_u)Ks-=s,Zs=c}function _0(){var c,s=Vs,B,L=1/0;while(s)if(s._call){if(L>s._time)L=s._time;c=s,s=s._next}else B=s._next,s._next=null,s=c?c._next=B:Vs=B;Yo=c,El(L)}function El(c){if(uo)return;if(Ho)Ho=clearTimeout(Ho);var s=c-Xi;if(s>24){if(c<1/0)Ho=setTimeout(Bu,c-jo.now()-Ks);if(No)No=clearInterval(No)}else{if(!No)Zs=jo.now(),No=setInterval(B0,_u);uo=1,vu(Bu)}}function Go(c,s,B){var L=new Xo;return s=s==null?0:+s,L.restart((_)=>{L.stop(),c(_+s)},s,B),L}var v0=gn("start","end","cancel","interrupt"),L0=[],Au=0,Fu=1,ta=2,Js=3,Mu=4,ea=5,Vo=6;function ei(c,s,B,L,_,I){var O=c.__transition;if(!O)c.__transition={};else if(B in O)return;F0(c,B,{name:s,index:L,group:_,on:v0,tween:L0,time:I.time,delay:I.delay,duration:I.duration,ease:I.ease,timer:null,state:Au})}function Zo(c,s){var B=He(c,s);if(B.state>Au)throw Error("too late; already scheduled");return B}function Ue(c,s){var B=He(c,s);if(B.state>Js)throw Error("too late; already running");return B}function He(c,s){var B=c.__transition;if(!B||!(B=B[s]))throw Error("transition not found");return B}function F0(c,s,B){var L=c.__transition,_;L[s]=B,B.timer=Qs(I,0,B.time);function I(W){if(B.state=Fu,B.timer.restart(O,B.delay,B.time),B.delay<=W)O(W-B.delay)}function O(W){var R,Y,G,U;if(B.state!==Fu)return P();for(R in L){if(U=L[R],U.name!==B.name)continue;if(U.state===Js)return Go(O);if(U.state===Mu)U.state=Vo,U.timer.stop(),U.on.call("interrupt",c,c.__data__,U.index,U.group),delete L[R];else if(+R<s)U.state=Vo,U.timer.stop(),U.on.call("cancel",c,c.__data__,U.index,U.group),delete L[R]}if(Go(function(){if(B.state===Js)B.state=Mu,B.timer.restart(D,B.delay,B.time),D(W)}),B.state=ta,B.on.call("start",c,c.__data__,B.index,B.group),B.state!==ta)return;B.state=Js,_=Array(G=B.tween.length);for(R=0,Y=-1;R<G;++R)if(U=B.tween[R].value.call(c,c.__data__,B.index,B.group))_[++Y]=U;_.length=Y+1}function D(W){var R=W<B.duration?B.ease.call(null,W/B.duration):(B.timer.restart(P),B.state=ea,1),Y=-1,G=_.length;while(++Y<G)_[Y].call(c,R);if(B.state===ea)B.on.call("end",c,c.__data__,B.index,B.group),P()}function P(){B.state=Vo,B.timer.stop(),delete L[s];for(var W in L)return;delete c.__transition}}function Ko(c,s){var B=c.__transition,L,_,I=!0,O;if(!B)return;s=s==null?null:s+"";for(O in B){if((L=B[O]).name!==s){I=!1;continue}_=L.state>ta&&L.state<ea,L.state=Vo,L.timer.stop(),L.on.call(_?"interrupt":"cancel",c,c.__data__,L.index,L.group),delete B[O]}if(I)delete c.__transition}function $l(c){return this.each(function(){Ko(this,c)})}function M0(c,s){var B,L;return function(){var _=Ue(this,c),I=_.tween;if(I!==B){L=B=I;for(var O=0,D=L.length;O<D;++O)if(L[O].name===s){L=L.slice(),L.splice(O,1);break}}_.tween=L}}function A0(c,s,B){var L,_;if(typeof B!=="function")throw Error();return function(){var I=Ue(this,c),O=I.tween;if(O!==L){_=(L=O).slice();for(var D={name:s,value:B},P=0,W=_.length;P<W;++P)if(_[P].name===s){_[P]=D;break}if(P===W)_.push(D)}I.tween=_}}function Il(c,s){var B=this._id;if(c+="",arguments.length<2){var L=He(this.node(),B).tween;for(var _=0,I=L.length,O;_<I;++_)if((O=L[_]).name===c)return O.value;return null}return this.each((s==null?M0:A0)(B,c,s))}function po(c,s,B){var L=c._id;return c.each(function(){var _=Ue(this,L);(_.value||(_.value={}))[s]=B.apply(this,arguments)}),function(_){return He(_,L).value[s]}}function Qo(c,s){var B;return(typeof s==="number"?ie:s instanceof Xe?Wt:(B=Xe(s))?(s=B,Wt):xr)(c,s)}function E0(c){return function(){this.removeAttribute(c)}}function $0(c){return function(){this.removeAttributeNS(c.space,c.local)}}function I0(c,s,B){var L,_=B+"",I;return function(){var O=this.getAttribute(c);return O===_?null:O===L?I:I=s(L=O,B)}}function O0(c,s,B){var L,_=B+"",I;return function(){var O=this.getAttributeNS(c.space,c.local);return O===_?null:O===L?I:I=s(L=O,B)}}function D0(c,s,B){var L,_,I;return function(){var O,D=B(this),P;if(D==null)return void this.removeAttribute(c);return O=this.getAttribute(c),P=D+"",O===P?null:O===L&&P===_?I:(_=P,I=s(L=O,D))}}function P0(c,s,B){var L,_,I;return function(){var O,D=B(this),P;if(D==null)return void this.removeAttributeNS(c.space,c.local);return O=this.getAttributeNS(c.space,c.local),P=D+"",O===P?null:O===L&&P===_?I:(_=P,I=s(L=O,D))}}function Ol(c,s){var B=Er(c),L=B==="transform"?Al:Qo;return this.attrTween(c,typeof s==="function"?(B.local?P0:D0)(B,L,po(this,"attr."+c,s)):s==null?(B.local?$0:E0)(B):(B.local?O0:I0)(B,L,s))}function R0(c,s){return function(B){this.setAttribute(c,s.call(this,B))}}function q0(c,s){return function(B){this.setAttributeNS(c.space,c.local,s.call(this,B))}}function z0(c,s){var B,L;function _(){var I=s.apply(this,arguments);if(I!==L)B=(L=I)&&q0(c,I);return B}return _._value=s,_}function W0(c,s){var B,L;function _(){var I=s.apply(this,arguments);if(I!==L)B=(L=I)&&R0(c,I);return B}return _._value=s,_}function Dl(c,s){var B="attr."+c;if(arguments.length<2)return(B=this.tween(B))&&B._value;if(s==null)return this.tween(B,null);if(typeof s!=="function")throw Error();var L=Er(c);return this.tween(B,(L.local?z0:W0)(L,s))}function N0(c,s){return function(){Zo(this,c).delay=+s.apply(this,arguments)}}function H0(c,s){return s=+s,function(){Zo(this,c).delay=s}}function Pl(c){var s=this._id;return arguments.length?this.each((typeof c==="function"?N0:H0)(s,c)):He(this.node(),s).delay}function Y0(c,s){return function(){Ue(this,c).duration=+s.apply(this,arguments)}}function j0(c,s){return s=+s,function(){Ue(this,c).duration=s}}function Rl(c){var s=this._id;return arguments.length?this.each((typeof c==="function"?Y0:j0)(s,c)):He(this.node(),s).duration}function X0(c,s){if(typeof s!=="function")throw Error();return function(){Ue(this,c).ease=s}}function ql(c){var s=this._id;return arguments.length?this.each(X0(s,c)):He(this.node(),s).ease}function U0(c,s){return function(){var B=s.apply(this,arguments);if(typeof B!=="function")throw Error();Ue(this,c).ease=B}}function zl(c){if(typeof c!=="function")throw Error();return this.each(U0(this._id,c))}function Wl(c){if(typeof c!=="function")c=lo(c);for(var s=this._groups,B=s.length,L=Array(B),_=0;_<B;++_)for(var I=s[_],O=I.length,D=L[_]=[],P,W=0;W<O;++W)if((P=I[W])&&c.call(P,P.__data__,W,I))D.push(P);return new rr(L,this._parents,this._name,this._id)}function Nl(c){if(c._id!==this._id)throw Error();for(var s=this._groups,B=c._groups,L=s.length,_=B.length,I=Math.min(L,_),O=Array(L),D=0;D<I;++D)for(var P=s[D],W=B[D],R=P.length,Y=O[D]=Array(R),G,U=0;U<R;++U)if(G=P[U]||W[U])Y[U]=G;for(;D<L;++D)O[D]=s[D];return new rr(O,this._parents,this._name,this._id)}function G0(c){return(c+"").trim().split(/^|\s+/).every(function(s){var B=s.indexOf(".");if(B>=0)s=s.slice(0,B);return!s||s==="start"})}function V0(c,s,B){var L,_,I=G0(s)?Zo:Ue;return function(){var O=I(this,c),D=O.on;if(D!==L)(_=(L=D).copy()).on(s,B);O.on=_}}function Hl(c,s){var B=this._id;return arguments.length<2?He(this.node(),B).on.on(c):this.each(V0(B,c,s))}function Z0(c){return function(){var s=this.parentNode;for(var B in this.__transition)if(+B!==c)return;if(s)s.removeChild(this)}}function Yl(){return this.on("end.remove",Z0(this._id))}function jl(c){var s=this._name,B=this._id;if(typeof c!=="function")c=hi(c);for(var L=this._groups,_=L.length,I=Array(_),O=0;O<_;++O)for(var D=L[O],P=D.length,W=I[O]=Array(P),R,Y,G=0;G<P;++G)if((R=D[G])&&(Y=c.call(R,R.__data__,G,D))){if("__data__"in R)Y.__data__=R.__data__;W[G]=Y,ei(W[G],s,B,G,W,He(R,B))}return new rr(I,this._parents,s,B)}function Xl(c){var s=this._name,B=this._id;if(typeof c!=="function")c=no(c);for(var L=this._groups,_=L.length,I=[],O=[],D=0;D<_;++D)for(var P=L[D],W=P.length,R,Y=0;Y<W;++Y)if(R=P[Y]){for(var G=c.call(R,R.__data__,Y,P),U,J=He(R,B),tt=0,et=G.length;tt<et;++tt)if(U=G[tt])ei(U,s,B,tt,G,J);I.push(G),O.push(R)}return new rr(I,O,s,B)}var K0=ti.prototype.constructor;function Ul(){return new K0(this._groups,this._parents)}function Q0(c,s){var B,L,_;return function(){var I=ci(this,c),O=(this.style.removeProperty(c),ci(this,c));return I===O?null:I===B&&O===L?_:_=s(B=I,L=O)}}function Eu(c){return function(){this.style.removeProperty(c)}}function J0(c,s,B){var L,_=B+"",I;return function(){var O=ci(this,c);return O===_?null:O===L?I:I=s(L=O,B)}}function tC(c,s,B){var L,_,I;return function(){var O=ci(this,c),D=B(this),P=D+"";if(D==null)P=D=(this.style.removeProperty(c),ci(this,c));return O===P?null:O===L&&P===_?I:(_=P,I=s(L=O,D))}}function eC(c,s){var B,L,_,I="style."+s,O="end."+I,D;return function(){var P=Ue(this,c),W=P.on,R=P.value[I]==null?D||(D=Eu(s)):void 0;if(W!==B||_!==R)(L=(B=W).copy()).on(O,_=R);P.on=L}}function Gl(c,s,B){var L=(c+="")==="transform"?Ml:Qo;return s==null?this.styleTween(c,Q0(c,L)).on("end.style."+c,Eu(c)):typeof s==="function"?this.styleTween(c,tC(c,L,po(this,"style."+c,s))).each(eC(this._id,c)):this.styleTween(c,J0(c,L,s),B).on("end.style."+c,null)}function rC(c,s,B){return function(L){this.style.setProperty(c,s.call(this,L),B)}}function iC(c,s,B){var L,_;function I(){var O=s.apply(this,arguments);if(O!==_)L=(_=O)&&rC(c,O,B);return L}return I._value=s,I}function Vl(c,s,B){var L="style."+(c+="");if(arguments.length<2)return(L=this.tween(L))&&L._value;if(s==null)return this.tween(L,null);if(typeof s!=="function")throw Error();return this.tween(L,iC(c,s,B==null?"":B))}function oC(c){return function(){this.textContent=c}}function sC(c){return function(){var s=c(this);this.textContent=s==null?"":s}}function Zl(c){return this.tween("text",typeof c==="function"?sC(po(this,"text",c)):oC(c==null?"":c+""))}function aC(c){return function(s){this.textContent=c.call(this,s)}}function nC(c){var s,B;function L(){var _=c.apply(this,arguments);if(_!==B)s=(B=_)&&aC(_);return s}return L._value=c,L}function Kl(c){var s="text";if(arguments.length<1)return(s=this.tween(s))&&s._value;if(c==null)return this.tween(s,null);if(typeof c!=="function")throw Error();return this.tween(s,nC(c))}function Ql(){var c=this._name,s=this._id,B=ra();for(var L=this._groups,_=L.length,I=0;I<_;++I)for(var O=L[I],D=O.length,P,W=0;W<D;++W)if(P=O[W]){var R=He(P,s);ei(P,c,B,W,O,{time:R.time+R.delay+R.duration,delay:0,duration:R.duration,ease:R.ease})}return new rr(L,this._parents,c,B)}function Jl(){var c,s,B=this,L=B._id,_=B.size();return new Promise(function(I,O){var D={value:O},P={value:function(){if(--_===0)I()}};if(B.each(function(){var W=Ue(this,L),R=W.on;if(R!==c)s=(c=R).copy(),s._.cancel.push(D),s._.interrupt.push(D),s._.end.push(P);W.on=s}),_===0)I()})}var lC=0;function rr(c,s,B,L){this._groups=c,this._parents=s,this._name=B,this._id=L}function $u(c){return ti().transition(c)}function ra(){return++lC}var ri=ti.prototype;rr.prototype=$u.prototype={constructor:rr,select:jl,selectAll:Xl,selectChild:ri.selectChild,selectChildren:ri.selectChildren,filter:Wl,merge:Nl,selection:Ul,transition:Ql,call:ri.call,nodes:ri.nodes,node:ri.node,size:ri.size,empty:ri.empty,each:ri.each,on:Hl,attr:Ol,attrTween:Dl,style:Gl,styleTween:Vl,text:Zl,textTween:Kl,remove:Yl,tween:Il,delay:Pl,duration:Rl,ease:ql,easeVarying:zl,end:Jl,[Symbol.iterator]:ri[Symbol.iterator]};function ia(c){return((c*=2)<=1?c*c*c:(c-=2)*c*c+2)/2}var hC={time:null,delay:0,duration:250,ease:ia};function cC(c,s){var B;while(!(B=c.__transition)||!(B=B[s]))if(!(c=c.parentNode))throw Error(`transition ${s} not found`);return B}function th(c){var s,B;if(c instanceof rr)s=c._id,c=c._name;else s=ra(),(B=hC).time=Uo(),c=c==null?null:c+"";for(var L=this._groups,_=L.length,I=0;I<_;++I)for(var O=L[I],D=O.length,P,W=0;W<D;++W)if(P=O[W])ei(P,c,s,W,O,B||cC(P,s));return new rr(L,this._parents,c,s)}ti.prototype.interrupt=$l;ti.prototype.transition=th;var{abs:aL,max:nL,min:lL}=Math;function Iu(c){return[+c[0],+c[1]]}function uC(c){return[Iu(c[0]),Iu(c[1])]}var hL={name:"x",handles:["w","e"].map(eh),input:function(c,s){return c==null?null:[[+c[0],s[0][1]],[+c[1],s[1][1]]]},output:function(c){return c&&[c[0][0],c[1][0]]}},cL={name:"y",handles:["n","s"].map(eh),input:function(c,s){return c==null?null:[[s[0][0],+c[0]],[s[1][0],+c[1]]]},output:function(c){return c&&[c[0][1],c[1][1]]}},uL={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eh),input:function(c){return c==null?null:uC(c)},output:function(c){return c}};function eh(c){return{type:c}}var rh=Math.PI,ih=2*rh;var dC=ih-0.000001;function Ou(c){this._+=c[0];for(let s=1,B=c.length;s<B;++s)this._+=arguments[s]+c[s]}function pC(c){let s=Math.floor(c);if(!(s>=0))throw Error(`invalid digits: ${c}`);if(s>15)return Ou;let B=10**s;return function(L){this._+=L[0];for(let _=1,I=L.length;_<I;++_)this._+=Math.round(arguments[_]*B)/B+L[_]}}class fo{constructor(c){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=c==null?Ou:pC(c)}moveTo(c,s){this._append`M${this._x0=this._x1=+c},${this._y0=this._y1=+s}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(c,s){this._append`L${this._x1=+c},${this._y1=+s}`}quadraticCurveTo(c,s,B,L){this._append`Q${+c},${+s},${this._x1=+B},${this._y1=+L}`}bezierCurveTo(c,s,B,L,_,I){this._append`C${+c},${+s},${+B},${+L},${this._x1=+_},${this._y1=+I}`}arcTo(c,s,B,L,_){if(c=+c,s=+s,B=+B,L=+L,_=+_,_<0)throw Error(`negative radius: ${_}`);let I=this._x1,O=this._y1,D=B-c,P=L-s,W=I-c,R=O-s,Y=W*W+R*R;if(this._x1===null)this._append`M${this._x1=c},${this._y1=s}`;else if(!(Y>0.000001));else if(!(Math.abs(R*D-P*W)>0.000001)||!_)this._append`L${this._x1=c},${this._y1=s}`;else{let G=B-I,U=L-O,J=D*D+P*P,tt=G*G+U*U,et=Math.sqrt(J),it=Math.sqrt(Y),at=_*Math.tan((rh-Math.acos((J+Y-tt)/(2*et*it)))/2),nt=at/it,ut=at/et;if(Math.abs(nt-1)>0.000001)this._append`L${c+nt*W},${s+nt*R}`;this._append`A${_},${_},0,0,${+(R*G>W*U)},${this._x1=c+ut*D},${this._y1=s+ut*P}`}}arc(c,s,B,L,_,I){if(c=+c,s=+s,B=+B,I=!!I,B<0)throw Error(`negative radius: ${B}`);let O=B*Math.cos(L),D=B*Math.sin(L),P=c+O,W=s+D,R=1^I,Y=I?L-_:_-L;if(this._x1===null)this._append`M${P},${W}`;else if(Math.abs(this._x1-P)>0.000001||Math.abs(this._y1-W)>0.000001)this._append`L${P},${W}`;if(!B)return;if(Y<0)Y=Y%ih+ih;if(Y>dC)this._append`A${B},${B},0,1,${R},${c-O},${s-D}A${B},${B},0,1,${R},${this._x1=P},${this._y1=W}`;else if(Y>0.000001)this._append`A${B},${B},0,${+(Y>=rh)},${R},${this._x1=c+B*Math.cos(_)},${this._y1=s+B*Math.sin(_)}`}rect(c,s,B,L){this._append`M${this._x0=this._x1=+c},${this._y0=this._y1=+s}h${B=+B}v${+L}h${-B}Z`}toString(){return this._}}function Du(){return new fo}Du.prototype=fo.prototype;function z(c){return function(){return c}}var{abs:xi,atan2:ue,cos:Dt,max:zi,min:On,sin:Ke,sqrt:Ut}=Math,ae=0.000000000001,wr=Math.PI,qr=wr/2,qt=2*wr;function Gi(c){return c>1?0:c<-1?wr:Math.acos(c)}function wi(c){return c>=1?qr:c<=-1?-qr:Math.asin(c)}function $n(c){let s=3;return c.digits=function(B){if(!arguments.length)return s;if(B==null)s=null;else{let L=Math.floor(B);if(!(L>=0))throw RangeError(`invalid digits: ${B}`);s=L}return c},()=>new fo(s)}var vL=Array.prototype.slice;function Vr(c){return typeof c==="object"&&"length"in c?c:Array.from(c)}function Pu(c){this._context=c}Pu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,s):this._context.moveTo(c,s);break;case 1:this._point=2;default:this._context.lineTo(c,s);break}}};function Ir(c){return new Pu(c)}function Ru(c){return c[0]}function qu(c){return c[1]}function Le(c,s){var B=z(!0),L=null,_=Ir,I=null,O=$n(D);c=typeof c==="function"?c:c===void 0?Ru:z(c),s=typeof s==="function"?s:s===void 0?qu:z(s);function D(P){var W,R=(P=Vr(P)).length,Y,G=!1,U;if(L==null)I=_(U=O());for(W=0;W<=R;++W){if(!(W<R&&B(Y=P[W],W,P))===G)if(G=!G)I.lineStart();else I.lineEnd();if(G)I.point(+c(Y,W,P),+s(Y,W,P))}if(U)return I=null,U+""||null}return D.x=function(P){return arguments.length?(c=typeof P==="function"?P:z(+P),D):c},D.y=function(P){return arguments.length?(s=typeof P==="function"?P:z(+P),D):s},D.defined=function(P){return arguments.length?(B=typeof P==="function"?P:z(!!P),D):B},D.curve=function(P){return arguments.length?(_=P,L!=null&&(I=_(L)),D):_},D.context=function(P){return arguments.length?(P==null?L=I=null:I=_(L=P),D):L},D}class oh{constructor(c,s){this._context=c,this._x=s}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line}point(c,s){switch(c=+c,s=+s,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(c,s);else this._context.moveTo(c,s);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+c)/2,this._y0,this._x0,s,c,s);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+s)/2,c,this._y0,c,s);break}}this._x0=c,this._y0=s}}function Jo(c){return new oh(c,!0)}function ts(c){return new oh(c,!1)}function cr(){}function go(c,s,B){c._context.bezierCurveTo((2*c._x0+c._x1)/3,(2*c._y0+c._y1)/3,(c._x0+2*c._x1)/3,(c._y0+2*c._y1)/3,(c._x0+4*c._x1+s)/6,(c._y0+4*c._y1+B)/6)}function es(c){this._context=c}es.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:go(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,s):this._context.moveTo(c,s);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:go(this,c,s);break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=s}};function Be(c){return new es(c)}function zu(c){this._context=c}zu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1,this._x2=c,this._y2=s;break;case 1:this._point=2,this._x3=c,this._y3=s;break;case 2:this._point=3,this._x4=c,this._y4=s,this._context.moveTo((this._x0+4*this._x1+c)/6,(this._y0+4*this._y1+s)/6);break;default:go(this,c,s);break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=s}};function oa(c){return new zu(c)}function Wu(c){this._context=c}Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var B=(this._x0+4*this._x1+c)/6,L=(this._y0+4*this._y1+s)/6;this._line?this._context.lineTo(B,L):this._context.moveTo(B,L);break;case 3:this._point=4;default:go(this,c,s);break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=s}};function sa(c){return new Wu(c)}function Nu(c,s){this._basis=new es(c),this._beta=s}Nu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var c=this._x,s=this._y,B=c.length-1;if(B>0){var L=c[0],_=s[0],I=c[B]-L,O=s[B]-_,D=-1,P;while(++D<=B)P=D/B,this._basis.point(this._beta*c[D]+(1-this._beta)*(L+P*I),this._beta*s[D]+(1-this._beta)*(_+P*O))}this._x=this._y=null,this._basis.lineEnd()},point:function(c,s){this._x.push(+c),this._y.push(+s)}};var sh=function c(s){function B(L){return s===1?new es(L):new Nu(L,s)}return B.beta=function(L){return c(+L)},B}(0.85);function mo(c,s,B){c._context.bezierCurveTo(c._x1+c._k*(c._x2-c._x0),c._y1+c._k*(c._y2-c._y0),c._x2+c._k*(c._x1-s),c._y2+c._k*(c._y1-B),c._x2,c._y2)}function aa(c,s){this._context=c,this._k=(1-s)/6}aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mo(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,s):this._context.moveTo(c,s);break;case 1:this._point=2,this._x1=c,this._y1=s;break;case 2:this._point=3;default:mo(this,c,s);break}this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=s}};var rs=function c(s){function B(L){return new aa(L,s)}return B.tension=function(L){return c(+L)},B}(0);function na(c,s){this._context=c,this._k=(1-s)/6}na.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1,this._x3=c,this._y3=s;break;case 1:this._point=2,this._context.moveTo(this._x4=c,this._y4=s);break;case 2:this._point=3,this._x5=c,this._y5=s;break;default:mo(this,c,s);break}this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=s}};var ah=function c(s){function B(L){return new na(L,s)}return B.tension=function(L){return c(+L)},B}(0);function la(c,s){this._context=c,this._k=(1-s)/6}la.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:mo(this,c,s);break}this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=s}};var nh=function c(s){function B(L){return new la(L,s)}return B.tension=function(L){return c(+L)},B}(0);function is(c,s,B){var{_x1:L,_y1:_,_x2:I,_y2:O}=c;if(c._l01_a>ae){var D=2*c._l01_2a+3*c._l01_a*c._l12_a+c._l12_2a,P=3*c._l01_a*(c._l01_a+c._l12_a);L=(L*D-c._x0*c._l12_2a+c._x2*c._l01_2a)/P,_=(_*D-c._y0*c._l12_2a+c._y2*c._l01_2a)/P}if(c._l23_a>ae){var W=2*c._l23_2a+3*c._l23_a*c._l12_a+c._l12_2a,R=3*c._l23_a*(c._l23_a+c._l12_a);I=(I*W+c._x1*c._l23_2a-s*c._l12_2a)/R,O=(O*W+c._y1*c._l23_2a-B*c._l12_2a)/R}c._context.bezierCurveTo(L,_,I,O,c._x2,c._y2)}function Hu(c,s){this._context=c,this._alpha=s}Hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(c,s){if(c=+c,s=+s,this._point){var B=this._x2-c,L=this._y2-s;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(B*B+L*L,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(c,s):this._context.moveTo(c,s);break;case 1:this._point=2;break;case 2:this._point=3;default:is(this,c,s);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=s}};var os=function c(s){function B(L){return s?new Hu(L,s):new aa(L,0)}return B.alpha=function(L){return c(+L)},B}(0.5);function Yu(c,s){this._context=c,this._alpha=s}Yu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(c,s){if(c=+c,s=+s,this._point){var B=this._x2-c,L=this._y2-s;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(B*B+L*L,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=c,this._y3=s;break;case 1:this._point=2,this._context.moveTo(this._x4=c,this._y4=s);break;case 2:this._point=3,this._x5=c,this._y5=s;break;default:is(this,c,s);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=s}};var lh=function c(s){function B(L){return s?new Yu(L,s):new na(L,0)}return B.alpha=function(L){return c(+L)},B}(0.5);function ju(c,s){this._context=c,this._alpha=s}ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(c,s){if(c=+c,s=+s,this._point){var B=this._x2-c,L=this._y2-s;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(B*B+L*L,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:is(this,c,s);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=s}};var hh=function c(s){function B(L){return s?new ju(L,s):new la(L,0)}return B.alpha=function(L){return c(+L)},B}(0.5);function Xu(c){this._context=c}Xu.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(c,s){if(c=+c,s=+s,this._point)this._context.lineTo(c,s);else this._point=1,this._context.moveTo(c,s)}};function ha(c){return new Xu(c)}function Uu(c){return c<0?-1:1}function Gu(c,s,B){var L=c._x1-c._x0,_=s-c._x1,I=(c._y1-c._y0)/(L||_<0&&-0),O=(B-c._y1)/(_||L<0&&-0),D=(I*_+O*L)/(L+_);return(Uu(I)+Uu(O))*Math.min(Math.abs(I),Math.abs(O),0.5*Math.abs(D))||0}function Vu(c,s){var B=c._x1-c._x0;return B?(3*(c._y1-c._y0)/B-s)/2:s}function ch(c,s,B){var{_x0:L,_y0:_,_x1:I,_y1:O}=c,D=(I-L)/3;c._context.bezierCurveTo(L+D,_+D*s,I-D,O-D*B,I,O)}function ca(c){this._context=c}ca.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ch(this,this._t0,Vu(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(c,s){var B=NaN;if(c=+c,s=+s,c===this._x1&&s===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(c,s):this._context.moveTo(c,s);break;case 1:this._point=2;break;case 2:this._point=3,ch(this,Vu(this,B=Gu(this,c,s)),B);break;default:ch(this,this._t0,B=Gu(this,c,s));break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=s,this._t0=B}};function Zu(c){this._context=new Ku(c)}(Zu.prototype=Object.create(ca.prototype)).point=function(c,s){ca.prototype.point.call(this,s,c)};function Ku(c){this._context=c}Ku.prototype={moveTo:function(c,s){this._context.moveTo(s,c)},closePath:function(){this._context.closePath()},lineTo:function(c,s){this._context.lineTo(s,c)},bezierCurveTo:function(c,s,B,L,_,I){this._context.bezierCurveTo(s,c,L,B,I,_)}};function ss(c){return new ca(c)}function as(c){return new Zu(c)}function Ju(c){this._context=c}Ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var c=this._x,s=this._y,B=c.length;if(B)if(this._line?this._context.lineTo(c[0],s[0]):this._context.moveTo(c[0],s[0]),B===2)this._context.lineTo(c[1],s[1]);else{var L=Qu(c),_=Qu(s);for(var I=0,O=1;O<B;++I,++O)this._context.bezierCurveTo(L[0][I],_[0][I],L[1][I],_[1][I],c[O],s[O])}if(this._line||this._line!==0&&B===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(c,s){this._x.push(+c),this._y.push(+s)}};function Qu(c){var s,B=c.length-1,L,_=Array(B),I=Array(B),O=Array(B);_[0]=0,I[0]=2,O[0]=c[0]+2*c[1];for(s=1;s<B-1;++s)_[s]=1,I[s]=4,O[s]=4*c[s]+2*c[s+1];_[B-1]=2,I[B-1]=7,O[B-1]=8*c[B-1]+c[B];for(s=1;s<B;++s)L=_[s]/I[s-1],I[s]-=L,O[s]-=L*O[s-1];_[B-1]=O[B-1]/I[B-1];for(s=B-2;s>=0;--s)_[s]=(O[s]-_[s+1])/I[s];I[B-1]=(c[B]+_[B-1])/2;for(s=0;s<B-1;++s)I[s]=2*c[s+1]-_[s+1];return[_,I]}function xo(c){return new Ju(c)}function ua(c,s){this._context=c,this._t=s}ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(c,s){switch(c=+c,s=+s,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,s):this._context.moveTo(c,s);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,s),this._context.lineTo(c,s);else{var B=this._x*(1-this._t)+c*this._t;this._context.lineTo(B,this._y),this._context.lineTo(B,s)}break}}this._x=c,this._y=s}};function yo(c){return new ua(c,0.5)}function ns(c){return new ua(c,0)}function ls(c){return new ua(c,1)}function ui(c,s,B){this.k=c,this.x=s,this.y=B}ui.prototype={constructor:ui,scale:function(c){return c===1?this:new ui(this.k*c,this.x,this.y)},translate:function(c,s){return c===0&s===0?this:new ui(this.k,this.x+this.k*c,this.y+this.k*s)},apply:function(c){return[c[0]*this.k+this.x,c[1]*this.k+this.y]},applyX:function(c){return c*this.k+this.x},applyY:function(c){return c*this.k+this.y},invert:function(c){return[(c[0]-this.x)/this.k,(c[1]-this.y)/this.k]},invertX:function(c){return(c-this.x)/this.k},invertY:function(c){return(c-this.y)/this.k},rescaleX:function(c){return c.copy().domain(c.range().map(this.invertX,this).map(c.invert,c))},rescaleY:function(c){return c.copy().domain(c.range().map(this.invertY,this).map(c.invert,c))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var uh=new ui(1,0,0);dh.prototype=ui.prototype;function dh(c){while(!c.__zoom)if(!(c=c.parentNode))return uh;return c.__zoom}var A=e((c)=>{let{securityLevel:s}=r(),B=n("body");if(s==="sandbox"){let I=n(`#i${c}`).node()?.contentDocument??document;B=n(I.body)}return B.select(`#${c}`)},"selectSvgElement");function Fh(c){return typeof c>"u"||c===null}e(Fh,"isNothing");function rd(c){return typeof c==="object"&&c!==null}e(rd,"isObject");function id(c){if(Array.isArray(c))return c;else if(Fh(c))return[];return[c]}e(id,"toArray");function od(c,s){var B,L,_,I;if(s){I=Object.keys(s);for(B=0,L=I.length;B<L;B+=1)_=I[B],c[_]=s[_]}return c}e(od,"extend");function sd(c,s){var B="",L;for(L=0;L<s;L+=1)B+=c;return B}e(sd,"repeat");function ad(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}e(ad,"isNegativeZero");var fC=Fh,gC=rd,mC=id,xC=sd,yC=ad,CC=od,Ye={isNothing:fC,isObject:gC,toArray:mC,repeat:xC,isNegativeZero:yC,extend:CC};function Mh(c,s){var B="",L=c.reason||"(unknown reason)";if(!c.mark)return L;if(c.mark.name)B+='in "'+c.mark.name+'" ';if(B+="("+(c.mark.line+1)+":"+(c.mark.column+1)+")",!s&&c.mark.snippet)B+=`
126
-
127
- `+c.mark.snippet;return L+" "+B}e(Mh,"formatError");function ko(c,s){if(Error.call(this),this.name="YAMLException",this.reason=c,this.mark=s,this.message=Mh(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}e(ko,"YAMLException$1");ko.prototype=Object.create(Error.prototype);ko.prototype.constructor=ko;ko.prototype.toString=e(function(s){return this.name+": "+Mh(this,s)},"toString");var ar=ko;function da(c,s,B,L,_){var I="",O="",D=Math.floor(_/2)-1;if(L-s>D)I=" ... ",s=L-D+I.length;if(B-L>D)O=" ...",B=L+D-O.length;return{str:I+c.slice(s,B).replace(/\t/g,"→")+O,pos:L-s+I.length}}e(da,"getLine");function pa(c,s){return Ye.repeat(" ",s-c.length)+c}e(pa,"padStart");function nd(c,s){if(s=Object.create(s||null),!c.buffer)return null;if(!s.maxLength)s.maxLength=79;if(typeof s.indent!=="number")s.indent=1;if(typeof s.linesBefore!=="number")s.linesBefore=3;if(typeof s.linesAfter!=="number")s.linesAfter=2;var B=/\r?\n|\r|\0/g,L=[0],_=[],I,O=-1;while(I=B.exec(c.buffer))if(_.push(I.index),L.push(I.index+I[0].length),c.position<=I.index&&O<0)O=L.length-2;if(O<0)O=L.length-1;var D="",P,W,R=Math.min(c.line+s.linesAfter,_.length).toString().length,Y=s.maxLength-(s.indent+R+3);for(P=1;P<=s.linesBefore;P++){if(O-P<0)break;W=da(c.buffer,L[O-P],_[O-P],c.position-(L[O]-L[O-P]),Y),D=Ye.repeat(" ",s.indent)+pa((c.line-P+1).toString(),R)+" | "+W.str+`
128
- `+D}W=da(c.buffer,L[O],_[O],c.position,Y),D+=Ye.repeat(" ",s.indent)+pa((c.line+1).toString(),R)+" | "+W.str+`
129
- `,D+=Ye.repeat("-",s.indent+R+3+W.pos)+`^
130
- `;for(P=1;P<=s.linesAfter;P++){if(O+P>=_.length)break;W=da(c.buffer,L[O+P],_[O+P],c.position-(L[O]-L[O+P]),Y),D+=Ye.repeat(" ",s.indent)+pa((c.line+P+1).toString(),R)+" | "+W.str+`
131
- `}return D.replace(/\n$/,"")}e(nd,"makeSnippet");var bC=nd,kC=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],wC=["scalar","sequence","mapping"];function ld(c){var s={};if(c!==null)Object.keys(c).forEach(function(B){c[B].forEach(function(L){s[String(L)]=B})});return s}e(ld,"compileStyleAliases");function hd(c,s){if(s=s||{},Object.keys(s).forEach(function(B){if(kC.indexOf(B)===-1)throw new ar('Unknown option "'+B+'" is met in definition of "'+c+'" YAML type.')}),this.options=s,this.tag=c,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(B){return B},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=ld(s.styleAliases||null),wC.indexOf(this.kind)===-1)throw new ar('Unknown kind "'+this.kind+'" is specified for "'+c+'" YAML type.')}e(hd,"Type$1");var Ve=hd;function fh(c,s){var B=[];return c[s].forEach(function(L){var _=B.length;B.forEach(function(I,O){if(I.tag===L.tag&&I.kind===L.kind&&I.multi===L.multi)_=O}),B[_]=L}),B}e(fh,"compileList");function cd(){var c={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},s,B;function L(_){if(_.multi)c.multi[_.kind].push(_),c.multi.fallback.push(_);else c[_.kind][_.tag]=c.fallback[_.tag]=_}e(L,"collectType");for(s=0,B=arguments.length;s<B;s+=1)arguments[s].forEach(L);return c}e(cd,"compileMap");function fa(c){return this.extend(c)}e(fa,"Schema$1");fa.prototype.extend=e(function(s){var B=[],L=[];if(s instanceof Ve)L.push(s);else if(Array.isArray(s))L=L.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit))){if(s.implicit)B=B.concat(s.implicit);if(s.explicit)L=L.concat(s.explicit)}else throw new ar("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");B.forEach(function(I){if(!(I instanceof Ve))throw new ar("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(I.loadKind&&I.loadKind!=="scalar")throw new ar("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(I.multi)throw new ar("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),L.forEach(function(I){if(!(I instanceof Ve))throw new ar("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var _=Object.create(fa.prototype);return _.implicit=(this.implicit||[]).concat(B),_.explicit=(this.explicit||[]).concat(L),_.compiledImplicit=fh(_,"implicit"),_.compiledExplicit=fh(_,"explicit"),_.compiledTypeMap=cd(_.compiledImplicit,_.compiledExplicit),_},"extend");var SC=fa,TC=new Ve("tag:yaml.org,2002:str",{kind:"scalar",construct:e(function(c){return c!==null?c:""},"construct")}),BC=new Ve("tag:yaml.org,2002:seq",{kind:"sequence",construct:e(function(c){return c!==null?c:[]},"construct")}),_C=new Ve("tag:yaml.org,2002:map",{kind:"mapping",construct:e(function(c){return c!==null?c:{}},"construct")}),vC=new SC({explicit:[TC,BC,_C]});function ud(c){if(c===null)return!0;var s=c.length;return s===1&&c==="~"||s===4&&(c==="null"||c==="Null"||c==="NULL")}e(ud,"resolveYamlNull");function dd(){return null}e(dd,"constructYamlNull");function pd(c){return c===null}e(pd,"isNull");var LC=new Ve("tag:yaml.org,2002:null",{kind:"scalar",resolve:ud,construct:dd,predicate:pd,represent:{canonical:e(function(){return"~"},"canonical"),lowercase:e(function(){return"null"},"lowercase"),uppercase:e(function(){return"NULL"},"uppercase"),camelcase:e(function(){return"Null"},"camelcase"),empty:e(function(){return""},"empty")},defaultStyle:"lowercase"});function fd(c){if(c===null)return!1;var s=c.length;return s===4&&(c==="true"||c==="True"||c==="TRUE")||s===5&&(c==="false"||c==="False"||c==="FALSE")}e(fd,"resolveYamlBoolean");function gd(c){return c==="true"||c==="True"||c==="TRUE"}e(gd,"constructYamlBoolean");function md(c){return Object.prototype.toString.call(c)==="[object Boolean]"}e(md,"isBoolean");var FC=new Ve("tag:yaml.org,2002:bool",{kind:"scalar",resolve:fd,construct:gd,predicate:md,represent:{lowercase:e(function(c){return c?"true":"false"},"lowercase"),uppercase:e(function(c){return c?"TRUE":"FALSE"},"uppercase"),camelcase:e(function(c){return c?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function xd(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}e(xd,"isHexCode");function yd(c){return 48<=c&&c<=55}e(yd,"isOctCode");function Cd(c){return 48<=c&&c<=57}e(Cd,"isDecCode");function bd(c){if(c===null)return!1;var s=c.length,B=0,L=!1,_;if(!s)return!1;if(_=c[B],_==="-"||_==="+")_=c[++B];if(_==="0"){if(B+1===s)return!0;if(_=c[++B],_==="b"){B++;for(;B<s;B++){if(_=c[B],_==="_")continue;if(_!=="0"&&_!=="1")return!1;L=!0}return L&&_!=="_"}if(_==="x"){B++;for(;B<s;B++){if(_=c[B],_==="_")continue;if(!xd(c.charCodeAt(B)))return!1;L=!0}return L&&_!=="_"}if(_==="o"){B++;for(;B<s;B++){if(_=c[B],_==="_")continue;if(!yd(c.charCodeAt(B)))return!1;L=!0}return L&&_!=="_"}}if(_==="_")return!1;for(;B<s;B++){if(_=c[B],_==="_")continue;if(!Cd(c.charCodeAt(B)))return!1;L=!0}if(!L||_==="_")return!1;return!0}e(bd,"resolveYamlInteger");function kd(c){var s=c,B=1,L;if(s.indexOf("_")!==-1)s=s.replace(/_/g,"");if(L=s[0],L==="-"||L==="+"){if(L==="-")B=-1;s=s.slice(1),L=s[0]}if(s==="0")return 0;if(L==="0"){if(s[1]==="b")return B*parseInt(s.slice(2),2);if(s[1]==="x")return B*parseInt(s.slice(2),16);if(s[1]==="o")return B*parseInt(s.slice(2),8)}return B*parseInt(s,10)}e(kd,"constructYamlInteger");function wd(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1===0&&!Ye.isNegativeZero(c))}e(wd,"isInteger");var MC=new Ve("tag:yaml.org,2002:int",{kind:"scalar",resolve:bd,construct:kd,predicate:wd,represent:{binary:e(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:e(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:e(function(c){return c.toString(10)},"decimal"),hexadecimal:e(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),AC=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Sd(c){if(c===null)return!1;if(!AC.test(c)||c[c.length-1]==="_")return!1;return!0}e(Sd,"resolveYamlFloat");function Td(c){var s,B;if(s=c.replace(/_/g,"").toLowerCase(),B=s[0]==="-"?-1:1,"+-".indexOf(s[0])>=0)s=s.slice(1);if(s===".inf")return B===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(s===".nan")return NaN;return B*parseFloat(s,10)}e(Td,"constructYamlFloat");var EC=/^[-+]?[0-9]+e/;function Bd(c,s){var B;if(isNaN(c))switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ye.isNegativeZero(c))return"-0.0";return B=c.toString(10),EC.test(B)?B.replace("e",".e"):B}e(Bd,"representYamlFloat");function _d(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||Ye.isNegativeZero(c))}e(_d,"isFloat");var $C=new Ve("tag:yaml.org,2002:float",{kind:"scalar",resolve:Sd,construct:Td,predicate:_d,represent:Bd,defaultStyle:"lowercase"}),vd=vC.extend({implicit:[LC,FC,MC,$C]}),IC=vd,Ld=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Fd=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 Md(c){if(c===null)return!1;if(Ld.exec(c)!==null)return!0;if(Fd.exec(c)!==null)return!0;return!1}e(Md,"resolveYamlTimestamp");function Ad(c){var s,B,L,_,I,O,D,P=0,W=null,R,Y,G;if(s=Ld.exec(c),s===null)s=Fd.exec(c);if(s===null)throw Error("Date resolve error");if(B=+s[1],L=+s[2]-1,_=+s[3],!s[4])return new Date(Date.UTC(B,L,_));if(I=+s[4],O=+s[5],D=+s[6],s[7]){P=s[7].slice(0,3);while(P.length<3)P+="0";P=+P}if(s[9]){if(R=+s[10],Y=+(s[11]||0),W=(R*60+Y)*60000,s[9]==="-")W=-W}if(G=new Date(Date.UTC(B,L,_,I,O,D,P)),W)G.setTime(G.getTime()-W);return G}e(Ad,"constructYamlTimestamp");function Ed(c){return c.toISOString()}e(Ed,"representYamlTimestamp");var OC=new Ve("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Md,construct:Ad,instanceOf:Date,represent:Ed});function $d(c){return c==="<<"||c===null}e($d,"resolveYamlMerge");var DC=new Ve("tag:yaml.org,2002:merge",{kind:"scalar",resolve:$d}),Ah=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
132
- \r`;function Id(c){if(c===null)return!1;var s,B,L=0,_=c.length,I=Ah;for(B=0;B<_;B++){if(s=I.indexOf(c.charAt(B)),s>64)continue;if(s<0)return!1;L+=6}return L%8===0}e(Id,"resolveYamlBinary");function Od(c){var s,B,L=c.replace(/[\r\n=]/g,""),_=L.length,I=Ah,O=0,D=[];for(s=0;s<_;s++){if(s%4===0&&s)D.push(O>>16&255),D.push(O>>8&255),D.push(O&255);O=O<<6|I.indexOf(L.charAt(s))}if(B=_%4*6,B===0)D.push(O>>16&255),D.push(O>>8&255),D.push(O&255);else if(B===18)D.push(O>>10&255),D.push(O>>2&255);else if(B===12)D.push(O>>4&255);return new Uint8Array(D)}e(Od,"constructYamlBinary");function Dd(c){var s="",B=0,L,_,I=c.length,O=Ah;for(L=0;L<I;L++){if(L%3===0&&L)s+=O[B>>18&63],s+=O[B>>12&63],s+=O[B>>6&63],s+=O[B&63];B=(B<<8)+c[L]}if(_=I%3,_===0)s+=O[B>>18&63],s+=O[B>>12&63],s+=O[B>>6&63],s+=O[B&63];else if(_===2)s+=O[B>>10&63],s+=O[B>>4&63],s+=O[B<<2&63],s+=O[64];else if(_===1)s+=O[B>>2&63],s+=O[B<<4&63],s+=O[64],s+=O[64];return s}e(Dd,"representYamlBinary");function Pd(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}e(Pd,"isBinary");var PC=new Ve("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Id,construct:Od,predicate:Pd,represent:Dd}),RC=Object.prototype.hasOwnProperty,qC=Object.prototype.toString;function Rd(c){if(c===null)return!0;var s=[],B,L,_,I,O,D=c;for(B=0,L=D.length;B<L;B+=1){if(_=D[B],O=!1,qC.call(_)!=="[object Object]")return!1;for(I in _)if(RC.call(_,I))if(!O)O=!0;else return!1;if(!O)return!1;if(s.indexOf(I)===-1)s.push(I);else return!1}return!0}e(Rd,"resolveYamlOmap");function qd(c){return c!==null?c:[]}e(qd,"constructYamlOmap");var zC=new Ve("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Rd,construct:qd}),WC=Object.prototype.toString;function zd(c){if(c===null)return!0;var s,B,L,_,I,O=c;I=Array(O.length);for(s=0,B=O.length;s<B;s+=1){if(L=O[s],WC.call(L)!=="[object Object]")return!1;if(_=Object.keys(L),_.length!==1)return!1;I[s]=[_[0],L[_[0]]]}return!0}e(zd,"resolveYamlPairs");function Wd(c){if(c===null)return[];var s,B,L,_,I,O=c;I=Array(O.length);for(s=0,B=O.length;s<B;s+=1)L=O[s],_=Object.keys(L),I[s]=[_[0],L[_[0]]];return I}e(Wd,"constructYamlPairs");var NC=new Ve("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:zd,construct:Wd}),HC=Object.prototype.hasOwnProperty;function Nd(c){if(c===null)return!0;var s,B=c;for(s in B)if(HC.call(B,s)){if(B[s]!==null)return!1}return!0}e(Nd,"resolveYamlSet");function Hd(c){return c!==null?c:{}}e(Hd,"constructYamlSet");var YC=new Ve("tag:yaml.org,2002:set",{kind:"mapping",resolve:Nd,construct:Hd}),Yd=IC.extend({implicit:[OC,DC],explicit:[PC,zC,NC,YC]}),vi=Object.prototype.hasOwnProperty,ga=1,jd=2,Xd=3,ma=4,ph=1,jC=2,td=3,XC=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,UC=/[\x85\u2028\u2029]/,GC=/[,\[\]\{\}]/,Ud=/^(?:!|!!|![a-z\-]+!)$/i,Gd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function gh(c){return Object.prototype.toString.call(c)}e(gh,"_class");function Br(c){return c===10||c===13}e(Br,"is_EOL");function di(c){return c===9||c===32}e(di,"is_WHITE_SPACE");function ir(c){return c===9||c===32||c===10||c===13}e(ir,"is_WS_OR_EOL");function Zi(c){return c===44||c===91||c===93||c===123||c===125}e(Zi,"is_FLOW_INDICATOR");function Vd(c){var s;if(48<=c&&c<=57)return c-48;if(s=c|32,97<=s&&s<=102)return s-97+10;return-1}e(Vd,"fromHexCode");function Zd(c){if(c===120)return 2;if(c===117)return 4;if(c===85)return 8;return 0}e(Zd,"escapedHexLen");function Kd(c){if(48<=c&&c<=57)return c-48;return-1}e(Kd,"fromDecimalCode");function mh(c){return c===48?"\x00":c===97?"\x07":c===98?"\b":c===116?"\t":c===9?"\t":c===110?`
133
- `:c===118?"\v":c===102?"\f":c===114?"\r":c===101?"\x1B":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"…":c===95?" ":c===76?"\u2028":c===80?"\u2029":""}e(mh,"simpleEscapeSequence");function Qd(c){if(c<=65535)return String.fromCharCode(c);return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}e(Qd,"charFromCodepoint");function Eh(c,s,B){if(s==="__proto__")Object.defineProperty(c,s,{configurable:!0,enumerable:!0,writable:!0,value:B});else c[s]=B}e(Eh,"setProperty");var Jd=Array(256),tp=Array(256);for(Vi=0;Vi<256;Vi++)Jd[Vi]=mh(Vi)?1:0,tp[Vi]=mh(Vi);var Vi;function ep(c,s){this.input=c,this.filename=s.filename||null,this.schema=s.schema||Yd,this.onWarning=s.onWarning||null,this.legacy=s.legacy||!1,this.json=s.json||!1,this.listener=s.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}e(ep,"State$1");function $h(c,s){var B={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return B.snippet=bC(B),new ar(s,B)}e($h,"generateError");function re(c,s){throw $h(c,s)}e(re,"throwError");function hs(c,s){if(c.onWarning)c.onWarning.call(null,$h(c,s))}e(hs,"throwWarning");var ed={YAML:e(function(s,B,L){var _,I,O;if(s.version!==null)re(s,"duplication of %YAML directive");if(L.length!==1)re(s,"YAML directive accepts exactly one argument");if(_=/^([0-9]+)\.([0-9]+)$/.exec(L[0]),_===null)re(s,"ill-formed argument of the YAML directive");if(I=parseInt(_[1],10),O=parseInt(_[2],10),I!==1)re(s,"unacceptable YAML version of the document");if(s.version=L[0],s.checkLineBreaks=O<2,O!==1&&O!==2)hs(s,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:e(function(s,B,L){var _,I;if(L.length!==2)re(s,"TAG directive accepts exactly two arguments");if(_=L[0],I=L[1],!Ud.test(_))re(s,"ill-formed tag handle (first argument) of the TAG directive");if(vi.call(s.tagMap,_))re(s,'there is a previously declared suffix for "'+_+'" tag handle');if(!Gd.test(I))re(s,"ill-formed tag prefix (second argument) of the TAG directive");try{I=decodeURIComponent(I)}catch(O){re(s,"tag prefix is malformed: "+I)}s.tagMap[_]=I},"handleTagDirective")};function ii(c,s,B,L){var _,I,O,D;if(s<B){if(D=c.input.slice(s,B),L){for(_=0,I=D.length;_<I;_+=1)if(O=D.charCodeAt(_),!(O===9||32<=O&&O<=1114111))re(c,"expected valid JSON character")}else if(XC.test(D))re(c,"the stream contains non-printable characters");c.result+=D}}e(ii,"captureSegment");function xh(c,s,B,L){var _,I,O,D;if(!Ye.isObject(B))re(c,"cannot merge mappings; the provided source object is unacceptable");_=Object.keys(B);for(O=0,D=_.length;O<D;O+=1)if(I=_[O],!vi.call(s,I))Eh(s,I,B[I]),L[I]=!0}e(xh,"mergeMappings");function Ki(c,s,B,L,_,I,O,D,P){var W,R;if(Array.isArray(_)){_=Array.prototype.slice.call(_);for(W=0,R=_.length;W<R;W+=1){if(Array.isArray(_[W]))re(c,"nested arrays are not supported inside keys");if(typeof _==="object"&&gh(_[W])==="[object Object]")_[W]="[object Object]"}}if(typeof _==="object"&&gh(_)==="[object Object]")_="[object Object]";if(_=String(_),s===null)s={};if(L==="tag:yaml.org,2002:merge")if(Array.isArray(I))for(W=0,R=I.length;W<R;W+=1)xh(c,s,I[W],B);else xh(c,s,I,B);else{if(!c.json&&!vi.call(B,_)&&vi.call(s,_))c.line=O||c.line,c.lineStart=D||c.lineStart,c.position=P||c.position,re(c,"duplicated mapping key");Eh(s,_,I),delete B[_]}return s}e(Ki,"storeMappingPair");function ba(c){var s=c.input.charCodeAt(c.position);if(s===10)c.position++;else if(s===13){if(c.position++,c.input.charCodeAt(c.position)===10)c.position++}else re(c,"a line break is expected");c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}e(ba,"readLineBreak");function qe(c,s,B){var L=0,_=c.input.charCodeAt(c.position);while(_!==0){while(di(_)){if(_===9&&c.firstTabInLine===-1)c.firstTabInLine=c.position;_=c.input.charCodeAt(++c.position)}if(s&&_===35)do _=c.input.charCodeAt(++c.position);while(_!==10&&_!==13&&_!==0);if(Br(_)){ba(c),_=c.input.charCodeAt(c.position),L++,c.lineIndent=0;while(_===32)c.lineIndent++,_=c.input.charCodeAt(++c.position)}else break}if(B!==-1&&L!==0&&c.lineIndent<B)hs(c,"deficient indentation");return L}e(qe,"skipSeparationSpace");function ps(c){var s=c.position,B;if(B=c.input.charCodeAt(s),(B===45||B===46)&&B===c.input.charCodeAt(s+1)&&B===c.input.charCodeAt(s+2)){if(s+=3,B=c.input.charCodeAt(s),B===0||ir(B))return!0}return!1}e(ps,"testDocumentSeparator");function ka(c,s){if(s===1)c.result+=" ";else if(s>1)c.result+=Ye.repeat(`
134
- `,s-1)}e(ka,"writeFoldedLines");function rp(c,s,B){var L,_,I,O,D,P,W,R,{kind:Y,result:G}=c,U;if(U=c.input.charCodeAt(c.position),ir(U)||Zi(U)||U===35||U===38||U===42||U===33||U===124||U===62||U===39||U===34||U===37||U===64||U===96)return!1;if(U===63||U===45){if(_=c.input.charCodeAt(c.position+1),ir(_)||B&&Zi(_))return!1}c.kind="scalar",c.result="",I=O=c.position,D=!1;while(U!==0){if(U===58){if(_=c.input.charCodeAt(c.position+1),ir(_)||B&&Zi(_))break}else if(U===35){if(L=c.input.charCodeAt(c.position-1),ir(L))break}else if(c.position===c.lineStart&&ps(c)||B&&Zi(U))break;else if(Br(U))if(P=c.line,W=c.lineStart,R=c.lineIndent,qe(c,!1,-1),c.lineIndent>=s){D=!0,U=c.input.charCodeAt(c.position);continue}else{c.position=O,c.line=P,c.lineStart=W,c.lineIndent=R;break}if(D)ii(c,I,O,!1),ka(c,c.line-P),I=O=c.position,D=!1;if(!di(U))O=c.position+1;U=c.input.charCodeAt(++c.position)}if(ii(c,I,O,!1),c.result)return!0;return c.kind=Y,c.result=G,!1}e(rp,"readPlainScalar");function ip(c,s){var B,L,_;if(B=c.input.charCodeAt(c.position),B!==39)return!1;c.kind="scalar",c.result="",c.position++,L=_=c.position;while((B=c.input.charCodeAt(c.position))!==0)if(B===39)if(ii(c,L,c.position,!0),B=c.input.charCodeAt(++c.position),B===39)L=c.position,c.position++,_=c.position;else return!0;else if(Br(B))ii(c,L,_,!0),ka(c,qe(c,!1,s)),L=_=c.position;else if(c.position===c.lineStart&&ps(c))re(c,"unexpected end of the document within a single quoted scalar");else c.position++,_=c.position;re(c,"unexpected end of the stream within a single quoted scalar")}e(ip,"readSingleQuotedScalar");function op(c,s){var B,L,_,I,O,D;if(D=c.input.charCodeAt(c.position),D!==34)return!1;c.kind="scalar",c.result="",c.position++,B=L=c.position;while((D=c.input.charCodeAt(c.position))!==0)if(D===34)return ii(c,B,c.position,!0),c.position++,!0;else if(D===92){if(ii(c,B,c.position,!0),D=c.input.charCodeAt(++c.position),Br(D))qe(c,!1,s);else if(D<256&&Jd[D])c.result+=tp[D],c.position++;else if((O=Zd(D))>0){_=O,I=0;for(;_>0;_--)if(D=c.input.charCodeAt(++c.position),(O=Vd(D))>=0)I=(I<<4)+O;else re(c,"expected hexadecimal character");c.result+=Qd(I),c.position++}else re(c,"unknown escape sequence");B=L=c.position}else if(Br(D))ii(c,B,L,!0),ka(c,qe(c,!1,s)),B=L=c.position;else if(c.position===c.lineStart&&ps(c))re(c,"unexpected end of the document within a double quoted scalar");else c.position++,L=c.position;re(c,"unexpected end of the stream within a double quoted scalar")}e(op,"readDoubleQuotedScalar");function sp(c,s){var B=!0,L,_,I,O=c.tag,D,P=c.anchor,W,R,Y,G,U,J=Object.create(null),tt,et,it,at;if(at=c.input.charCodeAt(c.position),at===91)R=93,U=!1,D=[];else if(at===123)R=125,U=!0,D={};else return!1;if(c.anchor!==null)c.anchorMap[c.anchor]=D;at=c.input.charCodeAt(++c.position);while(at!==0){if(qe(c,!0,s),at=c.input.charCodeAt(c.position),at===R)return c.position++,c.tag=O,c.anchor=P,c.kind=U?"mapping":"sequence",c.result=D,!0;else if(!B)re(c,"missed comma between flow collection entries");else if(at===44)re(c,"expected the node content, but found ','");if(et=tt=it=null,Y=G=!1,at===63){if(W=c.input.charCodeAt(c.position+1),ir(W))Y=G=!0,c.position++,qe(c,!0,s)}if(L=c.line,_=c.lineStart,I=c.position,Qi(c,s,ga,!1,!0),et=c.tag,tt=c.result,qe(c,!0,s),at=c.input.charCodeAt(c.position),(G||c.line===L)&&at===58)Y=!0,at=c.input.charCodeAt(++c.position),qe(c,!0,s),Qi(c,s,ga,!1,!0),it=c.result;if(U)Ki(c,D,J,et,tt,it,L,_,I);else if(Y)D.push(Ki(c,null,J,et,tt,it,L,_,I));else D.push(tt);if(qe(c,!0,s),at=c.input.charCodeAt(c.position),at===44)B=!0,at=c.input.charCodeAt(++c.position);else B=!1}re(c,"unexpected end of the stream within a flow collection")}e(sp,"readFlowCollection");function ap(c,s){var B,L,_=ph,I=!1,O=!1,D=s,P=0,W=!1,R,Y;if(Y=c.input.charCodeAt(c.position),Y===124)L=!1;else if(Y===62)L=!0;else return!1;c.kind="scalar",c.result="";while(Y!==0)if(Y=c.input.charCodeAt(++c.position),Y===43||Y===45)if(ph===_)_=Y===43?td:jC;else re(c,"repeat of a chomping mode identifier");else if((R=Kd(Y))>=0)if(R===0)re(c,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!O)D=s+R-1,O=!0;else re(c,"repeat of an indentation width identifier");else break;if(di(Y)){do Y=c.input.charCodeAt(++c.position);while(di(Y));if(Y===35)do Y=c.input.charCodeAt(++c.position);while(!Br(Y)&&Y!==0)}while(Y!==0){ba(c),c.lineIndent=0,Y=c.input.charCodeAt(c.position);while((!O||c.lineIndent<D)&&Y===32)c.lineIndent++,Y=c.input.charCodeAt(++c.position);if(!O&&c.lineIndent>D)D=c.lineIndent;if(Br(Y)){P++;continue}if(c.lineIndent<D){if(_===td)c.result+=Ye.repeat(`
135
- `,I?1+P:P);else if(_===ph){if(I)c.result+=`
136
- `}break}if(L)if(di(Y))W=!0,c.result+=Ye.repeat(`
137
- `,I?1+P:P);else if(W)W=!1,c.result+=Ye.repeat(`
138
- `,P+1);else if(P===0){if(I)c.result+=" "}else c.result+=Ye.repeat(`
139
- `,P);else c.result+=Ye.repeat(`
140
- `,I?1+P:P);I=!0,O=!0,P=0,B=c.position;while(!Br(Y)&&Y!==0)Y=c.input.charCodeAt(++c.position);ii(c,B,c.position,!1)}return!0}e(ap,"readBlockScalar");function yh(c,s){var B,{tag:L,anchor:_}=c,I=[],O,D=!1,P;if(c.firstTabInLine!==-1)return!1;if(c.anchor!==null)c.anchorMap[c.anchor]=I;P=c.input.charCodeAt(c.position);while(P!==0){if(c.firstTabInLine!==-1)c.position=c.firstTabInLine,re(c,"tab characters must not be used in indentation");if(P!==45)break;if(O=c.input.charCodeAt(c.position+1),!ir(O))break;if(D=!0,c.position++,qe(c,!0,-1)){if(c.lineIndent<=s){I.push(null),P=c.input.charCodeAt(c.position);continue}}if(B=c.line,Qi(c,s,Xd,!1,!0),I.push(c.result),qe(c,!0,-1),P=c.input.charCodeAt(c.position),(c.line===B||c.lineIndent>s)&&P!==0)re(c,"bad indentation of a sequence entry");else if(c.lineIndent<s)break}if(D)return c.tag=L,c.anchor=_,c.kind="sequence",c.result=I,!0;return!1}e(yh,"readBlockSequence");function np(c,s,B){var L,_,I,O,D,P,{tag:W,anchor:R}=c,Y={},G=Object.create(null),U=null,J=null,tt=null,et=!1,it=!1,at;if(c.firstTabInLine!==-1)return!1;if(c.anchor!==null)c.anchorMap[c.anchor]=Y;at=c.input.charCodeAt(c.position);while(at!==0){if(!et&&c.firstTabInLine!==-1)c.position=c.firstTabInLine,re(c,"tab characters must not be used in indentation");if(L=c.input.charCodeAt(c.position+1),I=c.line,(at===63||at===58)&&ir(L)){if(at===63){if(et)Ki(c,Y,G,U,J,null,O,D,P),U=J=tt=null;it=!0,et=!0,_=!0}else if(et)et=!1,_=!0;else re(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");c.position+=1,at=L}else{if(O=c.line,D=c.lineStart,P=c.position,!Qi(c,B,jd,!1,!0))break;if(c.line===I){at=c.input.charCodeAt(c.position);while(di(at))at=c.input.charCodeAt(++c.position);if(at===58){if(at=c.input.charCodeAt(++c.position),!ir(at))re(c,"a whitespace character is expected after the key-value separator within a block mapping");if(et)Ki(c,Y,G,U,J,null,O,D,P),U=J=tt=null;it=!0,et=!1,_=!1,U=c.tag,J=c.result}else if(it)re(c,"can not read an implicit mapping pair; a colon is missed");else return c.tag=W,c.anchor=R,!0}else if(it)re(c,"can not read a block mapping entry; a multiline key may not be an implicit key");else return c.tag=W,c.anchor=R,!0}if(c.line===I||c.lineIndent>s){if(et)O=c.line,D=c.lineStart,P=c.position;if(Qi(c,s,ma,!0,_))if(et)J=c.result;else tt=c.result;if(!et)Ki(c,Y,G,U,J,tt,O,D,P),U=J=tt=null;qe(c,!0,-1),at=c.input.charCodeAt(c.position)}if((c.line===I||c.lineIndent>s)&&at!==0)re(c,"bad indentation of a mapping entry");else if(c.lineIndent<s)break}if(et)Ki(c,Y,G,U,J,null,O,D,P);if(it)c.tag=W,c.anchor=R,c.kind="mapping",c.result=Y;return it}e(np,"readBlockMapping");function lp(c){var s,B=!1,L=!1,_,I,O;if(O=c.input.charCodeAt(c.position),O!==33)return!1;if(c.tag!==null)re(c,"duplication of a tag property");if(O=c.input.charCodeAt(++c.position),O===60)B=!0,O=c.input.charCodeAt(++c.position);else if(O===33)L=!0,_="!!",O=c.input.charCodeAt(++c.position);else _="!";if(s=c.position,B){do O=c.input.charCodeAt(++c.position);while(O!==0&&O!==62);if(c.position<c.length)I=c.input.slice(s,c.position),O=c.input.charCodeAt(++c.position);else re(c,"unexpected end of the stream within a verbatim tag")}else{while(O!==0&&!ir(O)){if(O===33)if(!L){if(_=c.input.slice(s-1,c.position+1),!Ud.test(_))re(c,"named tag handle cannot contain such characters");L=!0,s=c.position+1}else re(c,"tag suffix cannot contain exclamation marks");O=c.input.charCodeAt(++c.position)}if(I=c.input.slice(s,c.position),GC.test(I))re(c,"tag suffix cannot contain flow indicator characters")}if(I&&!Gd.test(I))re(c,"tag name cannot contain such characters: "+I);try{I=decodeURIComponent(I)}catch(D){re(c,"tag name is malformed: "+I)}if(B)c.tag=I;else if(vi.call(c.tagMap,_))c.tag=c.tagMap[_]+I;else if(_==="!")c.tag="!"+I;else if(_==="!!")c.tag="tag:yaml.org,2002:"+I;else re(c,'undeclared tag handle "'+_+'"');return!0}e(lp,"readTagProperty");function hp(c){var s,B;if(B=c.input.charCodeAt(c.position),B!==38)return!1;if(c.anchor!==null)re(c,"duplication of an anchor property");B=c.input.charCodeAt(++c.position),s=c.position;while(B!==0&&!ir(B)&&!Zi(B))B=c.input.charCodeAt(++c.position);if(c.position===s)re(c,"name of an anchor node must contain at least one character");return c.anchor=c.input.slice(s,c.position),!0}e(hp,"readAnchorProperty");function cp(c){var s,B,L;if(L=c.input.charCodeAt(c.position),L!==42)return!1;L=c.input.charCodeAt(++c.position),s=c.position;while(L!==0&&!ir(L)&&!Zi(L))L=c.input.charCodeAt(++c.position);if(c.position===s)re(c,"name of an alias node must contain at least one character");if(B=c.input.slice(s,c.position),!vi.call(c.anchorMap,B))re(c,'unidentified alias "'+B+'"');return c.result=c.anchorMap[B],qe(c,!0,-1),!0}e(cp,"readAlias");function Qi(c,s,B,L,_){var I,O,D,P=1,W=!1,R=!1,Y,G,U,J,tt,et;if(c.listener!==null)c.listener("open",c);if(c.tag=null,c.anchor=null,c.kind=null,c.result=null,I=O=D=ma===B||Xd===B,L){if(qe(c,!0,-1)){if(W=!0,c.lineIndent>s)P=1;else if(c.lineIndent===s)P=0;else if(c.lineIndent<s)P=-1}}if(P===1)while(lp(c)||hp(c))if(qe(c,!0,-1)){if(W=!0,D=I,c.lineIndent>s)P=1;else if(c.lineIndent===s)P=0;else if(c.lineIndent<s)P=-1}else D=!1;if(D)D=W||_;if(P===1||ma===B){if(ga===B||jd===B)tt=s;else tt=s+1;if(et=c.position-c.lineStart,P===1)if(D&&(yh(c,et)||np(c,et,tt))||sp(c,tt))R=!0;else{if(O&&ap(c,tt)||ip(c,tt)||op(c,tt))R=!0;else if(cp(c)){if(R=!0,c.tag!==null||c.anchor!==null)re(c,"alias node should not have any properties")}else if(rp(c,tt,ga===B)){if(R=!0,c.tag===null)c.tag="?"}if(c.anchor!==null)c.anchorMap[c.anchor]=c.result}else if(P===0)R=D&&yh(c,et)}if(c.tag===null){if(c.anchor!==null)c.anchorMap[c.anchor]=c.result}else if(c.tag==="?"){if(c.result!==null&&c.kind!=="scalar")re(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"');for(Y=0,G=c.implicitTypes.length;Y<G;Y+=1)if(J=c.implicitTypes[Y],J.resolve(c.result)){if(c.result=J.construct(c.result),c.tag=J.tag,c.anchor!==null)c.anchorMap[c.anchor]=c.result;break}}else if(c.tag!=="!"){if(vi.call(c.typeMap[c.kind||"fallback"],c.tag))J=c.typeMap[c.kind||"fallback"][c.tag];else{J=null,U=c.typeMap.multi[c.kind||"fallback"];for(Y=0,G=U.length;Y<G;Y+=1)if(c.tag.slice(0,U[Y].tag.length)===U[Y].tag){J=U[Y];break}}if(!J)re(c,"unknown tag !<"+c.tag+">");if(c.result!==null&&J.kind!==c.kind)re(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+J.kind+'", not "'+c.kind+'"');if(!J.resolve(c.result,c.tag))re(c,"cannot resolve a node with !<"+c.tag+"> explicit tag");else if(c.result=J.construct(c.result,c.tag),c.anchor!==null)c.anchorMap[c.anchor]=c.result}if(c.listener!==null)c.listener("close",c);return c.tag!==null||c.anchor!==null||R}e(Qi,"composeNode");function up(c){var s=c.position,B,L,_,I=!1,O;c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);while((O=c.input.charCodeAt(c.position))!==0){if(qe(c,!0,-1),O=c.input.charCodeAt(c.position),c.lineIndent>0||O!==37)break;I=!0,O=c.input.charCodeAt(++c.position),B=c.position;while(O!==0&&!ir(O))O=c.input.charCodeAt(++c.position);if(L=c.input.slice(B,c.position),_=[],L.length<1)re(c,"directive name must not be less than one character in length");while(O!==0){while(di(O))O=c.input.charCodeAt(++c.position);if(O===35){do O=c.input.charCodeAt(++c.position);while(O!==0&&!Br(O));break}if(Br(O))break;B=c.position;while(O!==0&&!ir(O))O=c.input.charCodeAt(++c.position);_.push(c.input.slice(B,c.position))}if(O!==0)ba(c);if(vi.call(ed,L))ed[L](c,L,_);else hs(c,'unknown document directive "'+L+'"')}if(qe(c,!0,-1),c.lineIndent===0&&c.input.charCodeAt(c.position)===45&&c.input.charCodeAt(c.position+1)===45&&c.input.charCodeAt(c.position+2)===45)c.position+=3,qe(c,!0,-1);else if(I)re(c,"directives end mark is expected");if(Qi(c,c.lineIndent-1,ma,!1,!0),qe(c,!0,-1),c.checkLineBreaks&&UC.test(c.input.slice(s,c.position)))hs(c,"non-ASCII line breaks are interpreted as content");if(c.documents.push(c.result),c.position===c.lineStart&&ps(c)){if(c.input.charCodeAt(c.position)===46)c.position+=3,qe(c,!0,-1);return}if(c.position<c.length-1)re(c,"end of the stream or a document separator is expected");else return}e(up,"readDocument");function Ih(c,s){if(c=String(c),s=s||{},c.length!==0){if(c.charCodeAt(c.length-1)!==10&&c.charCodeAt(c.length-1)!==13)c+=`
141
- `;if(c.charCodeAt(0)===65279)c=c.slice(1)}var B=new ep(c,s),L=c.indexOf("\x00");if(L!==-1)B.position=L,re(B,"null byte is not allowed in input");B.input+="\x00";while(B.input.charCodeAt(B.position)===32)B.lineIndent+=1,B.position+=1;while(B.position<B.length-1)up(B);return B.documents}e(Ih,"loadDocuments");function dp(c,s,B){if(s!==null&&typeof s==="object"&&typeof B>"u")B=s,s=null;var L=Ih(c,B);if(typeof s!=="function")return L;for(var _=0,I=L.length;_<I;_+=1)s(L[_])}e(dp,"loadAll$1");function pp(c,s){var B=Ih(c,s);if(B.length===0)return;else if(B.length===1)return B[0];throw new ar("expected a single document in the stream, but found more")}e(pp,"load$1");var VC=dp,ZC=pp,fp={loadAll:VC,load:ZC},gp=Object.prototype.toString,mp=Object.prototype.hasOwnProperty,Oh=65279,KC=9,cs=10,QC=13,JC=32,tb=33,eb=34,Ch=35,rb=37,ib=38,ob=39,sb=42,xp=44,ab=45,xa=58,nb=61,lb=62,hb=63,cb=64,yp=91,Cp=93,ub=96,bp=123,db=124,kp=125,tr={};tr[0]="\\0";tr[7]="\\a";tr[8]="\\b";tr[9]="\\t";tr[10]="\\n";tr[11]="\\v";tr[12]="\\f";tr[13]="\\r";tr[27]="\\e";tr[34]="\\\"";tr[92]="\\\\";tr[133]="\\N";tr[160]="\\_";tr[8232]="\\L";tr[8233]="\\P";var pb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],fb=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function wp(c,s){var B,L,_,I,O,D,P;if(s===null)return{};B={},L=Object.keys(s);for(_=0,I=L.length;_<I;_+=1){if(O=L[_],D=String(s[O]),O.slice(0,2)==="!!")O="tag:yaml.org,2002:"+O.slice(2);if(P=c.compiledTypeMap.fallback[O],P&&mp.call(P.styleAliases,D))D=P.styleAliases[D];B[O]=D}return B}e(wp,"compileStyleMap");function Sp(c){var s,B,L;if(s=c.toString(16).toUpperCase(),c<=255)B="x",L=2;else if(c<=65535)B="u",L=4;else if(c<=4294967295)B="U",L=8;else throw new ar("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+B+Ye.repeat("0",L-s.length)+s}e(Sp,"encodeHex");var gb=1,us=2;function Tp(c){this.schema=c.schema||Yd,this.indent=Math.max(1,c.indent||2),this.noArrayIndent=c.noArrayIndent||!1,this.skipInvalid=c.skipInvalid||!1,this.flowLevel=Ye.isNothing(c.flowLevel)?-1:c.flowLevel,this.styleMap=wp(this.schema,c.styles||null),this.sortKeys=c.sortKeys||!1,this.lineWidth=c.lineWidth||80,this.noRefs=c.noRefs||!1,this.noCompatMode=c.noCompatMode||!1,this.condenseFlow=c.condenseFlow||!1,this.quotingType=c.quotingType==='"'?us:gb,this.forceQuotes=c.forceQuotes||!1,this.replacer=typeof c.replacer==="function"?c.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}e(Tp,"State");function bh(c,s){var B=Ye.repeat(" ",s),L=0,_=-1,I="",O,D=c.length;while(L<D){if(_=c.indexOf(`
142
- `,L),_===-1)O=c.slice(L),L=D;else O=c.slice(L,_+1),L=_+1;if(O.length&&O!==`
143
- `)I+=B;I+=O}return I}e(bh,"indentString");function ya(c,s){return`
144
- `+Ye.repeat(" ",c.indent*s)}e(ya,"generateNextLine");function Bp(c,s){var B,L,_;for(B=0,L=c.implicitTypes.length;B<L;B+=1)if(_=c.implicitTypes[B],_.resolve(s))return!0;return!1}e(Bp,"testImplicitResolving");function ds(c){return c===JC||c===KC}e(ds,"isWhitespace");function wo(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==Oh||65536<=c&&c<=1114111}e(wo,"isPrintable");function kh(c){return wo(c)&&c!==Oh&&c!==QC&&c!==cs}e(kh,"isNsCharOrWhitespace");function wh(c,s,B){var L=kh(c),_=L&&!ds(c);return(B?L:L&&c!==xp&&c!==yp&&c!==Cp&&c!==bp&&c!==kp)&&c!==Ch&&!(s===xa&&!_)||kh(s)&&!ds(s)&&c===Ch||s===xa&&_}e(wh,"isPlainSafe");function _p(c){return wo(c)&&c!==Oh&&!ds(c)&&c!==ab&&c!==hb&&c!==xa&&c!==xp&&c!==yp&&c!==Cp&&c!==bp&&c!==kp&&c!==Ch&&c!==ib&&c!==sb&&c!==tb&&c!==db&&c!==nb&&c!==lb&&c!==ob&&c!==eb&&c!==rb&&c!==cb&&c!==ub}e(_p,"isPlainSafeFirst");function vp(c){return!ds(c)&&c!==xa}e(vp,"isPlainSafeLast");function bo(c,s){var B=c.charCodeAt(s),L;if(B>=55296&&B<=56319&&s+1<c.length){if(L=c.charCodeAt(s+1),L>=56320&&L<=57343)return(B-55296)*1024+L-56320+65536}return B}e(bo,"codePointAt");function Dh(c){var s=/^\n* /;return s.test(c)}e(Dh,"needIndentIndicator");var Lp=1,Sh=2,Fp=3,Mp=4,Co=5;function Ap(c,s,B,L,_,I,O,D){var P,W=0,R=null,Y=!1,G=!1,U=L!==-1,J=-1,tt=_p(bo(c,0))&&vp(bo(c,c.length-1));if(s||O)for(P=0;P<c.length;W>=65536?P+=2:P++){if(W=bo(c,P),!wo(W))return Co;tt=tt&&wh(W,R,D),R=W}else{for(P=0;P<c.length;W>=65536?P+=2:P++){if(W=bo(c,P),W===cs){if(Y=!0,U)G=G||P-J-1>L&&c[J+1]!==" ",J=P}else if(!wo(W))return Co;tt=tt&&wh(W,R,D),R=W}G=G||U&&(P-J-1>L&&c[J+1]!==" ")}if(!Y&&!G){if(tt&&!O&&!_(c))return Lp;return I===us?Co:Sh}if(B>9&&Dh(c))return Co;if(!O)return G?Mp:Fp;return I===us?Co:Sh}e(Ap,"chooseScalarStyle");function Ep(c,s,B,L,_){c.dump=function(){if(s.length===0)return c.quotingType===us?'""':"''";if(!c.noCompatMode){if(pb.indexOf(s)!==-1||fb.test(s))return c.quotingType===us?'"'+s+'"':"'"+s+"'"}var I=c.indent*Math.max(1,B),O=c.lineWidth===-1?-1:Math.max(Math.min(c.lineWidth,40),c.lineWidth-I),D=L||c.flowLevel>-1&&B>=c.flowLevel;function P(W){return Bp(c,W)}switch(e(P,"testAmbiguity"),Ap(s,D,c.indent,O,P,c.quotingType,c.forceQuotes&&!L,_)){case Lp:return s;case Sh:return"'"+s.replace(/'/g,"''")+"'";case Fp:return"|"+Th(s,c.indent)+Bh(bh(s,I));case Mp:return">"+Th(s,c.indent)+Bh(bh($p(s,O),I));case Co:return'"'+Ip(s)+'"';default:throw new ar("impossible error: invalid scalar style")}}()}e(Ep,"writeScalar");function Th(c,s){var B=Dh(c)?String(s):"",L=c[c.length-1]===`
145
- `,_=L&&(c[c.length-2]===`
146
- `||c===`
147
- `),I=_?"+":L?"":"-";return B+I+`
148
- `}e(Th,"blockHeader");function Bh(c){return c[c.length-1]===`
149
- `?c.slice(0,-1):c}e(Bh,"dropEndingNewline");function $p(c,s){var B=/(\n+)([^\n]*)/g,L=function(){var W=c.indexOf(`
150
- `);return W=W!==-1?W:c.length,B.lastIndex=W,_h(c.slice(0,W),s)}(),_=c[0]===`
151
- `||c[0]===" ",I,O;while(O=B.exec(c)){var D=O[1],P=O[2];I=P[0]===" ",L+=D+(!_&&!I&&P!==""?`
152
- `:"")+_h(P,s),_=I}return L}e($p,"foldString");function _h(c,s){if(c===""||c[0]===" ")return c;var B=/ [^ ]/g,L,_=0,I,O=0,D=0,P="";while(L=B.exec(c)){if(D=L.index,D-_>s)I=O>_?O:D,P+=`
153
- `+c.slice(_,I),_=I+1;O=D}if(P+=`
154
- `,c.length-_>s&&O>_)P+=c.slice(_,O)+`
155
- `+c.slice(O+1);else P+=c.slice(_);return P.slice(1)}e(_h,"foldLine");function Ip(c){var s="",B=0,L;for(var _=0;_<c.length;B>=65536?_+=2:_++)if(B=bo(c,_),L=tr[B],!L&&wo(B)){if(s+=c[_],B>=65536)s+=c[_+1]}else s+=L||Sp(B);return s}e(Ip,"escapeString");function Op(c,s,B){var L="",_=c.tag,I,O,D;for(I=0,O=B.length;I<O;I+=1){if(D=B[I],c.replacer)D=c.replacer.call(B,String(I),D);if(Or(c,s,D,!1,!1)||typeof D>"u"&&Or(c,s,null,!1,!1)){if(L!=="")L+=","+(!c.condenseFlow?" ":"");L+=c.dump}}c.tag=_,c.dump="["+L+"]"}e(Op,"writeFlowSequence");function vh(c,s,B,L){var _="",I=c.tag,O,D,P;for(O=0,D=B.length;O<D;O+=1){if(P=B[O],c.replacer)P=c.replacer.call(B,String(O),P);if(Or(c,s+1,P,!0,!0,!1,!0)||typeof P>"u"&&Or(c,s+1,null,!0,!0,!1,!0)){if(!L||_!=="")_+=ya(c,s);if(c.dump&&cs===c.dump.charCodeAt(0))_+="-";else _+="- ";_+=c.dump}}c.tag=I,c.dump=_||"[]"}e(vh,"writeBlockSequence");function Dp(c,s,B){var L="",_=c.tag,I=Object.keys(B),O,D,P,W,R;for(O=0,D=I.length;O<D;O+=1){if(R="",L!=="")R+=", ";if(c.condenseFlow)R+='"';if(P=I[O],W=B[P],c.replacer)W=c.replacer.call(B,P,W);if(!Or(c,s,P,!1,!1))continue;if(c.dump.length>1024)R+="? ";if(R+=c.dump+(c.condenseFlow?'"':"")+":"+(c.condenseFlow?"":" "),!Or(c,s,W,!1,!1))continue;R+=c.dump,L+=R}c.tag=_,c.dump="{"+L+"}"}e(Dp,"writeFlowMapping");function Pp(c,s,B,L){var _="",I=c.tag,O=Object.keys(B),D,P,W,R,Y,G;if(c.sortKeys===!0)O.sort();else if(typeof c.sortKeys==="function")O.sort(c.sortKeys);else if(c.sortKeys)throw new ar("sortKeys must be a boolean or a function");for(D=0,P=O.length;D<P;D+=1){if(G="",!L||_!=="")G+=ya(c,s);if(W=O[D],R=B[W],c.replacer)R=c.replacer.call(B,W,R);if(!Or(c,s+1,W,!0,!0,!0))continue;if(Y=c.tag!==null&&c.tag!=="?"||c.dump&&c.dump.length>1024,Y)if(c.dump&&cs===c.dump.charCodeAt(0))G+="?";else G+="? ";if(G+=c.dump,Y)G+=ya(c,s);if(!Or(c,s+1,R,!0,Y))continue;if(c.dump&&cs===c.dump.charCodeAt(0))G+=":";else G+=": ";G+=c.dump,_+=G}c.tag=I,c.dump=_||"{}"}e(Pp,"writeBlockMapping");function Lh(c,s,B){var L,_,I,O,D,P;_=B?c.explicitTypes:c.implicitTypes;for(I=0,O=_.length;I<O;I+=1)if(D=_[I],(D.instanceOf||D.predicate)&&(!D.instanceOf||typeof s==="object"&&s instanceof D.instanceOf)&&(!D.predicate||D.predicate(s))){if(B)if(D.multi&&D.representName)c.tag=D.representName(s);else c.tag=D.tag;else c.tag="?";if(D.represent){if(P=c.styleMap[D.tag]||D.defaultStyle,gp.call(D.represent)==="[object Function]")L=D.represent(s,P);else if(mp.call(D.represent,P))L=D.represent[P](s,P);else throw new ar("!<"+D.tag+'> tag resolver accepts not "'+P+'" style');c.dump=L}return!0}return!1}e(Lh,"detectType");function Or(c,s,B,L,_,I,O){if(c.tag=null,c.dump=B,!Lh(c,B,!1))Lh(c,B,!0);var D=gp.call(c.dump),P=L,W;if(L)L=c.flowLevel<0||c.flowLevel>s;var R=D==="[object Object]"||D==="[object Array]",Y,G;if(R)Y=c.duplicates.indexOf(B),G=Y!==-1;if(c.tag!==null&&c.tag!=="?"||G||c.indent!==2&&s>0)_=!1;if(G&&c.usedDuplicates[Y])c.dump="*ref_"+Y;else{if(R&&G&&!c.usedDuplicates[Y])c.usedDuplicates[Y]=!0;if(D==="[object Object]"){if(L&&Object.keys(c.dump).length!==0){if(Pp(c,s,c.dump,_),G)c.dump="&ref_"+Y+c.dump}else if(Dp(c,s,c.dump),G)c.dump="&ref_"+Y+" "+c.dump}else if(D==="[object Array]"){if(L&&c.dump.length!==0){if(c.noArrayIndent&&!O&&s>0)vh(c,s-1,c.dump,_);else vh(c,s,c.dump,_);if(G)c.dump="&ref_"+Y+c.dump}else if(Op(c,s,c.dump),G)c.dump="&ref_"+Y+" "+c.dump}else if(D==="[object String]"){if(c.tag!=="?")Ep(c,c.dump,s,I,P)}else if(D==="[object Undefined]")return!1;else{if(c.skipInvalid)return!1;throw new ar("unacceptable kind of an object to dump "+D)}if(c.tag!==null&&c.tag!=="?"){if(W=encodeURI(c.tag[0]==="!"?c.tag.slice(1):c.tag).replace(/!/g,"%21"),c.tag[0]==="!")W="!"+W;else if(W.slice(0,18)==="tag:yaml.org,2002:")W="!!"+W.slice(18);else W="!<"+W+">";c.dump=W+" "+c.dump}}return!0}e(Or,"writeNode");function Rp(c,s){var B=[],L=[],_,I;Ca(c,B,L);for(_=0,I=L.length;_<I;_+=1)s.duplicates.push(B[L[_]]);s.usedDuplicates=Array(I)}e(Rp,"getDuplicateReferences");function Ca(c,s,B){var L,_,I;if(c!==null&&typeof c==="object")if(_=s.indexOf(c),_!==-1){if(B.indexOf(_)===-1)B.push(_)}else if(s.push(c),Array.isArray(c))for(_=0,I=c.length;_<I;_+=1)Ca(c[_],s,B);else{L=Object.keys(c);for(_=0,I=L.length;_<I;_+=1)Ca(c[L[_]],s,B)}}e(Ca,"inspectNode");function qp(c,s){s=s||{};var B=new Tp(s);if(!B.noRefs)Rp(c,B);var L=c;if(B.replacer)L=B.replacer.call({"":L},"",L);if(Or(B,0,L,!0,!0))return B.dump+`
156
- `;return""}e(qp,"dump$1");var mb=qp,xb={dump:mb};function wa(c,s){return function(){throw Error("Function yaml."+c+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e(wa,"renamed");var Ze=vd,{load:Je,loadAll:D5}=fp,P5=xb.dump,R5=wa("safeLoad","load"),q5=wa("safeLoadAll","loadAll"),z5=wa("safeDump","dump");/*! Bundled license information:
157
-
158
- js-yaml/dist/js-yaml.mjs:
159
- (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
160
- */var zp=e((c)=>{let{handDrawnSeed:s}=r();return{fill:c,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:0.7,stroke:c,seed:s}},"solidStateFill"),Ji=e((c)=>{let s=yb([...c.cssCompiledStyles||[],...c.cssStyles||[],...c.labelStyle||[]]);return{stylesMap:s,stylesArray:[...s]}},"compileStyles"),yb=e((c)=>{let s=new Map;return c.forEach((B)=>{let[L,_]=B.split(":");s.set(L.trim(),_?.trim())}),s},"styles2Map"),Yr=e((c)=>c==="color"||c==="font-size"||c==="font-family"||c==="font-weight"||c==="font-style"||c==="text-decoration"||c==="text-align"||c==="text-transform"||c==="line-height"||c==="letter-spacing"||c==="word-spacing"||c==="text-shadow"||c==="text-overflow"||c==="white-space"||c==="word-wrap"||c==="word-break"||c==="overflow-wrap"||c==="hyphens","isLabelStyle"),y=e((c)=>{let{stylesArray:s}=Ji(c),B=[],L=[],_=[],I=[];return s.forEach((O)=>{let D=O[0];if(Yr(D))B.push(O.join(":")+" !important");else{if(L.push(O.join(":")+" !important"),D.includes("stroke"))_.push(O.join(":")+" !important");if(D==="fill")I.push(O.join(":")+" !important")}}),{labelStyles:B.join(";"),nodeStyles:L.join(";"),stylesArray:s,borderStyles:_,backgroundStyles:I}},"styles2String"),ee=e((c,s)=>{let{themeVariables:B,handDrawnSeed:L}=r(),{nodeBorder:_,mainBkg:I}=B,{stylesMap:O}=Ji(c);return Object.assign({roughness:0.7,fill:O.get("fill")||I,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:O.get("stroke")||_,seed:L,strokeWidth:O.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Cb(O.get("stroke-dasharray"))},s)},"userNodeOverrides"),Cb=e((c)=>{if(!c)return[0,0];let s=c.trim().split(/\s+/).map(Number);if(s.length===1){let _=isNaN(s[0])?0:s[0];return[_,_]}let B=isNaN(s[0])?0:s[0],L=isNaN(s[1])?0:s[1];return[B,L]},"getStrokeDashArray");var rf=K(pt(),1);function to(c,s){if(typeof c!=="function"||s!=null&&typeof s!=="function")throw TypeError("Expected a function");let B=function(..._){let I=s?s.apply(this,_):_[0],O=B.cache;if(O.has(I))return O.get(I);let D=c.apply(this,_);return B.cache=O.set(I,D)||O,D},L=to.Cache||Map;return B.cache=new L,B}to.Cache=Map;function Pt(c){return c==null||typeof c!=="object"&&typeof c!=="function"}function mt(c){if(c==null)return c===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(c)}var jr="[object RegExp]",Ot="[object String]",Vt="[object Number]",Yt="[object Boolean]",jt="[object Arguments]",Xr="[object Symbol]",Kr="[object Date]",Zr="[object Map]",Jr="[object Set]",Bn="[object Array]";var Qr="[object ArrayBuffer]",Tr="[object Object]";var en="[object DataView]",Fn="[object Uint8Array]",zn="[object Uint8ClampedArray]",Gn="[object Uint16Array]",Hn="[object Uint32Array]";var Wn="[object Int8Array]",Un="[object Int16Array]",qn="[object Int32Array]";var Vn="[object Float32Array]",Yn="[object Float64Array]";function So(c){return ArrayBuffer.isView(c)&&!(c instanceof DataView)}function gt(c){return So(c)}function Sa(c){return Object.getOwnPropertySymbols(c).filter((s)=>Object.prototype.propertyIsEnumerable.call(c,s))}function Xp(c,s){return To(c,void 0,c,new Map,s)}function To(c,s,B,L=new Map,_=void 0){let I=_?.(c,s,B,L);if(I!==void 0)return I;if(Pt(c))return c;if(L.has(c))return L.get(c);if(Array.isArray(c)){let O=Array(c.length);L.set(c,O);for(let D=0;D<c.length;D++)O[D]=To(c[D],D,B,L,_);if(Object.hasOwn(c,"index"))O.index=c.index;if(Object.hasOwn(c,"input"))O.input=c.input;return O}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){let O=new RegExp(c.source,c.flags);return O.lastIndex=c.lastIndex,O}if(c instanceof Map){let O=new Map;L.set(c,O);for(let[D,P]of c)O.set(D,To(P,D,B,L,_));return O}if(c instanceof Set){let O=new Set;L.set(c,O);for(let D of c)O.add(To(D,void 0,B,L,_));return O}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(So(c)){let O=new(Object.getPrototypeOf(c)).constructor(c.length);L.set(c,O);for(let D=0;D<c.length;D++)O[D]=To(c[D],D,B,L,_);return O}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){let O=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return L.set(c,O),Cr(O,c,B,L,_),O}if(typeof File<"u"&&c instanceof File){let O=new File([c],c.name,{type:c.type});return L.set(c,O),Cr(O,c,B,L,_),O}if(typeof Blob<"u"&&c instanceof Blob){let O=new Blob([c],{type:c.type});return L.set(c,O),Cr(O,c,B,L,_),O}if(c instanceof Error){let O=structuredClone(c);return L.set(c,O),O.message=c.message,O.name=c.name,O.stack=c.stack,O.cause=c.cause,O.constructor=c.constructor,Cr(O,c,B,L,_),O}if(c instanceof Boolean){let O=new Boolean(c.valueOf());return L.set(c,O),Cr(O,c,B,L,_),O}if(c instanceof Number){let O=new Number(c.valueOf());return L.set(c,O),Cr(O,c,B,L,_),O}if(c instanceof String){let O=new String(c.valueOf());return L.set(c,O),Cr(O,c,B,L,_),O}if(typeof c==="object"&&Eb(c)){let O=Object.create(Object.getPrototypeOf(c));return L.set(c,O),Cr(O,c,B,L,_),O}return c}function Cr(c,s,B=c,L,_){let I=[...Object.keys(s),...Sa(s)];for(let O=0;O<I.length;O++){let D=I[O],P=Object.getOwnPropertyDescriptor(c,D);if(P==null||P.writable)c[D]=To(s[D],D,B,L,_)}}function Eb(c){switch(mt(c)){case jt:case Bn:case Qr:case en:case Yt:case Kr:case Vn:case Yn:case Wn:case Un:case qn:case Zr:case Vt:case Tr:case jr:case Jr:case Ot:case Xr:case Fn:case zn:case Gn:case Hn:return!0;default:return!1}}function Up(c,s){return Xp(c,(B,L,_,I)=>{let O=s?.(B,L,_,I);if(O!==void 0)return O;if(typeof c!=="object")return;if(mt(c)===Tr&&typeof c.constructor!=="function"){let D={};return I.set(c,D),Cr(D,c,_,I),D}switch(Object.prototype.toString.call(c)){case Vt:case Ot:case Yt:{let D=new c.constructor(c?.valueOf());return Cr(D,c),D}case jt:{let D={};return Cr(D,c),D.length=c.length,D[Symbol.iterator]=c[Symbol.iterator],D}default:return}})}function Ph(c){return Up(c)}function Gp(c){return c==="__proto__"}function Vp(c){if(Pt(c))return c;if(Array.isArray(c)||So(c)||c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);let s=Object.getPrototypeOf(c);if(s==null)return Object.assign(Object.create(s),c);let B=s.constructor;if(c instanceof Date||c instanceof Map||c instanceof Set)return new B(c);if(c instanceof RegExp){let L=new B(c);return L.lastIndex=c.lastIndex,L}if(c instanceof DataView)return new B(c.buffer.slice(0));if(c instanceof Error){let L;if(c instanceof AggregateError)L=new B(c.errors,c.message,{cause:c.cause});else L=new B(c.message,{cause:c.cause});return L.stack=c.stack,Object.assign(L,c),L}if(typeof File<"u"&&c instanceof File)return new B([c],c.name,{type:c.type,lastModified:c.lastModified});if(typeof c==="object"){let L=Object.create(s);return Object.assign(L,c)}return c}function tn(c){return c!==null&&typeof c==="object"&&mt(c)==="[object Arguments]"}function Zp(c){return Number.isSafeInteger(c)&&c>=0}function jn(c){return c!=null&&typeof c!=="function"&&Zp(c.length)}function fs(c){return typeof c==="object"&&c!==null}function Kp(c){return fs(c)&&jn(c)}function Ta(c){if(typeof c!=="object")return!1;if(c==null)return!1;if(Object.getPrototypeOf(c)===null)return!0;if(Object.prototype.toString.call(c)!=="[object Object]"){let B=c[Symbol.toStringTag];if(B==null)return!1;if(!Object.getOwnPropertyDescriptor(c,Symbol.toStringTag)?.writable)return!1;return c.toString()===`[object ${B}]`}let s=c;while(Object.getPrototypeOf(s)!==null)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(c)===s}function Qp(c,...s){let B=s.slice(0,-1),L=s[s.length-1],_=c;for(let I=0;I<B.length;I++){let O=B[I];_=Ba(_,O,L,new Map)}return _}function Ba(c,s,B,L){if(Pt(c))c=Object(c);if(s==null||typeof s!=="object")return c;if(L.has(s))return Vp(L.get(s));if(L.set(s,c),Array.isArray(s)){s=s.slice();for(let I=0;I<s.length;I++)s[I]=s[I]??void 0}let _=[...Object.keys(s),...Sa(s)];for(let I=0;I<_.length;I++){let O=_[I];if(Gp(O))continue;let D=s[O],P=c[O];if(tn(D))D={...D};if(tn(P))P={...P};if(typeof Buffer<"u"&&Buffer.isBuffer(D))D=Ph(D);if(Array.isArray(D))if(Array.isArray(P)){let R=[],Y=Reflect.ownKeys(P);for(let G=0;G<Y.length;G++){let U=Y[G];R[U]=P[U]}P=R}else if(Kp(P)){let R=[];for(let Y=0;Y<P.length;Y++)R[Y]=P[Y];P=R}else P=[];let W=B(P,D,O,c,s,L);if(W!==void 0)c[O]=W;else if(Array.isArray(D))c[O]=Ba(P,D,B,L);else if(fs(P)&&fs(D)&&(Ta(P)||Ta(D)||gt(P)||gt(D)))c[O]=Ba(P,D,B,L);else if(P==null&&Ta(D))c[O]=Ba({},D,B,L);else if(P==null&&gt(D))c[O]=Ph(D);else if(P===void 0||D!==void 0)c[O]=D}return c}function Jp(){}function Rh(c,...s){return Qp(c,...s,Jp)}var Ti="​",$b={curveBasis:Be,curveBasisClosed:oa,curveBasisOpen:sa,curveBumpX:Jo,curveBumpY:ts,curveBundle:sh,curveCardinalClosed:ah,curveCardinalOpen:nh,curveCardinal:rs,curveCatmullRomClosed:lh,curveCatmullRomOpen:hh,curveCatmullRom:os,curveLinear:Ir,curveLinearClosed:ha,curveMonotoneX:ss,curveMonotoneY:as,curveNatural:xo,curveStep:yo,curveStepAfter:ls,curveStepBefore:ns},Ib=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ob=e(function(c,s){let B=of(c,/(?:init\b)|(?:initialize\b)/),L={};if(Array.isArray(B)){let O=B.map((D)=>D.args);Io(O),L=F(L,[...O])}else L=B.args;if(!L)return;let _=Hr(c,s),I="config";if(L[I]!==void 0){if(_==="flowchart-v2")_="flowchart";L[_]=L[I],delete L[I]}return L},"detectInit"),of=e(function(c,s=null){try{let B=new RegExp(`[%]{2}(?![{]${Ib.source})(?=[}][%]{2}).*
161
- `,"ig");c=c.trim().replace(B,"").replace(/'/gm,'"'),t.debug(`Detecting diagram directive${s!==null?" type:"+s:""} based on the text:${c}`);let L,_=[];while((L=ao.exec(c))!==null){if(L.index===ao.lastIndex)ao.lastIndex++;if(L&&!s||s&&L[1]?.match(s)||s&&L[2]?.match(s)){let I=L[1]?L[1]:L[2],O=L[3]?L[3].trim():L[4]?JSON.parse(L[4].trim()):null;_.push({type:I,args:O})}}if(_.length===0)return{type:c,args:null};return _.length===1?_[0]:_}catch(B){return t.error(`ERROR: ${B.message} - Unable to parse directive type: '${s}' based on the text: '${c}'`),{type:void 0,args:null}}},"detectDirective"),Hi=e(function(c){return c.replace(ao,"")},"removeDirectives"),Db=e(function(c,s){for(let[B,L]of s.entries())if(L.match(c))return B;return-1},"isSubstringInArray");function va(c,s){if(!c)return s;let B=`curve${c.charAt(0).toUpperCase()+c.slice(1)}`;return $b[B]??s}e(va,"interpolateToCurve");function sf(c,s){let B=c.trim();if(!B)return;if(s.securityLevel!=="loose")return rf.sanitizeUrl(B);return B}e(sf,"formatUrl");var Pb=e((c,...s)=>{let B=c.split("."),L=B.length-1,_=B[L],I=window;for(let O=0;O<L;O++)if(I=I[B[O]],!I){t.error(`Function name: ${c} not found in window`);return}I[_](...s)},"runFunc");function qh(c,s){if(!c||!s)return 0;return Math.sqrt(Math.pow(s.x-c.x,2)+Math.pow(s.y-c.y,2))}e(qh,"distance");function af(c){let s,B=0;c.forEach((_)=>{B+=qh(_,s),s=_});let L=B/2;return zh(c,L)}e(af,"traverseEdge");function nf(c){if(c.length===1)return c[0];return af(c)}e(nf,"calcLabelPosition");var tf=e((c,s=2)=>{let B=Math.pow(10,s);return Math.round(c*B)/B},"roundNumber"),zh=e((c,s)=>{let B=void 0,L=s;for(let _ of c){if(B){let I=qh(_,B);if(I===0)return B;if(I<L)L-=I;else{let O=L/I;if(O<=0)return B;if(O>=1)return{x:_.x,y:_.y};if(O>0&&O<1)return{x:tf((1-O)*B.x+O*_.x,5),y:tf((1-O)*B.y+O*_.y,5)}}}B=_}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Rb=e((c,s,B)=>{if(t.info(`our points ${JSON.stringify(s)}`),s[0]!==B)s=s.reverse();let _=zh(s,25),I=c?10:5,O=Math.atan2(s[0].y-_.y,s[0].x-_.x),D={x:0,y:0};return D.x=Math.sin(O)*I+(s[0].x+_.x)/2,D.y=-Math.cos(O)*I+(s[0].y+_.y)/2,D},"calcCardinalityPosition");function lf(c,s,B){let L=structuredClone(B);if(t.info("our points",L),s!=="start_left"&&s!=="start_right")L.reverse();let _=25+c,I=zh(L,_),O=10+c*0.5,D=Math.atan2(L[0].y-I.y,L[0].x-I.x),P={x:0,y:0};if(s==="start_left")P.x=Math.sin(D+Math.PI)*O+(L[0].x+I.x)/2,P.y=-Math.cos(D+Math.PI)*O+(L[0].y+I.y)/2;else if(s==="end_right")P.x=Math.sin(D-Math.PI)*O+(L[0].x+I.x)/2-5,P.y=-Math.cos(D-Math.PI)*O+(L[0].y+I.y)/2-5;else if(s==="end_left")P.x=Math.sin(D)*O+(L[0].x+I.x)/2-5,P.y=-Math.cos(D)*O+(L[0].y+I.y)/2-5;else P.x=Math.sin(D)*O+(L[0].x+I.x)/2,P.y=-Math.cos(D)*O+(L[0].y+I.y)/2;return P}e(lf,"calcTerminalLabelPosition");function Xn(c){let s="",B="";for(let L of c)if(L!==void 0)if(L.startsWith("color:")||L.startsWith("text-align:"))B=B+L+";";else s=s+L+";";return{style:s,labelStyle:B}}e(Xn,"getStylesFromArray");var ef=0,ki=e(()=>(ef++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ef),"generateId");function hf(c){let s="",B="0123456789abcdef",L=B.length;for(let _=0;_<c;_++)s+=B.charAt(Math.floor(Math.random()*L));return s}e(hf,"makeRandomHex");var Ci=e((c)=>hf(c.length),"random"),qb=e(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"),zb=e(function(c,s){let B=s.text.replace(l.lineBreakRegex," "),[,L]=he(s.fontSize),_=c.append("text");if(_.attr("x",s.x),_.attr("y",s.y),_.style("text-anchor",s.anchor),_.style("font-family",s.fontFamily),_.style("font-size",L),_.style("font-weight",s.fontWeight),_.attr("fill",s.fill),s.class!==void 0)_.attr("class",s.class);let I=_.append("tspan");return I.attr("x",s.x+s.textMargin*2),I.attr("fill",s.fill),I.text(B),_},"drawSimpleText"),$t=to((c,s,B)=>{if(!c)return c;if(B=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},B),l.lineBreakRegex.test(c))return c;let L=c.split(" ").filter(Boolean),_=[],I="";return L.forEach((O,D)=>{let P=de(`${O} `,B),W=de(I,B);if(P>s){let{hyphenatedStrings:G,remainingWord:U}=Wb(O,s,"-",B);_.push(I,...G),I=U}else if(W+P>=s)_.push(I),I=O;else I=[I,O].filter(Boolean).join(" ");if(D+1===L.length)_.push(I)}),_.filter((O)=>O!=="").join(B.joinWith)},(c,s,B)=>`${c}${s}${B.fontSize}${B.fontWeight}${B.fontFamily}${B.joinWith}`),Wb=to((c,s,B="-",L)=>{L=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},L);let _=[...c],I=[],O="";return _.forEach((D,P)=>{let W=`${O}${D}`;if(de(W,L)>=s){let Y=P+1,G=_.length===Y,U=`${W}${B}`;I.push(G?W:U),O=""}else O=W}),{hyphenatedStrings:I,remainingWord:O}},(c,s,B="-",L)=>`${c}${s}${B}${L.fontSize}${L.fontWeight}${L.fontFamily}`);function rn(c,s){return nn(c,s).height}e(rn,"calculateTextHeight");function de(c,s){return nn(c,s).width}e(de,"calculateTextWidth");var nn=to((c,s)=>{let{fontSize:B=12,fontFamily:L="Arial",fontWeight:_=400}=s;if(!c)return{width:0,height:0};let[,I]=he(B),O=["sans-serif",L],D=c.split(l.lineBreakRegex),P=[],W=n("body");if(!W.remove)return{width:0,height:0,lineHeight:0};let R=W.append("svg");for(let G of O){let U=0,J={width:0,height:0,lineHeight:0};for(let tt of D){let et=qb();et.text=tt||Ti;let it=zb(R,et).style("font-size",I).style("font-weight",_).style("font-family",G),at=(it._groups||it)[0][0].getBBox();if(at.width===0&&at.height===0)throw Error("svg element not in render tree");J.width=Math.round(Math.max(J.width,at.width)),U=Math.round(at.height),J.height+=U,J.lineHeight=Math.round(Math.max(J.lineHeight,U))}P.push(J)}R.remove();let Y=isNaN(P[1].height)||isNaN(P[1].width)||isNaN(P[1].lineHeight)||P[0].height>P[1].height&&P[0].width>P[1].width&&P[0].lineHeight>P[1].lineHeight?0:1;return P[Y]},(c,s)=>`${c}${s.fontSize}${s.fontWeight}${s.fontFamily}`),Nb=class{constructor(c=!1,s){this.count=0,this.count=s?s.length:0,this.next=c?()=>this.count++:()=>Date.now()}static{e(this,"InitIDGenerator")}},_a,Hb=e(function(c){return _a=_a||document.createElement("div"),c=escape(c).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),_a.innerHTML=c,unescape(_a.textContent)},"entityDecode");function Kn(c){return"str"in c}e(Kn,"isDetailedError");var Yb=e((c,s,B,L)=>{if(!L)return;let _=c.node()?.getBBox();if(!_)return;c.append("text").text(L).attr("text-anchor","middle").attr("x",_.x+_.width/2).attr("y",-B).attr("class",s)},"insertTitle"),he=e((c)=>{if(typeof c==="number")return[c,c+"px"];let s=parseInt(c??"",10);if(Number.isNaN(s))return[void 0,void 0];else if(c===String(s))return[s,c+"px"];else return[s,c]},"parseFontSize");function E(c,s){return Rh({},c,s)}e(E,"cleanAndMerge");var h={assignWithDepth:F,wrapLabel:$t,calculateTextHeight:rn,calculateTextWidth:de,calculateTextDimensions:nn,cleanAndMerge:E,detectInit:Ob,detectDirective:of,isSubstringInArray:Db,interpolateToCurve:va,calcLabelPosition:nf,calcCardinalityPosition:Rb,calcTerminalLabelPosition:lf,formatUrl:sf,getStylesFromArray:Xn,generateId:ki,random:Ci,runFunc:Pb,entityDecode:Hb,insertTitle:Yb,isLabelCoordinateInPath:cf,parseFontSize:he,InitIDGenerator:Nb},Wi=e(function(c){let s=c;return s=s.replace(/style.*:\S*#.*;/g,function(B){return B.substring(0,B.length-1)}),s=s.replace(/classDef.*:\S*#.*;/g,function(B){return B.substring(0,B.length-1)}),s=s.replace(/#\w+;/g,function(B){let L=B.substring(1,B.length-1);if(/^\+?\d+$/.test(L))return"fl°°"+L+"¶ß";else return"fl°"+L+"¶ß"}),s},"encodeEntities"),Te=e(function(c){return c.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Me=e((c,s,{counter:B=0,prefix:L,suffix:_},I)=>{if(I)return I;return`${L?`${L}_`:""}${c}_${s}_${B}${_?`_${_}`:""}`},"getEdgeId");function ze(c){return c??null}e(ze,"handleUndefinedAttr");function cf(c,s){let B=Math.round(c.x),L=Math.round(c.y),_=s.replace(/(\d+\.\d+)/g,(I)=>Math.round(parseFloat(I)).toString());return _.includes(B.toString())||_.includes(L.toString())}e(cf,"isLabelCoordinateInPath");var Ne=e(({flowchart:c})=>{let s=c?.subGraphTitleMargin?.top??0,B=c?.subGraphTitleMargin?.bottom??0,L=s+B;return{subGraphTitleTopMargin:s,subGraphTitleBottomMargin:B,subGraphTitleTotalMargin:L}},"getSubGraphTitleMargins");async function an(c,s){let B=c.getElementsByTagName("img");if(!B||B.length===0)return;let L=s.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...B].map((_)=>new Promise((I)=>{function O(){if(_.style.display="flex",_.style.flexDirection="column",L){let D=r().fontSize?r().fontSize:window.getComputedStyle(document.body).fontSize,P=5,[W=x.fontSize]=he(D),R=W*5+"px";_.style.minWidth=R,_.style.maxWidth=R}else _.style.width="100%";I(_)}e(O,"setupImage"),setTimeout(()=>{if(_.complete)O()}),_.addEventListener("error",O),_.addEventListener("load",O)})))}e(an,"configureLabelImages");var Wh=(c,s,B,L="")=>{let _=c.split(":");if(c.slice(0,1)==="@"){if(_.length<2||_.length>3)return null;L=_.shift().slice(1)}if(_.length>3||!_.length)return null;if(_.length>1){let D=_.pop(),P=_.pop(),W={provider:_.length>0?_[0]:L,prefix:P,name:D};return s&&!La(W)?null:W}let I=_[0],O=I.split("-");if(O.length>1){let D={provider:L,prefix:O.shift(),name:O.join("-")};return s&&!La(D)?null:D}if(B&&L===""){let D={provider:L,prefix:"",name:I};return s&&!La(D,B)?null:D}return null},La=(c,s)=>{if(!c)return!1;return!!((s&&c.prefix===""||!!c.prefix)&&!!c.name)};var jb=Object.freeze({left:0,top:0,width:16,height:16}),Bo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nh=Object.freeze({...jb,...Bo}),uf=Object.freeze({...Nh,body:"",hidden:!1});function df(c,s){let B={};if(!c.hFlip!==!s.hFlip)B.hFlip=!0;if(!c.vFlip!==!s.vFlip)B.vFlip=!0;let L=((c.rotate||0)+(s.rotate||0))%4;if(L)B.rotate=L;return B}function Hh(c,s){let B=df(c,s);for(let L in uf)if(L in Bo){if(L in c&&!(L in B))B[L]=Bo[L]}else if(L in s)B[L]=s[L];else if(L in c)B[L]=c[L];return B}function pf(c,s){let B=c.icons,L=c.aliases||Object.create(null),_=Object.create(null);function I(O){if(B[O])return _[O]=[];if(!(O in _)){_[O]=null;let D=L[O]&&L[O].parent,P=D&&I(D);if(P)_[O]=[D].concat(P)}return _[O]}return(s||Object.keys(B).concat(Object.keys(L))).forEach(I),_}function ff(c,s,B){let L=c.icons,_=c.aliases||Object.create(null),I={};function O(D){I=Hh(L[D]||_[D],I)}return O(s),B.forEach(O),Hh(c,I)}function Yh(c,s){if(c.icons[s])return ff(c,s,[]);let B=pf(c,[s])[s];return B?ff(c,s,B):null}var Xb=Object.freeze({width:null,height:null}),gf=Object.freeze({...Xb,...Bo});var Ub=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function jh(c,s,B){if(s===1)return c;if(B=B||100,typeof c==="number")return Math.ceil(c*s*B)/B;if(typeof c!=="string")return c;let L=c.split(Ub);if(L===null||!L.length)return c;let _=[],I=L.shift(),O=Gb.test(I);while(!0){if(O){let D=parseFloat(I);if(isNaN(D))_.push(I);else _.push(Math.ceil(D*s*B)/B)}else _.push(I);if(I=L.shift(),I===void 0)return _.join("");O=!O}}function Vb(c,s="defs"){let B="",L=c.indexOf("<"+s);while(L>=0){let _=c.indexOf(">",L),I=c.indexOf("</"+s);if(_===-1||I===-1)break;let O=c.indexOf(">",I);if(O===-1)break;B+=c.slice(_+1,I).trim(),c=c.slice(0,L).trim()+c.slice(O+1)}return{defs:B,content:c}}function Zb(c,s){return c?"<defs>"+c+"</defs>"+s:s}function mf(c,s,B){let L=Vb(c);return Zb(L.defs,s+L.content+B)}var Kb=(c)=>c==="unset"||c==="undefined"||c==="none";function Xh(c,s){let B={...Nh,...c},L={...gf,...s},_={left:B.left,top:B.top,width:B.width,height:B.height},I=B.body;[B,L].forEach((tt)=>{let et=[],{hFlip:it,vFlip:at,rotate:nt}=tt;if(it)if(at)nt+=2;else et.push("translate("+(_.width+_.left).toString()+" "+(0-_.top).toString()+")"),et.push("scale(-1 1)"),_.top=_.left=0;else if(at)et.push("translate("+(0-_.left).toString()+" "+(_.height+_.top).toString()+")"),et.push("scale(1 -1)"),_.top=_.left=0;let ut;if(nt<0)nt-=Math.floor(nt/4)*4;switch(nt=nt%4,nt){case 1:ut=_.height/2+_.top,et.unshift("rotate(90 "+ut.toString()+" "+ut.toString()+")");break;case 2:et.unshift("rotate(180 "+(_.width/2+_.left).toString()+" "+(_.height/2+_.top).toString()+")");break;case 3:ut=_.width/2+_.left,et.unshift("rotate(-90 "+ut.toString()+" "+ut.toString()+")");break}if(nt%2===1){if(_.left!==_.top)ut=_.left,_.left=_.top,_.top=ut;if(_.width!==_.height)ut=_.width,_.width=_.height,_.height=ut}if(et.length)I=mf(I,'<g transform="'+et.join(" ")+'">',"</g>")});let{width:O,height:D}=L,{width:P,height:W}=_,R,Y;if(O===null)Y=D===null?"1em":D==="auto"?W:D,R=jh(Y,P/W);else R=O==="auto"?P:O,Y=D===null?jh(R,W/P):D==="auto"?W:D;let G={},U=(tt,et)=>{if(!Kb(et))G[tt]=et.toString()};U("width",R),U("height",Y);let J=[_.left,_.top,P,W];return G.viewBox=J.join(" "),{attributes:G,viewBox:J,body:I}}var Qb=/\sid="(\S+)"/g,xf=new Map;function Jb(c){c=c.replace(/[0-9]+$/,"")||"a";let s=xf.get(c)||0;return xf.set(c,s+1),s?`${c}${s}`:c}function Uh(c){let s=[],B;while(B=Qb.exec(c))s.push(B[1]);if(!s.length)return c;let L="suffix"+(Math.random()*16777216|Date.now()).toString(16);return s.forEach((_)=>{let I=Jb(_),O=_.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");c=c.replace(new RegExp('([#;"])('+O+')([")]|\\.[a-z])',"g"),"$1"+I+L+"$3")}),c=c.replace(new RegExp(L,"g"),""),c}function Gh(c,s){let B=c.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let L in s)B+=" "+L+'="'+s[L]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+B+">"+c+"</svg>"}var Si={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},Vh=new Map,yf=new Map,Bt=e((c)=>{for(let s of c){if(!s.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(t.debug("Registering icon pack:",s.name),"loader"in s)yf.set(s.name,s.loader);else if("icons"in s)Vh.set(s.name,s.icons);else throw t.error("Invalid icon loader:",s),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Cf=e(async(c,s)=>{let B=Wh(c,!0,s!==void 0);if(!B)throw Error(`Invalid icon name: ${c}`);let L=B.prefix||s;if(!L)throw Error(`Icon name must contain a prefix: ${c}`);let _=Vh.get(L);if(!_){let O=yf.get(L);if(!O)throw Error(`Icon set not found: ${B.prefix}`);try{_={...await O(),prefix:L},Vh.set(L,_)}catch(D){throw t.error(D),Error(`Failed to load icon set: ${B.prefix}`)}}let I=Yh(_,B.name);if(!I)throw Error(`Icon not found: ${c}`);return I},"getRegisteredIconData"),bf=e(async(c)=>{try{return await Cf(c),!0}catch{return!1}},"isIconAvailable"),ke=e(async(c,s,B)=>{let L;try{L=await Cf(c,s?.fallbackPrefix)}catch(O){t.error(O),L=Si}let _=Xh(L,s),I=Gh(Uh(_.body),{..._.attributes,...B});return w(I,u())},"getIconSVG");function Kh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ro=Kh();function vf(c){ro=c}var ys={exec:()=>null};function _e(c,s=""){let B=typeof c=="string"?c:c.source,L={replace:(_,I)=>{let O=typeof I=="string"?I:I.source;return O=O.replace(or.caret,"$1"),B=B.replace(_,O),L},getRegex:()=>new RegExp(B,s)};return L}var tk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),or={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:(c)=>new RegExp(`^( {0,3}${c})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(c)=>new RegExp(`^ {0,${Math.min(3,c-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(c)=>new RegExp(`^ {0,${Math.min(3,c-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(c)=>new RegExp(`^ {0,${Math.min(3,c-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(c)=>new RegExp(`^ {0,${Math.min(3,c-1)}}#`),htmlBeginRegex:(c)=>new RegExp(`^ {0,${Math.min(3,c-1)}}<(?:[a-z].*>|!--)`,"i")},ek=/^(?:[ \t]*(?:\n|$))+/,rk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ik=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Cs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ok=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qh=/(?:[*+-]|\d{1,9}[.)])/,Lf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ff=_e(Lf).replace(/bull/g,Qh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),sk=_e(Lf).replace(/bull/g,Qh).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Jh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ak=/^[^\n]+/,tc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,nk=_e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lk=_e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qh).getRegex(),$a="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ec=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hk=_e("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",ec).replace("tag",$a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Mf=_e(Jh).replace("hr",Cs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),ck=_e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Mf).getRegex(),rc={blockquote:ck,code:rk,def:nk,fences:ik,heading:ok,hr:Cs,html:hk,lheading:Ff,list:lk,newline:ek,paragraph:Mf,table:ys,text:ak},kf=_e("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),uk={...rc,lheading:sk,table:kf,paragraph:_e(Jh).replace("hr",Cs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kf).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex()},dk={...rc,html:_e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ec).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ys,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_e(Jh).replace("hr",Cs).replace("heading",` *#{1,6} *[^
162
- ]`).replace("lheading",Ff).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Af=/^( {2,}|\\)\n(?!\s*$)/,gk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ia=/[\p{P}\p{S}]/u,ic=/[\s\p{P}\p{S}]/u,Ef=/[^\s\p{P}\p{S}]/u,mk=_e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ic).getRegex(),$f=/(?!~)[\p{P}\p{S}]/u,xk=/(?!~)[\s\p{P}\p{S}]/u,yk=/(?:[^\s\p{P}\p{S}]|~)/u,Ck=_e(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),If=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,bk=_e(If,"u").replace(/punct/g,Ia).getRegex(),kk=_e(If,"u").replace(/punct/g,$f).getRegex(),Of="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",wk=_e(Of,"gu").replace(/notPunctSpace/g,Ef).replace(/punctSpace/g,ic).replace(/punct/g,Ia).getRegex(),Sk=_e(Of,"gu").replace(/notPunctSpace/g,yk).replace(/punctSpace/g,xk).replace(/punct/g,$f).getRegex(),Tk=_e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ef).replace(/punctSpace/g,ic).replace(/punct/g,Ia).getRegex(),Bk=_e(/\\(punct)/,"gu").replace(/punct/g,Ia).getRegex(),_k=_e(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),vk=_e(ec).replace("(?:-->|$)","-->").getRegex(),Lk=_e("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ma=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Fk=_e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ma).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Df=_e(/^!?\[(label)\]\[(ref)\]/).replace("label",Ma).replace("ref",tc).getRegex(),Pf=_e(/^!?\[(ref)\](?:\[\])?/).replace("ref",tc).getRegex(),Mk=_e("reflink|nolink(?!\\()","g").replace("reflink",Df).replace("nolink",Pf).getRegex(),wf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,oc={_backpedal:ys,anyPunctuation:Bk,autolink:_k,blockSkip:Ck,br:Af,code:fk,del:ys,emStrongLDelim:bk,emStrongRDelimAst:wk,emStrongRDelimUnd:Tk,escape:pk,link:Fk,nolink:Pf,punctuation:mk,reflink:Df,reflinkSearch:Mk,tag:Lk,text:gk,url:ys},Ak={...oc,link:_e(/^!?\[(label)\]\((.*?)\)/).replace("label",Ma).getRegex(),reflink:_e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ma).getRegex()},Zh={...oc,emStrongRDelimAst:Sk,emStrongLDelim:kk,url:_e(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wf).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:_e(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wf).getRegex()},Ek={...Zh,br:_e(Af).replace("{2,}","*").getRegex(),text:_e(Zh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fa={normal:rc,gfm:uk,pedantic:dk},gs={normal:oc,gfm:Zh,breaks:Ek,pedantic:Ak},$k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sf=(c)=>$k[c];function Dr(c,s){if(s){if(or.escapeTest.test(c))return c.replace(or.escapeReplace,Sf)}else if(or.escapeTestNoEncode.test(c))return c.replace(or.escapeReplaceNoEncode,Sf);return c}function Tf(c){try{c=encodeURI(c).replace(or.percentDecode,"%")}catch{return null}return c}function Bf(c,s){let B=c.replace(or.findPipe,(I,O,D)=>{let P=!1,W=O;for(;--W>=0&&D[W]==="\\";)P=!P;return P?"|":" |"}),L=B.split(or.splitPipe),_=0;if(L[0].trim()||L.shift(),L.length>0&&!L.at(-1)?.trim()&&L.pop(),s)if(L.length>s)L.splice(s);else for(;L.length<s;)L.push("");for(;_<L.length;_++)L[_]=L[_].trim().replace(or.slashPipe,"|");return L}function ms(c,s,B){let L=c.length;if(L===0)return"";let _=0;for(;_<L;){let I=c.charAt(L-_-1);if(I===s&&!B)_++;else if(I!==s&&B)_++;else break}return c.slice(0,L-_)}function Ik(c,s){if(c.indexOf(s[1])===-1)return-1;let B=0;for(let L=0;L<c.length;L++)if(c[L]==="\\")L++;else if(c[L]===s[0])B++;else if(c[L]===s[1]&&(B--,B<0))return L;return B>0?-2:-1}function _f(c,s,B,L,_){let I=s.href,O=s.title||null,D=c[1].replace(_.other.outputLinkReplace,"$1");L.state.inLink=!0;let P={type:c[0].charAt(0)==="!"?"image":"link",raw:B,href:I,title:O,text:D,tokens:L.inlineTokens(D)};return L.state.inLink=!1,P}function Ok(c,s,B){let L=c.match(B.other.indentCodeCompensation);if(L===null)return s;let _=L[1];return s.split(`
163
- `).map((I)=>{let O=I.match(B.other.beginningSpace);if(O===null)return I;let[D]=O;return D.length>=_.length?I.slice(_.length):I}).join(`
164
- `)}var Aa=class{options;rules;lexer;constructor(c){this.options=c||ro}space(c){let s=this.rules.block.newline.exec(c);if(s&&s[0].length>0)return{type:"space",raw:s[0]}}code(c){let s=this.rules.block.code.exec(c);if(s){let B=s[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:s[0],codeBlockStyle:"indented",text:this.options.pedantic?B:ms(B,`
165
- `)}}}fences(c){let s=this.rules.block.fences.exec(c);if(s){let B=s[0],L=Ok(B,s[3]||"",this.rules);return{type:"code",raw:B,lang:s[2]?s[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):s[2],text:L}}}heading(c){let s=this.rules.block.heading.exec(c);if(s){let B=s[2].trim();if(this.rules.other.endingHash.test(B)){let L=ms(B,"#");(this.options.pedantic||!L||this.rules.other.endingSpaceChar.test(L))&&(B=L.trim())}return{type:"heading",raw:s[0],depth:s[1].length,text:B,tokens:this.lexer.inline(B)}}}hr(c){let s=this.rules.block.hr.exec(c);if(s)return{type:"hr",raw:ms(s[0],`
166
- `)}}blockquote(c){let s=this.rules.block.blockquote.exec(c);if(s){let B=ms(s[0],`
167
- `).split(`
168
- `),L="",_="",I=[];for(;B.length>0;){let O=!1,D=[],P;for(P=0;P<B.length;P++)if(this.rules.other.blockquoteStart.test(B[P]))D.push(B[P]),O=!0;else if(!O)D.push(B[P]);else break;B=B.slice(P);let W=D.join(`
169
- `),R=W.replace(this.rules.other.blockquoteSetextReplace,`
170
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");L=L?`${L}
171
- ${W}`:W,_=_?`${_}
172
- ${R}`:R;let Y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(R,I,!0),this.lexer.state.top=Y,B.length===0)break;let G=I.at(-1);if(G?.type==="code")break;if(G?.type==="blockquote"){let U=G,J=U.raw+`
173
- `+B.join(`
174
- `),tt=this.blockquote(J);I[I.length-1]=tt,L=L.substring(0,L.length-U.raw.length)+tt.raw,_=_.substring(0,_.length-U.text.length)+tt.text;break}else if(G?.type==="list"){let U=G,J=U.raw+`
175
- `+B.join(`
176
- `),tt=this.list(J);I[I.length-1]=tt,L=L.substring(0,L.length-G.raw.length)+tt.raw,_=_.substring(0,_.length-U.raw.length)+tt.raw,B=J.substring(I.at(-1).raw.length).split(`
177
- `);continue}}return{type:"blockquote",raw:L,tokens:I,text:_}}}list(c){let s=this.rules.block.list.exec(c);if(s){let B=s[1].trim(),L=B.length>1,_={type:"list",raw:"",ordered:L,start:L?+B.slice(0,-1):"",loose:!1,items:[]};B=L?`\\d{1,9}\\${B.slice(-1)}`:`\\${B}`,this.options.pedantic&&(B=L?B:"[*+-]");let I=this.rules.other.listItemRegex(B),O=!1;for(;c;){let P=!1,W="",R="";if(!(s=I.exec(c))||this.rules.block.hr.test(c))break;W=s[0],c=c.substring(W.length);let Y=s[2].split(`
178
- `,1)[0].replace(this.rules.other.listReplaceTabs,(it)=>" ".repeat(3*it.length)),G=c.split(`
179
- `,1)[0],U=!Y.trim(),J=0;if(this.options.pedantic?(J=2,R=Y.trimStart()):U?J=s[1].length+1:(J=s[2].search(this.rules.other.nonSpaceChar),J=J>4?1:J,R=Y.slice(J),J+=s[1].length),U&&this.rules.other.blankLine.test(G)&&(W+=G+`
180
- `,c=c.substring(G.length+1),P=!0),!P){let it=this.rules.other.nextBulletRegex(J),at=this.rules.other.hrRegex(J),nt=this.rules.other.fencesBeginRegex(J),ut=this.rules.other.headingBeginRegex(J),dt=this.rules.other.htmlBeginRegex(J);for(;c;){let kt=c.split(`
181
- `,1)[0],St;if(G=kt,this.options.pedantic?(G=G.replace(this.rules.other.listReplaceNesting," "),St=G):St=G.replace(this.rules.other.tabCharGlobal," "),nt.test(G)||ut.test(G)||dt.test(G)||it.test(G)||at.test(G))break;if(St.search(this.rules.other.nonSpaceChar)>=J||!G.trim())R+=`
182
- `+St.slice(J);else{if(U||Y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||nt.test(Y)||ut.test(Y)||at.test(Y))break;R+=`
183
- `+G}!U&&!G.trim()&&(U=!0),W+=kt+`
184
- `,c=c.substring(kt.length+1),Y=St.slice(J)}}_.loose||(O?_.loose=!0:this.rules.other.doubleBlankLine.test(W)&&(O=!0));let tt=null,et;this.options.gfm&&(tt=this.rules.other.listIsTask.exec(R),tt&&(et=tt[0]!=="[ ] ",R=R.replace(this.rules.other.listReplaceTask,""))),_.items.push({type:"list_item",raw:W,task:!!tt,checked:et,loose:!1,text:R,tokens:[]}),_.raw+=W}let D=_.items.at(-1);if(D)D.raw=D.raw.trimEnd(),D.text=D.text.trimEnd();else return;_.raw=_.raw.trimEnd();for(let P=0;P<_.items.length;P++)if(this.lexer.state.top=!1,_.items[P].tokens=this.lexer.blockTokens(_.items[P].text,[]),!_.loose){let W=_.items[P].tokens.filter((Y)=>Y.type==="space"),R=W.length>0&&W.some((Y)=>this.rules.other.anyLine.test(Y.raw));_.loose=R}if(_.loose)for(let P=0;P<_.items.length;P++)_.items[P].loose=!0;return _}}html(c){let s=this.rules.block.html.exec(c);if(s)return{type:"html",block:!0,raw:s[0],pre:s[1]==="pre"||s[1]==="script"||s[1]==="style",text:s[0]}}def(c){let s=this.rules.block.def.exec(c);if(s){let B=s[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),L=s[2]?s[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",_=s[3]?s[3].substring(1,s[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):s[3];return{type:"def",tag:B,raw:s[0],href:L,title:_}}}table(c){let s=this.rules.block.table.exec(c);if(!s||!this.rules.other.tableDelimiter.test(s[2]))return;let B=Bf(s[1]),L=s[2].replace(this.rules.other.tableAlignChars,"").split("|"),_=s[3]?.trim()?s[3].replace(this.rules.other.tableRowBlankLine,"").split(`
185
- `):[],I={type:"table",raw:s[0],header:[],align:[],rows:[]};if(B.length===L.length){for(let O of L)this.rules.other.tableAlignRight.test(O)?I.align.push("right"):this.rules.other.tableAlignCenter.test(O)?I.align.push("center"):this.rules.other.tableAlignLeft.test(O)?I.align.push("left"):I.align.push(null);for(let O=0;O<B.length;O++)I.header.push({text:B[O],tokens:this.lexer.inline(B[O]),header:!0,align:I.align[O]});for(let O of _)I.rows.push(Bf(O,I.header.length).map((D,P)=>({text:D,tokens:this.lexer.inline(D),header:!1,align:I.align[P]})));return I}}lheading(c){let s=this.rules.block.lheading.exec(c);if(s)return{type:"heading",raw:s[0],depth:s[2].charAt(0)==="="?1:2,text:s[1],tokens:this.lexer.inline(s[1])}}paragraph(c){let s=this.rules.block.paragraph.exec(c);if(s){let B=s[1].charAt(s[1].length-1)===`
186
- `?s[1].slice(0,-1):s[1];return{type:"paragraph",raw:s[0],text:B,tokens:this.lexer.inline(B)}}}text(c){let s=this.rules.block.text.exec(c);if(s)return{type:"text",raw:s[0],text:s[0],tokens:this.lexer.inline(s[0])}}escape(c){let s=this.rules.inline.escape.exec(c);if(s)return{type:"escape",raw:s[0],text:s[1]}}tag(c){let s=this.rules.inline.tag.exec(c);if(s)return!this.lexer.state.inLink&&this.rules.other.startATag.test(s[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(s[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(s[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(s[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:s[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:s[0]}}link(c){let s=this.rules.inline.link.exec(c);if(s){let B=s[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(B)){if(!this.rules.other.endAngleBracket.test(B))return;let I=ms(B.slice(0,-1),"\\");if((B.length-I.length)%2===0)return}else{let I=Ik(s[2],"()");if(I===-2)return;if(I>-1){let O=(s[0].indexOf("!")===0?5:4)+s[1].length+I;s[2]=s[2].substring(0,I),s[0]=s[0].substring(0,O).trim(),s[3]=""}}let L=s[2],_="";if(this.options.pedantic){let I=this.rules.other.pedanticHrefTitle.exec(L);I&&(L=I[1],_=I[3])}else _=s[3]?s[3].slice(1,-1):"";return L=L.trim(),this.rules.other.startAngleBracket.test(L)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(B)?L=L.slice(1):L=L.slice(1,-1)),_f(s,{href:L&&L.replace(this.rules.inline.anyPunctuation,"$1"),title:_&&_.replace(this.rules.inline.anyPunctuation,"$1")},s[0],this.lexer,this.rules)}}reflink(c,s){let B;if((B=this.rules.inline.reflink.exec(c))||(B=this.rules.inline.nolink.exec(c))){let L=(B[2]||B[1]).replace(this.rules.other.multipleSpaceGlobal," "),_=s[L.toLowerCase()];if(!_){let I=B[0].charAt(0);return{type:"text",raw:I,text:I}}return _f(B,_,B[0],this.lexer,this.rules)}}emStrong(c,s,B=""){let L=this.rules.inline.emStrongLDelim.exec(c);if(!L||L[3]&&B.match(this.rules.other.unicodeAlphaNumeric))return;if(!(L[1]||L[2])||!B||this.rules.inline.punctuation.exec(B)){let _=[...L[0]].length-1,I,O,D=_,P=0,W=L[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(W.lastIndex=0,s=s.slice(-1*c.length+_);(L=W.exec(s))!=null;){if(I=L[1]||L[2]||L[3]||L[4]||L[5]||L[6],!I)continue;if(O=[...I].length,L[3]||L[4]){D+=O;continue}else if((L[5]||L[6])&&_%3&&!((_+O)%3)){P+=O;continue}if(D-=O,D>0)continue;O=Math.min(O,O+D+P);let R=[...L[0]][0].length,Y=c.slice(0,_+L.index+R+O);if(Math.min(_,O)%2){let U=Y.slice(1,-1);return{type:"em",raw:Y,text:U,tokens:this.lexer.inlineTokens(U)}}let G=Y.slice(2,-2);return{type:"strong",raw:Y,text:G,tokens:this.lexer.inlineTokens(G)}}}}codespan(c){let s=this.rules.inline.code.exec(c);if(s){let B=s[2].replace(this.rules.other.newLineCharGlobal," "),L=this.rules.other.nonSpaceChar.test(B),_=this.rules.other.startingSpaceChar.test(B)&&this.rules.other.endingSpaceChar.test(B);return L&&_&&(B=B.substring(1,B.length-1)),{type:"codespan",raw:s[0],text:B}}}br(c){let s=this.rules.inline.br.exec(c);if(s)return{type:"br",raw:s[0]}}del(c){let s=this.rules.inline.del.exec(c);if(s)return{type:"del",raw:s[0],text:s[2],tokens:this.lexer.inlineTokens(s[2])}}autolink(c){let s=this.rules.inline.autolink.exec(c);if(s){let B,L;return s[2]==="@"?(B=s[1],L="mailto:"+B):(B=s[1],L=B),{type:"link",raw:s[0],text:B,href:L,tokens:[{type:"text",raw:B,text:B}]}}}url(c){let s;if(s=this.rules.inline.url.exec(c)){let B,L;if(s[2]==="@")B=s[0],L="mailto:"+B;else{let _;do _=s[0],s[0]=this.rules.inline._backpedal.exec(s[0])?.[0]??"";while(_!==s[0]);B=s[0],s[1]==="www."?L="http://"+s[0]:L=s[0]}return{type:"link",raw:s[0],text:B,href:L,tokens:[{type:"text",raw:B,text:B}]}}}inlineText(c){let s=this.rules.inline.text.exec(c);if(s){let B=this.lexer.state.inRawBlock;return{type:"text",raw:s[0],text:s[0],escaped:B}}}},_r=class c{tokens;options;state;tokenizer;inlineQueue;constructor(s){this.tokens=[],this.tokens.links=Object.create(null),this.options=s||ro,this.options.tokenizer=this.options.tokenizer||new Aa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let B={other:or,block:Fa.normal,inline:gs.normal};this.options.pedantic?(B.block=Fa.pedantic,B.inline=gs.pedantic):this.options.gfm&&(B.block=Fa.gfm,this.options.breaks?B.inline=gs.breaks:B.inline=gs.gfm),this.tokenizer.rules=B}static get rules(){return{block:Fa,inline:gs}}static lex(s,B){return new c(B).lex(s)}static lexInline(s,B){return new c(B).inlineTokens(s)}lex(s){s=s.replace(or.carriageReturn,`
187
- `),this.blockTokens(s,this.tokens);for(let B=0;B<this.inlineQueue.length;B++){let L=this.inlineQueue[B];this.inlineTokens(L.src,L.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(s,B=[],L=!1){for(this.options.pedantic&&(s=s.replace(or.tabCharGlobal," ").replace(or.spaceLine,""));s;){let _;if(this.options.extensions?.block?.some((O)=>(_=O.call({lexer:this},s,B))?(s=s.substring(_.raw.length),B.push(_),!0):!1))continue;if(_=this.tokenizer.space(s)){s=s.substring(_.raw.length);let O=B.at(-1);_.raw.length===1&&O!==void 0?O.raw+=`
188
- `:B.push(_);continue}if(_=this.tokenizer.code(s)){s=s.substring(_.raw.length);let O=B.at(-1);O?.type==="paragraph"||O?.type==="text"?(O.raw+=(O.raw.endsWith(`
189
- `)?"":`
190
- `)+_.raw,O.text+=`
191
- `+_.text,this.inlineQueue.at(-1).src=O.text):B.push(_);continue}if(_=this.tokenizer.fences(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.heading(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.hr(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.blockquote(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.list(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.html(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.def(s)){s=s.substring(_.raw.length);let O=B.at(-1);O?.type==="paragraph"||O?.type==="text"?(O.raw+=(O.raw.endsWith(`
192
- `)?"":`
193
- `)+_.raw,O.text+=`
194
- `+_.raw,this.inlineQueue.at(-1).src=O.text):this.tokens.links[_.tag]||(this.tokens.links[_.tag]={href:_.href,title:_.title},B.push(_));continue}if(_=this.tokenizer.table(s)){s=s.substring(_.raw.length),B.push(_);continue}if(_=this.tokenizer.lheading(s)){s=s.substring(_.raw.length),B.push(_);continue}let I=s;if(this.options.extensions?.startBlock){let O=1/0,D=s.slice(1),P;this.options.extensions.startBlock.forEach((W)=>{P=W.call({lexer:this},D),typeof P=="number"&&P>=0&&(O=Math.min(O,P))}),O<1/0&&O>=0&&(I=s.substring(0,O+1))}if(this.state.top&&(_=this.tokenizer.paragraph(I))){let O=B.at(-1);L&&O?.type==="paragraph"?(O.raw+=(O.raw.endsWith(`
195
- `)?"":`
196
- `)+_.raw,O.text+=`
197
- `+_.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=O.text):B.push(_),L=I.length!==s.length,s=s.substring(_.raw.length);continue}if(_=this.tokenizer.text(s)){s=s.substring(_.raw.length);let O=B.at(-1);O?.type==="text"?(O.raw+=(O.raw.endsWith(`
198
- `)?"":`
199
- `)+_.raw,O.text+=`
200
- `+_.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=O.text):B.push(_);continue}if(s){let O="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(O);break}else throw Error(O)}}return this.state.top=!0,B}inline(s,B=[]){return this.inlineQueue.push({src:s,tokens:B}),B}inlineTokens(s,B=[]){let L=s,_=null;if(this.tokens.links){let P=Object.keys(this.tokens.links);if(P.length>0)for(;(_=this.tokenizer.rules.inline.reflinkSearch.exec(L))!=null;)P.includes(_[0].slice(_[0].lastIndexOf("[")+1,-1))&&(L=L.slice(0,_.index)+"["+"a".repeat(_[0].length-2)+"]"+L.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(_=this.tokenizer.rules.inline.anyPunctuation.exec(L))!=null;)L=L.slice(0,_.index)+"++"+L.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let I;for(;(_=this.tokenizer.rules.inline.blockSkip.exec(L))!=null;)I=_[2]?_[2].length:0,L=L.slice(0,_.index+I)+"["+"a".repeat(_[0].length-I-2)+"]"+L.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);L=this.options.hooks?.emStrongMask?.call({lexer:this},L)??L;let O=!1,D="";for(;s;){O||(D=""),O=!1;let P;if(this.options.extensions?.inline?.some((R)=>(P=R.call({lexer:this},s,B))?(s=s.substring(P.raw.length),B.push(P),!0):!1))continue;if(P=this.tokenizer.escape(s)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.tag(s)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.link(s)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.reflink(s,this.tokens.links)){s=s.substring(P.raw.length);let R=B.at(-1);P.type==="text"&&R?.type==="text"?(R.raw+=P.raw,R.text+=P.text):B.push(P);continue}if(P=this.tokenizer.emStrong(s,L,D)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.codespan(s)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.br(s)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.del(s)){s=s.substring(P.raw.length),B.push(P);continue}if(P=this.tokenizer.autolink(s)){s=s.substring(P.raw.length),B.push(P);continue}if(!this.state.inLink&&(P=this.tokenizer.url(s))){s=s.substring(P.raw.length),B.push(P);continue}let W=s;if(this.options.extensions?.startInline){let R=1/0,Y=s.slice(1),G;this.options.extensions.startInline.forEach((U)=>{G=U.call({lexer:this},Y),typeof G=="number"&&G>=0&&(R=Math.min(R,G))}),R<1/0&&R>=0&&(W=s.substring(0,R+1))}if(P=this.tokenizer.inlineText(W)){s=s.substring(P.raw.length),P.raw.slice(-1)!=="_"&&(D=P.raw.slice(-1)),O=!0;let R=B.at(-1);R?.type==="text"?(R.raw+=P.raw,R.text+=P.text):B.push(P);continue}if(s){let R="Infinite loop on byte: "+s.charCodeAt(0);if(this.options.silent){console.error(R);break}else throw Error(R)}}return B}},Ea=class{options;parser;constructor(c){this.options=c||ro}space(c){return""}code({text:c,lang:s,escaped:B}){let L=(s||"").match(or.notSpaceStart)?.[0],_=c.replace(or.endingNewline,"")+`
201
- `;return L?'<pre><code class="language-'+Dr(L)+'">'+(B?_:Dr(_,!0))+`</code></pre>
202
- `:"<pre><code>"+(B?_:Dr(_,!0))+`</code></pre>
203
- `}blockquote({tokens:c}){return`<blockquote>
204
- ${this.parser.parse(c)}</blockquote>
205
- `}html({text:c}){return c}def(c){return""}heading({tokens:c,depth:s}){return`<h${s}>${this.parser.parseInline(c)}</h${s}>
206
- `}hr(c){return`<hr>
207
- `}list(c){let{ordered:s,start:B}=c,L="";for(let O=0;O<c.items.length;O++){let D=c.items[O];L+=this.listitem(D)}let _=s?"ol":"ul",I=s&&B!==1?' start="'+B+'"':"";return"<"+_+I+`>
208
- `+L+"</"+_+`>
209
- `}listitem(c){let s="";if(c.task){let B=this.checkbox({checked:!!c.checked});c.loose?c.tokens[0]?.type==="paragraph"?(c.tokens[0].text=B+" "+c.tokens[0].text,c.tokens[0].tokens&&c.tokens[0].tokens.length>0&&c.tokens[0].tokens[0].type==="text"&&(c.tokens[0].tokens[0].text=B+" "+Dr(c.tokens[0].tokens[0].text),c.tokens[0].tokens[0].escaped=!0)):c.tokens.unshift({type:"text",raw:B+" ",text:B+" ",escaped:!0}):s+=B+" "}return s+=this.parser.parse(c.tokens,!!c.loose),`<li>${s}</li>
210
- `}checkbox({checked:c}){return"<input "+(c?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:c}){return`<p>${this.parser.parseInline(c)}</p>
211
- `}table(c){let s="",B="";for(let _=0;_<c.header.length;_++)B+=this.tablecell(c.header[_]);s+=this.tablerow({text:B});let L="";for(let _=0;_<c.rows.length;_++){let I=c.rows[_];B="";for(let O=0;O<I.length;O++)B+=this.tablecell(I[O]);L+=this.tablerow({text:B})}return L&&(L=`<tbody>${L}</tbody>`),`<table>
212
- <thead>
213
- `+s+`</thead>
214
- `+L+`</table>
215
- `}tablerow({text:c}){return`<tr>
216
- ${c}</tr>
217
- `}tablecell(c){let s=this.parser.parseInline(c.tokens),B=c.header?"th":"td";return(c.align?`<${B} align="${c.align}">`:`<${B}>`)+s+`</${B}>
218
- `}strong({tokens:c}){return`<strong>${this.parser.parseInline(c)}</strong>`}em({tokens:c}){return`<em>${this.parser.parseInline(c)}</em>`}codespan({text:c}){return`<code>${Dr(c,!0)}</code>`}br(c){return"<br>"}del({tokens:c}){return`<del>${this.parser.parseInline(c)}</del>`}link({href:c,title:s,tokens:B}){let L=this.parser.parseInline(B),_=Tf(c);if(_===null)return L;c=_;let I='<a href="'+c+'"';return s&&(I+=' title="'+Dr(s)+'"'),I+=">"+L+"</a>",I}image({href:c,title:s,text:B,tokens:L}){L&&(B=this.parser.parseInline(L,this.parser.textRenderer));let _=Tf(c);if(_===null)return Dr(B);c=_;let I=`<img src="${c}" alt="${B}"`;return s&&(I+=` title="${Dr(s)}"`),I+=">",I}text(c){return"tokens"in c&&c.tokens?this.parser.parseInline(c.tokens):("escaped"in c)&&c.escaped?c.text:Dr(c.text)}},sc=class{strong({text:c}){return c}em({text:c}){return c}codespan({text:c}){return c}del({text:c}){return c}html({text:c}){return c}text({text:c}){return c}link({text:c}){return""+c}image({text:c}){return""+c}br(){return""}},Lr=class c{options;renderer;textRenderer;constructor(s){this.options=s||ro,this.options.renderer=this.options.renderer||new Ea,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sc}static parse(s,B){return new c(B).parse(s)}static parseInline(s,B){return new c(B).parseInline(s)}parse(s,B=!0){let L="";for(let _=0;_<s.length;_++){let I=s[_];if(this.options.extensions?.renderers?.[I.type]){let D=I,P=this.options.extensions.renderers[D.type].call({parser:this},D);if(P!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(D.type)){L+=P||"";continue}}let O=I;switch(O.type){case"space":{L+=this.renderer.space(O);continue}case"hr":{L+=this.renderer.hr(O);continue}case"heading":{L+=this.renderer.heading(O);continue}case"code":{L+=this.renderer.code(O);continue}case"table":{L+=this.renderer.table(O);continue}case"blockquote":{L+=this.renderer.blockquote(O);continue}case"list":{L+=this.renderer.list(O);continue}case"html":{L+=this.renderer.html(O);continue}case"def":{L+=this.renderer.def(O);continue}case"paragraph":{L+=this.renderer.paragraph(O);continue}case"text":{let D=O,P=this.renderer.text(D);for(;_+1<s.length&&s[_+1].type==="text";)D=s[++_],P+=`
219
- `+this.renderer.text(D);B?L+=this.renderer.paragraph({type:"paragraph",raw:P,text:P,tokens:[{type:"text",raw:P,text:P,escaped:!0}]}):L+=P;continue}default:{let D='Token with "'+O.type+'" type was not found.';if(this.options.silent)return console.error(D),"";throw Error(D)}}}return L}parseInline(s,B=this.renderer){let L="";for(let _=0;_<s.length;_++){let I=s[_];if(this.options.extensions?.renderers?.[I.type]){let D=this.options.extensions.renderers[I.type].call({parser:this},I);if(D!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(I.type)){L+=D||"";continue}}let O=I;switch(O.type){case"escape":{L+=B.text(O);break}case"html":{L+=B.html(O);break}case"link":{L+=B.link(O);break}case"image":{L+=B.image(O);break}case"strong":{L+=B.strong(O);break}case"em":{L+=B.em(O);break}case"codespan":{L+=B.codespan(O);break}case"br":{L+=B.br(O);break}case"del":{L+=B.del(O);break}case"text":{L+=B.text(O);break}default:{let D='Token with "'+O.type+'" type was not found.';if(this.options.silent)return console.error(D),"";throw Error(D)}}}return L}},xs=class{options;block;constructor(c){this.options=c||ro}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(c){return c}postprocess(c){return c}processAllTokens(c){return c}emStrongMask(c){return c}provideLexer(){return this.block?_r.lex:_r.lexInline}provideParser(){return this.block?Lr.parse:Lr.parseInline}},Dk=class{defaults=Kh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Lr;Renderer=Ea;TextRenderer=sc;Lexer=_r;Tokenizer=Aa;Hooks=xs;constructor(...c){this.use(...c)}walkTokens(c,s){let B=[];for(let L of c)switch(B=B.concat(s.call(this,L)),L.type){case"table":{let _=L;for(let I of _.header)B=B.concat(this.walkTokens(I.tokens,s));for(let I of _.rows)for(let O of I)B=B.concat(this.walkTokens(O.tokens,s));break}case"list":{let _=L;B=B.concat(this.walkTokens(_.items,s));break}default:{let _=L;this.defaults.extensions?.childTokens?.[_.type]?this.defaults.extensions.childTokens[_.type].forEach((I)=>{let O=_[I].flat(1/0);B=B.concat(this.walkTokens(O,s))}):_.tokens&&(B=B.concat(this.walkTokens(_.tokens,s)))}}return B}use(...c){let s=this.defaults.extensions||{renderers:{},childTokens:{}};return c.forEach((B)=>{let L={...B};if(L.async=this.defaults.async||L.async||!1,B.extensions&&(B.extensions.forEach((_)=>{if(!_.name)throw Error("extension name required");if("renderer"in _){let I=s.renderers[_.name];I?s.renderers[_.name]=function(...O){let D=_.renderer.apply(this,O);return D===!1&&(D=I.apply(this,O)),D}:s.renderers[_.name]=_.renderer}if("tokenizer"in _){if(!_.level||_.level!=="block"&&_.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let I=s[_.level];I?I.unshift(_.tokenizer):s[_.level]=[_.tokenizer],_.start&&(_.level==="block"?s.startBlock?s.startBlock.push(_.start):s.startBlock=[_.start]:_.level==="inline"&&(s.startInline?s.startInline.push(_.start):s.startInline=[_.start]))}"childTokens"in _&&_.childTokens&&(s.childTokens[_.name]=_.childTokens)}),L.extensions=s),B.renderer){let _=this.defaults.renderer||new Ea(this.defaults);for(let I in B.renderer){if(!(I in _))throw Error(`renderer '${I}' does not exist`);if(["options","parser"].includes(I))continue;let O=I,D=B.renderer[O],P=_[O];_[O]=(...W)=>{let R=D.apply(_,W);return R===!1&&(R=P.apply(_,W)),R||""}}L.renderer=_}if(B.tokenizer){let _=this.defaults.tokenizer||new Aa(this.defaults);for(let I in B.tokenizer){if(!(I in _))throw Error(`tokenizer '${I}' does not exist`);if(["options","rules","lexer"].includes(I))continue;let O=I,D=B.tokenizer[O],P=_[O];_[O]=(...W)=>{let R=D.apply(_,W);return R===!1&&(R=P.apply(_,W)),R}}L.tokenizer=_}if(B.hooks){let _=this.defaults.hooks||new xs;for(let I in B.hooks){if(!(I in _))throw Error(`hook '${I}' does not exist`);if(["options","block"].includes(I))continue;let O=I,D=B.hooks[O],P=_[O];xs.passThroughHooks.has(I)?_[O]=(W)=>{if(this.defaults.async&&xs.passThroughHooksRespectAsync.has(I))return(async()=>{let Y=await D.call(_,W);return P.call(_,Y)})();let R=D.call(_,W);return P.call(_,R)}:_[O]=(...W)=>{if(this.defaults.async)return(async()=>{let Y=await D.apply(_,W);return Y===!1&&(Y=await P.apply(_,W)),Y})();let R=D.apply(_,W);return R===!1&&(R=P.apply(_,W)),R}}L.hooks=_}if(B.walkTokens){let _=this.defaults.walkTokens,I=B.walkTokens;L.walkTokens=function(O){let D=[];return D.push(I.call(this,O)),_&&(D=D.concat(_.call(this,O))),D}}this.defaults={...this.defaults,...L}}),this}setOptions(c){return this.defaults={...this.defaults,...c},this}lexer(c,s){return _r.lex(c,s??this.defaults)}parser(c,s){return Lr.parse(c,s??this.defaults)}parseMarkdown(c){return(s,B)=>{let L={...B},_={...this.defaults,...L},I=this.onError(!!_.silent,!!_.async);if(this.defaults.async===!0&&L.async===!1)return I(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof s>"u"||s===null)return I(Error("marked(): input parameter is undefined or null"));if(typeof s!="string")return I(Error("marked(): input parameter is of type "+Object.prototype.toString.call(s)+", string expected"));if(_.hooks&&(_.hooks.options=_,_.hooks.block=c),_.async)return(async()=>{let O=_.hooks?await _.hooks.preprocess(s):s,D=await(_.hooks?await _.hooks.provideLexer():c?_r.lex:_r.lexInline)(O,_),P=_.hooks?await _.hooks.processAllTokens(D):D;_.walkTokens&&await Promise.all(this.walkTokens(P,_.walkTokens));let W=await(_.hooks?await _.hooks.provideParser():c?Lr.parse:Lr.parseInline)(P,_);return _.hooks?await _.hooks.postprocess(W):W})().catch(I);try{_.hooks&&(s=_.hooks.preprocess(s));let O=(_.hooks?_.hooks.provideLexer():c?_r.lex:_r.lexInline)(s,_);_.hooks&&(O=_.hooks.processAllTokens(O)),_.walkTokens&&this.walkTokens(O,_.walkTokens);let D=(_.hooks?_.hooks.provideParser():c?Lr.parse:Lr.parseInline)(O,_);return _.hooks&&(D=_.hooks.postprocess(D)),D}catch(O){return I(O)}}}onError(c,s){return(B)=>{if(B.message+=`
220
- Please report this to https://github.com/markedjs/marked.`,c){let L="<p>An error occurred:</p><pre>"+Dr(B.message+"",!0)+"</pre>";return s?Promise.resolve(L):L}if(s)return Promise.reject(B);throw B}}},eo=new Dk;function ve(c,s){return eo.parse(c,s)}ve.options=ve.setOptions=function(c){return eo.setOptions(c),ve.defaults=eo.defaults,vf(ve.defaults),ve};ve.getDefaults=Kh;ve.defaults=ro;ve.use=function(...c){return eo.use(...c),ve.defaults=eo.defaults,vf(ve.defaults),ve};ve.walkTokens=function(c,s){return eo.walkTokens(c,s)};ve.parseInline=eo.parseInline;ve.Parser=Lr;ve.parser=Lr.parse;ve.Renderer=Ea;ve.TextRenderer=sc;ve.Lexer=_r;ve.lexer=_r.lex;ve.Tokenizer=Aa;ve.Hooks=xs;ve.parse=ve;var{options:Nz,setOptions:Hz,use:Yz,walkTokens:jz,parseInline:Xz}=ve;var Uz=Lr.parse,Gz=_r.lex;function Zn(c){var s=[];for(var B=1;B<arguments.length;B++)s[B-1]=arguments[B];var L=Array.from(typeof c==="string"?[c]:c);L[L.length-1]=L[L.length-1].replace(/\r?\n([\t ]*)$/,"");var _=L.reduce(function(D,P){var W=P.match(/\n([\t ]+|(?!\s).)/g);if(W)return D.concat(W.map(function(R){var Y,G;return(G=(Y=R.match(/[\t ]/g))===null||Y===void 0?void 0:Y.length)!==null&&G!==void 0?G:0}));return D},[]);if(_.length){var I=new RegExp(`
221
- [ ]{`.concat(Math.min.apply(Math,_),"}"),"g");L=L.map(function(D){return D.replace(I,`
222
- `)})}L[0]=L[0].replace(/^\r?\n/,"");var O=L[0];return s.forEach(function(D,P){var W=O.match(/(?:^|\n)( *)$/),R=W?W[1]:"",Y=D;if(typeof D==="string"&&D.includes(`
223
- `))Y=String(D).split(`
224
- `).map(function(G,U){return U===0?G:"".concat(R).concat(G)}).join(`
225
- `);O+=Y+L[P+1]}),O}function qf(c,{markdownAutoWrap:s}){let L=c.replace(/<br\/>/g,`
226
- `).replace(/\n{2,}/g,`
227
- `);return Zn(L)}e(qf,"preprocessMarkdown");function zf(c){return c.split(/\\n|\n|<br\s*\/?>/gi).map((s)=>s.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((B)=>({content:B,type:"normal"}))??[])}e(zf,"nonMarkdownToLines");function Wf(c,s={}){let B=qf(c,s),L=ve.lexer(B),_=[[]],I=0;function O(D,P="normal"){if(D.type==="text")D.text.split(`
228
- `).forEach((R,Y)=>{if(Y!==0)I++,_.push([]);R.split(" ").forEach((G)=>{if(G=G.replace(/&#39;/g,"'"),G)_[I].push({content:G,type:P})})});else if(D.type==="strong"||D.type==="em")D.tokens.forEach((W)=>{O(W,D.type)});else if(D.type==="html")_[I].push({content:D.text,type:"normal"})}return e(O,"processNode"),L.forEach((D)=>{if(D.type==="paragraph")D.tokens?.forEach((P)=>{O(P)});else if(D.type==="html")_[I].push({content:D.text,type:"normal"});else _[I].push({content:D.raw,type:"normal"})}),_}e(Wf,"markdownToLines");function Nf(c){if(!c)return"";return`<p>${c.replace(/\\n|\n/g,"<br />")}</p>`}e(Nf,"nonMarkdownToHTML");function Hf(c,{markdownAutoWrap:s}={}){let B=ve.lexer(c);function L(_){if(_.type==="text"){if(s===!1)return _.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;");return _.text.replace(/\n */g,"<br/>")}else if(_.type==="strong")return`<strong>${_.tokens?.map(L).join("")}</strong>`;else if(_.type==="em")return`<em>${_.tokens?.map(L).join("")}</em>`;else if(_.type==="paragraph")return`<p>${_.tokens?.map(L).join("")}</p>`;else if(_.type==="space")return"";else if(_.type==="html")return`${_.text}`;else if(_.type==="escape")return _.text;return t.warn(`Unsupported markdown: ${_.type}`),_.raw}return e(L,"output"),B.map(L).join("")}e(Hf,"markdownToHTML");function Yf(c){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(c)].map((s)=>s.segment);return[...c]}e(Yf,"splitTextToChars");function jf(c,s){let B=Yf(s.content);return lc(c,[],B,s.type)}e(jf,"splitWordToFitWidth");function lc(c,s,B,L){if(B.length===0)return[{content:s.join(""),type:L},{content:"",type:L}];let[_,...I]=B,O=[...s,_];if(c([{content:O.join(""),type:L}]))return lc(c,O,I,L);if(s.length===0&&_)s.push(_),B.shift();return[{content:s.join(""),type:L},{content:B.join(""),type:L}]}e(lc,"splitWordToFitWidthRecursion");function Xf(c,s){if(c.some(({content:B})=>B.includes(`
229
- `)))throw Error("splitLineToFitWidth does not support newlines in the line");return Oa(c,s)}e(Xf,"splitLineToFitWidth");function Oa(c,s,B=[],L=[]){if(c.length===0){if(L.length>0)B.push(L);return B.length>0?B:[]}let _="";if(c[0].content===" ")_=" ",c.shift();let I=c.shift()??{content:" ",type:"normal"},O=[...L];if(_!=="")O.push({content:_,type:"normal"});if(O.push(I),s(O))return Oa(c,s,B,O);if(L.length>0)B.push(L),c.unshift(I);else if(I.content){let[D,P]=jf(s,I);if(B.push([D]),P.content)c.unshift(P)}return Oa(c,s,B)}e(Oa,"splitLineToFitWidthRecursion");function ac(c,s){if(s)c.attr("style",s)}e(ac,"applyStyle");var Rf=16384;async function Uf(c,s,B,L,_=!1,I=u()){let O=c.append("foreignObject");O.attr("width",`${Math.min(10*B,Rf)}px`),O.attr("height",`${Math.min(10*B,Rf)}px`);let D=O.append("xhtml:div"),P=H(s.label)?await mr(s.label.replace(l.lineBreakRegex,`
230
- `),I):w(s.label,I),W=s.isNode?"nodeLabel":"edgeLabel",R=D.append("span");if(R.html(P),ac(R,s.labelStyle),R.attr("class",`${W} ${L}`),ac(D,s.labelStyle),D.style("display","table-cell"),D.style("white-space","nowrap"),D.style("line-height","1.5"),B!==Number.POSITIVE_INFINITY)D.style("max-width",B+"px"),D.style("text-align","center");if(D.attr("xmlns","http://www.w3.org/1999/xhtml"),_)D.attr("class","labelBkg");let Y=D.node().getBoundingClientRect();if(Y.width===B)D.style("display","table"),D.style("white-space","break-spaces"),D.style("width",B+"px"),Y=D.node().getBoundingClientRect();return O.node()}e(Uf,"addHtmlSpan");function Da(c,s,B,L=!1){let _=c.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",s*B-0.1+"em").attr("dy",B+"em");if(L)_.attr("text-anchor","middle");return _}e(Da,"createTspan");function Gf(c,s,B){let L=c.append("text"),_=Da(L,1,s);Pa(_,B);let I=_.node().getComputedTextLength();return L.remove(),I}e(Gf,"computeWidthOfText");function Ei(c,s,B){let L=c.append("text"),_=Da(L,1,s);Pa(_,[{content:B,type:"normal"}]);let I=_.node()?.getBoundingClientRect();if(I)L.remove();return I}e(Ei,"computeDimensionOfText");function Vf(c,s,B,L=!1,_=!1){let O=s.append("g"),D=O.insert("rect").attr("class","background").attr("style","stroke: none"),P=O.append("text").attr("y","-10.1");if(_)P.attr("text-anchor","middle");let W=0;for(let R of B){let Y=e((U)=>Gf(O,1.1,U)<=c,"checkWidth"),G=Y(R)?[R]:Xf(R,Y);for(let U of G){let J=Da(P,W,1.1,_);Pa(J,U),W++}}if(L){let R=P.node().getBBox(),Y=2;return D.attr("x",R.x-2).attr("y",R.y-2).attr("width",R.width+4).attr("height",R.height+4),O.node()}else return P.node()}e(Vf,"createFormattedText");function nc(c){let s=/&(amp|lt|gt);/g;return c.replace(s,(B,L)=>{switch(L){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return B}})}e(nc,"decodeHTMLEntities");function Pa(c,s){c.text(""),s.forEach((B,L)=>{let _=c.append("tspan").attr("font-style",B.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",B.type==="strong"?"bold":"normal");if(L===0)_.text(nc(B.content));else _.text(" "+nc(B.content))})}e(Pa,"updateTextContentAndStyles");async function Zf(c,s={}){let B=[];c.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(_,I,O)=>(B.push((async()=>{let D=`${I}:${O}`;if(await bf(D))return await ke(D,void 0,{class:"label-icon"});else return`<i class='${w(_,s).replace(":"," ")}'></i>`})()),_));let L=await Promise.all(B);return c.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>L.shift()??"")}e(Zf,"replaceIconSubstring");var Z=e(async(c,s="",{style:B="",isTitle:L=!1,classes:_="",useHtmlLabels:I=!0,markdown:O=!0,isNode:D=!0,width:P=200,addSvgBackground:W=!1}={},R)=>{if(t.debug("XYZ createText",s,B,L,_,I,D,"addSvgBackground: ",W),I){let Y=O?Hf(s,R):Nf(s),G=await Zf(Te(Y),R),U=s.replace(/\\\\/g,"\\"),J={isNode:D,label:H(s)?U:G,labelStyle:B.replace("fill:","color:")};return await Uf(c,J,P,_,W,R)}else{let Y=Te(s.replace(/<br\s*\/?>/g,"<br/>")),G=O?Wf(Y.replace("<br>","<br/>"),R):zf(Y),U=Vf(P,c,G,s?W:!1,!D);if(D){if(/stroke:/.exec(B))B=B.replace("stroke:","lineColor:");let J=B.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");n(U).attr("style",J)}else{let J=B.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");n(U).select("rect").attr("style",J.replace(/background:/g,"fill:"));let tt=B.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");n(U).select("text").attr("style",tt)}if(L)n(U).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else n(U).selectAll("tspan.text-outer-tspan").classed("row",!0);return U}},"createText");function hc(c,s,B){if(c&&c.length){let[L,_]=s,I=Math.PI/180*B,O=Math.cos(I),D=Math.sin(I);for(let P of c){let[W,R]=P;P[0]=(W-L)*O-(R-_)*D+L,P[1]=(W-L)*D+(R-_)*O+_}}}function Pk(c,s){return c[0]===s[0]&&c[1]===s[1]}function Rk(c,s,B,L=1){let _=B,I=Math.max(s,0.1),O=c[0]&&c[0][0]&&typeof c[0][0]=="number"?[c]:c,D=[0,0];if(_)for(let W of O)hc(W,D,_);let P=function(W,R,Y){let G=[];for(let at of W){let nt=[...at];Pk(nt[0],nt[nt.length-1])||nt.push([nt[0][0],nt[0][1]]),nt.length>2&&G.push(nt)}let U=[];R=Math.max(R,0.1);let J=[];for(let at of G)for(let nt=0;nt<at.length-1;nt++){let ut=at[nt],dt=at[nt+1];if(ut[1]!==dt[1]){let kt=Math.min(ut[1],dt[1]);J.push({ymin:kt,ymax:Math.max(ut[1],dt[1]),x:kt===ut[1]?ut[0]:dt[0],islope:(dt[0]-ut[0])/(dt[1]-ut[1])})}}if(J.sort((at,nt)=>at.ymin<nt.ymin?-1:at.ymin>nt.ymin?1:at.x<nt.x?-1:at.x>nt.x?1:at.ymax===nt.ymax?0:(at.ymax-nt.ymax)/Math.abs(at.ymax-nt.ymax)),!J.length)return U;let tt=[],et=J[0].ymin,it=0;for(;tt.length||J.length;){if(J.length){let at=-1;for(let nt=0;nt<J.length&&!(J[nt].ymin>et);nt++)at=nt;J.splice(0,at+1).forEach((nt)=>{tt.push({s:et,edge:nt})})}if(tt=tt.filter((at)=>!(at.edge.ymax<=et)),tt.sort((at,nt)=>at.edge.x===nt.edge.x?0:(at.edge.x-nt.edge.x)/Math.abs(at.edge.x-nt.edge.x)),(Y!==1||it%R==0)&&tt.length>1)for(let at=0;at<tt.length;at+=2){let nt=at+1;if(nt>=tt.length)break;let ut=tt[at].edge,dt=tt[nt].edge;U.push([[Math.round(ut.x),et],[Math.round(dt.x),et]])}et+=Y,tt.forEach((at)=>{at.edge.x=at.edge.x+Y*at.edge.islope}),it++}return U}(O,I,L);if(_){for(let W of O)hc(W,D,-_);(function(W,R,Y){let G=[];W.forEach((U)=>G.push(...U)),hc(G,R,Y)})(P,D,-_)}return P}function Ss(c,s){var B;let L=s.hachureAngle+90,_=s.hachureGap;_<0&&(_=4*s.strokeWidth),_=Math.round(Math.max(_,0.1));let I=1;return s.roughness>=1&&(((B=s.randomizer)===null||B===void 0?void 0:B.next())||Math.random())>0.7&&(I=_),Rk(c,_,L,I||1)}class Xa{constructor(c){this.helper=c}fillPolygons(c,s){return this._fillPolygons(c,s)}_fillPolygons(c,s){let B=Ss(c,s);return{type:"fillSketch",ops:this.renderLines(B,s)}}renderLines(c,s){let B=[];for(let L of c)B.push(...this.helper.doubleLineOps(L[0][0],L[0][1],L[1][0],L[1][1],s));return B}}function Ua(c){let s=c[0],B=c[1];return Math.sqrt(Math.pow(s[0]-B[0],2)+Math.pow(s[1]-B[1],2))}class sg extends Xa{fillPolygons(c,s){let B=s.hachureGap;B<0&&(B=4*s.strokeWidth),B=Math.max(B,0.1);let L=Ss(c,Object.assign({},s,{hachureGap:B})),_=Math.PI/180*s.hachureAngle,I=[],O=0.5*B*Math.cos(_),D=0.5*B*Math.sin(_);for(let[P,W]of L)Ua([P,W])&&I.push([[P[0]-O,P[1]+D],[...W]],[[P[0]+O,P[1]-D],[...W]]);return{type:"fillSketch",ops:this.renderLines(I,s)}}}class ag extends Xa{fillPolygons(c,s){let B=this._fillPolygons(c,s),L=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),_=this._fillPolygons(c,L);return B.ops=B.ops.concat(_.ops),B}}class ng{constructor(c){this.helper=c}fillPolygons(c,s){let B=Ss(c,s=Object.assign({},s,{hachureAngle:0}));return this.dotsOnLines(B,s)}dotsOnLines(c,s){let B=[],L=s.hachureGap;L<0&&(L=4*s.strokeWidth),L=Math.max(L,0.1);let _=s.fillWeight;_<0&&(_=s.strokeWidth/2);let I=L/4;for(let O of c){let D=Ua(O),P=D/L,W=Math.ceil(P)-1,R=D-W*L,Y=(O[0][0]+O[1][0])/2-L/4,G=Math.min(O[0][1],O[1][1]);for(let U=0;U<W;U++){let J=G+R+U*L,tt=Y-I+2*Math.random()*I,et=J-I+2*Math.random()*I,it=this.helper.ellipse(tt,et,_,_,s);B.push(...it.ops)}}return{type:"fillSketch",ops:B}}}class lg{constructor(c){this.helper=c}fillPolygons(c,s){let B=Ss(c,s);return{type:"fillSketch",ops:this.dashedLine(B,s)}}dashedLine(c,s){let B=s.dashOffset<0?s.hachureGap<0?4*s.strokeWidth:s.hachureGap:s.dashOffset,L=s.dashGap<0?s.hachureGap<0?4*s.strokeWidth:s.hachureGap:s.dashGap,_=[];return c.forEach((I)=>{let O=Ua(I),D=Math.floor(O/(B+L)),P=(O+L-D*(B+L))/2,W=I[0],R=I[1];W[0]>R[0]&&(W=I[1],R=I[0]);let Y=Math.atan((R[1]-W[1])/(R[0]-W[0]));for(let G=0;G<D;G++){let U=G*(B+L),J=U+B,tt=[W[0]+U*Math.cos(Y)+P*Math.cos(Y),W[1]+U*Math.sin(Y)+P*Math.sin(Y)],et=[W[0]+J*Math.cos(Y)+P*Math.cos(Y),W[1]+J*Math.sin(Y)+P*Math.sin(Y)];_.push(...this.helper.doubleLineOps(tt[0],tt[1],et[0],et[1],s))}}),_}}class hg{constructor(c){this.helper=c}fillPolygons(c,s){let B=s.hachureGap<0?4*s.strokeWidth:s.hachureGap,L=s.zigzagOffset<0?B:s.zigzagOffset,_=Ss(c,s=Object.assign({},s,{hachureGap:B+L}));return{type:"fillSketch",ops:this.zigzagLines(_,L,s)}}zigzagLines(c,s,B){let L=[];return c.forEach((_)=>{let I=Ua(_),O=Math.round(I/(2*s)),D=_[0],P=_[1];D[0]>P[0]&&(D=_[1],P=_[0]);let W=Math.atan((P[1]-D[1])/(P[0]-D[0]));for(let R=0;R<O;R++){let Y=2*R*s,G=2*(R+1)*s,U=Math.sqrt(2*Math.pow(s,2)),J=[D[0]+Y*Math.cos(W),D[1]+Y*Math.sin(W)],tt=[D[0]+G*Math.cos(W),D[1]+G*Math.sin(W)],et=[J[0]+U*Math.cos(W+Math.PI/4),J[1]+U*Math.sin(W+Math.PI/4)];L.push(...this.helper.doubleLineOps(J[0],J[1],et[0],et[1],B),...this.helper.doubleLineOps(et[0],et[1],tt[0],tt[1],B))}}),L}}var nr={};class cg{constructor(c){this.seed=c}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var qk=0,cc=1,Kf=2,Ra={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 uc(c,s){return c.type===s}function xc(c){let s=[],B=function(O){let D=[];for(;O!=="";)if(O.match(/^([ \t\r\n,]+)/))O=O.substr(RegExp.$1.length);else if(O.match(/^([aAcChHlLmMqQsStTvVzZ])/))D[D.length]={type:qk,text:RegExp.$1},O=O.substr(RegExp.$1.length);else{if(!O.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];D[D.length]={type:cc,text:`${parseFloat(RegExp.$1)}`},O=O.substr(RegExp.$1.length)}return D[D.length]={type:Kf,text:""},D}(c),L="BOD",_=0,I=B[_];for(;!uc(I,Kf);){let O=0,D=[];if(L==="BOD"){if(I.text!=="M"&&I.text!=="m")return xc("M0,0"+c);_++,O=Ra[I.text],L=I.text}else uc(I,cc)?O=Ra[L]:(_++,O=Ra[I.text],L=I.text);if(!(_+O<B.length))throw Error("Path data ended short");for(let P=_;P<_+O;P++){let W=B[P];if(!uc(W,cc))throw Error("Param not a number: "+L+","+W.text);D[D.length]=+W.text}if(typeof Ra[L]!="number")throw Error("Bad segment: "+L);{let P={key:L,data:D};s.push(P),_+=O,I=B[_],L==="M"&&(L="L"),L==="m"&&(L="l")}}return s}function ug(c){let s=0,B=0,L=0,_=0,I=[];for(let{key:O,data:D}of c)switch(O){case"M":I.push({key:"M",data:[...D]}),[s,B]=D,[L,_]=D;break;case"m":s+=D[0],B+=D[1],I.push({key:"M",data:[s,B]}),L=s,_=B;break;case"L":I.push({key:"L",data:[...D]}),[s,B]=D;break;case"l":s+=D[0],B+=D[1],I.push({key:"L",data:[s,B]});break;case"C":I.push({key:"C",data:[...D]}),s=D[4],B=D[5];break;case"c":{let P=D.map((W,R)=>R%2?W+B:W+s);I.push({key:"C",data:P}),s=P[4],B=P[5];break}case"Q":I.push({key:"Q",data:[...D]}),s=D[2],B=D[3];break;case"q":{let P=D.map((W,R)=>R%2?W+B:W+s);I.push({key:"Q",data:P}),s=P[2],B=P[3];break}case"A":I.push({key:"A",data:[...D]}),s=D[5],B=D[6];break;case"a":s+=D[5],B+=D[6],I.push({key:"A",data:[D[0],D[1],D[2],D[3],D[4],s,B]});break;case"H":I.push({key:"H",data:[...D]}),s=D[0];break;case"h":s+=D[0],I.push({key:"H",data:[s]});break;case"V":I.push({key:"V",data:[...D]}),B=D[0];break;case"v":B+=D[0],I.push({key:"V",data:[B]});break;case"S":I.push({key:"S",data:[...D]}),s=D[2],B=D[3];break;case"s":{let P=D.map((W,R)=>R%2?W+B:W+s);I.push({key:"S",data:P}),s=P[2],B=P[3];break}case"T":I.push({key:"T",data:[...D]}),s=D[0],B=D[1];break;case"t":s+=D[0],B+=D[1],I.push({key:"T",data:[s,B]});break;case"Z":case"z":I.push({key:"Z",data:[]}),s=L,B=_}return I}function dg(c){let s=[],B="",L=0,_=0,I=0,O=0,D=0,P=0;for(let{key:W,data:R}of c){switch(W){case"M":s.push({key:"M",data:[...R]}),[L,_]=R,[I,O]=R;break;case"C":s.push({key:"C",data:[...R]}),L=R[4],_=R[5],D=R[2],P=R[3];break;case"L":s.push({key:"L",data:[...R]}),[L,_]=R;break;case"H":L=R[0],s.push({key:"L",data:[L,_]});break;case"V":_=R[0],s.push({key:"L",data:[L,_]});break;case"S":{let Y=0,G=0;B==="C"||B==="S"?(Y=L+(L-D),G=_+(_-P)):(Y=L,G=_),s.push({key:"C",data:[Y,G,...R]}),D=R[0],P=R[1],L=R[2],_=R[3];break}case"T":{let[Y,G]=R,U=0,J=0;B==="Q"||B==="T"?(U=L+(L-D),J=_+(_-P)):(U=L,J=_);let tt=L+2*(U-L)/3,et=_+2*(J-_)/3,it=Y+2*(U-Y)/3,at=G+2*(J-G)/3;s.push({key:"C",data:[tt,et,it,at,Y,G]}),D=U,P=J,L=Y,_=G;break}case"Q":{let[Y,G,U,J]=R,tt=L+2*(Y-L)/3,et=_+2*(G-_)/3,it=U+2*(Y-U)/3,at=J+2*(G-J)/3;s.push({key:"C",data:[tt,et,it,at,U,J]}),D=Y,P=G,L=U,_=J;break}case"A":{let Y=Math.abs(R[0]),G=Math.abs(R[1]),U=R[2],J=R[3],tt=R[4],et=R[5],it=R[6];if(Y===0||G===0)s.push({key:"C",data:[L,_,et,it,et,it]}),L=et,_=it;else if(L!==et||_!==it)pg(L,_,et,it,Y,G,U,J,tt).forEach(function(at){s.push({key:"C",data:at})}),L=et,_=it;break}case"Z":s.push({key:"Z",data:[]}),L=I,_=O}B=W}return s}function bs(c,s,B){return[c*Math.cos(B)-s*Math.sin(B),c*Math.sin(B)+s*Math.cos(B)]}function pg(c,s,B,L,_,I,O,D,P,W){let R=(Y=O,Math.PI*Y/180);var Y;let G=[],U=0,J=0,tt=0,et=0;if(W)[U,J,tt,et]=W;else{[c,s]=bs(c,s,-R),[B,L]=bs(B,L,-R);let bt=(c-B)/2,Ct=(s-L)/2,Tt=bt*bt/(_*_)+Ct*Ct/(I*I);Tt>1&&(Tt=Math.sqrt(Tt),_*=Tt,I*=Tt);let wt=_*_,Et=I*I,At=wt*Et-wt*Ct*Ct-Et*bt*bt,Zt=wt*Ct*Ct+Et*bt*bt,Qt=(D===P?-1:1)*Math.sqrt(Math.abs(At/Zt));tt=Qt*_*Ct/I+(c+B)/2,et=Qt*-I*bt/_+(s+L)/2,U=Math.asin(parseFloat(((s-et)/I).toFixed(9))),J=Math.asin(parseFloat(((L-et)/I).toFixed(9))),c<tt&&(U=Math.PI-U),B<tt&&(J=Math.PI-J),U<0&&(U=2*Math.PI+U),J<0&&(J=2*Math.PI+J),P&&U>J&&(U-=2*Math.PI),!P&&J>U&&(J-=2*Math.PI)}let it=J-U;if(Math.abs(it)>120*Math.PI/180){let bt=J,Ct=B,Tt=L;J=P&&J>U?U+120*Math.PI/180*1:U+120*Math.PI/180*-1,G=pg(B=tt+_*Math.cos(J),L=et+I*Math.sin(J),Ct,Tt,_,I,O,0,P,[J,bt,tt,et])}it=J-U;let at=Math.cos(U),nt=Math.sin(U),ut=Math.cos(J),dt=Math.sin(J),kt=Math.tan(it/4),St=1.3333333333333333*_*kt,vt=1.3333333333333333*I*kt,_t=[c,s],Rt=[c+St*nt,s-vt*at],zt=[B+St*dt,L-vt*ut],It=[B,L];if(Rt[0]=2*_t[0]-Rt[0],Rt[1]=2*_t[1]-Rt[1],W)return[Rt,zt,It].concat(G);{G=[Rt,zt,It].concat(G);let bt=[];for(let Ct=0;Ct<G.length;Ct+=3){let Tt=bs(G[Ct][0],G[Ct][1],R),wt=bs(G[Ct+1][0],G[Ct+1][1],R),Et=bs(G[Ct+2][0],G[Ct+2][1],R);bt.push([Tt[0],Tt[1],wt[0],wt[1],Et[0],Et[1]])}return bt}}var zk={randOffset:function(c,s){return le(c,s)},randOffsetWithRange:function(c,s,B){return Ha(c,s,B)},ellipse:function(c,s,B,L,_){let I=gg(B,L,_);return fc(c,s,_,I).opset},doubleLineOps:function(c,s,B,L,_){return Li(c,s,B,L,_,!0)}};function fg(c,s,B,L,_){return{type:"path",ops:Li(c,s,B,L,_)}}function Wa(c,s,B){let L=(c||[]).length;if(L>2){let _=[];for(let I=0;I<L-1;I++)_.push(...Li(c[I][0],c[I][1],c[I+1][0],c[I+1][1],B));return s&&_.push(...Li(c[L-1][0],c[L-1][1],c[0][0],c[0][1],B)),{type:"path",ops:_}}return L===2?fg(c[0][0],c[0][1],c[1][0],c[1][1],B):{type:"path",ops:[]}}function Wk(c,s,B,L,_){return function(I,O){return Wa(I,!0,O)}([[c,s],[c+B,s],[c+B,s+L],[c,s+L]],_)}function Qf(c,s){if(c.length){let B=typeof c[0][0]=="number"?[c]:c,L=qa(B[0],1*(1+0.2*s.roughness),s),_=s.disableMultiStroke?[]:qa(B[0],1.5*(1+0.22*s.roughness),eg(s));for(let I=1;I<B.length;I++){let O=B[I];if(O.length){let D=qa(O,1*(1+0.2*s.roughness),s),P=s.disableMultiStroke?[]:qa(O,1.5*(1+0.22*s.roughness),eg(s));for(let W of D)W.op!=="move"&&L.push(W);for(let W of P)W.op!=="move"&&_.push(W)}}return{type:"path",ops:L.concat(_)}}return{type:"path",ops:[]}}function gg(c,s,B){let L=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(c/2,2)+Math.pow(s/2,2))/2)),_=Math.ceil(Math.max(B.curveStepCount,B.curveStepCount/Math.sqrt(200)*L)),I=2*Math.PI/_,O=Math.abs(c/2),D=Math.abs(s/2),P=1-B.curveFitting;return O+=le(O*P,B),D+=le(D*P,B),{increment:I,rx:O,ry:D}}function fc(c,s,B,L){let[_,I]=rg(L.increment,c,s,L.rx,L.ry,1,L.increment*Ha(0.1,Ha(0.4,1,B),B),B),O=Ya(_,null,B);if(!B.disableMultiStroke&&B.roughness!==0){let[D]=rg(L.increment,c,s,L.rx,L.ry,1.5,0,B),P=Ya(D,null,B);O=O.concat(P)}return{estimatedPoints:I,opset:{type:"path",ops:O}}}function Jf(c,s,B,L,_,I,O,D,P){let W=c,R=s,Y=Math.abs(B/2),G=Math.abs(L/2);Y+=le(0.01*Y,P),G+=le(0.01*G,P);let U=_,J=I;for(;U<0;)U+=2*Math.PI,J+=2*Math.PI;J-U>2*Math.PI&&(U=0,J=2*Math.PI);let tt=2*Math.PI/P.curveStepCount,et=Math.min(tt/2,(J-U)/2),it=ig(et,W,R,Y,G,U,J,1,P);if(!P.disableMultiStroke){let at=ig(et,W,R,Y,G,U,J,1.5,P);it.push(...at)}return O&&(D?it.push(...Li(W,R,W+Y*Math.cos(U),R+G*Math.sin(U),P),...Li(W,R,W+Y*Math.cos(J),R+G*Math.sin(J),P)):it.push({op:"lineTo",data:[W,R]},{op:"lineTo",data:[W+Y*Math.cos(U),R+G*Math.sin(U)]})),{type:"path",ops:it}}function tg(c,s){let B=dg(ug(xc(c))),L=[],_=[0,0],I=[0,0];for(let{key:O,data:D}of B)switch(O){case"M":I=[D[0],D[1]],_=[D[0],D[1]];break;case"L":L.push(...Li(I[0],I[1],D[0],D[1],s)),I=[D[0],D[1]];break;case"C":{let[P,W,R,Y,G,U]=D;L.push(...Nk(P,W,R,Y,G,U,I,s)),I=[G,U];break}case"Z":L.push(...Li(I[0],I[1],_[0],_[1],s)),I=[_[0],_[1]]}return{type:"path",ops:L}}function dc(c,s){let B=[];for(let L of c)if(L.length){let _=s.maxRandomnessOffset||0,I=L.length;if(I>2){B.push({op:"move",data:[L[0][0]+le(_,s),L[0][1]+le(_,s)]});for(let O=1;O<I;O++)B.push({op:"lineTo",data:[L[O][0]+le(_,s),L[O][1]+le(_,s)]})}}return{type:"fillPath",ops:B}}function _o(c,s){return function(B,L){let _=B.fillStyle||"hachure";if(!nr[_])switch(_){case"zigzag":nr[_]||(nr[_]=new sg(L));break;case"cross-hatch":nr[_]||(nr[_]=new ag(L));break;case"dots":nr[_]||(nr[_]=new ng(L));break;case"dashed":nr[_]||(nr[_]=new lg(L));break;case"zigzag-line":nr[_]||(nr[_]=new hg(L));break;default:_="hachure",nr[_]||(nr[_]=new Xa(L))}return nr[_]}(s,zk).fillPolygons(c,s)}function eg(c){let s=Object.assign({},c);return s.randomizer=void 0,c.seed&&(s.seed=c.seed+1),s}function mg(c){return c.randomizer||(c.randomizer=new cg(c.seed||0)),c.randomizer.next()}function Ha(c,s,B,L=1){return B.roughness*L*(mg(B)*(s-c)+c)}function le(c,s,B=1){return Ha(-c,c,s,B)}function Li(c,s,B,L,_,I=!1){let O=I?_.disableMultiStrokeFill:_.disableMultiStroke,D=gc(c,s,B,L,_,!0,!1);if(O)return D;let P=gc(c,s,B,L,_,!0,!0);return D.concat(P)}function gc(c,s,B,L,_,I,O){let D=Math.pow(c-B,2)+Math.pow(s-L,2),P=Math.sqrt(D),W=1;W=P<200?1:P>500?0.4:-0.0016668*P+1.233334;let R=_.maxRandomnessOffset||0;R*R*100>D&&(R=P/10);let Y=R/2,G=0.2+0.2*mg(_),U=_.bowing*_.maxRandomnessOffset*(L-s)/200,J=_.bowing*_.maxRandomnessOffset*(c-B)/200;U=le(U,_,W),J=le(J,_,W);let tt=[],et=()=>le(Y,_,W),it=()=>le(R,_,W),at=_.preserveVertices;return I&&(O?tt.push({op:"move",data:[c+(at?0:et()),s+(at?0:et())]}):tt.push({op:"move",data:[c+(at?0:le(R,_,W)),s+(at?0:le(R,_,W))]})),O?tt.push({op:"bcurveTo",data:[U+c+(B-c)*G+et(),J+s+(L-s)*G+et(),U+c+2*(B-c)*G+et(),J+s+2*(L-s)*G+et(),B+(at?0:et()),L+(at?0:et())]}):tt.push({op:"bcurveTo",data:[U+c+(B-c)*G+it(),J+s+(L-s)*G+it(),U+c+2*(B-c)*G+it(),J+s+2*(L-s)*G+it(),B+(at?0:it()),L+(at?0:it())]}),tt}function qa(c,s,B){if(!c.length)return[];let L=[];L.push([c[0][0]+le(s,B),c[0][1]+le(s,B)]),L.push([c[0][0]+le(s,B),c[0][1]+le(s,B)]);for(let _=1;_<c.length;_++)L.push([c[_][0]+le(s,B),c[_][1]+le(s,B)]),_===c.length-1&&L.push([c[_][0]+le(s,B),c[_][1]+le(s,B)]);return Ya(L,null,B)}function Ya(c,s,B){let L=c.length,_=[];if(L>3){let I=[],O=1-B.curveTightness;_.push({op:"move",data:[c[1][0],c[1][1]]});for(let D=1;D+2<L;D++){let P=c[D];I[0]=[P[0],P[1]],I[1]=[P[0]+(O*c[D+1][0]-O*c[D-1][0])/6,P[1]+(O*c[D+1][1]-O*c[D-1][1])/6],I[2]=[c[D+1][0]+(O*c[D][0]-O*c[D+2][0])/6,c[D+1][1]+(O*c[D][1]-O*c[D+2][1])/6],I[3]=[c[D+1][0],c[D+1][1]],_.push({op:"bcurveTo",data:[I[1][0],I[1][1],I[2][0],I[2][1],I[3][0],I[3][1]]})}if(s&&s.length===2){let D=B.maxRandomnessOffset;_.push({op:"lineTo",data:[s[0]+le(D,B),s[1]+le(D,B)]})}}else L===3?(_.push({op:"move",data:[c[1][0],c[1][1]]}),_.push({op:"bcurveTo",data:[c[1][0],c[1][1],c[2][0],c[2][1],c[2][0],c[2][1]]})):L===2&&_.push(...gc(c[0][0],c[0][1],c[1][0],c[1][1],B,!0,!0));return _}function rg(c,s,B,L,_,I,O,D){let P=[],W=[];if(D.roughness===0){c/=4,W.push([s+L*Math.cos(-c),B+_*Math.sin(-c)]);for(let R=0;R<=2*Math.PI;R+=c){let Y=[s+L*Math.cos(R),B+_*Math.sin(R)];P.push(Y),W.push(Y)}W.push([s+L*Math.cos(0),B+_*Math.sin(0)]),W.push([s+L*Math.cos(c),B+_*Math.sin(c)])}else{let R=le(0.5,D)-Math.PI/2;W.push([le(I,D)+s+0.9*L*Math.cos(R-c),le(I,D)+B+0.9*_*Math.sin(R-c)]);let Y=2*Math.PI+R-0.01;for(let G=R;G<Y;G+=c){let U=[le(I,D)+s+L*Math.cos(G),le(I,D)+B+_*Math.sin(G)];P.push(U),W.push(U)}W.push([le(I,D)+s+L*Math.cos(R+2*Math.PI+0.5*O),le(I,D)+B+_*Math.sin(R+2*Math.PI+0.5*O)]),W.push([le(I,D)+s+0.98*L*Math.cos(R+O),le(I,D)+B+0.98*_*Math.sin(R+O)]),W.push([le(I,D)+s+0.9*L*Math.cos(R+0.5*O),le(I,D)+B+0.9*_*Math.sin(R+0.5*O)])}return[W,P]}function ig(c,s,B,L,_,I,O,D,P){let W=I+le(0.1,P),R=[];R.push([le(D,P)+s+0.9*L*Math.cos(W-c),le(D,P)+B+0.9*_*Math.sin(W-c)]);for(let Y=W;Y<=O;Y+=c)R.push([le(D,P)+s+L*Math.cos(Y),le(D,P)+B+_*Math.sin(Y)]);return R.push([s+L*Math.cos(O),B+_*Math.sin(O)]),R.push([s+L*Math.cos(O),B+_*Math.sin(O)]),Ya(R,null,P)}function Nk(c,s,B,L,_,I,O,D){let P=[],W=[D.maxRandomnessOffset||1,(D.maxRandomnessOffset||1)+0.3],R=[0,0],Y=D.disableMultiStroke?1:2,G=D.preserveVertices;for(let U=0;U<Y;U++)U===0?P.push({op:"move",data:[O[0],O[1]]}):P.push({op:"move",data:[O[0]+(G?0:le(W[0],D)),O[1]+(G?0:le(W[0],D))]}),R=G?[_,I]:[_+le(W[U],D),I+le(W[U],D)],P.push({op:"bcurveTo",data:[c+le(W[U],D),s+le(W[U],D),B+le(W[U],D),L+le(W[U],D),R[0],R[1]]});return P}function ks(c){return[...c]}function og(c,s=0){let B=c.length;if(B<3)throw Error("A curve must have at least three points.");let L=[];if(B===3)L.push(ks(c[0]),ks(c[1]),ks(c[2]),ks(c[2]));else{let _=[];_.push(c[0],c[0]);for(let D=1;D<c.length;D++)_.push(c[D]),D===c.length-1&&_.push(c[D]);let I=[],O=1-s;L.push(ks(_[0]));for(let D=1;D+2<_.length;D++){let P=_[D];I[0]=[P[0],P[1]],I[1]=[P[0]+(O*_[D+1][0]-O*_[D-1][0])/6,P[1]+(O*_[D+1][1]-O*_[D-1][1])/6],I[2]=[_[D+1][0]+(O*_[D][0]-O*_[D+2][0])/6,_[D+1][1]+(O*_[D][1]-O*_[D+2][1])/6],I[3]=[_[D+1][0],_[D+1][1]],L.push(I[1],I[2],I[3])}}return L}function Na(c,s){return Math.pow(c[0]-s[0],2)+Math.pow(c[1]-s[1],2)}function Hk(c,s,B){let L=Na(s,B);if(L===0)return Na(c,s);let _=((c[0]-s[0])*(B[0]-s[0])+(c[1]-s[1])*(B[1]-s[1]))/L;return _=Math.max(0,Math.min(1,_)),Na(c,io(s,B,_))}function io(c,s,B){return[c[0]+(s[0]-c[0])*B,c[1]+(s[1]-c[1])*B]}function mc(c,s,B,L){let _=L||[];if(function(D,P){let W=D[P+0],R=D[P+1],Y=D[P+2],G=D[P+3],U=3*R[0]-2*W[0]-G[0];U*=U;let J=3*R[1]-2*W[1]-G[1];J*=J;let tt=3*Y[0]-2*G[0]-W[0];tt*=tt;let et=3*Y[1]-2*G[1]-W[1];return et*=et,U<tt&&(U=tt),J<et&&(J=et),U+J}(c,s)<B){let D=c[s+0];if(_.length)(I=_[_.length-1],O=D,Math.sqrt(Na(I,O)))>1&&_.push(D);else _.push(D);_.push(c[s+3])}else{let P=c[s+0],W=c[s+1],R=c[s+2],Y=c[s+3],G=io(P,W,0.5),U=io(W,R,0.5),J=io(R,Y,0.5),tt=io(G,U,0.5),et=io(U,J,0.5),it=io(tt,et,0.5);mc([P,G,tt,it],0,B,_),mc([it,et,J,Y],0,B,_)}var I,O;return _}function Yk(c,s){return ja(c,0,c.length,s)}function ja(c,s,B,L,_){let I=_||[],O=c[s],D=c[B-1],P=0,W=1;for(let R=s+1;R<B-1;++R){let Y=Hk(c[R],O,D);Y>P&&(P=Y,W=R)}return Math.sqrt(P)>L?(ja(c,s,W+1,L,I),ja(c,W,B,L,I)):(I.length||I.push(O),I.push(D)),I}function pc(c,s=0.15,B){let L=[],_=(c.length-1)/3;for(let I=0;I<_;I++)mc(c,3*I,s,L);return B&&B>0?ja(L,0,L.length,B):L}var ur="none";class ws{constructor(c){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:0.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:0.8},this.config=c||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(c){return c?Object.assign({},this.defaultOptions,c):this.defaultOptions}_d(c,s,B){return{shape:c,sets:s||[],options:B||this.defaultOptions}}line(c,s,B,L,_){let I=this._o(_);return this._d("line",[fg(c,s,B,L,I)],I)}rectangle(c,s,B,L,_){let I=this._o(_),O=[],D=Wk(c,s,B,L,I);if(I.fill){let P=[[c,s],[c+B,s],[c+B,s+L],[c,s+L]];I.fillStyle==="solid"?O.push(dc([P],I)):O.push(_o([P],I))}return I.stroke!==ur&&O.push(D),this._d("rectangle",O,I)}ellipse(c,s,B,L,_){let I=this._o(_),O=[],D=gg(B,L,I),P=fc(c,s,I,D);if(I.fill)if(I.fillStyle==="solid"){let W=fc(c,s,I,D).opset;W.type="fillPath",O.push(W)}else O.push(_o([P.estimatedPoints],I));return I.stroke!==ur&&O.push(P.opset),this._d("ellipse",O,I)}circle(c,s,B,L){let _=this.ellipse(c,s,B,B,L);return _.shape="circle",_}linearPath(c,s){let B=this._o(s);return this._d("linearPath",[Wa(c,!1,B)],B)}arc(c,s,B,L,_,I,O=!1,D){let P=this._o(D),W=[],R=Jf(c,s,B,L,_,I,O,!0,P);if(O&&P.fill)if(P.fillStyle==="solid"){let Y=Object.assign({},P);Y.disableMultiStroke=!0;let G=Jf(c,s,B,L,_,I,!0,!1,Y);G.type="fillPath",W.push(G)}else W.push(function(Y,G,U,J,tt,et,it){let at=Y,nt=G,ut=Math.abs(U/2),dt=Math.abs(J/2);ut+=le(0.01*ut,it),dt+=le(0.01*dt,it);let kt=tt,St=et;for(;kt<0;)kt+=2*Math.PI,St+=2*Math.PI;St-kt>2*Math.PI&&(kt=0,St=2*Math.PI);let vt=(St-kt)/it.curveStepCount,_t=[];for(let Rt=kt;Rt<=St;Rt+=vt)_t.push([at+ut*Math.cos(Rt),nt+dt*Math.sin(Rt)]);return _t.push([at+ut*Math.cos(St),nt+dt*Math.sin(St)]),_t.push([at,nt]),_o([_t],it)}(c,s,B,L,_,I,P));return P.stroke!==ur&&W.push(R),this._d("arc",W,P)}curve(c,s){let B=this._o(s),L=[],_=Qf(c,B);if(B.fill&&B.fill!==ur)if(B.fillStyle==="solid"){let I=Qf(c,Object.assign(Object.assign({},B),{disableMultiStroke:!0,roughness:B.roughness?B.roughness+B.fillShapeRoughnessGain:0}));L.push({type:"fillPath",ops:this._mergedShape(I.ops)})}else{let I=[],O=c;if(O.length){let D=typeof O[0][0]=="number"?[O]:O;for(let P of D)P.length<3?I.push(...P):P.length===3?I.push(...pc(og([P[0],P[0],P[1],P[2]]),10,(1+B.roughness)/2)):I.push(...pc(og(P),10,(1+B.roughness)/2))}I.length&&L.push(_o([I],B))}return B.stroke!==ur&&L.push(_),this._d("curve",L,B)}polygon(c,s){let B=this._o(s),L=[],_=Wa(c,!0,B);return B.fill&&(B.fillStyle==="solid"?L.push(dc([c],B)):L.push(_o([c],B))),B.stroke!==ur&&L.push(_),this._d("polygon",L,B)}path(c,s){let B=this._o(s),L=[];if(!c)return this._d("path",L,B);c=(c||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let _=B.fill&&B.fill!=="transparent"&&B.fill!==ur,I=B.stroke!==ur,O=!!(B.simplification&&B.simplification<1),D=function(W,R,Y){let G=dg(ug(xc(W))),U=[],J=[],tt=[0,0],et=[],it=()=>{et.length>=4&&J.push(...pc(et,R)),et=[]},at=()=>{it(),J.length&&(U.push(J),J=[])};for(let{key:ut,data:dt}of G)switch(ut){case"M":at(),tt=[dt[0],dt[1]],J.push(tt);break;case"L":it(),J.push([dt[0],dt[1]]);break;case"C":if(!et.length){let kt=J.length?J[J.length-1]:tt;et.push([kt[0],kt[1]])}et.push([dt[0],dt[1]]),et.push([dt[2],dt[3]]),et.push([dt[4],dt[5]]);break;case"Z":it(),J.push([tt[0],tt[1]])}if(at(),!Y)return U;let nt=[];for(let ut of U){let dt=Yk(ut,Y);dt.length&&nt.push(dt)}return nt}(c,1,O?4-4*(B.simplification||1):(1+B.roughness)/2),P=tg(c,B);if(_)if(B.fillStyle==="solid")if(D.length===1){let W=tg(c,Object.assign(Object.assign({},B),{disableMultiStroke:!0,roughness:B.roughness?B.roughness+B.fillShapeRoughnessGain:0}));L.push({type:"fillPath",ops:this._mergedShape(W.ops)})}else L.push(dc(D,B));else L.push(_o(D,B));return I&&(O?D.forEach((W)=>{L.push(Wa(W,!1,B))}):L.push(P)),this._d("path",L,B)}opsToPath(c,s){let B="";for(let L of c.ops){let _=typeof s=="number"&&s>=0?L.data.map((I)=>+I.toFixed(s)):L.data;switch(L.op){case"move":B+=`M${_[0]} ${_[1]} `;break;case"bcurveTo":B+=`C${_[0]} ${_[1]}, ${_[2]} ${_[3]}, ${_[4]} ${_[5]} `;break;case"lineTo":B+=`L${_[0]} ${_[1]} `}}return B.trim()}toPaths(c){let s=c.sets||[],B=c.options||this.defaultOptions,L=[];for(let _ of s){let I=null;switch(_.type){case"path":I={d:this.opsToPath(_),stroke:B.stroke,strokeWidth:B.strokeWidth,fill:ur};break;case"fillPath":I={d:this.opsToPath(_),stroke:ur,strokeWidth:0,fill:B.fill||ur};break;case"fillSketch":I=this.fillSketch(_,B)}I&&L.push(I)}return L}fillSketch(c,s){let B=s.fillWeight;return B<0&&(B=s.strokeWidth/2),{d:this.opsToPath(c),stroke:s.fill||ur,strokeWidth:B,fill:ur}}_mergedShape(c){return c.filter((s,B)=>B===0||s.op!=="move")}}class xg{constructor(c,s){this.canvas=c,this.ctx=this.canvas.getContext("2d"),this.gen=new ws(s)}draw(c){let s=c.sets||[],B=c.options||this.getDefaultOptions(),L=this.ctx,_=c.options.fixedDecimalPlaceDigits;for(let I of s)switch(I.type){case"path":L.save(),L.strokeStyle=B.stroke==="none"?"transparent":B.stroke,L.lineWidth=B.strokeWidth,B.strokeLineDash&&L.setLineDash(B.strokeLineDash),B.strokeLineDashOffset&&(L.lineDashOffset=B.strokeLineDashOffset),this._drawToContext(L,I,_),L.restore();break;case"fillPath":{L.save(),L.fillStyle=B.fill||"";let O=c.shape==="curve"||c.shape==="polygon"||c.shape==="path"?"evenodd":"nonzero";this._drawToContext(L,I,_,O),L.restore();break}case"fillSketch":this.fillSketch(L,I,B)}}fillSketch(c,s,B){let L=B.fillWeight;L<0&&(L=B.strokeWidth/2),c.save(),B.fillLineDash&&c.setLineDash(B.fillLineDash),B.fillLineDashOffset&&(c.lineDashOffset=B.fillLineDashOffset),c.strokeStyle=B.fill||"",c.lineWidth=L,this._drawToContext(c,s,B.fixedDecimalPlaceDigits),c.restore()}_drawToContext(c,s,B,L="nonzero"){c.beginPath();for(let _ of s.ops){let I=typeof B=="number"&&B>=0?_.data.map((O)=>+O.toFixed(B)):_.data;switch(_.op){case"move":c.moveTo(I[0],I[1]);break;case"bcurveTo":c.bezierCurveTo(I[0],I[1],I[2],I[3],I[4],I[5]);break;case"lineTo":c.lineTo(I[0],I[1])}}s.type==="fillPath"?c.fill(L):c.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(c,s,B,L,_){let I=this.gen.line(c,s,B,L,_);return this.draw(I),I}rectangle(c,s,B,L,_){let I=this.gen.rectangle(c,s,B,L,_);return this.draw(I),I}ellipse(c,s,B,L,_){let I=this.gen.ellipse(c,s,B,L,_);return this.draw(I),I}circle(c,s,B,L){let _=this.gen.circle(c,s,B,L);return this.draw(_),_}linearPath(c,s){let B=this.gen.linearPath(c,s);return this.draw(B),B}polygon(c,s){let B=this.gen.polygon(c,s);return this.draw(B),B}arc(c,s,B,L,_,I,O=!1,D){let P=this.gen.arc(c,s,B,L,_,I,O,D);return this.draw(P),P}curve(c,s){let B=this.gen.curve(c,s);return this.draw(B),B}path(c,s){let B=this.gen.path(c,s);return this.draw(B),B}}var za="http://www.w3.org/2000/svg";class yg{constructor(c,s){this.svg=c,this.gen=new ws(s)}draw(c){let s=c.sets||[],B=c.options||this.getDefaultOptions(),L=this.svg.ownerDocument||window.document,_=L.createElementNS(za,"g"),I=c.options.fixedDecimalPlaceDigits;for(let O of s){let D=null;switch(O.type){case"path":D=L.createElementNS(za,"path"),D.setAttribute("d",this.opsToPath(O,I)),D.setAttribute("stroke",B.stroke),D.setAttribute("stroke-width",B.strokeWidth+""),D.setAttribute("fill","none"),B.strokeLineDash&&D.setAttribute("stroke-dasharray",B.strokeLineDash.join(" ").trim()),B.strokeLineDashOffset&&D.setAttribute("stroke-dashoffset",`${B.strokeLineDashOffset}`);break;case"fillPath":D=L.createElementNS(za,"path"),D.setAttribute("d",this.opsToPath(O,I)),D.setAttribute("stroke","none"),D.setAttribute("stroke-width","0"),D.setAttribute("fill",B.fill||""),c.shape!=="curve"&&c.shape!=="polygon"||D.setAttribute("fill-rule","evenodd");break;case"fillSketch":D=this.fillSketch(L,O,B)}D&&_.appendChild(D)}return _}fillSketch(c,s,B){let L=B.fillWeight;L<0&&(L=B.strokeWidth/2);let _=c.createElementNS(za,"path");return _.setAttribute("d",this.opsToPath(s,B.fixedDecimalPlaceDigits)),_.setAttribute("stroke",B.fill||""),_.setAttribute("stroke-width",L+""),_.setAttribute("fill","none"),B.fillLineDash&&_.setAttribute("stroke-dasharray",B.fillLineDash.join(" ").trim()),B.fillLineDashOffset&&_.setAttribute("stroke-dashoffset",`${B.fillLineDashOffset}`),_}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(c,s){return this.gen.opsToPath(c,s)}line(c,s,B,L,_){let I=this.gen.line(c,s,B,L,_);return this.draw(I)}rectangle(c,s,B,L,_){let I=this.gen.rectangle(c,s,B,L,_);return this.draw(I)}ellipse(c,s,B,L,_){let I=this.gen.ellipse(c,s,B,L,_);return this.draw(I)}circle(c,s,B,L){let _=this.gen.circle(c,s,B,L);return this.draw(_)}linearPath(c,s){let B=this.gen.linearPath(c,s);return this.draw(B)}polygon(c,s){let B=this.gen.polygon(c,s);return this.draw(B)}arc(c,s,B,L,_,I,O=!1,D){let P=this.gen.arc(c,s,B,L,_,I,O,D);return this.draw(P)}curve(c,s){let B=this.gen.curve(c,s);return this.draw(B)}path(c,s){let B=this.gen.path(c,s);return this.draw(B)}}var o={canvas:(c,s)=>new xg(c,s),svg:(c,s)=>new yg(c,s),generator:(c)=>new ws(c),newSeed:()=>ws.newSeed()};var pe=e(async(c,s,B)=>{let L,_=s.useHtmlLabels||$e(r()?.htmlLabels);if(!B)L="node default";else L=B;let I=c.insert("g").attr("class",L).attr("id",s.domId||s.id),O=I.insert("g").attr("class","label").attr("style",ze(s.labelStyle)),D;if(s.label===void 0)D="";else D=typeof s.label==="string"?s.label:s.label[0];let P=!!s.icon||!!s.img,W=s.labelType==="markdown",R=await Z(O,w(Te(D),r()),{useHtmlLabels:_,width:s.width||r().flowchart?.wrappingWidth,classes:W?"markdown-node-label":"",style:s.labelStyle,addSvgBackground:P,markdown:W},r()),Y=R.getBBox(),G=(s?.padding??0)/2;if(_){let U=R.children[0],J=n(R);await an(U,D),Y=U.getBoundingClientRect(),J.attr("width",Y.width),J.attr("height",Y.height)}if(_)O.attr("transform","translate("+-Y.width/2+", "+-Y.height/2+")");else O.attr("transform","translate(0, "+-Y.height/2+")");if(s.centerLabel)O.attr("transform","translate("+-Y.width/2+", "+-Y.height/2+")");return O.insert("rect",":first-child"),{shapeSvg:I,bbox:Y,halfPadding:G,label:O}},"labelHelper"),yc=e(async(c,s,B)=>{let L=B.useHtmlLabels??M(r()),_=c.insert("g").attr("class","label").attr("style",B.labelStyle||""),I=await Z(_,w(Te(s),r()),{useHtmlLabels:L,width:B.width||r()?.flowchart?.wrappingWidth,style:B.labelStyle,addSvgBackground:!!B.icon||!!B.img}),O=I.getBBox(),D=B.padding/2;if(M(r())){let P=I.children[0],W=n(I);O=P.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}if(L)_.attr("transform","translate("+-O.width/2+", "+-O.height/2+")");else _.attr("transform","translate(0, "+-O.height/2+")");if(B.centerLabel)_.attr("transform","translate("+-O.width/2+", "+-O.height/2+")");return _.insert("rect",":first-child"),{shapeSvg:c,bbox:O,halfPadding:D,label:_}},"insertLabel"),C=e((c,s)=>{let B=s.node().getBBox();c.width=B.width,c.height=B.height},"updateNodeBounds"),oe=e((c,s)=>(c.look==="handDrawn"?"rough-node":"node")+" "+c.cssClasses+" "+(s||""),"getNodeClasses");function ye(c){let s=c.map((B,L)=>`${L===0?"M":"L"}${B.x},${B.y}`);return s.push("Z"),s.join(" ")}e(ye,"createPathFromPoints");function Mi(c,s,B,L,_,I){let O=[],D=50,P=B-c,W=L-s,R=P/I,Y=2*Math.PI/R,G=s+W/2;for(let U=0;U<=50;U++){let J=U/50,tt=c+J*P,et=G+_*Math.sin(Y*(tt-c));O.push({x:tt,y:et})}return O}e(Mi,"generateFullSineWavePoints");function Bs(c,s,B,L,_,I){let O=[],D=_*Math.PI/180,R=(I*Math.PI/180-D)/(L-1);for(let Y=0;Y<L;Y++){let G=D+Y*R,U=c+B*Math.cos(G),J=s+B*Math.sin(G);O.push({x:-U,y:-J})}return O}e(Bs,"generateCirclePoints");function bc(c){let s=Array.from(c.childNodes).filter((P)=>P.tagName==="path"),B=document.createElementNS("http://www.w3.org/2000/svg","path"),L=s.map((P)=>P.getAttribute("d")).filter((P)=>P!==null).join(" ");B.setAttribute("d",L);let _=s.find((P)=>P.getAttribute("fill")!=="none"),I=s.find((P)=>P.getAttribute("stroke")!=="none"),O=e((P,W)=>P?.getAttribute(W)??void 0,"getAttr");if(_){let P={fill:O(_,"fill"),"fill-opacity":O(_,"fill-opacity")??"1"};Object.entries(P).forEach(([W,R])=>{if(R)B.setAttribute(W,R)})}if(I){let P={stroke:O(I,"stroke"),"stroke-width":O(I,"stroke-width")??"1","stroke-opacity":O(I,"stroke-opacity")??"1"};Object.entries(P).forEach(([W,R])=>{if(R)B.setAttribute(W,R)})}let D=document.createElementNS("http://www.w3.org/2000/svg","g");return D.appendChild(B),D}e(bc,"mergePaths");var jk=e((c,s)=>{var{x:B,y:L}=c,_=s.x-B,I=s.y-L,O=c.width/2,D=c.height/2,P,W;if(Math.abs(I)*O>Math.abs(_)*D){if(I<0)D=-D;P=I===0?0:D*_/I,W=D}else{if(_<0)O=-O;P=O,W=_===0?0:O*I/_}return{x:B+P,y:L+W}},"intersectRect"),so=jk,Xk=e(async(c,s,B,L=!1,_=!1)=>{let I=s||"";if(typeof I==="object")I=I[0];let O=r(),D=M(O);return await Z(c,I,{style:B,isTitle:L,useHtmlLabels:D,markdown:!1,isNode:_,width:Number.POSITIVE_INFINITY},O)},"createLabel"),ai=Xk,Ii=e((c,s,B,L,_)=>["M",c+_,s,"H",c+B-_,"A",_,_,0,0,1,c+B,s+_,"V",s+L-_,"A",_,_,0,0,1,c+B-_,s+L,"H",c+_,"A",_,_,0,0,1,c,s+L-_,"V",s+_,"A",_,_,0,0,1,c+_,s,"Z"].join(" "),"createRoundedRectPathD"),Uk=e(async(c,s)=>{let B=r(),{themeVariables:L,handDrawnSeed:_}=B,{clusterBkg:I,clusterBorder:O}=L,D=O,{labelStyles:P,nodeStyles:W,borderStyles:R,backgroundStyles:Y}=y(s),G=c.insert("g").attr("class","cluster swimlane "+(s.cssClasses||"")).attr("id",s.id).attr("data-id",s.id).attr("data-et","cluster").attr("data-look",s.look),U=$e(B.flowchart.htmlLabels),J=s.direction==="LR",tt=G.insert("g").attr("class","cluster-label swimlane-label"),et=await Z(tt,s.label,{style:s.labelStyle,useHtmlLabels:U,isNode:!0,width:s.width}),it=et.getBBox();if(U){let bt=et.children[0],Ct=n(et);it=bt.getBoundingClientRect(),Ct.attr("width",it.width),Ct.attr("height",it.height)}let at=s.padding??0,nt=s.width<=it.width+at?it.width+at:s.width;if(s.width<=it.width+at)s.diff=(nt-s.width)/2-at;else s.diff=-at;let ut=s.height,dt=s.y-ut/2,kt=s.y+ut/2,St=s.x-nt/2,vt=s.swimlaneContentTop!==void 0?s.swimlaneContentTop:dt+ut/3,_t=J?4:0,Rt=it.height+2*_t,zt,It;if(J){let bt=Math.max(Rt,it.height+2*_t),Ct=St+bt,Tt=Math.max(0,nt-bt);if(s.look==="handDrawn"){let At=o.svg(G),Zt=ee(s,{roughness:0.7,fill:I,stroke:D,fillWeight:3,seed:_}),Qt=ee(s,{roughness:0.7,fill:"none",stroke:D,seed:_}),be=At.rectangle(St,dt,bt,ut,Zt);zt=G.insert(()=>be,":first-child");let we=At.rectangle(Ct,dt,Tt,ut,Qt);It=G.insert(()=>we,":first-child"),zt.select("path:nth-child(2)").attr("style",R.join(";")),zt.select("path").attr("style",Y.join(";").replace("fill","stroke"))}else zt=G.insert("rect",":first-child"),It=G.insert("rect",":first-child"),zt.attr("class","swimlane-title").attr("style",W).attr("x",St).attr("y",dt).attr("width",bt).attr("height",ut).attr("fill",I).attr("stroke",D),It.attr("class","swimlane-body").attr("style",W).attr("x",Ct).attr("y",dt).attr("width",Tt).attr("height",ut).attr("fill","none").attr("stroke",D);let wt=St+bt/2,Et=s.y;tt.attr("transform",`translate(${wt}, ${Et}) rotate(-90) translate(${-it.width/2}, ${-it.height/2})`)}else{let bt=Math.max(0,vt-dt),Ct=Math.min(Rt,bt),Tt=dt+Ct,wt=Math.max(0,kt-Tt),Et=s.x-nt/2;if(s.look==="handDrawn"){let Qt=o.svg(G),be=ee(s,{roughness:0.7,fill:I,stroke:D,fillWeight:3,seed:_}),we=ee(s,{roughness:0.7,fill:"none",stroke:D,seed:_}),Se=Qt.rectangle(Et,dt,nt,Ct,be);zt=G.insert(()=>Se,":first-child");let Ae=Qt.rectangle(Et,Tt,nt,wt,we);It=G.insert(()=>Ae,":first-child"),zt.select("path:nth-child(2)").attr("style",R.join(";")),zt.select("path").attr("style",Y.join(";").replace("fill","stroke"))}else zt=G.insert("rect",":first-child"),It=G.insert("rect",":first-child"),zt.attr("class","swimlane-title").attr("style",W).attr("x",Et).attr("y",dt).attr("width",nt).attr("height",Ct).attr("fill",I).attr("stroke",D),It.attr("class","swimlane-body").attr("style",W).attr("x",Et).attr("y",Tt).attr("width",nt).attr("height",wt).attr("fill","none").attr("stroke",D);let At=s.x-it.width/2,Zt=dt+(Ct-it.height)/2;tt.attr("transform",`translate(${At}, ${Zt})`)}if(t.trace("Swimlane data ",s,JSON.stringify(s)),P){let bt=tt.select("span");if(bt)bt.attr("style",P)}return s.offsetX=0,s.width=nt,s.height=ut,s.offsetY=it.height-at/2,s.intersect=function(bt){return so(s,bt)},{cluster:G,labelBBox:it}},"swimlane"),Mg=e(async(c,s)=>{t.info("Creating subgraph rect for ",s.id,s);let B=r(),{themeVariables:L,handDrawnSeed:_}=B,{clusterBkg:I,clusterBorder:O}=L,{labelStyles:D,nodeStyles:P,borderStyles:W,backgroundStyles:R}=y(s),Y=c.insert("g").attr("class","cluster "+s.cssClasses).attr("id",s.domId).attr("data-look",s.look),G=M(B),U=Y.insert("g").attr("class","cluster-label "),J;if(s.labelType==="markdown")J=await Z(U,s.label,{style:s.labelStyle,useHtmlLabels:G,isNode:!0,width:s.width});else J=await ai(U,s.label,s.labelStyle||"",!1,!0);let tt=J.getBBox();if(M(B)){let St=J.children[0],vt=n(J);tt=St.getBoundingClientRect(),vt.attr("width",tt.width),vt.attr("height",tt.height)}let et=s.width<=tt.width+s.padding?tt.width+s.padding:s.width;if(s.width<=tt.width+s.padding)s.diff=(et-s.width)/2-s.padding;else s.diff=-s.padding;let it=s.height,at=s.x-et/2,nt=s.y-it/2;t.trace("Data ",s,JSON.stringify(s));let ut;if(s.look==="handDrawn"){let St=o.svg(Y),vt=ee(s,{roughness:0.7,fill:I,stroke:O,fillWeight:3,seed:_}),_t=St.path(Ii(at,nt,et,it,0),vt);ut=Y.insert(()=>(t.debug("Rough node insert CXC",_t),_t),":first-child"),ut.select("path:nth-child(2)").attr("style",W.join(";")),ut.select("path").attr("style",R.join(";").replace("fill","stroke"))}else ut=Y.insert("rect",":first-child"),ut.attr("style",P).attr("rx",s.rx).attr("ry",s.ry).attr("x",at).attr("y",nt).attr("width",et).attr("height",it);let{subGraphTitleTopMargin:dt}=Ne(B);if(U.attr("transform",`translate(${s.x-tt.width/2}, ${s.y-s.height/2+dt})`),D){let St=U.select("span");if(St)St.attr("style",D)}let kt=ut.node().getBBox();return s.offsetX=0,s.width=kt.width,s.height=kt.height,s.offsetY=tt.height-s.padding/2,s.intersect=function(St){return so(s,St)},{cluster:Y,labelBBox:tt}},"rect"),Gk=e((c,s)=>{let B=c.insert("g").attr("class","note-cluster").attr("id",s.domId),L=B.insert("rect",":first-child"),_=0*s.padding,I=_/2;L.attr("rx",s.rx).attr("ry",s.ry).attr("x",s.x-s.width/2-I).attr("y",s.y-s.height/2-I).attr("width",s.width+_).attr("height",s.height+_).attr("fill","none");let O=L.node().getBBox();return s.width=O.width,s.height=O.height,s.intersect=function(D){return so(s,D)},{cluster:B,labelBBox:{width:0,height:0}}},"noteGroup"),Vk=e(async(c,s)=>{let B=r(),{themeVariables:L,handDrawnSeed:_}=B,{altBackground:I,compositeBackground:O,compositeTitleBackground:D,nodeBorder:P}=L,W=c.insert("g").attr("class",s.cssClasses).attr("id",s.domId).attr("data-id",s.id).attr("data-look",s.look),R=W.insert("g",":first-child"),Y=W.insert("g").attr("class","cluster-label"),G=W.append("rect"),U=await ai(Y,s.label,s.labelStyle,void 0,!0),J=U.getBBox();if(M(B)){let _t=U.children[0],Rt=n(U);J=_t.getBoundingClientRect(),Rt.attr("width",J.width),Rt.attr("height",J.height)}let tt=0*s.padding,et=tt/2,it=(s.width<=J.width+s.padding?J.width+s.padding:s.width)+tt;if(s.width<=J.width+s.padding)s.diff=(it-s.width)/2-s.padding;else s.diff=-s.padding;let at=s.height+tt,nt=s.height+tt-J.height-6,ut=s.x-it/2,dt=s.y-at/2;s.width=it;let kt=s.y-s.height/2-et+J.height+2,St;if(s.look==="handDrawn"){let _t=s.cssClasses.includes("statediagram-cluster-alt"),Rt=o.svg(W),zt=s.rx||s.ry?Rt.path(Ii(ut,dt,it,at,10),{roughness:0.7,fill:D,fillStyle:"solid",stroke:P,seed:_}):Rt.rectangle(ut,dt,it,at,{seed:_});St=W.insert(()=>zt,":first-child");let It=Rt.rectangle(ut,kt,it,nt,{fill:_t?I:O,fillStyle:_t?"hachure":"solid",stroke:P,seed:_});St=W.insert(()=>zt,":first-child"),G=W.insert(()=>It)}else{St=R.insert("rect",":first-child");let _t="outer";St.attr("class",_t).attr("x",ut).attr("y",dt).attr("width",it).attr("height",at).attr("data-look",s.look),G.attr("class","inner").attr("x",ut).attr("y",kt).attr("width",it).attr("height",nt)}Y.attr("transform",`translate(${s.x-J.width/2}, ${dt+1-(M(B)?0:3)})`);let vt=St.node().getBBox();return s.height=vt.height,s.offsetX=0,s.offsetY=J.height-s.padding/2,s.labelBBox=J,s.intersect=function(_t){return so(s,_t)},{cluster:W,labelBBox:J}},"roundedWithTitle"),Zk=e(async(c,s)=>{t.info("Creating subgraph rect for ",s.id,s);let B=r(),{themeVariables:L,handDrawnSeed:_}=B,{clusterBkg:I,clusterBorder:O}=L,{labelStyles:D,nodeStyles:P,borderStyles:W,backgroundStyles:R}=y(s),Y=c.insert("g").attr("class","cluster "+s.cssClasses).attr("id",s.domId).attr("data-look",s.look),G=M(B),U=Y.insert("g").attr("class","cluster-label "),J=await Z(U,s.label,{style:s.labelStyle,useHtmlLabels:G,isNode:!0,width:s.width}),tt=J.getBBox();if(M(B)){let St=J.children[0],vt=n(J);tt=St.getBoundingClientRect(),vt.attr("width",tt.width),vt.attr("height",tt.height)}let et=s.width<=tt.width+s.padding?tt.width+s.padding:s.width;if(s.width<=tt.width+s.padding)s.diff=(et-s.width)/2-s.padding;else s.diff=-s.padding;let it=s.height,at=s.x-et/2,nt=s.y-it/2;t.trace("Data ",s,JSON.stringify(s));let ut;if(s.look==="handDrawn"){let St=o.svg(Y),vt=ee(s,{roughness:0.7,fill:I,stroke:O,fillWeight:4,seed:_}),_t=St.path(Ii(at,nt,et,it,s.rx),vt);ut=Y.insert(()=>(t.debug("Rough node insert CXC",_t),_t),":first-child"),ut.select("path:nth-child(2)").attr("style",W.join(";")),ut.select("path").attr("style",R.join(";").replace("fill","stroke"))}else ut=Y.insert("rect",":first-child"),ut.attr("style",P).attr("rx",s.rx).attr("ry",s.ry).attr("x",at).attr("y",nt).attr("width",et).attr("height",it);let{subGraphTitleTopMargin:dt}=Ne(B);if(U.attr("transform",`translate(${s.x-tt.width/2}, ${s.y-s.height/2+dt})`),D){let St=U.select("span");if(St)St.attr("style",D)}let kt=ut.node().getBBox();return s.offsetX=0,s.width=kt.width,s.height=kt.height,s.offsetY=tt.height-s.padding/2,s.intersect=function(St){return so(s,St)},{cluster:Y,labelBBox:tt}},"kanbanSection"),Kk=e((c,s)=>{let B=r(),{themeVariables:L,handDrawnSeed:_}=B,{nodeBorder:I}=L,O=c.insert("g").attr("class",s.cssClasses).attr("id",s.domId).attr("data-look",s.look),D=O.insert("g",":first-child"),P=0*s.padding,W=s.width+P;s.diff=-s.padding;let R=s.height+P,Y=s.x-W/2,G=s.y-R/2;s.width=W;let U;if(s.look==="handDrawn"){let et=o.svg(O).rectangle(Y,G,W,R,{fill:"lightgrey",roughness:0.5,strokeLineDash:[5],stroke:I,seed:_});U=O.insert(()=>et,":first-child")}else{U=D.insert("rect",":first-child");let tt="outer";if(s.look==="neo")tt="divider";else tt="divider";U.attr("class",tt).attr("x",Y).attr("y",G).attr("width",W).attr("height",R).attr("data-look",s.look)}let J=U.node().getBBox();return s.height=J.height,s.offsetX=0,s.offsetY=0,s.intersect=function(tt){return so(s,tt)},{cluster:O,labelBBox:{}}},"divider"),Qk=Mg,Jk={rect:Mg,squareRect:Qk,roundedWithTitle:Vk,noteGroup:Gk,divider:Kk,kanbanSection:Zk,swimlane:Uk},Ag=new Map,ct=e(async(c,s)=>{let B=s.shape||"rect",L=await Jk[B](c,s);return Ag.set(s.id,L),L},"insertCluster"),sn=e(()=>{Ag=new Map},"clear");function Eg(c,s){return c.intersect(s)}e(Eg,"intersectNode");var t1=Eg;function $g(c,s,B,L){var{x:_,y:I}=c,O=_-L.x,D=I-L.y,P=Math.sqrt(s*s*D*D+B*B*O*O),W=Math.abs(s*B*O/P);if(L.x<_)W=-W;var R=Math.abs(s*B*D/P);if(L.y<I)R=-R;return{x:_+W,y:I+R}}e($g,"intersectEllipse");var Ig=$g;function Og(c,s,B){return Ig(c,s,s,B)}e(Og,"intersectCircle");var e1=Og;function Dg(c,s,B,L){{let _=s.y-c.y,I=c.x-s.x,O=s.x*c.y-c.x*s.y,D=_*B.x+I*B.y+O,P=_*L.x+I*L.y+O,W=0.000001;if(D!==0&&P!==0&&kc(D,P))return;let R=L.y-B.y,Y=B.x-L.x,G=L.x*B.y-B.x*L.y,U=R*c.x+Y*c.y+G,J=R*s.x+Y*s.y+G;if(Math.abs(U)<0.000001&&Math.abs(J)<0.000001&&kc(U,J))return;let tt=_*Y-R*I;if(tt===0)return;let et=Math.abs(tt/2),it=I*G-Y*O,at=it<0?(it-et)/tt:(it+et)/tt;it=R*O-_*G;let nt=it<0?(it-et)/tt:(it+et)/tt;return{x:at,y:nt}}}e(Dg,"intersectLine");function kc(c,s){return c*s>0}e(kc,"sameSign");var r1=Dg;function Pg(c,s,B){let{x:L,y:_}=c,I=[],{POSITIVE_INFINITY:O,POSITIVE_INFINITY:D}=Number;if(typeof s.forEach==="function")s.forEach(function(R){O=Math.min(O,R.x),D=Math.min(D,R.y)});else O=Math.min(O,s.x),D=Math.min(D,s.y);let P=L-c.width/2-O,W=_-c.height/2-D;for(let R=0;R<s.length;R++){let Y=s[R],G=s[R<s.length-1?R+1:0],U=r1(c,B,{x:P+Y.x,y:W+Y.y},{x:P+G.x,y:W+G.y});if(U)I.push(U)}if(!I.length)return c;if(I.length>1)I.sort(function(R,Y){let G=R.x-B.x,U=R.y-B.y,J=Math.sqrt(G*G+U*U),tt=Y.x-B.x,et=Y.y-B.y,it=Math.sqrt(tt*tt+et*et);return J<it?-1:J===it?0:1});return I[0]}e(Pg,"intersectPolygon");var i1=Pg,Jt={node:t1,circle:e1,ellipse:Ig,polygon:i1,rect:so};function Rg(c,s){let{labelStyles:B}=y(s);s.labelStyle=B;let L=oe(s),_=L;if(!L)_="anchor";let I=c.insert("g").attr("class",_).attr("id",s.domId||s.id),O=1,{cssStyles:D}=s,P=o.svg(I),W=ee(s,{fill:"black",stroke:"none",fillStyle:"solid"});if(s.look!=="handDrawn")W.roughness=0;let R=P.circle(0,0,O*2,W),Y=I.insert(()=>R,":first-child");return Y.attr("class","anchor").attr("style",ze(D)),C(s,Y),s.intersect=function(G){return t.info("Circle intersect",s,O,G),Jt.circle(s,O,G)},I}e(Rg,"anchor");function wc(c,s,B,L,_,I,O){let P=(c+B)/2,W=(s+L)/2,R=Math.atan2(L-s,B-c),Y=(B-c)/2,G=(L-s)/2,U=Y/_,J=G/I,tt=Math.sqrt(U**2+J**2);if(tt>1)throw Error("The given radii are too small to create an arc between the points.");let et=Math.sqrt(1-tt**2),it=P+et*I*Math.sin(R)*(O?-1:1),at=W-et*_*Math.cos(R)*(O?-1:1),nt=Math.atan2((s-at)/I,(c-it)/_),dt=Math.atan2((L-at)/I,(B-it)/_)-nt;if(O&&dt<0)dt+=2*Math.PI;if(!O&&dt>0)dt-=2*Math.PI;let kt=[];for(let St=0;St<20;St++){let vt=St/19,_t=nt+vt*dt,Rt=it+_*Math.cos(_t),zt=at+I*Math.sin(_t);kt.push({x:Rt,y:zt})}return kt}e(wc,"generateArcPoints");function qg(c,s,B){let[L,_]=[s,B].sort((I,O)=>O-I);return _*(1-Math.sqrt(1-(c/L/2)**2))}e(qg,"calculateArcSagitta");async function zg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_,D=e((_t)=>_t+O,"calcTotalHeight"),P=e((_t)=>{let Rt=_t/2;return[Rt/(2.5+_t/50),Rt]},"calcEllipseRadius"),{shapeSvg:W,bbox:R}=await pe(c,s,oe(s)),Y=D(s?.height?s?.height:R.height),[G,U]=P(Y),J=qg(Y,G,U),et=(s?.width?s?.width:R.width)+I*2+J-J,it=Y,{cssStyles:at}=s,nt=[{x:et/2,y:-it/2},{x:-et/2,y:-it/2},...wc(-et/2,-it/2,-et/2,it/2,G,U,!1),{x:et/2,y:it/2},...wc(et/2,it/2,et/2,-it/2,G,U,!0)],ut=o.svg(W),dt=ee(s,{});if(s.look!=="handDrawn")dt.roughness=0,dt.fillStyle="solid";let kt=ye(nt),St=ut.path(kt,dt),vt=W.insert(()=>St,":first-child");if(vt.attr("class","basic label-container outer-path"),at&&s.look!=="handDrawn")vt.selectAll("path").attr("style",at);if(L&&s.look!=="handDrawn")vt.selectAll("path").attr("style",L);return vt.attr("transform",`translate(${G/2}, 0)`),C(s,vt),s.intersect=function(_t){return Jt.polygon(s,nt,_t)},W}e(zg,"bowTieRect");function ni(c,s,B,L){return c.insert("polygon",":first-child").attr("points",L.map(function(_){return _.x+","+_.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-s/2+","+B/2+")")}e(ni,"insertPolygonShape");var Ga=12;async function Wg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?28:_,O=s.look==="neo"?24:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.width??P.width)+(s.look==="neo"?I*2:I+Ga),R=(s?.height??P.height)+(s.look==="neo"?O*2:O),Y=0,G=W,U=-R,J=0,tt=[{x:Y+Ga,y:U},{x:G,y:U},{x:G,y:J},{x:Y,y:J},{x:Y,y:U+Ga},{x:Y+Ga,y:U}],et,{cssStyles:it}=s;if(s.look==="handDrawn"){let at=o.svg(D),nt=ee(s,{}),ut=ye(tt),dt=at.path(ut,nt);if(et=D.insert(()=>dt,":first-child").attr("transform",`translate(${-W/2}, ${R/2})`),it)et.attr("style",it)}else et=ni(D,W,R,tt);if(L)et.attr("style",L);return C(s,et),s.intersect=function(at){return Jt.polygon(s,tt,at)},D}e(Wg,"card");function Ng(c,s){let{nodeStyles:B}=y(s);s.label="";let L=c.insert("g").attr("class",oe(s)).attr("id",s.domId??s.id),{cssStyles:_}=s,I=Math.max(28,s.width??0),O=[{x:0,y:I/2},{x:I/2,y:0},{x:0,y:-I/2},{x:-I/2,y:0}],D=o.svg(L),P=ee(s,{});if(s.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let W=ye(O),R=D.path(W,P),Y=L.insert(()=>R,":first-child");if(_&&s.look!=="handDrawn")Y.selectAll("path").attr("style",_);if(B&&s.look!=="handDrawn")Y.selectAll("path").attr("style",B);return s.width=28,s.height=28,s.intersect=function(G){return Jt.polygon(s,O,G)},L}e(Ng,"choice");async function Sc(c,s,B){let{labelStyles:L,nodeStyles:_}=y(s);s.labelStyle=L;let{shapeSvg:I,bbox:O,halfPadding:D}=await pe(c,s,oe(s)),P=16,W=B?.padding??D,R=s.look==="neo"?O.width/2+P*2:O.width/2+W,Y,{cssStyles:G}=s;if(s.look==="handDrawn"){let U=o.svg(I),J=ee(s,{}),tt=U.circle(0,0,R*2,J);Y=I.insert(()=>tt,":first-child"),Y.attr("class","basic label-container").attr("style",ze(G))}else Y=I.insert("circle",":first-child").attr("class","basic label-container").attr("style",_).attr("r",R).attr("cx",0).attr("cy",0);return C(s,Y),s.calcIntersect=function(U,J){let tt=U.width/2;return Jt.circle(U,tt,J)},s.intersect=function(U){return t.info("Circle intersect",s,R,U),Jt.circle(s,R,U)},I}e(Sc,"circle");function Hg(c){let s=Math.cos(Math.PI/4),B=Math.sin(Math.PI/4),L=c*2,_={x:L/2*s,y:L/2*B},I={x:-(L/2)*s,y:L/2*B},O={x:-(L/2)*s,y:-(L/2)*B},D={x:L/2*s,y:-(L/2)*B};return`M ${I.x},${I.y} L ${D.x},${D.y}
231
- M ${_.x},${_.y} L ${O.x},${O.y}`}e(Hg,"createLine");function Yg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B,s.label="";let _=c.insert("g").attr("class",oe(s)).attr("id",s.domId??s.id),I=Math.max(30,s?.width??0),{cssStyles:O}=s,D=o.svg(_),P=ee(s,{});if(s.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let W=D.circle(0,0,I*2,P),R=Hg(I),Y=D.path(R,P),G=_.insert(()=>W,":first-child");if(G.insert(()=>Y),G.attr("class","outer-path"),O&&s.look!=="handDrawn")G.selectAll("path").attr("style",O);if(L&&s.look!=="handDrawn")G.selectAll("path").attr("style",L);return C(s,G),s.intersect=function(U){return t.info("crossedCircle intersect",s,{radius:I,point:U}),Jt.circle(s,I,U)},_}e(Yg,"crossedCircle");function oi(c,s,B,L=100,_=0,I=180){let O=[],D=_*Math.PI/180,R=(I*Math.PI/180-D)/(L-1);for(let Y=0;Y<L;Y++){let G=D+Y*R,U=c+B*Math.cos(G),J=s+B*Math.sin(G);O.push({x:-U,y:-J})}return O}e(oi,"generateCirclePoints");async function jg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,label:O}=await pe(c,s,oe(s)),D=s.look==="neo"?18:s.padding??0,P=s.look==="neo"?12:s.padding??0,W=I.width+D,R=I.height+P,Y=Math.max(5,R*0.1),{cssStyles:G}=s,U=[...oi(W/2,-R/2,Y,30,-90,0),{x:-W/2-Y,y:Y},...oi(W/2+Y*2,-Y,Y,20,-180,-270),...oi(W/2+Y*2,Y,Y,20,-90,-180),{x:-W/2-Y,y:-R/2},...oi(W/2,R/2,Y,20,0,90)],J=[{x:W/2,y:-R/2-Y},{x:-W/2,y:-R/2-Y},...oi(W/2,-R/2,Y,20,-90,0),{x:-W/2-Y,y:-Y},...oi(W/2+W*0.1,-Y,Y,20,-180,-270),...oi(W/2+W*0.1,Y,Y,20,-90,-180),{x:-W/2-Y,y:R/2},...oi(W/2,R/2,Y,20,0,90),{x:-W/2,y:R/2+Y},{x:W/2,y:R/2+Y}],tt=o.svg(_),et=ee(s,{fill:"none"});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let at=ye(U).replace("Z",""),nt=tt.path(at,et),ut=ye(J),dt=tt.path(ut,{...et}),kt=_.insert("g",":first-child");if(kt.insert(()=>dt,":first-child").attr("stroke-opacity",0),kt.insert(()=>nt,":first-child"),kt.attr("class","text"),G&&s.look!=="handDrawn")kt.selectAll("path").attr("style",G);if(L&&s.look!=="handDrawn")kt.selectAll("path").attr("style",L);return kt.attr("transform",`translate(${Y}, 0)`),O.attr("transform",`translate(${-W/2+Y-(I.x-(I.left??0))},${-R/2+(s.padding??0)/2-(I.y-(I.top??0))})`),C(s,kt),s.intersect=function(St){return Jt.polygon(s,J,St)},_}e(jg,"curlyBraceLeft");function si(c,s,B,L=100,_=0,I=180){let O=[],D=_*Math.PI/180,R=(I*Math.PI/180-D)/(L-1);for(let Y=0;Y<L;Y++){let G=D+Y*R,U=c+B*Math.cos(G),J=s+B*Math.sin(G);O.push({x:U,y:J})}return O}e(si,"generateCirclePoints");async function Xg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,label:O}=await pe(c,s,oe(s)),D=s.look==="neo"?18:s.padding??0,P=s.look==="neo"?12:s.padding??0,W=I.width+(s.look==="neo"?D*2:D),R=I.height+(s.look==="neo"?P*2:P),Y=Math.max(5,R*0.1),{cssStyles:G}=s,U=[...si(W/2,-R/2,Y,20,-90,0),{x:W/2+Y,y:-Y},...si(W/2+Y*2,-Y,Y,20,-180,-270),...si(W/2+Y*2,Y,Y,20,-90,-180),{x:W/2+Y,y:R/2},...si(W/2,R/2,Y,20,0,90)],J=[{x:-W/2,y:-R/2-Y},{x:W/2,y:-R/2-Y},...si(W/2,-R/2,Y,20,-90,0),{x:W/2+Y,y:-Y},...si(W/2+Y*2,-Y,Y,20,-180,-270),...si(W/2+Y*2,Y,Y,20,-90,-180),{x:W/2+Y,y:R/2},...si(W/2,R/2,Y,20,0,90),{x:W/2,y:R/2+Y},{x:-W/2,y:R/2+Y}],tt=o.svg(_),et=ee(s,{fill:"none"});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let at=ye(U).replace("Z",""),nt=tt.path(at,et),ut=ye(J),dt=tt.path(ut,{...et}),kt=_.insert("g",":first-child");if(kt.insert(()=>dt,":first-child").attr("stroke-opacity",0),kt.insert(()=>nt,":first-child"),kt.attr("class","text"),G&&s.look!=="handDrawn")kt.selectAll("path").attr("style",G);if(L&&s.look!=="handDrawn")kt.selectAll("path").attr("style",L);return kt.attr("transform",`translate(${-Y}, 0)`),O.attr("transform",`translate(${-W/2+(s.padding??0)/2-(I.x-(I.left??0))},${-R/2+(s.padding??0)/2-(I.y-(I.top??0))})`),C(s,kt),s.intersect=function(St){return Jt.polygon(s,J,St)},_}e(Xg,"curlyBraceRight");function Ge(c,s,B,L=100,_=0,I=180){let O=[],D=_*Math.PI/180,R=(I*Math.PI/180-D)/(L-1);for(let Y=0;Y<L;Y++){let G=D+Y*R,U=c+B*Math.cos(G),J=s+B*Math.sin(G);O.push({x:-U,y:-J})}return O}e(Ge,"generateCirclePoints");async function Ug(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,label:O}=await pe(c,s,oe(s)),D=s.look==="neo"?18:s.padding??0,P=s.look==="neo"?12:s.padding??0,W=I.width+(s.look==="neo"?D*2:D),R=I.height+(s.look==="neo"?P*2:P),Y=Math.max(5,R*0.1),{cssStyles:G}=s,U=[...Ge(W/2,-R/2,Y,30,-90,0),{x:-W/2-Y,y:Y},...Ge(W/2+Y*2,-Y,Y,20,-180,-270),...Ge(W/2+Y*2,Y,Y,20,-90,-180),{x:-W/2-Y,y:-R/2},...Ge(W/2,R/2,Y,20,0,90)],J=[...Ge(-W/2+Y+Y/2,-R/2,Y,20,-90,-180),{x:W/2-Y/2,y:Y},...Ge(-W/2-Y/2,-Y,Y,20,0,90),...Ge(-W/2-Y/2,Y,Y,20,-90,0),{x:W/2-Y/2,y:-Y},...Ge(-W/2+Y+Y/2,R/2,Y,30,-180,-270)],tt=[{x:W/2,y:-R/2-Y},{x:-W/2,y:-R/2-Y},...Ge(W/2,-R/2,Y,20,-90,0),{x:-W/2-Y,y:-Y},...Ge(W/2+Y*2,-Y,Y,20,-180,-270),...Ge(W/2+Y*2,Y,Y,20,-90,-180),{x:-W/2-Y,y:R/2},...Ge(W/2,R/2,Y,20,0,90),{x:-W/2,y:R/2+Y},{x:W/2-Y-Y/2,y:R/2+Y},...Ge(-W/2+Y+Y/2,-R/2,Y,20,-90,-180),{x:W/2-Y/2,y:Y},...Ge(-W/2-Y/2,-Y,Y,20,0,90),...Ge(-W/2-Y/2,Y,Y,20,-90,0),{x:W/2-Y/2,y:-Y},...Ge(-W/2+Y+Y/2,R/2,Y,30,-180,-270)],et=o.svg(_),it=ee(s,{fill:"none"});if(s.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let nt=ye(U).replace("Z",""),ut=et.path(nt,it),kt=ye(J).replace("Z",""),St=et.path(kt,it),vt=ye(tt),_t=et.path(vt,{...it}),Rt=_.insert("g",":first-child");if(Rt.insert(()=>_t,":first-child").attr("stroke-opacity",0),Rt.insert(()=>ut,":first-child"),Rt.insert(()=>St,":first-child"),Rt.attr("class","text"),G&&s.look!=="handDrawn")Rt.selectAll("path").attr("style",G);if(L&&s.look!=="handDrawn")Rt.selectAll("path").attr("style",L);return Rt.attr("transform",`translate(${Y-Y/4}, 0)`),O.attr("transform",`translate(${-W/2+(s.padding??0)/2-(I.x-(I.left??0))},${-R/2+(s.padding??0)/2-(I.y-(I.top??0))})`),C(s,Rt),s.intersect=function(zt){return Jt.polygon(s,tt,zt)},_}e(Ug,"curlyBraces");async function Gg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_,D=20,P=5,{shapeSvg:W,bbox:R}=await pe(c,s,oe(s)),Y=Math.max(D,(R.width+I*2)*1.25,s?.width??0),G=Math.max(P,R.height+O*2,s?.height??0),U=G/2,{cssStyles:J}=s,tt=o.svg(W),et=ee(s,{});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=Y,at=G,nt=it-U,ut=at/4,dt=[{x:nt,y:0},{x:ut,y:0},{x:0,y:at/2},{x:ut,y:at},{x:nt,y:at},...Bs(-nt,-at/2,U,50,270,90)],kt=ye(dt),St=tt.path(kt,et),vt=W.insert(()=>St,":first-child");if(vt.attr("class","basic label-container outer-path"),J&&s.look!=="handDrawn")vt.selectChildren("path").attr("style",J);if(L&&s.look!=="handDrawn")vt.selectChildren("path").attr("style",L);return vt.attr("transform",`translate(${-Y/2}, ${-G/2})`),C(s,vt),s.intersect=function(_t){return Jt.polygon(s,dt,_t)},W}e(Gg,"curvedTrapezoid");var o1=e((c,s,B,L,_,I)=>[`M${c},${s+I}`,`a${_},${I} 0,0,0 ${B},0`,`a${_},${I} 0,0,0 ${-B},0`,`l0,${L}`,`a${_},${I} 0,0,0 ${B},0`,`l0,${-L}`].join(" "),"createCylinderPathD"),s1=e((c,s,B,L,_,I)=>[`M${c},${s+I}`,`M${c+B},${s+I}`,`a${_},${I} 0,0,0 ${-B},0`,`l0,${L}`,`a${_},${I} 0,0,0 ${B},0`,`l0,${-L}`].join(" "),"createOuterCylinderPathD"),a1=e((c,s,B,L,_,I)=>[`M${c-B/2},${-L/2}`,`a${_},${I} 0,0,0 ${B},0`].join(" "),"createInnerCylinderPathD"),Cg=8,bg=8;async function Vg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?24:_,O=s.look==="neo"?24:_;if(s.width||s.height){let et=s.width??0;if(s.width=(s.width??0)-O,s.width<bg)s.width=bg;let at=et/2/(2.5+et/50);if(s.height=(s.height??0)-I-at*3,s.height<Cg)s.height=Cg}let{shapeSvg:D,bbox:P,label:W}=await pe(c,s,oe(s)),R=(s.width?s.width:P.width)+O,Y=R/2,G=Y/(2.5+R/50),U=(s.height?s.height:P.height)+I+G,J,{cssStyles:tt}=s;if(s.look==="handDrawn"){let et=o.svg(D),it=s1(0,0,R,U,Y,G),at=a1(0,G,R,U,Y,G),nt=ee(s,{}),ut=et.path(it,nt),dt=et.path(at,ee(s,{fill:"none"}));if(J=D.insert(()=>dt,":first-child"),J=D.insert(()=>ut,":first-child"),J.attr("class","basic label-container"),tt)J.attr("style",tt)}else{let et=o1(0,0,R,U,Y,G);J=D.insert("path",":first-child").attr("d",et).attr("class","basic label-container outer-path").attr("style",ze(tt)).attr("style",L)}return J.attr("label-offset-y",G),J.attr("transform",`translate(${-R/2}, ${-(U/2+G)})`),C(s,J),W.attr("transform",`translate(${-(P.width/2)-(P.x-(P.left??0))}, ${-(P.height/2)+(s.padding??0)/1.5-(P.y-(P.top??0))})`),s.intersect=function(et){let it=Jt.rect(s,et),at=it.x-(s.x??0);if(Y!=0&&(Math.abs(at)<(s.width??0)/2||Math.abs(at)==(s.width??0)/2&&Math.abs(it.y-(s.y??0))>(s.height??0)/2-G)){let nt=G*G*(1-at*at/(Y*Y));if(nt>0)nt=Math.sqrt(nt);if(nt=G-nt,et.y-(s.y??0)>0)nt=-nt;it.y+=nt}return it},D}e(Vg,"cylinder");async function Mo(c,s,B){let{labelStyles:L,nodeStyles:_}=y(s);s.labelStyle=L;let{shapeSvg:I,bbox:O}=await pe(c,s,oe(s)),D=Math.max(O.width+B.labelPaddingX*2,s?.width||0),P=Math.max(O.height+B.labelPaddingY*2,s?.height||0),W=-D/2,R=-P/2,Y,{rx:G,ry:U}=s,{cssStyles:J}=s;if(B?.rx&&B.ry)G=B.rx,U=B.ry;if(s.look==="handDrawn"){let tt=o.svg(I),et=ee(s,{}),it=G||U?tt.path(Ii(W,R,D,P,G||0),et):tt.rectangle(W,R,D,P,et);Y=I.insert(()=>it,":first-child"),Y.attr("class","basic label-container").attr("style",ze(J))}else Y=I.insert("rect",":first-child"),Y.attr("class","basic label-container").attr("style",_).attr("rx",ze(G)).attr("ry",ze(U)).attr("x",W).attr("y",R).attr("width",D).attr("height",P);return C(s,Y),s.calcIntersect=function(tt,et){return Jt.rect(tt,et)},s.intersect=function(tt){return Jt.rect(s,tt)},I}e(Mo,"drawRect");async function Zg(c,s){let{cssClasses:B,labelPaddingX:L,labelPaddingY:_,padding:I,width:O,height:D}=s,P={rx:0,ry:0,classes:B??"",labelPaddingX:L??(I??0)*2,labelPaddingY:_??I??0},W=await Mo(c,s,P);if(s.look==="handDrawn"){let U=o.svg(W),J=ee(s,{}),tt=W.select(".basic.label-container > path:nth-child(2)"),et=tt.node();if(!et)return W;let it=null;if(et instanceof SVGGraphicsElement)it=et.getBBox();else return W;return W.insert(()=>U.line(it.x,it.y,it.x+it.width,it.y,J),".basic.label-container g.label"),W.insert(()=>U.line(it.x,it.y+it.height,it.x+it.width,it.y+it.height,J),".basic.label-container g.label"),tt.remove(),W}let R=W.select(".basic.label-container"),Y=(Number(R.attr("width"))||O)??0,G=(Number(R.attr("height"))||D)??0;if(Y>0&&G>0)R.attr("stroke-dasharray",`${Y} ${G}`);return W}e(Zg,"datastore");async function Kg(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.look==="neo"?16:s.padding??0,I=s.look==="neo"?16:s.padding??0,{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=D.width+_,R=D.height+I,Y=R*0.2,G=-W/2,U=-R/2-Y/2,{cssStyles:J}=s,tt=o.svg(O),et=ee(s,{});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=[{x:G,y:U+Y},{x:-G,y:U+Y},{x:-G,y:-U},{x:G,y:-U},{x:G,y:U},{x:-G,y:U},{x:-G,y:U+Y}],at=tt.polygon(it.map((ut)=>[ut.x,ut.y]),et),nt=O.insert(()=>at,":first-child");if(nt.attr("class","basic label-container outer-path"),J&&s.look!=="handDrawn")nt.selectAll("path").attr("style",J);if(L&&s.look!=="handDrawn")nt.selectAll("path").attr("style",L);return P.attr("transform",`translate(${G+(s.padding??0)/2-(D.x-(D.left??0))}, ${U+Y+(s.padding??0)/2-(D.y-(D.top??0))})`),C(s,nt),s.intersect=function(ut){return Jt.rect(s,ut)},O}e(Kg,"dividedRectangle");async function Qg(c,s){let{labelStyles:B,nodeStyles:L}=y(s),_=s.look==="neo"?12:5;s.labelStyle=B;let I=s.padding??0,O=s.look==="neo"?16:I,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.width?s?.width/2:P.width/2)+(O??0),R=W-_,Y,{cssStyles:G}=s;if(s.look==="handDrawn"){let U=o.svg(D),J=ee(s,{roughness:0.2,strokeWidth:2.5}),tt=ee(s,{roughness:0.2,strokeWidth:1.5}),et=U.circle(0,0,W*2,J),it=U.circle(0,0,R*2,tt);Y=D.insert("g",":first-child"),Y.attr("class",ze(s.cssClasses)).attr("style",ze(G)),Y.node()?.appendChild(et),Y.node()?.appendChild(it)}else{Y=D.insert("g",":first-child");let U=Y.insert("circle",":first-child"),J=Y.insert("circle");Y.attr("class","basic label-container").attr("style",L),U.attr("class","outer-circle").attr("style",L).attr("r",W).attr("cx",0).attr("cy",0),J.attr("class","inner-circle").attr("style",L).attr("r",R).attr("cx",0).attr("cy",0)}return C(s,Y),s.intersect=function(U){return t.info("DoubleCircle intersect",s,W,U),Jt.circle(s,W,U)},D}e(Qg,"doublecircle");function Jg(c,s,{config:{themeVariables:B}}){let{labelStyles:L,nodeStyles:_}=y(s);s.label="",s.labelStyle=L;let I=c.insert("g").attr("class",oe(s)).attr("id",s.domId??s.id),O=7,{cssStyles:D}=s,P=o.svg(I),{nodeBorder:W}=B,R=ee(s,{fillStyle:"solid"});if(s.look!=="handDrawn")R.roughness=0;let Y=P.circle(0,0,O*2,R),G=I.insert(()=>Y,":first-child");if(G.selectAll("path").attr("style",`fill: ${W} !important;`),D&&D.length>0&&s.look!=="handDrawn")G.selectAll("path").attr("style",D);if(_&&s.look!=="handDrawn")G.selectAll("path").attr("style",_);return C(s,G),s.intersect=function(U){return t.info("filledCircle intersect",s,{radius:O,point:U}),Jt.circle(s,O,U)},I}e(Jg,"filledCircle");var kg=10,wg=10;async function tm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?_*2:_;if(s.width||s.height){if(s.height=s?.height??0,s.height<kg)s.height=kg;if(s.width=(s?.width??0)-I-I/2,s.width<wg)s.width=wg}let{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=(s?.width?s?.width:D.width)+(I??0),R=s?.height?s?.height:W+D.height,Y=R,G=[{x:0,y:-R},{x:Y,y:-R},{x:Y/2,y:0}],{cssStyles:U}=s,J=o.svg(O),tt=ee(s,{});if(s.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let et=ye(G),it=J.path(et,tt),at=O.insert(()=>it,":first-child").attr("transform",`translate(${-R/2}, ${R/2})`).attr("class","outer-path");if(U&&s.look!=="handDrawn")at.selectChildren("path").attr("style",U);if(L&&s.look!=="handDrawn")at.selectChildren("path").attr("style",L);return s.width=W,s.height=R,C(s,at),P.attr("transform",`translate(${-D.width/2-(D.x-(D.left??0))}, ${-R/2+(s.padding??0)/2+(D.y-(D.top??0))})`),s.intersect=function(nt){return t.info("Triangle intersect",s,G,nt),Jt.polygon(s,G,nt)},O}e(tm,"flippedTriangle");function em(c,s,{dir:B,config:{state:L,themeVariables:_}}){let{nodeStyles:I}=y(s);s.label="";let O=c.insert("g").attr("class",oe(s)).attr("id",s.domId??s.id),{cssStyles:D}=s,P=Math.max(70,s?.width??0),W=Math.max(10,s?.height??0);if(B==="LR")P=Math.max(10,s?.width??0),W=Math.max(70,s?.height??0);let R=-1*P/2,Y=-1*W/2,G=o.svg(O),U=ee(s,{stroke:_.lineColor,fill:_.lineColor});if(s.look!=="handDrawn")U.roughness=0,U.fillStyle="solid";let J=G.rectangle(R,Y,P,W,U),tt=O.insert(()=>J,":first-child");if(D&&s.look!=="handDrawn")tt.selectAll("path").attr("style",D);if(I&&s.look!=="handDrawn")tt.selectAll("path").attr("style",I);C(s,tt);let et=L?.padding??0;if(s.width&&s.height)s.width+=et/2||0,s.height+=et/2||0;return s.intersect=function(it){return Jt.rect(s,it)},O}e(em,"forkJoin");async function rm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=15,I=10,O=s.look==="neo"?16:s.padding??0,D=s.look==="neo"?12:s.padding??0;if(s.width||s.height){if(s.height=(s?.height??0)-D*2,s.height<I)s.height=I;if(s.width=(s?.width??0)-O*2,s.width<_)s.width=_}let{shapeSvg:P,bbox:W}=await pe(c,s,oe(s)),R=(s?.width?s?.width:Math.max(_,W.width))+O*2,Y=(s?.height?s?.height:Math.max(I,W.height))+D*2,G=Y/2,{cssStyles:U}=s,J=o.svg(P),tt=ee(s,{});if(s.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let et=[{x:-R/2,y:-Y/2},{x:R/2-G,y:-Y/2},...Bs(-R/2+G,0,G,50,90,270),{x:R/2-G,y:Y/2},{x:-R/2,y:Y/2}],it=ye(et),at=J.path(it,tt),nt=P.insert(()=>at,":first-child");if(nt.attr("class","basic label-container outer-path"),U&&s.look!=="handDrawn")nt.selectChildren("path").attr("style",U);if(L&&s.look!=="handDrawn")nt.selectChildren("path").attr("style",L);return C(s,nt),s.intersect=function(ut){return t.info("Pill intersect",s,{radius:G,point:ut}),Jt.polygon(s,et,ut)},P}e(rm,"halfRoundedRectangle");var n1=e((c,s,B,L,_)=>[`M${c+_},${s}`,`L${c+B-_},${s}`,`L${c+B},${s-L/2}`,`L${c+B-_},${s-L}`,`L${c+_},${s-L}`,`L${c},${s-L/2}`,"Z"].join(" "),"createHexagonPathD");async function im(c,s){let{labelStyles:B,nodeStyles:L}=y(s),_=s.look==="neo"?3.5:4;s.labelStyle=B;let I=s.padding??0,O=70,D=32,P=s.look==="neo"?O:I,W=s.look==="neo"?D:I;if(s.width||s.height){let nt=(s.height??0)/_;s.width=(s?.width??0)-2*nt-W,s.height=(s.height??0)-P}let{shapeSvg:R,bbox:Y}=await pe(c,s,oe(s)),G=(s?.height?s?.height:Y.height)+P,U=G/_,J=(s?.width?s?.width:Y.width)+2*U+W,tt=[{x:U,y:0},{x:J-U,y:0},{x:J,y:-G/2},{x:J-U,y:-G},{x:U,y:-G},{x:0,y:-G/2}],et,{cssStyles:it}=s;if(s.look==="handDrawn"){let at=o.svg(R),nt=ee(s,{}),ut=n1(0,0,J,G,U),dt=at.path(ut,nt);if(et=R.insert(()=>dt,":first-child").attr("transform",`translate(${-J/2}, ${G/2})`),it)et.attr("style",it)}else et=ni(R,J,G,tt);if(L)et.attr("style",L);return s.width=J,s.height=G,C(s,et),s.intersect=function(at){return Jt.polygon(s,tt,at)},R}e(im,"hexagon");async function om(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.label="",s.labelStyle=B;let{shapeSvg:_}=await pe(c,s,oe(s)),I=Math.max(30,s?.width??0),O=Math.max(30,s?.height??0),{cssStyles:D}=s,P=o.svg(_),W=ee(s,{});if(s.look!=="handDrawn")W.roughness=0,W.fillStyle="solid";let R=[{x:0,y:0},{x:I,y:0},{x:0,y:O},{x:I,y:O}],Y=ye(R),G=P.path(Y,W),U=_.insert(()=>G,":first-child");if(U.attr("class","basic label-container outer-path"),D&&s.look!=="handDrawn")U.selectChildren("path").attr("style",D);if(L&&s.look!=="handDrawn")U.selectChildren("path").attr("style",L);return U.attr("transform",`translate(${-I/2}, ${-O/2})`),C(s,U),s.intersect=function(J){return t.info("Pill intersect",s,{points:R}),Jt.polygon(s,R,J)},_}e(om,"hourglass");async function sm(c,s,{config:{themeVariables:B,flowchart:L}}){let{labelStyles:_}=y(s);s.labelStyle=_;let I=s.assetHeight??48,O=s.assetWidth??48,D=Math.max(I,O),P=L?.wrappingWidth;s.width=Math.max(D,P??0);let{shapeSvg:W,bbox:R,label:Y}=await pe(c,s,"icon-shape default"),G=s.pos==="t",U=D,J=D,{nodeBorder:tt}=B,{stylesMap:et}=Ji(s),it=-J/2,at=-U/2,nt=s.label?8:0,ut=o.svg(W),dt=ee(s,{stroke:"none",fill:"none"});if(s.look!=="handDrawn")dt.roughness=0,dt.fillStyle="solid";let kt=ut.rectangle(it,at,J,U,dt),St=Math.max(J,R.width),vt=U+R.height+nt,_t=ut.rectangle(-St/2,-vt/2,St,vt,{...dt,fill:"transparent",stroke:"none"}),Rt=W.insert(()=>kt,":first-child"),zt=W.insert(()=>_t);if(s.icon){let It=W.append("g");It.html(`<g>${await ke(s.icon,{height:D,width:D,fallbackPrefix:""})}</g>`);let bt=It.node().getBBox(),{width:Ct,height:Tt,x:wt,y:Et}=bt;It.attr("transform",`translate(${-Ct/2-wt},${G?R.height/2+nt/2-Tt/2-Et:-R.height/2-nt/2-Tt/2-Et})`),It.attr("style",`color: ${et.get("stroke")??tt};`)}return Y.attr("transform",`translate(${-R.width/2-(R.x-(R.left??0))},${G?-vt/2:vt/2-R.height})`),Rt.attr("transform",`translate(0,${G?R.height/2+nt/2:-R.height/2-nt/2})`),C(s,zt),s.intersect=function(It){if(t.info("iconSquare intersect",s,It),!s.label)return Jt.rect(s,It);let bt=s.x??0,Ct=s.y??0,Tt=s.height??0,wt=[];if(G)wt=[{x:bt-R.width/2,y:Ct-Tt/2},{x:bt+R.width/2,y:Ct-Tt/2},{x:bt+R.width/2,y:Ct-Tt/2+R.height+nt},{x:bt+J/2,y:Ct-Tt/2+R.height+nt},{x:bt+J/2,y:Ct+Tt/2},{x:bt-J/2,y:Ct+Tt/2},{x:bt-J/2,y:Ct-Tt/2+R.height+nt},{x:bt-R.width/2,y:Ct-Tt/2+R.height+nt}];else wt=[{x:bt-J/2,y:Ct-Tt/2},{x:bt+J/2,y:Ct-Tt/2},{x:bt+J/2,y:Ct-Tt/2+U},{x:bt+R.width/2,y:Ct-Tt/2+U},{x:bt+R.width/2/2,y:Ct+Tt/2},{x:bt-R.width/2,y:Ct+Tt/2},{x:bt-R.width/2,y:Ct-Tt/2+U},{x:bt-J/2,y:Ct-Tt/2+U}];return Jt.polygon(s,wt,It)},W}e(sm,"icon");async function am(c,s,{config:{themeVariables:B,flowchart:L}}){let{labelStyles:_}=y(s);s.labelStyle=_;let I=s.assetHeight??48,O=s.assetWidth??48,D=Math.max(I,O),P=L?.wrappingWidth;s.width=Math.max(D,P??0);let{shapeSvg:W,bbox:R,label:Y}=await pe(c,s,"icon-shape default"),G=20,U=s.label?8:0,J=s.pos==="t",{nodeBorder:tt,mainBkg:et}=B,{stylesMap:it}=Ji(s),at=o.svg(W),nt=ee(s,{});if(s.look!=="handDrawn")nt.roughness=0,nt.fillStyle="solid";let ut=it.get("fill");nt.stroke=ut??et;let dt=W.append("g");if(s.icon)dt.html(`<g>${await ke(s.icon,{height:D,width:D,fallbackPrefix:""})}</g>`);let kt=dt.node().getBBox(),{width:St,height:vt,x:_t,y:Rt}=kt,zt=Math.max(St,vt)*Math.SQRT2+G*2,It=at.circle(0,0,zt,nt),bt=Math.max(zt,R.width),Ct=zt+R.height+U,Tt=at.rectangle(-bt/2,-Ct/2,bt,Ct,{...nt,fill:"transparent",stroke:"none"}),wt=W.insert(()=>It,":first-child"),Et=W.insert(()=>Tt);return dt.attr("transform",`translate(${-St/2-_t},${J?R.height/2+U/2-vt/2-Rt:-R.height/2-U/2-vt/2-Rt})`),dt.attr("style",`color: ${it.get("stroke")??tt};`),Y.attr("transform",`translate(${-R.width/2-(R.x-(R.left??0))},${J?-Ct/2:Ct/2-R.height})`),wt.attr("transform",`translate(0,${J?R.height/2+U/2:-R.height/2-U/2})`),C(s,Et),s.intersect=function(At){return t.info("iconSquare intersect",s,At),Jt.rect(s,At)},W}e(am,"iconCircle");async function nm(c,s,{config:{themeVariables:B,flowchart:L}}){let{labelStyles:_}=y(s);s.labelStyle=_;let I=s.assetHeight??48,O=s.assetWidth??48,D=Math.max(I,O),P=L?.wrappingWidth;s.width=Math.max(D,P??0);let{shapeSvg:W,bbox:R,halfPadding:Y,label:G}=await pe(c,s,"icon-shape default"),U=s.pos==="t",J=D+Y*2,tt=D+Y*2,{nodeBorder:et,mainBkg:it}=B,{stylesMap:at}=Ji(s),nt=-tt/2,ut=-J/2,dt=s.label?8:0,kt=o.svg(W),St=ee(s,{});if(s.look!=="handDrawn")St.roughness=0,St.fillStyle="solid";let vt=at.get("fill");St.stroke=vt??it;let _t=kt.path(Ii(nt,ut,tt,J,5),St),Rt=Math.max(tt,R.width),zt=J+R.height+dt,It=kt.rectangle(-Rt/2,-zt/2,Rt,zt,{...St,fill:"transparent",stroke:"none"}),bt=W.insert(()=>_t,":first-child").attr("class","icon-shape2"),Ct=W.insert(()=>It);if(s.icon){let Tt=W.append("g");Tt.html(`<g>${await ke(s.icon,{height:D,width:D,fallbackPrefix:""})}</g>`);let wt=Tt.node().getBBox(),{width:Et,height:At,x:Zt,y:Qt}=wt;Tt.attr("transform",`translate(${-Et/2-Zt},${U?R.height/2+dt/2-At/2-Qt:-R.height/2-dt/2-At/2-Qt})`),Tt.attr("style",`color: ${at.get("stroke")??et};`)}return G.attr("transform",`translate(${-R.width/2-(R.x-(R.left??0))},${U?-zt/2:zt/2-R.height})`),bt.attr("transform",`translate(0,${U?R.height/2+dt/2:-R.height/2-dt/2})`),C(s,Ct),s.intersect=function(Tt){if(t.info("iconSquare intersect",s,Tt),!s.label)return Jt.rect(s,Tt);let wt=s.x??0,Et=s.y??0,At=s.height??0,Zt=[];if(U)Zt=[{x:wt-R.width/2,y:Et-At/2},{x:wt+R.width/2,y:Et-At/2},{x:wt+R.width/2,y:Et-At/2+R.height+dt},{x:wt+tt/2,y:Et-At/2+R.height+dt},{x:wt+tt/2,y:Et+At/2},{x:wt-tt/2,y:Et+At/2},{x:wt-tt/2,y:Et-At/2+R.height+dt},{x:wt-R.width/2,y:Et-At/2+R.height+dt}];else Zt=[{x:wt-tt/2,y:Et-At/2},{x:wt+tt/2,y:Et-At/2},{x:wt+tt/2,y:Et-At/2+J},{x:wt+R.width/2,y:Et-At/2+J},{x:wt+R.width/2/2,y:Et+At/2},{x:wt-R.width/2,y:Et+At/2},{x:wt-R.width/2,y:Et-At/2+J},{x:wt-tt/2,y:Et-At/2+J}];return Jt.polygon(s,Zt,Tt)},W}e(nm,"iconRounded");async function lm(c,s,{config:{themeVariables:B,flowchart:L}}){let{labelStyles:_}=y(s);s.labelStyle=_;let I=s.assetHeight??48,O=s.assetWidth??48,D=Math.max(I,O),P=L?.wrappingWidth;s.width=Math.max(D,P??0);let{shapeSvg:W,bbox:R,halfPadding:Y,label:G}=await pe(c,s,"icon-shape default"),U=s.pos==="t",J=D+Y*2,tt=D+Y*2,{nodeBorder:et,mainBkg:it}=B,{stylesMap:at}=Ji(s),nt=-tt/2,ut=-J/2,dt=s.label?8:0,kt=o.svg(W),St=ee(s,{});if(s.look!=="handDrawn")St.roughness=0,St.fillStyle="solid";let vt=at.get("fill");St.stroke=vt??it;let _t=kt.path(Ii(nt,ut,tt,J,0.1),St),Rt=Math.max(tt,R.width),zt=J+R.height+dt,It=kt.rectangle(-Rt/2,-zt/2,Rt,zt,{...St,fill:"transparent",stroke:"none"}),bt=W.insert(()=>_t,":first-child"),Ct=W.insert(()=>It);if(s.icon){let Tt=W.append("g");Tt.html(`<g>${await ke(s.icon,{height:D,width:D,fallbackPrefix:""})}</g>`);let wt=Tt.node().getBBox(),{width:Et,height:At,x:Zt,y:Qt}=wt;Tt.attr("transform",`translate(${-Et/2-Zt},${U?R.height/2+dt/2-At/2-Qt:-R.height/2-dt/2-At/2-Qt})`),Tt.attr("style",`color: ${at.get("stroke")??et};`)}return G.attr("transform",`translate(${-R.width/2-(R.x-(R.left??0))},${U?-zt/2:zt/2-R.height})`),bt.attr("transform",`translate(0,${U?R.height/2+dt/2:-R.height/2-dt/2})`),C(s,Ct),s.intersect=function(Tt){if(t.info("iconSquare intersect",s,Tt),!s.label)return Jt.rect(s,Tt);let wt=s.x??0,Et=s.y??0,At=s.height??0,Zt=[];if(U)Zt=[{x:wt-R.width/2,y:Et-At/2},{x:wt+R.width/2,y:Et-At/2},{x:wt+R.width/2,y:Et-At/2+R.height+dt},{x:wt+tt/2,y:Et-At/2+R.height+dt},{x:wt+tt/2,y:Et+At/2},{x:wt-tt/2,y:Et+At/2},{x:wt-tt/2,y:Et-At/2+R.height+dt},{x:wt-R.width/2,y:Et-At/2+R.height+dt}];else Zt=[{x:wt-tt/2,y:Et-At/2},{x:wt+tt/2,y:Et-At/2},{x:wt+tt/2,y:Et-At/2+J},{x:wt+R.width/2,y:Et-At/2+J},{x:wt+R.width/2/2,y:Et+At/2},{x:wt-R.width/2,y:Et+At/2},{x:wt-R.width/2,y:Et-At/2+J},{x:wt-tt/2,y:Et-At/2+J}];return Jt.polygon(s,Zt,Tt)},W}e(lm,"iconSquare");async function hm(c,s,{config:{flowchart:B}}){let L=new Image;L.src=s?.img??"",await L.decode();let _=Number(L.naturalWidth.toString().replace("px","")),I=Number(L.naturalHeight.toString().replace("px",""));s.imageAspectRatio=_/I;let{labelStyles:O}=y(s);s.labelStyle=O;let D=B?.wrappingWidth;s.defaultWidth=B?.wrappingWidth;let P=Math.max(s.label?D??0:0,s?.assetWidth??_),W=s.constraint==="on"?s?.assetHeight?s.assetHeight*s.imageAspectRatio:P:P,R=s.constraint==="on"?W/s.imageAspectRatio:s?.assetHeight??I;s.width=Math.max(W,D??0);let{shapeSvg:Y,bbox:G,label:U}=await pe(c,s,"image-shape default"),J=s.pos==="t",tt=-W/2,et=-R/2,it=s.label?8:0,at=o.svg(Y),nt=ee(s,{});if(s.look!=="handDrawn")nt.roughness=0,nt.fillStyle="solid";let ut=at.rectangle(tt,et,W,R,nt),dt=Math.max(W,G.width),kt=R+G.height+it,St=at.rectangle(-dt/2,-kt/2,dt,kt,{...nt,fill:"none",stroke:"none"}),vt=Y.insert(()=>ut,":first-child"),_t=Y.insert(()=>St);if(s.img){let Rt=Y.append("image");Rt.attr("href",s.img),Rt.attr("width",W),Rt.attr("height",R),Rt.attr("preserveAspectRatio","none"),Rt.attr("transform",`translate(${-W/2},${J?kt/2-R:-kt/2})`)}return U.attr("transform",`translate(${-G.width/2-(G.x-(G.left??0))},${J?-R/2-G.height/2-it/2:R/2-G.height/2+it/2})`),vt.attr("transform",`translate(0,${J?G.height/2+it/2:-G.height/2-it/2})`),C(s,_t),s.intersect=function(Rt){if(t.info("iconSquare intersect",s,Rt),!s.label)return Jt.rect(s,Rt);let zt=s.x??0,It=s.y??0,bt=s.height??0,Ct=[];if(J)Ct=[{x:zt-G.width/2,y:It-bt/2},{x:zt+G.width/2,y:It-bt/2},{x:zt+G.width/2,y:It-bt/2+G.height+it},{x:zt+W/2,y:It-bt/2+G.height+it},{x:zt+W/2,y:It+bt/2},{x:zt-W/2,y:It+bt/2},{x:zt-W/2,y:It-bt/2+G.height+it},{x:zt-G.width/2,y:It-bt/2+G.height+it}];else Ct=[{x:zt-W/2,y:It-bt/2},{x:zt+W/2,y:It-bt/2},{x:zt+W/2,y:It-bt/2+R},{x:zt+G.width/2,y:It-bt/2+R},{x:zt+G.width/2/2,y:It+bt/2},{x:zt-G.width/2,y:It+bt/2},{x:zt-G.width/2,y:It-bt/2+R},{x:zt-W/2,y:It-bt/2+R}];return Jt.polygon(s,Ct,Rt)},Y}e(hm,"imageSquare");async function cm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=_,O=s.look==="neo"?_*2:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=Math.max(P.width+(O??0)*2,s?.width??0),R=Math.max(P.height+(I??0)*2,s?.height??0),Y=[{x:0,y:0},{x:W,y:0},{x:W+3*R/6,y:-R},{x:-3*R/6,y:-R}],G,{cssStyles:U}=s;if(s.look==="handDrawn"){let J=o.svg(D),tt=ee(s,{}),et=ye(Y),it=J.path(et,tt);if(G=D.insert(()=>it,":first-child").attr("transform",`translate(${-W/2}, ${R/2})`),U)G.attr("style",U)}else G=ni(D,W,R,Y);if(L)G.attr("style",L);return s.width=W,s.height=R,C(s,G),s.intersect=function(J){return Jt.polygon(s,Y,J)},D}e(cm,"inv_trapezoid");async function um(c,s){let{shapeSvg:B,bbox:L,label:_}=await pe(c,s,"label"),I=B.insert("rect",":first-child"),O=0.1,D=0.1;return I.attr("width",0.1).attr("height",0.1),B.attr("class","label edgeLabel"),_.attr("transform",`translate(${-(L.width/2)-(L.x-(L.left??0))}, ${-(L.height/2)-(L.y-(L.top??0))})`),C(s,I),s.intersect=function(P){return Jt.rect(s,P)},B}e(um,"labelRect");async function dm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=_,O=s.look==="neo"?_*2:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.height??P.height)+I,R=(s?.width??P.width)+O,Y=[{x:0,y:0},{x:R+3*W/6,y:0},{x:R,y:-W},{x:-(3*W)/6,y:-W}],G,{cssStyles:U}=s;if(s.look==="handDrawn"){let J=o.svg(D),tt=ee(s,{}),et=ye(Y),it=J.path(et,tt);if(G=D.insert(()=>it,":first-child").attr("transform",`translate(${-R/2}, ${W/2})`),U)G.attr("style",U)}else G=ni(D,R,W,Y);if(L)G.attr("style",L);return s.width=R,s.height=W,C(s,G),s.intersect=function(J){return Jt.polygon(s,Y,J)},D}e(dm,"lean_left");async function pm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=_,O=s.look==="neo"?_*2:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.height??P.height)+I,R=(s?.width??P.width)+O,Y=[{x:-3*W/6,y:0},{x:R,y:0},{x:R+3*W/6,y:-W},{x:0,y:-W}],G,{cssStyles:U}=s;if(s.look==="handDrawn"){let J=o.svg(D),tt=ee(s,{}),et=ye(Y),it=J.path(et,tt);if(G=D.insert(()=>it,":first-child").attr("transform",`translate(${-R/2}, ${W/2})`),U)G.attr("style",U)}else G=ni(D,R,W,Y);if(L)G.attr("style",L);return s.width=R,s.height=W,C(s,G),s.intersect=function(J){return Jt.polygon(s,Y,J)},D}e(pm,"lean_right");function fm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.label="",s.labelStyle=B;let _=c.insert("g").attr("class",oe(s)).attr("id",s.domId??s.id),{cssStyles:I}=s,O=Math.max(35,s?.width??0),D=Math.max(35,s?.height??0),P=7,W=[{x:O,y:0},{x:0,y:D+P/2},{x:O-2*P,y:D+P/2},{x:0,y:2*D},{x:O,y:D-P/2},{x:2*P,y:D-P/2}],R=o.svg(_),Y=ee(s,{});if(s.look!=="handDrawn")Y.roughness=0,Y.fillStyle="solid";let G=ye(W),U=R.path(G,Y),J=_.insert(()=>U,":first-child");if(J.attr("class","outer-path"),I&&s.look!=="handDrawn")J.selectAll("path").attr("style",I);if(L&&s.look!=="handDrawn")J.selectAll("path").attr("style",L);return J.attr("transform",`translate(-${O/2},${-D})`),C(s,J),s.intersect=function(tt){return t.info("lightningBolt intersect",s,tt),Jt.polygon(s,W,tt)},_}e(fm,"lightningBolt");var l1=e((c,s,B,L,_,I,O)=>[`M${c},${s+I}`,`a${_},${I} 0,0,0 ${B},0`,`a${_},${I} 0,0,0 ${-B},0`,`l0,${L}`,`a${_},${I} 0,0,0 ${B},0`,`l0,${-L}`,`M${c},${s+I+O}`,`a${_},${I} 0,0,0 ${B},0`].join(" "),"createCylinderPathD"),h1=e((c,s,B,L,_,I,O)=>[`M${c},${s+I}`,`M${c+B},${s+I}`,`a${_},${I} 0,0,0 ${-B},0`,`l0,${L}`,`a${_},${I} 0,0,0 ${B},0`,`l0,${-L}`,`M${c},${s+I+O}`,`a${_},${I} 0,0,0 ${B},0`].join(" "),"createOuterCylinderPathD"),c1=e((c,s,B,L,_,I)=>[`M${c-B/2},${-L/2}`,`a${_},${I} 0,0,0 ${B},0`].join(" "),"createInnerCylinderPathD"),Sg=10,Tg=10;async function gm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?24:_;if(s.width||s.height){let it=s.width??0;if(s.width=(s.width??0)-I,s.width<Tg)s.width=Tg;let nt=it/2/(2.5+it/50);if(s.height=(s.height??0)-O-nt*3,s.height<Sg)s.height=Sg}let{shapeSvg:D,bbox:P,label:W}=await pe(c,s,oe(s)),R=(s?.width?s?.width:P.width)+I*2,Y=R/2,G=Y/(2.5+R/50),U=(s?.height?s?.height:P.height)+G+O*2,J=U*0.1,tt,{cssStyles:et}=s;if(s.look==="handDrawn"){let it=o.svg(D),at=h1(0,0,R,U,Y,G,J),nt=c1(0,G,R,U,Y,G),ut=ee(s,{}),dt=it.path(at,ut),kt=it.path(nt,ut);if(D.insert(()=>kt,":first-child").attr("class","line"),tt=D.insert(()=>dt,":first-child"),tt.attr("class","basic label-container"),et)tt.attr("style",et)}else{let it=l1(0,0,R,U,Y,G,J);tt=D.insert("path",":first-child").attr("d",it).attr("class","basic label-container outer-path").attr("style",ze(et)).attr("style",L)}return tt.attr("label-offset-y",G),tt.attr("transform",`translate(${-R/2}, ${-(U/2+G)})`),C(s,tt),W.attr("transform",`translate(${-(P.width/2)-(P.x-(P.left??0))}, ${-(P.height/2)+G-(P.y-(P.top??0))})`),s.intersect=function(it){let at=Jt.rect(s,it),nt=at.x-(s.x??0);if(Y!=0&&(Math.abs(nt)<(s.width??0)/2||Math.abs(nt)==(s.width??0)/2&&Math.abs(at.y-(s.y??0))>(s.height??0)/2-G)){let ut=G*G*(1-nt*nt/(Y*Y));if(ut>0)ut=Math.sqrt(ut);if(ut=G-ut,it.y-(s.y??0)>0)ut=-ut;at.y+=ut}return at},D}e(gm,"linedCylinder");async function mm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_;if(s.width||s.height){let ut=s.width;if(s.width=(ut??0)*10/11-I*2,s.width<10)s.width=10;if(s.height=(s?.height??0)-O*2,s.height<10)s.height=10}let{shapeSvg:D,bbox:P,label:W}=await pe(c,s,oe(s)),R=(s?.width?s?.width:P.width)+(I??0)*2,Y=(s?.height?s?.height:P.height)+(O??0)*2,G=s.look==="neo"?Y/4:Y/8,U=Y+G,{cssStyles:J}=s,tt=o.svg(D),et=ee(s,{});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=[{x:-R/2-R/2*0.1,y:-U/2},{x:-R/2-R/2*0.1,y:U/2},...Mi(-R/2-R/2*0.1,U/2,R/2+R/2*0.1,U/2,G,0.8),{x:R/2+R/2*0.1,y:-U/2},{x:-R/2-R/2*0.1,y:-U/2},{x:-R/2,y:-U/2},{x:-R/2,y:U/2*1.1},{x:-R/2,y:-U/2}],at=tt.polygon(it.map((ut)=>[ut.x,ut.y]),et),nt=D.insert(()=>at,":first-child");if(nt.attr("class","basic label-container outer-path"),J&&s.look!=="handDrawn")nt.selectAll("path").attr("style",J);if(L&&s.look!=="handDrawn")nt.selectAll("path").attr("style",L);return nt.attr("transform",`translate(0,${-G/2})`),W.attr("transform",`translate(${-R/2+(s.padding??0)+R/2*0.1/2-(P.x-(P.left??0))},${-Y/2+(s.padding??0)-G/2-(P.y-(P.top??0))})`),C(s,nt),s.intersect=function(ut){return Jt.polygon(s,it,ut)},D}e(mm,"linedWaveEdgedRect");async function xm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_,D=s.look==="neo"?10:5;if(s.width||s.height)s.width=Math.max((s?.width??0)-I*2-2*D,10),s.height=Math.max((s?.height??0)-O*2-2*D,10);let{shapeSvg:P,bbox:W,label:R}=await pe(c,s,oe(s)),Y=(s?.width?s?.width:W.width)+I*2+2*D,G=(s?.height?s?.height:W.height)+O*2+2*D,U=Y-2*D,J=G-2*D,tt=-U/2,et=-J/2,{cssStyles:it}=s,at=o.svg(P),nt=ee(s,{}),ut=[{x:tt-D,y:et+D},{x:tt-D,y:et+J+D},{x:tt+U-D,y:et+J+D},{x:tt+U-D,y:et+J},{x:tt+U,y:et+J},{x:tt+U,y:et+J-D},{x:tt+U+D,y:et+J-D},{x:tt+U+D,y:et-D},{x:tt+D,y:et-D},{x:tt+D,y:et},{x:tt,y:et},{x:tt,y:et+D}],dt=[{x:tt,y:et+D},{x:tt+U-D,y:et+D},{x:tt+U-D,y:et+J},{x:tt+U,y:et+J},{x:tt+U,y:et},{x:tt,y:et}];if(s.look!=="handDrawn")nt.roughness=0,nt.fillStyle="solid";let kt=ye(ut),St=at.path(kt,nt),vt=ye(dt),_t=at.path(vt,nt);if(s.look!=="handDrawn")St=bc(St),_t=bc(_t);let Rt=P.insert("g",":first-child");if(Rt.insert(()=>St),Rt.insert(()=>_t),Rt.attr("class","basic label-container outer-path"),it&&s.look!=="handDrawn")Rt.selectAll("path").attr("style",it);if(L&&s.look!=="handDrawn")Rt.selectAll("path").attr("style",L);return R.attr("transform",`translate(${-(W.width/2)-D-(W.x-(W.left??0))}, ${-(W.height/2)+D-(W.y-(W.top??0))})`),C(s,Rt),s.intersect=function(zt){return Jt.polygon(s,ut,zt)},P}e(xm,"multiRect");async function ym(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,label:O}=await pe(c,s,oe(s)),D=s.padding??0,P=s.look==="neo"?16:D,W=s.look==="neo"?12:D,R=!0;if(s.width||s.height)R=!1,s.width=(s?.width??0)-P*2,s.height=(s?.height??0)-W*3;let Y=Math.max(I.width,s?.width??0)+P*2,G=Math.max(I.height,s?.height??0)+W*3,U=s.look==="neo"?G/4:G/8,J=G+(R?U/2:-U/2),tt=-Y/2,et=-J/2,it=10,{cssStyles:at}=s,nt=Mi(tt-it,et+J+it,tt+Y-it,et+J+it,U,0.8),ut=nt?.[nt.length-1],dt=[{x:tt-it,y:et+it},{x:tt-it,y:et+J+it},...nt,{x:tt+Y-it,y:ut.y-it},{x:tt+Y,y:ut.y-it},{x:tt+Y,y:ut.y-2*it},{x:tt+Y+it,y:ut.y-2*it},{x:tt+Y+it,y:et-it},{x:tt+it,y:et-it},{x:tt+it,y:et},{x:tt,y:et},{x:tt,y:et+it}],kt=[{x:tt,y:et+it},{x:tt+Y-it,y:et+it},{x:tt+Y-it,y:ut.y-it},{x:tt+Y,y:ut.y-it},{x:tt+Y,y:et},{x:tt,y:et}],St=o.svg(_),vt=ee(s,{});if(s.look!=="handDrawn")vt.roughness=0,vt.fillStyle="solid";let _t=ye(dt),Rt=St.path(_t,vt),zt=ye(kt),It=St.path(zt,vt),bt=_.insert(()=>Rt,":first-child");if(bt.insert(()=>It),bt.attr("class","basic label-container outer-path"),at&&s.look!=="handDrawn")bt.selectAll("path").attr("style",at);if(L&&s.look!=="handDrawn")bt.selectAll("path").attr("style",L);return bt.attr("transform",`translate(0,${-U/2})`),O.attr("transform",`translate(${-(I.width/2)-it-(I.x-(I.left??0))}, ${-(I.height/2)+it-U/2-(I.y-(I.top??0))})`),C(s,bt),s.intersect=function(Ct){return Jt.polygon(s,dt,Ct)},_}e(ym,"multiWaveEdgedRectangle");async function Cm(c,s,{config:{themeVariables:B}}){let{labelStyles:L,nodeStyles:_}=y(s);if(s.labelStyle=L,!(s.useHtmlLabels||M(u())))s.centerLabel=!0;let{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=Math.max(D.width+(s.padding??0)*2,s?.width??0),R=Math.max(D.height+(s.padding??0)*2,s?.height??0),Y=-W/2,G=-R/2,{cssStyles:U}=s,J=o.svg(O),tt=ee(s,{fill:B.noteBkgColor,stroke:B.noteBorderColor});if(s.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let et=J.rectangle(Y,G,W,R,tt),it=O.insert(()=>et,":first-child");if(it.attr("class","basic label-container outer-path"),P.attr("class","label noteLabel"),U&&s.look!=="handDrawn")it.selectAll("path").attr("style",U);if(_&&s.look!=="handDrawn")it.selectAll("path").attr("style",_);return P.attr("transform",`translate(${-D.width/2-(D.x-(D.left??0))}, ${-(D.height/2)-(D.y-(D.top??0))})`),C(s,it),s.intersect=function(at){return Jt.rect(s,at)},O}e(Cm,"note");var u1=e((c,s,B)=>[`M${c+B/2},${s}`,`L${c+B},${s-B/2}`,`L${c+B/2},${s-B}`,`L${c},${s-B/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function bm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I}=await pe(c,s,oe(s)),O=I.width+(s.padding??0),D=I.height+(s.padding??0),P=O+D,W=0.5,R=[{x:P/2,y:0},{x:P,y:-P/2},{x:P/2,y:-P},{x:0,y:-P/2}],Y,{cssStyles:G}=s;if(s.look==="handDrawn"){let U=o.svg(_),J=ee(s,{}),tt=u1(0,0,P),et=U.path(tt,J);if(Y=_.insert(()=>et,":first-child").attr("transform",`translate(${-P/2+W}, ${P/2})`),G)Y.attr("style",G)}else Y=ni(_,P,P,R),Y.attr("transform",`translate(${-P/2+W}, ${P/2})`);if(L)Y.attr("style",L);return C(s,Y),s.calcIntersect=function(U,J){let tt=U.width,et=[{x:tt/2,y:0},{x:tt,y:-tt/2},{x:tt/2,y:-tt},{x:0,y:-tt/2}],it=Jt.polygon(U,et,J);return{x:it.x-0.5,y:it.y-0.5}},s.intersect=function(U){return this.calcIntersect(s,U)},_}e(bm,"question");async function km(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?21:_??0,O=s.look==="neo"?12:_??0,{shapeSvg:D,bbox:P,label:W}=await pe(c,s,oe(s)),R=(s?.width??P.width)+(s.look==="neo"?I*2:I),Y=(s?.height??P.height)+(s.look==="neo"?O*2:O),G=-R/2,U=-Y/2,J=U/2,tt=[{x:G+J,y:U},{x:G,y:0},{x:G+J,y:-U},{x:-G,y:-U},{x:-G,y:U}],{cssStyles:et}=s,it=o.svg(D),at=ee(s,{});if(s.look!=="handDrawn")at.roughness=0,at.fillStyle="solid";let nt=ye(tt),ut=it.path(nt,at),dt=D.insert(()=>ut,":first-child");if(dt.attr("class","basic label-container outer-path"),et&&s.look!=="handDrawn")dt.selectAll("path").attr("style",et);if(L&&s.look!=="handDrawn")dt.selectAll("path").attr("style",L);return dt.attr("transform",`translate(${-J/2},0)`),W.attr("transform",`translate(${-J/2-P.width/2-(P.x-(P.left??0))}, ${-(P.height/2)-(P.y-(P.top??0))})`),C(s,dt),s.intersect=function(kt){return Jt.polygon(s,tt,kt)},D}e(km,"rect_left_inv_arrow");async function wm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _;if(!s.cssClasses)_="node default";else _="node "+s.cssClasses;let I=c.insert("g").attr("class",_).attr("id",s.domId||s.id),O=I.insert("g"),D=I.insert("g").attr("class","label").attr("style",L),{description:P,label:W}=s,R=await ai(D,W,s.labelStyle,!0,!0),Y={width:0,height:0};if(M(r())){let vt=R.children[0],_t=n(R);Y=vt.getBoundingClientRect(),_t.attr("width",Y.width),_t.attr("height",Y.height)}t.info("Text 2",P);let G=P||[],U=R.getBBox(),J=await ai(D,Array.isArray(G)?G.join("<br/>"):G,s.labelStyle,!0,!0),tt=J.children[0],et=n(J);Y=tt.getBoundingClientRect(),et.attr("width",Y.width),et.attr("height",Y.height);let it=(s.padding||0)/2;n(J).attr("transform","translate( "+(Y.width>U.width?0:(U.width-Y.width)/2)+", "+(U.height+it+5)+")"),n(R).attr("transform","translate( "+(Y.width<U.width?0:-(U.width-Y.width)/2)+", 0)"),Y=D.node().getBBox(),D.attr("transform","translate("+-Y.width/2+", "+(-Y.height/2-it+3)+")");let at=Y.width+(s.padding||0),nt=Y.height+(s.padding||0),ut=-Y.width/2-it,dt=-Y.height/2-it,kt,St;if(s.look==="handDrawn"){let vt=o.svg(I),_t=ee(s,{}),Rt=vt.path(Ii(ut,dt,at,nt,s.rx||0),_t),zt=vt.line(-Y.width/2-it,-Y.height/2-it+U.height+it,Y.width/2+it,-Y.height/2-it+U.height+it,_t);St=I.insert(()=>(t.debug("Rough node insert CXC",Rt),zt),":first-child"),kt=I.insert(()=>(t.debug("Rough node insert CXC",Rt),Rt),":first-child")}else kt=O.insert("rect",":first-child"),St=O.insert("line"),kt.attr("class","outer title-state").attr("style",L).attr("x",-Y.width/2-it).attr("y",-Y.height/2-it).attr("width",Y.width+(s.padding||0)).attr("height",Y.height+(s.padding||0)),St.attr("class","divider").attr("x1",-Y.width/2-it).attr("x2",Y.width/2+it).attr("y1",-Y.height/2-it+U.height+it).attr("y2",-Y.height/2-it+U.height+it);return C(s,kt),s.intersect=function(vt){return Jt.rect(s,vt)},I}e(wm,"rectWithTitle");async function Sm(c,s,{config:{themeVariables:B}}){let L=B?.radius??5,_={rx:L,ry:L,classes:"",labelPaddingX:(s?.padding??0)*1,labelPaddingY:(s?.padding??0)*1};return Mo(c,s,_)}e(Sm,"roundedRect");var oo=8;async function Tm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.look==="neo"?16:s.padding??0,I=s.look==="neo"?12:s.padding??0,{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=(s?.width??D.width)+_*2+(s.look==="neo"?oo:oo*2),R=(s?.height??D.height)+I*2,Y=W-oo,G=R,U=oo-W/2,J=-R/2,{cssStyles:tt}=s,et=o.svg(O),it=ee(s,{});if(s.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let at=[{x:U,y:J},{x:U+Y,y:J},{x:U+Y,y:J+G},{x:U-oo,y:J+G},{x:U-oo,y:J},{x:U,y:J},{x:U,y:J+G}],nt=et.polygon(at.map((dt)=>[dt.x,dt.y]),it),ut=O.insert(()=>nt,":first-child");if(ut.attr("class","basic label-container outer-path").attr("style",ze(tt)),L&&s.look!=="handDrawn")ut.selectAll("path").attr("style",L);if(tt&&s.look!=="handDrawn")ut.selectAll("path").attr("style",L);return P.attr("transform",`translate(${oo/2-D.width/2-(D.x-(D.left??0))}, ${-(D.height/2)-(D.y-(D.top??0))})`),C(s,ut),s.intersect=function(dt){return Jt.rect(s,dt)},O}e(Tm,"shadedProcess");async function Bm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_;if(s.width||s.height)s.width=Math.max((s?.width??0)-I*2,10),s.height=Math.max((s?.height??0)/1.5-O*2,10);let{shapeSvg:D,bbox:P,label:W}=await pe(c,s,oe(s)),R=(s?.width?s?.width:P.width)+I*2,Y=((s?.height?s?.height:P.height)+O*2)*1.5,G=R,U=Y/1.5,J=-G/2,tt=-U/2,{cssStyles:et}=s,it=o.svg(D),at=ee(s,{});if(s.look!=="handDrawn")at.roughness=0,at.fillStyle="solid";let nt=[{x:J,y:tt},{x:J,y:tt+U},{x:J+G,y:tt+U},{x:J+G,y:tt-U/2}],ut=ye(nt),dt=it.path(ut,at),kt=D.insert(()=>dt,":first-child");if(kt.attr("class","basic label-container outer-path"),et&&s.look!=="handDrawn")kt.selectChildren("path").attr("style",et);if(L&&s.look!=="handDrawn")kt.selectChildren("path").attr("style",L);return kt.attr("transform",`translate(0, ${U/4})`),W.attr("transform",`translate(${-G/2+(s.padding??0)-(P.x-(P.left??0))}, ${-U/4+(s.padding??0)-(P.y-(P.top??0))})`),C(s,kt),s.intersect=function(St){return Jt.polygon(s,nt,St)},D}e(Bm,"slopedRect");async function _m(c,s){let B=s.padding??0,L=s.look==="neo"?16:B*2,_=s.look==="neo"?12:B,I={rx:0,ry:0,classes:"",labelPaddingX:s.labelPaddingX??L,labelPaddingY:_};return Mo(c,s,I)}e(_m,"squareRect");async function vm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?20:_,O=s.look==="neo"?12:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=P.height+(s.look==="neo"?O*2:O),R=P.width+W/4+(s.look==="neo"?I*2:I),Y=W/2,{cssStyles:G}=s,U=o.svg(D),J=ee(s,{});if(s.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let tt=[{x:-R/2+Y,y:-W/2},{x:R/2-Y,y:-W/2},...Bs(-R/2+Y,0,Y,50,90,270),{x:R/2-Y,y:W/2},...Bs(R/2-Y,0,Y,50,270,450)],et=ye(tt),it=U.path(et,J),at=D.insert(()=>it,":first-child");if(at.attr("class","basic label-container outer-path"),G&&s.look!=="handDrawn")at.selectChildren("path").attr("style",G);if(L&&s.look!=="handDrawn")at.selectChildren("path").attr("style",L);return C(s,at),s.intersect=function(nt){return Jt.polygon(s,tt,nt)},D}e(vm,"stadium");async function Lm(c,s){let B={rx:s.look==="neo"?3:5,ry:s.look==="neo"?3:5,classes:"flowchart-node"};return Mo(c,s,B)}e(Lm,"state");function Fm(c,s,{config:{themeVariables:B}}){let{labelStyles:L,nodeStyles:_}=y(s);s.labelStyle=L;let{cssStyles:I}=s,{lineColor:O,stateBorder:D,nodeBorder:P,nodeShadow:W}=B;if(s.width||s.height){if((s.width??0)<14)s.width=14;if((s.height??0)<14)s.height=14}if(!s.width)s.width=14;if(!s.height)s.height=14;let R=c.insert("g").attr("class","node default").attr("id",s.domId??s.id),Y=o.svg(R),G=ee(s,{});if(s.look!=="handDrawn")G.roughness=0,G.fillStyle="solid";let U=Y.circle(0,0,s.width,{...G,stroke:O,strokeWidth:2}),J=D??P,tt=(s.width??0)*5/14,et=Y.circle(0,0,tt,{...G,fill:J,stroke:J,strokeWidth:2,fillStyle:"solid"}),it=R.insert(()=>U,":first-child");if(it.insert(()=>et),s.look!=="handDrawn")it.attr("class","outer-path");if(I)it.selectAll("path").attr("style",I);if(_)it.selectAll("path").attr("style",_);if(s.width<25&&W&&s.look!=="handDrawn"){let at=c.node()?.ownerSVGElement?.id??"",nt=at?`${at}-drop-shadow-small`:"drop-shadow-small";it.attr("style",`filter:url(#${nt})`)}return C(s,it),s.intersect=function(at){return Jt.circle(s,(s.width??0)/2,at)},R}e(Fm,"stateEnd");function Mm(c,s,{config:{themeVariables:B}}){let{lineColor:L,nodeShadow:_}=B;if(s.width||s.height){if((s.width??0)<14)s.width=14;if((s.height??0)<14)s.height=14}if(!s.width)s.width=14;if(!s.height)s.height=14;let I=c.insert("g").attr("class","node default").attr("id",s.domId||s.id),O;if(s.look==="handDrawn"){let P=o.svg(I).circle(0,0,s.width,zp(L));O=I.insert(()=>P),O.attr("class","state-start").attr("r",(s.width??7)/2).attr("width",s.width??14).attr("height",s.height??14)}else O=I.insert("circle",":first-child"),O.attr("class","state-start").attr("r",(s.width??7)/2).attr("width",s.width??14).attr("height",s.height??14);if(s.width<25&&_&&s.look!=="handDrawn"){let D=c.node()?.ownerSVGElement?.id??"",P=D?`${D}-drop-shadow-small`:"drop-shadow-small";O.attr("style",`filter:url(#${P})`)}return C(s,O),s.intersect=function(D){return Jt.circle(s,(s.width??7)/2,D)},I}e(Mm,"stateStart");var vo=8;async function Am(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s?.padding??8,I=s.look==="neo"?28:_,O=s.look==="neo"?12:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.width??P.width)+2*vo+I,R=(s?.height??P.height)+O,Y=W-2*vo,G=R,U=-W/2,J=-R/2,tt=[{x:0,y:0},{x:Y,y:0},{x:Y,y:-G},{x:0,y:-G},{x:0,y:0},{x:-8,y:0},{x:Y+8,y:0},{x:Y+8,y:-G},{x:-8,y:-G},{x:-8,y:0}];if(s.look==="handDrawn"){let et=o.svg(D),it=ee(s,{}),at=et.rectangle(U,J,Y+16,G,it),nt=et.line(U+vo,J,U+vo,J+G,it),ut=et.line(U+vo+Y,J,U+vo+Y,J+G,it);D.insert(()=>nt,":first-child"),D.insert(()=>ut,":first-child");let dt=D.insert(()=>at,":first-child"),{cssStyles:kt}=s;dt.attr("class","basic label-container").attr("style",ze(kt)),C(s,dt)}else{let et=ni(D,Y,G,tt);if(L)et.attr("style",L);C(s,et)}return s.intersect=function(et){return Jt.polygon(s,tt,et)},D}e(Am,"subroutine");var Cc=0.2;async function Em(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_;if(s.width||s.height)s.height=Math.max((s?.height??0)-O*2,10),s.width=Math.max((s?.width??0)-I*2-Cc*(s.height+O*2),10);let{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.height?s?.height:P.height)+O*2,R=Cc*W,Y=Cc*W,U=(s?.width?s?.width:P.width)+I*2+R-R,J=W,tt=-U/2,et=-J/2,{cssStyles:it}=s,at=o.svg(D),nt=ee(s,{}),ut=[{x:tt-R/2,y:et},{x:tt+U+R/2,y:et},{x:tt+U+R/2,y:et+J},{x:tt-R/2,y:et+J}],dt=[{x:tt+U-R/2,y:et+J},{x:tt+U+R/2,y:et+J},{x:tt+U+R/2,y:et+J-Y}];if(s.look!=="handDrawn")nt.roughness=0,nt.fillStyle="solid";let kt=ye(ut),St=at.path(kt,nt),vt=ye(dt),_t=at.path(vt,{...nt,fillStyle:"solid"}),Rt=D.insert(()=>_t,":first-child");if(Rt.insert(()=>St,":first-child"),Rt.attr("class","basic label-container outer-path"),it&&s.look!=="handDrawn")Rt.selectAll("path").attr("style",it);if(L&&s.look!=="handDrawn")Rt.selectAll("path").attr("style",L);return C(s,Rt),s.intersect=function(zt){return Jt.polygon(s,ut,zt)},D}e(Em,"taggedRect");async function $m(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,label:O}=await pe(c,s,oe(s)),D=Math.max(I.width+(s.padding??0)*2,s?.width??0),P=Math.max(I.height+(s.padding??0)*2,s?.height??0),W=P/8,R=0.2*D,Y=0.2*P,G=P+W,{cssStyles:U}=s,J=o.svg(_),tt=ee(s,{});if(s.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let et=[{x:-D/2-D/2*0.1,y:G/2},...Mi(-D/2-D/2*0.1,G/2,D/2+D/2*0.1,G/2,W,0.8),{x:D/2+D/2*0.1,y:-G/2},{x:-D/2-D/2*0.1,y:-G/2}],it=-D/2+D/2*0.1,at=-G/2-Y*0.4,nt=[{x:it+D-R,y:(at+P)*1.3},{x:it+D,y:at+P-Y},{x:it+D,y:(at+P)*0.9},...Mi(it+D,(at+P)*1.25,it+D-R,(at+P)*1.3,-P*0.02,0.5)],ut=ye(et),dt=J.path(ut,tt),kt=ye(nt),St=J.path(kt,{...tt,fillStyle:"solid"}),vt=_.insert(()=>St,":first-child");if(vt.insert(()=>dt,":first-child"),vt.attr("class","basic label-container outer-path"),U&&s.look!=="handDrawn")vt.selectAll("path").attr("style",U);if(L&&s.look!=="handDrawn")vt.selectAll("path").attr("style",L);return vt.attr("transform",`translate(0,${-W/2})`),O.attr("transform",`translate(${-D/2+(s.padding??0)-(I.x-(I.left??0))},${-P/2+(s.padding??0)-W/2-(I.y-(I.top??0))})`),C(s,vt),s.intersect=function(_t){return Jt.polygon(s,et,_t)},_}e($m,"taggedWaveEdgedRectangle");async function Im(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I}=await pe(c,s,oe(s)),O=Math.max(I.width+(s.padding??0),s?.width||0),D=Math.max(I.height+(s.padding??0),s?.height||0),P=-O/2,W=-D/2,R=_.insert("rect",":first-child");return R.attr("class","text").attr("style",L).attr("rx",0).attr("ry",0).attr("x",P).attr("y",W).attr("width",O).attr("height",D),C(s,R),s.intersect=function(Y){return Jt.rect(s,Y)},_}e(Im,"text");var d1=e((c,s,B,L,_,I)=>`M${c},${s}
232
- a${_},${I} 0,0,1 0,${-L}
233
- l${B},0
234
- a${_},${I} 0,0,1 0,${L}
235
- M${B},${-L}
236
- a${_},${I} 0,0,0 0,${L}
237
- l${-B},0`,"createCylinderPathD"),p1=e((c,s,B,L,_,I)=>[`M${c},${s}`,`M${c+B},${s}`,`a${_},${I} 0,0,0 0,${-L}`,`l${-B},0`,`a${_},${I} 0,0,0 0,${L}`,`l${B},0`].join(" "),"createOuterCylinderPathD"),f1=e((c,s,B,L,_,I)=>[`M${c+B/2},${-L/2}`,`a${_},${I} 0,0,0 0,${L}`].join(" "),"createInnerCylinderPathD"),Bg=5,_g=10;async function Om(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?12:_/2;if(s.width||s.height){let tt=s.height??0;if(s.height=(s.height??0)-I,s.height<Bg)s.height=Bg;let it=tt/2/(2.5+tt/50);if(s.width=(s.width??0)-I-it*3,s.width<_g)s.width=_g}let{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=(s.height?s.height:D.height)+I,R=W/2,Y=R/(2.5+W/50),G=(s.width?s.width:D.width)+Y+I,{cssStyles:U}=s,J;if(s.look==="handDrawn"){let tt=o.svg(O),et=p1(0,0,G,W,Y,R),it=f1(0,0,G,W,Y,R),at=tt.path(et,ee(s,{})),nt=tt.path(it,ee(s,{fill:"none"}));if(J=O.insert(()=>nt,":first-child"),J=O.insert(()=>at,":first-child"),J.attr("class","basic label-container"),U)J.attr("style",U)}else{let tt=d1(0,0,G,W,Y,R);if(J=O.insert("path",":first-child").attr("d",tt).attr("class","basic label-container").attr("style",ze(U)).attr("style",L),J.attr("class","basic label-container outer-path"),U)J.selectAll("path").attr("style",U);if(L)J.selectAll("path").attr("style",L)}return J.attr("label-offset-x",Y),J.attr("transform",`translate(${-G/2}, ${W/2} )`),P.attr("transform",`translate(${-(D.width/2)-Y-(D.x-(D.left??0))}, ${-(D.height/2)-(D.y-(D.top??0))})`),C(s,J),s.intersect=function(tt){let et=Jt.rect(s,tt),it=et.y-(s.y??0);if(R!=0&&(Math.abs(it)<(s.height??0)/2||Math.abs(it)==(s.height??0)/2&&Math.abs(et.x-(s.x??0))>(s.width??0)/2-Y)){let at=Y*Y*(1-it*it/(R*R));if(at!=0)at=Math.sqrt(Math.abs(at));if(at=Y-at,tt.x-(s.x??0)>0)at=-at;et.x+=at}return et},O}e(Om,"tiltedCylinder");async function Dm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?_:_,O=s.look==="neo"?_*2:_,{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.height??P.height)+I,R=(s?.width??P.width)+O,Y=[{x:-3*W/6,y:0},{x:R+3*W/6,y:0},{x:R,y:-W},{x:0,y:-W}],G,{cssStyles:U}=s;if(s.look==="handDrawn"){let J=o.svg(D),tt=ee(s,{}),et=ye(Y),it=J.path(et,tt);if(G=D.insert(()=>it,":first-child").attr("transform",`translate(${-R/2}, ${W/2})`),U)G.attr("style",U)}else G=ni(D,R,W,Y);if(L)G.attr("style",L);return s.width=R,s.height=W,C(s,G),s.intersect=function(J){return Jt.polygon(s,Y,J)},D}e(Dm,"trapezoid");async function Pm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_,D=15,P=5;if(s.width||s.height){if(s.height=(s.height??0)-O*2,s.height<P)s.height=P;if(s.width=(s.width??0)-I*2,s.width<D)s.width=D}let{shapeSvg:W,bbox:R}=await pe(c,s,oe(s)),Y=(s?.width?s?.width:R.width)+I*2,G=(s?.height?s?.height:R.height)+O*2,{cssStyles:U}=s,J=o.svg(W),tt=ee(s,{});if(s.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let et=[{x:-Y/2*0.8,y:-G/2},{x:Y/2*0.8,y:-G/2},{x:Y/2,y:-G/2*0.6},{x:Y/2,y:G/2},{x:-Y/2,y:G/2},{x:-Y/2,y:-G/2*0.6}],it=ye(et),at=J.path(it,tt),nt=W.insert(()=>at,":first-child");if(nt.attr("class","basic label-container outer-path"),U&&s.look!=="handDrawn")nt.selectChildren("path").attr("style",U);if(L&&s.look!=="handDrawn")nt.selectChildren("path").attr("style",L);return C(s,nt),s.intersect=function(ut){return Jt.polygon(s,et,ut)},W}e(Pm,"trapezoidalPentagon");var vg=10,Lg=10;async function Rm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?_*2:_;if(s.width||s.height){if(s.width=((s?.width??0)-I)/2,s.width<Lg)s.width=Lg;if(s.height=s?.height??0,s.height<vg)s.height=vg}let{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=$e(r().flowchart?.htmlLabels),R=(s?.width?s?.width:D.width)+I,Y=s?.height?s?.height:R+D.height,G=Y,U=[{x:0,y:0},{x:G,y:0},{x:G/2,y:-Y}],{cssStyles:J}=s,tt=o.svg(O),et=ee(s,{});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=ye(U),at=tt.path(it,et),nt=O.insert(()=>at,":first-child").attr("transform",`translate(${-Y/2}, ${Y/2})`).attr("class","outer-path");if(J&&s.look!=="handDrawn")nt.selectChildren("path").attr("style",J);if(L&&s.look!=="handDrawn")nt.selectChildren("path").attr("style",L);return s.width=R,s.height=Y,C(s,nt),P.attr("transform",`translate(${-D.width/2-(D.x-(D.left??0))}, ${Y/2-(D.height+(s.padding??0)/(W?2:1)-(D.y-(D.top??0)))})`),s.intersect=function(ut){return t.info("Triangle intersect",s,U,ut),Jt.polygon(s,U,ut)},O}e(Rm,"triangle");async function qm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?12:_,D=!0;if(s.width||s.height){if(D=!1,s.width=(s?.width??0)-I*2,s.width<10)s.width=10;if(s.height=(s?.height??0)-O*2,s.height<10)s.height=10}let{shapeSvg:P,bbox:W,label:R}=await pe(c,s,oe(s)),Y=(s?.width?s?.width:W.width)+(I??0)*2,G=(s?.height?s?.height:W.height)+(O??0)*2,U=s.look==="neo"?G/4:G/8,J=G+(D?U:-U),{cssStyles:tt}=s,it=14-Y,at=it>0?it/2:0,nt=o.svg(P),ut=ee(s,{});if(s.look!=="handDrawn")ut.roughness=0,ut.fillStyle="solid";let dt=[{x:-Y/2-at,y:J/2},...Mi(-Y/2-at,J/2,Y/2+at,J/2,U,0.8),{x:Y/2+at,y:-J/2},{x:-Y/2-at,y:-J/2}],kt=ye(dt),St=nt.path(kt,ut),vt=P.insert(()=>St,":first-child");if(vt.attr("class","basic label-container outer-path"),tt&&s.look!=="handDrawn")vt.selectAll("path").attr("style",tt);if(L&&s.look!=="handDrawn")vt.selectAll("path").attr("style",L);return vt.attr("transform",`translate(0,${-U/2})`),R.attr("transform",`translate(${-Y/2+(s.padding??0)-(W.x-(W.left??0))},${-G/2+(s.padding??0)-U-(W.y-(W.top??0))})`),C(s,vt),s.intersect=function(_t){return Jt.polygon(s,dt,_t)},P}e(qm,"waveEdgedRectangle");async function zm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.padding??0,I=s.look==="neo"?16:_,O=s.look==="neo"?20:_;if(s.width||s.height){if(s.width=s?.width??0,s.width<20)s.width=20;if(s.height=s?.height??0,s.height<10)s.height=10;let ut=Math.min(s.height*0.2,s.height/4);s.height=Math.ceil(s.height-O-ut*2.2222222222222223),s.width=s.width-I*2}let{shapeSvg:D,bbox:P}=await pe(c,s,oe(s)),W=(s?.width?s?.width:P.width)+I*2,R=(s?.height?s?.height:P.height)+O,Y=R/8,G=R+Y*2,{cssStyles:U}=s,J=o.svg(D),tt=ee(s,{});if(s.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let et=[{x:-W/2,y:G/2},...Mi(-W/2,G/2,W/2,G/2,Y,1),{x:W/2,y:-G/2},...Mi(W/2,-G/2,-W/2,-G/2,Y,-1)],it=ye(et),at=J.path(it,tt),nt=D.insert(()=>at,":first-child");if(nt.attr("class","basic label-container"),U&&s.look!=="handDrawn")nt.selectAll("path").attr("style",U);if(L&&s.look!=="handDrawn")nt.selectAll("path").attr("style",L);return C(s,nt),s.intersect=function(ut){return Jt.polygon(s,et,ut)},D}e(zm,"waveRectangle");var Re=10;async function Wm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s.look==="neo"?16:s.padding??0,I=s.look==="neo"?12:s.padding??0;if(s.width||s.height)s.width=Math.max((s?.width??0)-_*2-Re,10),s.height=Math.max((s?.height??0)-I*2-Re,10);let{shapeSvg:O,bbox:D,label:P}=await pe(c,s,oe(s)),W=(s?.width?s?.width:D.width)+_*2+Re,R=(s?.height?s?.height:D.height)+I*2+Re,Y=W-Re,G=R-Re,U=-Y/2,J=-G/2,{cssStyles:tt}=s,et=o.svg(O),it=ee(s,{}),at=[{x:U-Re,y:J-Re},{x:U-Re,y:J+G},{x:U+Y,y:J+G},{x:U+Y,y:J-Re}],nt=`M${U-Re},${J-Re} L${U+Y},${J-Re} L${U+Y},${J+G} L${U-Re},${J+G} L${U-Re},${J-Re}
238
- M${U-Re},${J} L${U+Y},${J}
239
- M${U},${J-Re} L${U},${J+G}`;if(s.look!=="handDrawn")it.roughness=0,it.fillStyle="solid";let ut=et.path(nt,it),dt=O.insert(()=>ut,":first-child");if(dt.attr("transform",`translate(${Re/2}, ${Re/2})`),dt.attr("class","basic label-container outer-path"),tt&&s.look!=="handDrawn")dt.selectAll("path").attr("style",tt);if(L&&s.look!=="handDrawn")dt.selectAll("path").attr("style",L);return P.attr("transform",`translate(${-(D.width/2)+Re/2-(D.x-(D.left??0))}, ${-(D.height/2)+Re/2-(D.y-(D.top??0))})`),C(s,dt),s.intersect=function(kt){return Jt.polygon(s,at,kt)},O}e(Wm,"windowPane");var Fg=new Set(["redux-color","redux-dark-color"]),g1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Tc(c,s){let B=s;if(B.alias)s.label=B.alias;let{theme:L,themeVariables:_}=u(),{rowEven:I,rowOdd:O,nodeBorder:D,borderColorArray:P}=_;if(s.look==="handDrawn"){let{themeVariables:ne}=u(),{background:me}=ne,xe={...s,id:s.id+"-background",domId:(s.domId||s.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${me}`]};await Tc(c,xe)}let W=u();s.useHtmlLabels=W.htmlLabels;let R=W.er?.diagramPadding??10,Y=W.er?.entityPadding??6,{cssStyles:G}=s,{labelStyles:U,nodeStyles:J}=y(s);if(B.attributes.length===0&&s.label){let ne={rx:0,ry:0,labelPaddingX:R,labelPaddingY:R*1.5,classes:""};if(de(s.label,W)+ne.labelPaddingX*2<W.er.minEntityWidth)s.width=W.er.minEntityWidth;let me=await Mo(c,s,ne);if(L!=null&&Fg.has(L)){let xe=B.colorIndex??0;me.attr("data-color-id",`color-${xe%P.length}`)}if(!$e(W.htmlLabels)){let xe=me.select("text"),De=xe.node()?.getBBox();xe.attr("transform",`translate(${-De.width/2}, 0)`)}return me}if(!W.htmlLabels)R*=1.25,Y*=1.25;let tt=oe(s);if(!tt)tt="node default";let et=c.insert("g").attr("class",tt).attr("id",s.domId||s.id),it=await Lo(et,s.label??"",W,0,0,["name"],U);it.height+=Y;let at=0,nt=[],ut=[],dt=0,kt=0,St=0,vt=0,_t=!0,Rt=!0;for(let ne of B.attributes){let me=await Lo(et,ne.type,W,0,at,["attribute-type"],U);dt=Math.max(dt,me.width+R);let xe=await Lo(et,ne.name,W,0,at,["attribute-name"],U);kt=Math.max(kt,xe.width+R);let De=await Lo(et,ne.keys.join(),W,0,at,["attribute-keys"],U);St=Math.max(St,De.width+R);let lr=await Lo(et,ne.comment,W,0,at,["attribute-comment"],U);vt=Math.max(vt,lr.width+R);let hr=Math.max(me.height,xe.height,De.height,lr.height)+Y;ut.push({yOffset:at,rowHeight:hr}),at+=hr}let zt=4;if(St<=R)_t=!1,St=0,zt--;if(vt<=R)Rt=!1,vt=0,zt--;let It=et.node().getBBox();if(it.width+R*2-(dt+kt+St+vt)>0){let ne=it.width+R*2-(dt+kt+St+vt);if(dt+=ne/zt,kt+=ne/zt,St>0)St+=ne/zt;if(vt>0)vt+=ne/zt}let bt=dt+kt+St+vt,Ct=o.svg(et),Tt=ee(s,{});if(s.look!=="handDrawn")Tt.roughness=0,Tt.fillStyle="solid";let wt=0;if(ut.length>0)wt=ut.reduce((ne,me)=>ne+(me?.rowHeight??0),0);let Et=Math.max(It.width+R*2,s?.width||0,bt),At=Math.max((wt??0)+it.height,s?.height||0),Zt=-Et/2,Qt=-At/2;if(et.selectAll("g:not(:first-child)").each((ne,me,xe)=>{let De=n(xe[me]),lr=De.attr("transform"),hr=0,vc=0;if(lr){let Za=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(lr);if(Za){if(hr=parseFloat(Za[1]),vc=parseFloat(Za[2]),De.attr("class").includes("attribute-name"))hr+=dt;else if(De.attr("class").includes("attribute-keys"))hr+=dt+kt;else if(De.attr("class").includes("attribute-comment"))hr+=dt+kt+St}}De.attr("transform",`translate(${Zt+R/2+hr}, ${vc+Qt+it.height+Y/2})`)}),et.select(".name").attr("transform","translate("+-it.width/2+", "+(Qt+Y/2)+")"),L!=null&&Fg.has(L)){let ne=B.colorIndex??0;et.attr("data-color-id",`color-${ne%P.length}`)}let be=Ct.rectangle(Zt,Qt,Et,At,Tt),we=et.insert(()=>be,":first-child").attr("class","outer-path").attr("style",G.join(""));nt.push(0);for(let[ne,me]of ut.entries()){let De=(ne+1)%2===0&&me.yOffset!==0,lr=Ct.rectangle(Zt,it.height+Qt+me?.yOffset,Et,me?.rowHeight,{...Tt,fill:De?I:O,stroke:D});et.insert(()=>lr,"g.label").attr("style",G.join("")).attr("class",`row-rect-${De?"even":"odd"}`)}let Se=0.0001,Ae=Fo(Zt,it.height+Qt,Et+Zt,it.height+Qt,Se),Ee=Ct.polygon(Ae.map((ne)=>[ne.x,ne.y]),Tt);if(et.insert(()=>Ee).attr("class","divider"),Ae=Fo(dt+Zt,it.height+Qt,dt+Zt,At+Qt,Se),Ee=Ct.polygon(Ae.map((ne)=>[ne.x,ne.y]),Tt),et.insert(()=>Ee).attr("class","divider"),_t){let ne=dt+kt+Zt;Ae=Fo(ne,it.height+Qt,ne,At+Qt,Se),Ee=Ct.polygon(Ae.map((me)=>[me.x,me.y]),Tt),et.insert(()=>Ee).attr("class","divider")}if(Rt){let ne=dt+kt+St+Zt;Ae=Fo(ne,it.height+Qt,ne,At+Qt,Se),Ee=Ct.polygon(Ae.map((me)=>[me.x,me.y]),Tt),et.insert(()=>Ee).attr("class","divider")}for(let ne of nt){let me=it.height+Qt+ne;Ae=Fo(Zt,me,Et+Zt,me,Se),Ee=Ct.polygon(Ae.map((xe)=>[xe.x,xe.y]),Tt),et.insert(()=>Ee).attr("class","divider")}if(C(s,we),J&&s.look!=="handDrawn")if(L!=null&&g1.has(L))et.selectAll("path").attr("style",J);else{let me=J.split(";")?.filter((xe)=>xe.includes("stroke"))?.map((xe)=>`${xe}`).join("; ");et.selectAll("path").attr("style",me??""),et.selectAll(".row-rect-even path").attr("style",J)}return s.intersect=function(ne){return Jt.rect(s,ne)},et}e(Tc,"erBox");async function Lo(c,s,B,L=0,_=0,I=[],O=""){let D=c.insert("g").attr("class",`label ${I.join(" ")}`).attr("transform",`translate(${L}, ${_})`).attr("style",O);if(s!==lt(s))s=lt(s),s=s.replaceAll("<","&lt;").replaceAll(">","&gt;");let P=D.node().appendChild(await Z(D,s,{width:de(s,B)+100,style:O,useHtmlLabels:B.htmlLabels},B));if(s.includes("&lt;")||s.includes("&gt;")){let R=P.children[0];R.textContent=R.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");while(R.childNodes[0])R=R.childNodes[0],R.textContent=R.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let W=P.getBBox();if($e(B.htmlLabels)){let R=P.children[0];R.style.textAlign="start";let Y=n(P);W=R.getBoundingClientRect(),Y.attr("width",W.width),Y.attr("height",W.height)}return W}e(Lo,"addText");function Fo(c,s,B,L,_){if(c===B)return[{x:c-_/2,y:s},{x:c+_/2,y:s},{x:B+_/2,y:L},{x:B-_/2,y:L}];return[{x:c,y:s-_/2},{x:c,y:s+_/2},{x:B,y:L+_/2},{x:B,y:L-_/2}]}e(Fo,"lineToPolygon");async function Nm(c,s,B,L,_=B.class.padding??12){let I=!L?3:0,O=c.insert("g").attr("class",oe(s)).attr("id",s.domId||s.id),D=null,P=null,W=null,R=null,Y=0,G=0,U=0;if(D=O.insert("g").attr("class","annotation-group text"),s.annotations.length>0){let at=s.annotations[0];await Ts(D,{text:`«${at}»`},0),Y=D.node().getBBox().height}P=O.insert("g").attr("class","label-group text"),await Ts(P,s,0,["font-weight: bolder"]);let J=P.node().getBBox();G=J.height,W=O.insert("g").attr("class","members-group text");let tt=0;for(let at of s.members){let nt=await Ts(W,at,tt,[at.parseClassifier()]);tt+=nt+I}if(U=W.node().getBBox().height,U<=0)U=_/2;R=O.insert("g").attr("class","methods-group text");let et=0;for(let at of s.methods){let nt=await Ts(R,at,et,[at.parseClassifier()]);et+=nt+I}let it=O.node().getBBox();if(D!==null){let at=D.node().getBBox();D.attr("transform",`translate(${-at.width/2})`)}return P.attr("transform",`translate(${-J.width/2}, ${Y})`),it=O.node().getBBox(),W.attr("transform",`translate(0, ${Y+G+_*2})`),it=O.node().getBBox(),R.attr("transform",`translate(0, ${Y+G+(U?U+_*4:_*2)})`),it=O.node().getBBox(),{shapeSvg:O,bbox:it}}e(Nm,"textHelper");async function Ts(c,s,B,L=[]){let _=c.insert("g").attr("class","label").attr("style",L.join("; ")),I=u(),O="useHtmlLabels"in s?s.useHtmlLabels:$e(I.htmlLabels)??!0,D="";if("text"in s)D=s.text;else D=s.label;if(!O&&D.startsWith("\\"))D=D.substring(1);if(H(D))O=!0;let P=await Z(_,Rs(Te(D)),{width:de(D,I)+50,classes:"markdown-node-label",useHtmlLabels:O},I),W,R=1;if(!O){if(L.includes("font-weight: bolder"))n(P).selectAll("tspan").attr("font-weight","");R=P.children.length;let Y=P.children[0];if(P.textContent===""||P.textContent.includes("&gt")){if(Y.textContent=D[0]+D.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),D[1]===" ")Y.textContent=Y.textContent[0]+" "+Y.textContent.substring(1)}if(Y.textContent==="undefined")Y.textContent="";W=P.getBBox()}else{let Y=P.children[0],G=n(P);if(R=Y.innerHTML.split("<br>").length,Y.innerHTML.includes("</math>"))R+=Y.innerHTML.split("<mrow>").length-1;let U=Y.getElementsByTagName("img");if(U){let J=D.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...U].map((tt)=>new Promise((et)=>{function it(){if(tt.style.display="flex",tt.style.flexDirection="column",J){let at=I.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,nt=5,ut=parseInt(at,10)*5+"px";tt.style.minWidth=ut,tt.style.maxWidth=ut}else tt.style.width="100%";et(tt)}e(it,"setupImage"),setTimeout(()=>{if(tt.complete)it()}),tt.addEventListener("error",it),tt.addEventListener("load",it)})))}W=Y.getBoundingClientRect(),G.attr("width",W.width),G.attr("height",W.height)}return _.attr("transform","translate(0,"+(-W.height/(2*R)+B)+")"),W.height}e(Ts,"addText");async function Hm(c,s){let B=r(),{themeVariables:L}=B,{useGradient:_}=L,I=B.class.padding??12,O=I,D=s.useHtmlLabels??$e(B.htmlLabels)??!0,P=s;P.annotations=P.annotations??[],P.members=P.members??[],P.methods=P.methods??[];let{shapeSvg:W,bbox:R}=await Nm(c,s,B,D,O),{labelStyles:Y,nodeStyles:G}=y(s);s.labelStyle=Y,s.cssStyles=P.styles||"";let U=P.styles?.join(";")||G||"";if(!s.cssStyles)s.cssStyles=U.replaceAll("!important","").split(";");let J=P.members.length===0&&P.methods.length===0&&!B.class?.hideEmptyMembersBox,tt=o.svg(W),et=ee(s,{});if(s.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let it=Math.max(s.width??0,R.width),at=Math.max(s.height??0,R.height),nt=(s.height??0)>R.height;if(P.members.length===0&&P.methods.length===0)at+=O;else if(P.members.length>0&&P.methods.length===0)at+=O*2;let ut=-it/2,dt=-at/2,kt=J?I*2:P.members.length===0&&P.methods.length===0?-I:0;if(nt)kt=I*2;let St=tt.rectangle(ut-I,dt-I-(J?I:P.members.length===0&&P.methods.length===0?-I/2:0),it+2*I,at+2*I+kt,et),vt=W.insert(()=>St,":first-child");vt.attr("class","basic label-container outer-path");let _t=vt.node().getBBox(),Rt=W.select(".annotation-group").node().getBBox().height-(J?I/2:0)||0,zt=W.select(".label-group").node().getBBox().height-(J?I/2:0)||0,It=W.select(".members-group").node().getBBox().height-(J?I/2:0)||0,bt=(Rt+zt+dt+I-(dt-I-(J?I:P.members.length===0&&P.methods.length===0?-I/2:0)))/2;if(W.selectAll(".text").each((Ct,Tt,wt)=>{let Et=n(wt[Tt]),At=Et.attr("transform"),Zt=0;if(At){let Se=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(At);if(Se)Zt=parseFloat(Se[2])}let Qt=Zt+dt+I-(J?I:P.members.length===0&&P.methods.length===0?-I/2:0);if(Et.attr("class").includes("methods-group")){let we=Math.max(It,O/2);if(nt)Qt=Math.max(bt,Rt+zt+we+dt+O*2+I)+O*2;else Qt=Rt+zt+we+dt+O*4+I}if(P.members.length===0&&P.methods.length===0&&B.class?.hideEmptyMembersBox)if(P.annotations.length>0)Qt=Zt-O;else Qt=Zt;if(!D)Qt-=4;let be=ut;if(Et.attr("class").includes("label-group")||Et.attr("class").includes("annotation-group"))be=-Et.node()?.getBBox().width/2||0,W.selectAll("text").each(function(we,Se,Ae){if(window.getComputedStyle(Ae[Se]).textAnchor==="middle")be=0});Et.attr("transform",`translate(${be}, ${Qt})`)}),P.members.length>0||P.methods.length>0||J){let Ct=Rt+zt+dt+I,Tt=tt.line(_t.x,Ct,_t.x+_t.width,Ct+0.001,et);W.insert(()=>Tt).attr("class",`divider${s.look==="neo"&&!_?" neo-line":""}`).attr("style",U)}if(J||P.members.length>0||P.methods.length>0){let Ct=Rt+zt+It+dt+O*2+I,Tt=tt.line(_t.x,nt?Math.max(bt,Ct):Ct,_t.x+_t.width,(nt?Math.max(bt,Ct):Ct)+0.001,et);W.insert(()=>Tt).attr("class",`divider${s.look==="neo"&&!_?" neo-line":""}`).attr("style",U)}if(P.look!=="handDrawn")W.selectAll("path").attr("style",U);if(vt.select(":nth-child(2)").attr("style",U),W.selectAll(".divider").select("path").attr("style",U),s.labelStyle)W.selectAll("span").attr("style",s.labelStyle);else W.selectAll("span").attr("style",U);if(!D){let Ct=RegExp(/color\s*:\s*([^;]*)/),Tt=Ct.exec(U);if(Tt){let wt=Tt[0].replace("color","fill");W.selectAll("tspan").attr("style",wt)}else if(Y){let wt=Ct.exec(Y);if(wt){let Et=wt[0].replace("color","fill");W.selectAll("tspan").attr("style",Et)}}}return C(s,vt),s.intersect=function(Ct){return Jt.rect(s,Ct)},W}e(Hm,"classBox");async function Ym(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let _=s,I=s,O=20,D=20,P="verifyMethod"in s,W=oe(s),{themeVariables:R}=r(),{borderColorArray:Y,requirementEdgeLabelBackground:G}=R,U=c.insert("g").attr("class",W).attr("id",s.domId??s.id),J;if(P)J=await Pr(U,`&lt;&lt;${_.type}&gt;&gt;`,0,s.labelStyle);else J=await Pr(U,"&lt;&lt;Element&gt;&gt;",0,s.labelStyle);let tt=J,et=await Pr(U,_.name,tt,s.labelStyle+"; font-weight: bold;");if(tt+=et+D,P){let _t=await Pr(U,`${_.requirementId?`ID: ${_.requirementId}`:""}`,tt,s.labelStyle);tt+=_t;let Rt=await Pr(U,`${_.text?`Text: ${_.text}`:""}`,tt,s.labelStyle);tt+=Rt;let zt=await Pr(U,`${_.risk?`Risk: ${_.risk}`:""}`,tt,s.labelStyle);tt+=zt,await Pr(U,`${_.verifyMethod?`Verification: ${_.verifyMethod}`:""}`,tt,s.labelStyle)}else{let _t=await Pr(U,`${I.type?`Type: ${I.type}`:""}`,tt,s.labelStyle);tt+=_t,await Pr(U,`${I.docRef?`Doc Ref: ${I.docRef}`:""}`,tt,s.labelStyle)}let it=(U.node()?.getBBox().width??200)+O,at=(U.node()?.getBBox().height??200)+O,nt=-it/2,ut=-at/2,dt=o.svg(U),kt=ee(s,{});if(s.look!=="handDrawn")kt.roughness=0,kt.fillStyle="solid";let St=dt.rectangle(nt,ut,it,at,kt),vt=U.insert(()=>St,":first-child");if(vt.attr("class","basic label-container outer-path").attr("style",L),Y?.length){let _t=s.colorIndex??0;U.attr("data-color-id",`color-${_t%Y.length}`)}if(U.selectAll(".label").each((_t,Rt,zt)=>{let It=n(zt[Rt]),bt=It.attr("transform"),Ct=0,Tt=0;if(bt){let Zt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(bt);if(Zt)Ct=parseFloat(Zt[1]),Tt=parseFloat(Zt[2])}let wt=Tt-at/2,Et=nt+O/2;if(Rt===0||Rt===1)Et=Ct;It.attr("transform",`translate(${Et}, ${wt+O})`)}),tt>J+et+D){let _t=ut+J+et+D,Rt;if(s.look==="neo"){let bt=[[nt,_t],[nt+it,_t],[nt+it,_t+0.001],[nt,_t+0.001]];Rt=dt.polygon(bt,kt)}else Rt=dt.line(nt,_t,nt+it,_t,kt);U.insert(()=>Rt).attr("class","divider")}if(C(s,vt),s.intersect=function(_t){return Jt.rect(s,_t)},L&&s.look!=="handDrawn"&&(G||Y?.length))U.selectAll("path").attr("style",L);return U}e(Ym,"requirementBox");async function Pr(c,s,B,L=""){if(s==="")return 0;let _=c.insert("g").attr("class","label").attr("style",L),I=r(),O=I.htmlLabels??!0,D=await Z(_,Rs(Te(s)),{width:de(s,I)+50,classes:"markdown-node-label",useHtmlLabels:O,style:L},I),P;if(!O){let W=D.children[0];for(let R of W.children)if(L)R.setAttribute("style",L);P=D.getBBox(),P.height+=6}else{let W=D.children[0],R=n(D);P=W.getBoundingClientRect(),R.attr("width",P.width),R.attr("height",P.height)}return _.attr("transform",`translate(${-P.width/2},${-P.height/2+B})`),P.height}e(Pr,"addText");var m1=e((c)=>{switch(c){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 jm(c,s,{config:B}){let{labelStyles:L,nodeStyles:_}=y(s);s.labelStyle=L||"";let I=10,O=s.width;s.width=(s.width??200)-10;let{shapeSvg:D,bbox:P,label:W}=await pe(c,s,oe(s)),R=s.padding||10,Y="",G;if("ticket"in s&&s.ticket&&B?.kanban?.ticketBaseUrl)Y=B?.kanban?.ticketBaseUrl.replace("#TICKET#",s.ticket),G=D.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",Y).attr("target","_blank");let U={useHtmlLabels:s.useHtmlLabels,labelStyle:s.labelStyle||"",width:s.width,img:s.img,padding:s.padding||8,centerLabel:!1},J,tt;if(G)({label:J,bbox:tt}=await yc(G,"ticket"in s&&s.ticket||"",U));else({label:J,bbox:tt}=await yc(D,"ticket"in s&&s.ticket||"",U));let{label:et,bbox:it}=await yc(D,"assigned"in s&&s.assigned||"",U);s.width=O;let at=10,nt=s?.width||0,ut=Math.max(tt.height,it.height)/2,dt=Math.max(P.height+at*2,s?.height||0)+ut,kt=-nt/2,St=-dt/2;W.attr("transform","translate("+(R-nt/2)+", "+(-ut-P.height/2)+")"),J.attr("transform","translate("+(R-nt/2)+", "+(-ut+P.height/2)+")"),et.attr("transform","translate("+(R+nt/2-it.width-2*I)+", "+(-ut+P.height/2)+")");let vt,{rx:_t,ry:Rt}=s,{cssStyles:zt}=s;if(s.look==="handDrawn"){let It=o.svg(D),bt=ee(s,{}),Ct=_t||Rt?It.path(Ii(kt,St,nt,dt,_t||0),bt):It.rectangle(kt,St,nt,dt,bt);vt=D.insert(()=>Ct,":first-child"),vt.attr("class","basic label-container").attr("style",zt?zt:null)}else{vt=D.insert("rect",":first-child"),vt.attr("class","basic label-container __APA__").attr("style",_).attr("rx",_t??5).attr("ry",Rt??5).attr("x",kt).attr("y",St).attr("width",nt).attr("height",dt);let It="priority"in s&&s.priority;if(It){let bt=D.append("line"),Ct=kt+2,Tt=St+Math.floor((_t??0)/2),wt=St+dt-Math.floor((_t??0)/2);bt.attr("x1",Ct).attr("y1",Tt).attr("x2",Ct).attr("y2",wt).attr("stroke-width","4").attr("stroke",m1(It))}}return C(s,vt),s.height=dt,s.intersect=function(It){return Jt.rect(s,It)},D}e(jm,"kanbanItem");async function Xm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,halfPadding:O,label:D}=await pe(c,s,oe(s)),P=I.width+10*O,W=I.height+8*O,R=0.15*P,{cssStyles:Y}=s,G=I.width+20,U=I.height+20,J=Math.max(P,G),tt=Math.max(W,U);D.attr("transform",`translate(${-I.width/2}, ${-I.height/2})`);let et,it=`M0 0
240
- a${R},${R} 1 0,0 ${J*0.25},${-1*tt*0.1}
241
- a${R},${R} 1 0,0 ${J*0.25},0
242
- a${R},${R} 1 0,0 ${J*0.25},0
243
- a${R},${R} 1 0,0 ${J*0.25},${tt*0.1}
244
-
245
- a${R},${R} 1 0,0 ${J*0.15},${tt*0.33}
246
- a${R*0.8},${R*0.8} 1 0,0 0,${tt*0.34}
247
- a${R},${R} 1 0,0 ${-1*J*0.15},${tt*0.33}
248
-
249
- a${R},${R} 1 0,0 ${-1*J*0.25},${tt*0.15}
250
- a${R},${R} 1 0,0 ${-1*J*0.25},0
251
- a${R},${R} 1 0,0 ${-1*J*0.25},0
252
- a${R},${R} 1 0,0 ${-1*J*0.25},${-1*tt*0.15}
253
-
254
- a${R},${R} 1 0,0 ${-1*J*0.1},${-1*tt*0.33}
255
- a${R*0.8},${R*0.8} 1 0,0 0,${-1*tt*0.34}
256
- a${R},${R} 1 0,0 ${J*0.1},${-1*tt*0.33}
257
- H0 V0 Z`;if(s.look==="handDrawn"){let at=o.svg(_),nt=ee(s,{}),ut=at.path(it,nt);et=_.insert(()=>ut,":first-child"),et.attr("class","basic label-container").attr("style",ze(Y))}else et=_.insert("path",":first-child").attr("class","basic label-container").attr("style",L).attr("d",it);return et.attr("transform",`translate(${-J/2}, ${-tt/2})`),C(s,et),s.calcIntersect=function(at,nt){return Jt.rect(at,nt)},s.intersect=function(at){return t.info("Bang intersect",s,at),Jt.rect(s,at)},_}e(Xm,"bang");async function Um(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,halfPadding:O,label:D}=await pe(c,s,oe(s)),P=I.width+2*O,W=I.height+2*O,R=0.15*P,Y=0.25*P,G=0.35*P,U=0.2*P,{cssStyles:J}=s,tt,et=`M0 0
258
- a${R},${R} 0 0,1 ${P*0.25},${-1*P*0.1}
259
- a${G},${G} 1 0,1 ${P*0.4},${-1*P*0.1}
260
- a${Y},${Y} 1 0,1 ${P*0.35},${P*0.2}
261
-
262
- a${R},${R} 1 0,1 ${P*0.15},${W*0.35}
263
- a${U},${U} 1 0,1 ${-1*P*0.15},${W*0.65}
264
-
265
- a${Y},${R} 1 0,1 ${-1*P*0.25},${P*0.15}
266
- a${G},${G} 1 0,1 ${-1*P*0.5},0
267
- a${R},${R} 1 0,1 ${-1*P*0.25},${-1*P*0.15}
268
-
269
- a${R},${R} 1 0,1 ${-1*P*0.1},${-1*W*0.35}
270
- a${U},${U} 1 0,1 ${P*0.1},${-1*W*0.65}
271
- H0 V0 Z`;if(s.look==="handDrawn"){let it=o.svg(_),at=ee(s,{}),nt=it.path(et,at);tt=_.insert(()=>nt,":first-child"),tt.attr("class","basic label-container").attr("style",ze(J))}else tt=_.insert("path",":first-child").attr("class","basic label-container").attr("style",L).attr("d",et);return D.attr("transform",`translate(${-I.width/2}, ${-I.height/2})`),tt.attr("transform",`translate(${-P/2}, ${-W/2})`),C(s,tt),s.calcIntersect=function(it,at){return Jt.rect(it,at)},s.intersect=function(it){return t.info("Cloud intersect",s,it),Jt.rect(s,it)},_}e(Um,"cloud");async function Gm(c,s){let{labelStyles:B,nodeStyles:L}=y(s);s.labelStyle=B;let{shapeSvg:_,bbox:I,halfPadding:O,label:D}=await pe(c,s,oe(s)),P=I.width+8*O,W=I.height+2*O,R=5,Y=s.look==="neo"?`
272
- M${-P/2} ${W/2-R}
273
- v${-W+2*R}
274
- q0,-${R} ${R},-${R}
275
- h${P-2*R}
276
- q${R},0 ${R},${R}
277
- v${W-R}
278
- H${-P/2}
279
- Z
280
- `:`
281
- M${-P/2} ${W/2-R}
282
- v${-W+2*R}
283
- q0,-${R} ${R},-${R}
284
- h${P-2*R}
285
- q${R},0 ${R},${R}
286
- v${W-2*R}
287
- q0,${R} ${-R},${R}
288
- h${-(P-2*R)}
289
- q${-R},0 ${-R},${-R}
290
- Z
291
- `;if(!s.domId)throw Error(`defaultMindmapNode: node "${s.id}" is missing a domId — was render.ts domId prefixing skipped?`);let G=_.append("path").attr("id",s.domId).attr("class","node-bkg node-"+s.type).attr("style",L).attr("d",Y);return _.append("line").attr("class","node-line-").attr("x1",-P/2).attr("y1",W/2).attr("x2",P/2).attr("y2",W/2),D.attr("transform",`translate(${-I.width/2}, ${-I.height/2})`),_.append(()=>D.node()),C(s,G),s.calcIntersect=function(U,J){return Jt.rect(U,J)},s.intersect=function(U){return Jt.rect(s,U)},_}e(Gm,"defaultMindmapNode");async function Vm(c,s){let B={padding:s.padding??0};return Sc(c,s,B)}e(Vm,"mindmapCircle");var x1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_m},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Sm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:vm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Am},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Vg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Zg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Sc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Xm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Um},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:bm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:im},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:dm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Dm},{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:cm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Qg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Im},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Wg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Tm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Mm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:em},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:om},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:jg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Xg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ug},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:fm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:rm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Om},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:gm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Gg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Kg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Rm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Wm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Jg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Pm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Bm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ym},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:xm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:zg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Yg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:$m},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Em},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:zm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:km},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:mm}],y1=e(()=>{let s=[...Object.entries({state:Lm,choice:Ng,note:Cm,rectWithTitle:wm,labelRect:um,iconSquare:lm,iconCircle:am,icon:sm,iconRounded:nm,imageSquare:hm,anchor:Rg,kanbanItem:jm,mindmapCircle:Vm,defaultMindmapNode:Gm,classBox:Hm,erBox:Tc,requirementBox:Ym}),...x1.flatMap((B)=>[B.shortName,..."aliases"in B?B.aliases:[],..."internalAliases"in B?B.internalAliases:[]].map((_)=>[_,B.handler]))];return Object.fromEntries(s)},"generateShapeMap"),Zm=y1();function _i(c){return c in Zm}e(_i,"isValidShape");var Va=new Map;async function Qe(c,s,B){let L,_;if(s.shape==="rect")if(s.rx&&s.ry)s.shape="roundedRect";else s.shape="squareRect";let I=s.shape?Zm[s.shape]:void 0;if(!I)throw Error(`No such shape: ${s.shape}. Please check your syntax.`);if(s.link){let O;if(B.config.securityLevel==="sandbox")O="_top";else if(s.linkTarget)O=s.linkTarget||"_blank";L=c.insert("svg:a").attr("xlink:href",s.link).attr("target",O??null),_=await I(L,s,B)}else _=await I(c,s,B),L=_;if(L.attr("data-look",ze(s.look)),s.tooltip)_.attr("title",s.tooltip);if(Va.set(s.id,L),s.haveCallback)L.attr("class",L.attr("class")+" clickable");return L}e(Qe,"insertNode");var Ui=e((c,s)=>{Va.set(s.id,c)},"setNodeElem"),on=e(()=>{Va.clear()},"clear"),yt=e((c)=>{let s=Va.get(c.id);t.trace("Transforming node",c.diff,c,"translate("+(c.x-c.width/2-5)+", "+c.width/2+")");let B=8,L=c.diff||0;if(c.clusterNode)s.attr("transform","translate("+(c.x+L-c.width/2)+", "+(c.y-c.height/2-B)+")");else s.attr("transform","translate("+c.x+", "+c.y+")");return L},"positionNode");var Fe=e((c,s)=>{if(s)return"translate("+-c.width/2+", "+-c.height/2+")";let B=c.x??0,L=c.y??0;return"translate("+-(B+c.width/2)+", "+-(L+c.height/2)+")"},"computeLabelTransform"),Q={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Bc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function _s(c,s){if(c===void 0||s===void 0)return{angle:0,deltaX:0,deltaY:0};c=Oe(c),s=Oe(s);let[B,L]=[c.x,c.y],[_,I]=[s.x,s.y],O=_-B,D=I-L;return{angle:Math.atan(D/O),deltaX:O,deltaY:D}}e(_s,"calculateDeltaAndAngle");var Oe=e((c)=>{if(Array.isArray(c))return{x:c[0],y:c[1]};return c},"pointTransformer"),Jn=e((c)=>({x:e(function(s,B,L){let _=0,I=Oe(L[0]).x<Oe(L[L.length-1]).x?"left":"right";if(B===0&&Object.hasOwn(Q,c.arrowTypeStart)){let{angle:U,deltaX:J}=_s(L[0],L[1]);_=Q[c.arrowTypeStart]*Math.cos(U)*(J>=0?1:-1)}else if(B===L.length-1&&Object.hasOwn(Q,c.arrowTypeEnd)){let{angle:U,deltaX:J}=_s(L[L.length-1],L[L.length-2]);_=Q[c.arrowTypeEnd]*Math.cos(U)*(J>=0?1:-1)}let O=Math.abs(Oe(s).x-Oe(L[L.length-1]).x),D=Math.abs(Oe(s).y-Oe(L[L.length-1]).y),P=Math.abs(Oe(s).x-Oe(L[0]).x),W=Math.abs(Oe(s).y-Oe(L[0]).y),R=Q[c.arrowTypeStart],Y=Q[c.arrowTypeEnd],G=1;if(O<Y&&O>0&&D<Y){let U=Y+G-O;U*=I==="right"?-1:1,_-=U}if(P<R&&P>0&&W<R){let U=R+G-P;U*=I==="right"?-1:1,_+=U}return Oe(s).x+_},"x"),y:e(function(s,B,L){let _=0,I=Oe(L[0]).y<Oe(L[L.length-1]).y?"down":"up";if(B===0&&Object.hasOwn(Q,c.arrowTypeStart)){let{angle:U,deltaY:J}=_s(L[0],L[1]);_=Q[c.arrowTypeStart]*Math.abs(Math.sin(U))*(J>=0?1:-1)}else if(B===L.length-1&&Object.hasOwn(Q,c.arrowTypeEnd)){let{angle:U,deltaY:J}=_s(L[L.length-1],L[L.length-2]);_=Q[c.arrowTypeEnd]*Math.abs(Math.sin(U))*(J>=0?1:-1)}let O=Math.abs(Oe(s).y-Oe(L[L.length-1]).y),D=Math.abs(Oe(s).x-Oe(L[L.length-1]).x),P=Math.abs(Oe(s).y-Oe(L[0]).y),W=Math.abs(Oe(s).x-Oe(L[0]).x),R=Q[c.arrowTypeStart],Y=Q[c.arrowTypeEnd],G=1;if(O<Y&&O>0&&D<Y){let U=Y+G-O;U*=I==="up"?-1:1,_-=U}if(P<R&&P>0&&W<R){let U=R+G-P;U*=I==="up"?-1:1,_+=U}return Oe(s).y+_},"y")}),"getLineFunctionsWithOffset");var C1=e((c,s,B,L,_,I=!1,O)=>{if(s.arrowTypeStart)Km(c,"start",s.arrowTypeStart,B,L,_,I,O);if(s.arrowTypeEnd)Km(c,"end",s.arrowTypeEnd,B,L,_,I,O)},"addEdgeMarkers"),b1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{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}},k1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Km=e((c,s,B,L,_,I,O=!1,D)=>{let P=b1[B],W=P&&k1.includes(P.type);if(!P){t.warn(`Unknown arrow type: ${B}`);return}let R=P.type,U=`${_}_${I}-${R}${s==="start"?"Start":"End"}${O&&W?"-margin":""}`;if(D&&D.trim()!==""){let J=D.replace(/[^\dA-Za-z]/g,"_"),tt=`${U}_${J}`;if(!document.getElementById(tt)){let et=document.getElementById(U);if(et){let it=et.cloneNode(!0);it.id=tt,it.querySelectorAll("path, circle, line").forEach((nt)=>{if(nt.setAttribute("stroke",D),P.fill)nt.setAttribute("fill",D)}),et.parentNode?.appendChild(it)}}c.attr(`marker-${s}`,`url(${L}#${tt})`)}else c.attr(`marker-${s}`,`url(${L}#${U})`)},"addEdgeMarker"),w1=e((c)=>typeof c==="string"?c:r()?.flowchart?.curve,"resolveEdgeCurveType"),kr=new Map,X=new Map,ln=e(()=>{kr.clear(),X.clear()},"clear"),vs=e((c)=>{if(!c)return"";if(typeof c==="string")return c;return c.reduce((s,B)=>s+";"+B,"")},"getLabelStyles"),Ft=e(async(c,s)=>{let B=r(),L=M(B),{labelStyles:_}=y(s);s.labelStyle=_;let I=c.insert("g").attr("class","edgeLabel"),O=I.insert("g").attr("class","label").attr("data-id",s.id),D=s.labelType==="markdown",P=void 0,W=await Z(c,s.label,{style:vs(s.labelStyle),useHtmlLabels:L,addSvgBackground:!0,isNode:!1,markdown:D,width:D?P:void 0},B);O.node().appendChild(W),t.info("abc82",s,s.labelType);let R=W.getBBox(),Y=R;if(L){let U=W.children[0],J=n(W);R=U.getBoundingClientRect(),Y=R,J.attr("width",R.width),J.attr("height",R.height)}else{let U=n(W).select("text").node();if(U&&typeof U.getBBox==="function")Y=U.getBBox()}O.attr("transform",Fe(Y,L)),kr.set(s.id,I),s.width=R.width,s.height=R.height;let G;if(s.startLabelLeft){let U=c.insert("g").attr("class","edgeTerminals"),J=U.insert("g").attr("class","inner"),tt=await ai(J,s.startLabelLeft,vs(s.labelStyle)||"",!1,!1);G=tt;let et=tt.getBBox();if(L){let it=tt.children[0],at=n(tt);et=it.getBoundingClientRect(),at.attr("width",et.width),at.attr("height",et.height)}if(J.attr("transform",Fe(et,L)),!X.get(s.id))X.set(s.id,{});X.get(s.id).startLeft=U,Ls(G,s.startLabelLeft)}if(s.startLabelRight){let U=c.insert("g").attr("class","edgeTerminals"),J=U.insert("g").attr("class","inner"),tt=await ai(J,s.startLabelRight,vs(s.labelStyle)||"",!1,!1);G=tt;let et=tt.getBBox();if(L){let it=tt.children[0],at=n(tt);et=it.getBoundingClientRect(),at.attr("width",et.width),at.attr("height",et.height)}if(J.attr("transform",Fe(et,L)),!X.get(s.id))X.set(s.id,{});X.get(s.id).startRight=U,Ls(G,s.startLabelRight)}if(s.endLabelLeft){let U=c.insert("g").attr("class","edgeTerminals"),J=U.insert("g").attr("class","inner"),tt=await ai(U,s.endLabelLeft,vs(s.labelStyle)||"",!1,!1);G=tt;let et=tt.getBBox();if(L){let it=tt.children[0],at=n(tt);et=it.getBoundingClientRect(),at.attr("width",et.width),at.attr("height",et.height)}if(J.attr("transform",Fe(et,L)),!X.get(s.id))X.set(s.id,{});X.get(s.id).endLeft=U,Ls(G,s.endLabelLeft)}if(s.endLabelRight){let U=c.insert("g").attr("class","edgeTerminals"),J=U.insert("g").attr("class","inner"),tt=await ai(U,s.endLabelRight,vs(s.labelStyle)||"",!1,!1);G=tt;let et=tt.getBBox();if(L){let it=tt.children[0],at=n(tt);et=it.getBoundingClientRect(),at.attr("width",et.width),at.attr("height",et.height)}if(J.attr("transform",Fe(et,L)),!X.get(s.id))X.set(s.id,{});X.get(s.id).endRight=U,Ls(G,s.endLabelRight)}return W},"insertEdgeLabel");function Ls(c,s){if(M(r())&&c)c.style.width=s.length*9+"px",c.style.height="12px"}e(Ls,"setTerminalWidth");var Qn=e((c,s)=>{t.debug("Moving label abc88 ",c.id,c.label,kr.get(c.id),s);let B=s.updatedPath?s.updatedPath:s.originalPath,L=r(),{subGraphTitleTotalMargin:_}=Ne(L);if(c.label){let I=kr.get(c.id),{x:O,y:D}=c;if(B){let P=h.calcLabelPosition(B);if(t.debug("Moving label "+c.label+" from (",O,",",D,") to (",P.x,",",P.y,") abc88"),s.updatedPath)O=P.x,D=P.y}I.attr("transform",`translate(${O}, ${D+_/2})`)}if(c.startLabelLeft){let I=X.get(c.id).startLeft,{x:O,y:D}=c;if(B){let P=h.calcTerminalLabelPosition(c.arrowTypeStart?10:0,"start_left",B);O=P.x,D=P.y}I.attr("transform",`translate(${O}, ${D})`)}if(c.startLabelRight){let I=X.get(c.id).startRight,{x:O,y:D}=c;if(B){let P=h.calcTerminalLabelPosition(c.arrowTypeStart?10:0,"start_right",B);O=P.x,D=P.y}I.attr("transform",`translate(${O}, ${D})`)}if(c.endLabelLeft){let I=X.get(c.id).endLeft,{x:O,y:D}=c;if(B){let P=h.calcTerminalLabelPosition(c.arrowTypeEnd?10:0,"end_left",B);O=P.x,D=P.y}I.attr("transform",`translate(${O}, ${D})`)}if(c.endLabelRight){let I=X.get(c.id).endRight,{x:O,y:D}=c;if(B){let P=h.calcTerminalLabelPosition(c.arrowTypeEnd?10:0,"end_right",B);O=P.x,D=P.y}I.attr("transform",`translate(${O}, ${D})`)}},"positionEdgeLabel"),S1=e((c,s)=>{if(!c?.isLabelEdge||!c?.id?.endsWith("-to-label")||!Array.isArray(s))return s;if(s.length!==2)return s;let[B,L]=s,_=Math.abs(L.x-B.x),I=Math.abs(L.y-B.y);if(_<0.001||I<0.001)return s;if(I>=_)return[B,{x:B.x,y:L.y},L];return[B,{x:L.x,y:B.y},L]},"orthogonalizeToLabelClippedPoints"),T1=e((c,s)=>{let{x:B,y:L}=c,_=Math.abs(s.x-B),I=Math.abs(s.y-L),O=c.width/2,D=c.height/2;return _>=O||I>=D},"outsideNode"),B1=e((c,s,B)=>{t.debug(`intersection calc abc89:
292
- outsidePoint: ${JSON.stringify(s)}
293
- insidePoint : ${JSON.stringify(B)}
294
- node : x:${c.x} y:${c.y} w:${c.width} h:${c.height}`);let{x:L,y:_}=c,I=Math.abs(L-B.x),O=c.width/2,D=B.x<s.x?O-I:O+I,P=c.height/2,W=Math.abs(s.y-B.y),R=Math.abs(s.x-B.x);if(Math.abs(_-s.y)*O>Math.abs(L-s.x)*P){let Y=B.y<s.y?s.y-P-_:_-P-s.y;D=R*Y/W;let G={x:B.x<s.x?B.x+D:B.x-R+D,y:B.y<s.y?B.y+W-Y:B.y-W+Y};if(D===0)G.x=s.x,G.y=s.y;if(R===0)G.x=s.x;if(W===0)G.y=s.y;return t.debug(`abc89 top/bottom calc, Q ${W}, q ${Y}, R ${R}, r ${D}`,G),G}else{if(B.x<s.x)D=s.x-O-L;else D=L-O-s.x;let Y=W*D/R,G=B.x<s.x?B.x+R-D:B.x-R+D,U=B.y<s.y?B.y+Y:B.y-Y;if(t.debug(`sides calc abc89, Q ${W}, q ${Y}, R ${R}, r ${D}`,{_x:G,_y:U}),D===0)G=s.x,U=s.y;if(R===0)G=s.x;if(W===0)U=s.y;return{x:G,y:U}}},"intersection"),Qm=e((c,s)=>{t.warn("abc88 cutPathAtIntersect",c,s);let B=[],L=c[0],_=!1;return c.forEach((I)=>{if(t.info("abc88 checking point",I,s),!T1(s,I)&&!_){let O=B1(s,L,I);t.debug("abc88 inside",I,L,O),t.debug("abc88 intersection",O,s);let D=!1;if(B.forEach((P)=>{D=D||P.x===O.x&&P.y===O.y}),!B.some((P)=>P.x===O.x&&P.y===O.y))B.push(O);else t.warn("abc88 no intersect",O,B);_=!0}else if(t.warn("abc88 outside",I,L),L=I,!_)B.push(I)}),t.debug("returning points",B),B},"cutPathAtIntersect");function tx(c){let s=[],B=[];for(let L=1;L<c.length-1;L++){let _=c[L-1],I=c[L],O=c[L+1];if(_.x===I.x&&I.y===O.y&&Math.abs(I.x-O.x)>5&&Math.abs(I.y-_.y)>5)s.push(I),B.push(L);else if(_.y===I.y&&I.x===O.x&&Math.abs(I.x-_.x)>5&&Math.abs(I.y-O.y)>5)s.push(I),B.push(L)}return{cornerPoints:s,cornerPointPositions:B}}e(tx,"extractCornerPoints");var Jm=e(function(c,s,B){let L=s.x-c.x,_=s.y-c.y,I=Math.sqrt(L*L+_*_),O=B/I;return{x:s.x-O*L,y:s.y-O*_}},"findAdjacentPoint"),_1=e(function(c){let{cornerPointPositions:s}=tx(c),B=[];for(let L=0;L<c.length;L++)if(s.includes(L)){let _=c[L-1],I=c[L+1],O=c[L],D=Jm(_,O,5),P=Jm(I,O,5),W=P.x-D.x,R=P.y-D.y;B.push(D);let Y=Math.sqrt(2)*2,G={x:O.x,y:O.y};if(Math.abs(I.x-_.x)>10&&Math.abs(I.y-_.y)>=10){t.debug("Corner point fixing",Math.abs(I.x-_.x),Math.abs(I.y-_.y));let U=5;if(O.x===D.x)G={x:W<0?D.x-U+Y:D.x+U-Y,y:R<0?D.y-Y:D.y+Y};else G={x:W<0?D.x-Y:D.x+Y,y:R<0?D.y-U+Y:D.y+U-Y}}else t.debug("Corner point skipping fixing",Math.abs(I.x-_.x),Math.abs(I.y-_.y));B.push(G,P)}else B.push(c[L]);return B},"fixCorners"),v1=e((c,s,B)=>{let L=c-s-B,_=2,I=2,O=4,D=Math.floor(L/4),P=Array(D).fill("2 2").join(" ");return`0 ${s} ${P} ${B}`},"generateDashArray"),Xt=e(function(c,s,B,L,_,I,O,D=!1){if(!O)throw Error(`insertEdge: missing diagramId for edge "${s.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:P,layout:W}=r(),R=s.points,Y=!1,G=_;var U=I;let J=[];for(let At in s.cssCompiledStyles){if(Yr(At))continue;J.push(s.cssCompiledStyles[At])}if(W==="swimlane"){if(U.intersect&&G.intersect&&Array.isArray(R)&&R.length>=2)if(R.length===2)R=[G.intersect(R[0]),U.intersect(R[1])];else{let At=R.slice(1,-1),Zt=At[0],Qt=At[At.length-1],be=0.5,we=Math.abs(R[R.length-1].x-Qt.x)<0.5&&Math.abs(R[R.length-1].y-Qt.y)<0.5,Se=G.intersect(Zt),Ae=we?Qt:U.intersect(Qt),Ee=Math.abs(Ae.x-Qt.x)<0.5&&Math.abs(Ae.y-Qt.y)<0.5,me=Math.abs(Se.x-Zt.x)<0.5&&Math.abs(Se.y-Zt.y)<0.5?[]:[Se],xe=Ee?[]:[Ae];R=[...me,...At,...xe]}R=S1(s,R)}else if(U.intersect&&G.intersect&&!D)R=R.slice(1,s.points.length-1),R.unshift(G.intersect(R[0])),R.push(U.intersect(R[R.length-1]));let tt=btoa(JSON.stringify(R));if(s.toCluster)t.info("to cluster abc88",B.get(s.toCluster)),R=Qm(s.points,B.get(s.toCluster).node),Y=!0;if(s.fromCluster)t.debug("from cluster abc88",B.get(s.fromCluster),JSON.stringify(R,null,2)),R=Qm(R.reverse(),B.get(s.fromCluster).node).reverse(),Y=!0;let et=R.filter((At)=>!Number.isNaN(At.y)),it=w1(s.curve);if(it!=="rounded")et=_1(et);let at=Ir;switch(it){case"linear":at=Ir;break;case"basis":at=Be;break;case"cardinal":at=rs;break;case"bumpX":at=Jo;break;case"bumpY":at=ts;break;case"catmullRom":at=os;break;case"monotoneX":at=ss;break;case"monotoneY":at=as;break;case"natural":at=xo;break;case"step":at=yo;break;case"stepAfter":at=ls;break;case"stepBefore":at=ns;break;case"rounded":at=Ir;break;default:at=Be}let{x:nt,y:ut}=Jn(s),dt=Le().x(nt).y(ut).curve(at),kt;switch(s.thickness){case"normal":kt="edge-thickness-normal";break;case"thick":kt="edge-thickness-thick";break;case"invisible":kt="edge-thickness-invisible";break;default:kt="edge-thickness-normal"}switch(s.pattern){case"solid":kt+=" edge-pattern-solid";break;case"dotted":kt+=" edge-pattern-dotted";break;case"dashed":kt+=" edge-pattern-dashed";break;default:kt+=" edge-pattern-solid"}let St,vt=it==="rounded"?ex(rx(et,s),5):dt(et),_t=Array.isArray(s.style)?s.style:[s.style],Rt=_t.find((At)=>At?.startsWith("stroke:")),zt="";if(s.animate)zt="edge-animation-fast";if(s.animation)zt="edge-animation-"+s.animation;let It=!1;if(s.look==="handDrawn"){let At=o.svg(c);Object.assign([],et);let Zt=At.path(vt,{roughness:0.3,seed:P});kt+=" transition",St=n(Zt).select("path").attr("id",`${O}-${s.id}`).attr("class"," "+kt+(s.classes?" "+s.classes:"")+(zt?" "+zt:"")).attr("style",_t?_t.reduce((be,we)=>be+";"+we,""):"");let Qt=St.attr("d");St.attr("d",Qt),c.node().appendChild(St.node())}else{let At=J.join(";"),Zt=_t?_t.reduce((Ee,ne)=>Ee+ne+";",""):"",Qt=(At?At+";"+Zt+";":Zt)+";"+(_t?_t.reduce((Ee,ne)=>Ee+";"+ne,""):"");St=c.append("path").attr("d",vt).attr("id",`${O}-${s.id}`).attr("class"," "+kt+(s.classes?" "+s.classes:"")+(zt?" "+zt:"")).attr("style",Qt),Rt=Qt.match(/stroke:([^;]+)/)?.[1],It=s.animate===!0||!!s.animation||At.includes("animation");let be=St.node(),we=typeof be.getTotalLength==="function"?be.getTotalLength():0,Se=Bc[s.arrowTypeStart]||0,Ae=Bc[s.arrowTypeEnd]||0;if(s.look==="neo"&&!It){let ne=`stroke-dasharray: ${s.pattern==="dotted"||s.pattern==="dashed"?v1(we,Se,Ae):`0 ${Se} ${we-Se-Ae} ${Ae}`}; stroke-dashoffset: 0;`;St.attr("style",ne+St.attr("style"))}}if(St.attr("data-edge",!0),St.attr("data-et","edge"),St.attr("data-id",s.id),St.attr("data-points",tt),St.attr("data-look",ze(s.look)),s.showPoints)et.forEach((At)=>{c.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",At.x).attr("cy",At.y)});let bt="";if(r().flowchart.arrowMarkerAbsolute||r().state.arrowMarkerAbsolute)bt=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,bt=bt.replace(/\(/g,"\\(").replace(/\)/g,"\\)");t.info("arrowTypeStart",s.arrowTypeStart),t.info("arrowTypeEnd",s.arrowTypeEnd);let Ct=!It&&s?.look==="neo";C1(St,s,bt,O,L,Ct,Rt);let Tt=Math.floor(R.length/2),wt=R[Tt];if(!h.isLabelCoordinateInPath(wt,St.attr("d")))Y=!0;let Et={};if(Y)Et.updatedPath=R;return Et.originalPath=s.points,Et},"insertEdge");function ex(c,s){if(c.length<2)return"";let B="",L=c.length,_=0.00001;for(let I=0;I<L;I++){let O=c[I],D=c[I-1],P=c[I+1];if(I===0)B+=`M${O.x},${O.y}`;else if(I===L-1)B+=`L${O.x},${O.y}`;else{let W=O.x-D.x,R=O.y-D.y,Y=P.x-O.x,G=P.y-O.y,U=Math.hypot(W,R),J=Math.hypot(Y,G);if(U<_||J<_){B+=`L${O.x},${O.y}`;continue}let tt=W/U,et=R/U,it=Y/J,at=G/J,nt=tt*it+et*at,ut=Math.max(-1,Math.min(1,nt)),dt=Math.acos(ut);if(dt<_||Math.abs(Math.PI-dt)<_){B+=`L${O.x},${O.y}`;continue}let kt=Math.min(s/Math.sin(dt/2),U/2,J/2),St=O.x-tt*kt,vt=O.y-et*kt,_t=O.x+it*kt,Rt=O.y+at*kt;B+=`L${St},${vt}`,B+=`Q${O.x},${O.y} ${_t},${Rt}`}}return B}e(ex,"generateRoundedPath");function _c(c,s){if(!c||!s)return{angle:0,deltaX:0,deltaY:0};let B=s.x-c.x,L=s.y-c.y;return{angle:Math.atan2(L,B),deltaX:B,deltaY:L}}e(_c,"calculateDeltaAndAngle");function rx(c,s){let B=c.map((_)=>({..._}));if(c.length>=2&&Q[s.arrowTypeStart]){let _=Q[s.arrowTypeStart],I=c[0],O=c[1],{angle:D}=_c(I,O),P=_*Math.cos(D),W=_*Math.sin(D);B[0].x=I.x+P,B[0].y=I.y+W}let L=c.length;if(L>=2&&Q[s.arrowTypeEnd]){let _=Q[s.arrowTypeEnd],I=c[L-1],O=c[L-2],{angle:D}=_c(O,I),P=_*Math.cos(D),W=_*Math.sin(D);B[L-1].x=I.x-P,B[L-1].y=I.y-W}return B}e(rx,"applyMarkerOffsetsToPoints");var L1=e((c,s,B,L)=>{s.forEach((_)=>{K1[_](c,B,L)})},"insertMarkers"),F1=e((c,s,B)=>{t.trace("Making markers for ",B),c.append("defs").append("marker").attr("id",B+"_"+s+"-extensionStart").attr("class","marker extension "+s).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),c.append("defs").append("marker").attr("id",B+"_"+s+"-extensionEnd").attr("class","marker extension "+s).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"),c.append("marker").attr("id",B+"_"+s+"-extensionStart-margin").attr("class","marker extension "+s).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),c.append("defs").append("marker").attr("id",B+"_"+s+"-extensionEnd-margin").attr("class","marker extension "+s).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),M1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-compositionStart").attr("class","marker composition "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-compositionEnd").attr("class","marker composition "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-compositionStart-margin").attr("class","marker composition "+s).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),c.append("defs").append("marker").attr("id",B+"_"+s+"-compositionEnd-margin").attr("class","marker composition "+s).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),A1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-aggregationStart").attr("class","marker aggregation "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-aggregationEnd").attr("class","marker aggregation "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-aggregationStart-margin").attr("class","marker aggregation "+s).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),c.append("defs").append("marker").attr("id",B+"_"+s+"-aggregationEnd-margin").attr("class","marker aggregation "+s).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),E1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-dependencyStart").attr("class","marker dependency "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-dependencyEnd").attr("class","marker dependency "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-dependencyStart-margin").attr("class","marker dependency "+s).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),c.append("defs").append("marker").attr("id",B+"_"+s+"-dependencyEnd-margin").attr("class","marker dependency "+s).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-lollipopStart").attr("class","marker lollipop "+s).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),c.append("defs").append("marker").attr("id",B+"_"+s+"-lollipopEnd").attr("class","marker lollipop "+s).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),c.append("defs").append("marker").attr("id",B+"_"+s+"-lollipopStart-margin").attr("class","marker lollipop "+s).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),c.append("defs").append("marker").attr("id",B+"_"+s+"-lollipopEnd-margin").attr("class","marker lollipop "+s).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),I1=e((c,s,B)=>{c.append("marker").attr("id",B+"_"+s+"-pointEnd").attr("class","marker "+s).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"),c.append("marker").attr("id",B+"_"+s+"-pointStart").attr("class","marker "+s).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"),c.append("marker").attr("id",B+"_"+s+"-pointEnd-margin").attr("class","marker "+s).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),c.append("marker").attr("id",B+"_"+s+"-pointStart-margin").attr("class","marker "+s).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),O1=e((c,s,B)=>{c.append("marker").attr("id",B+"_"+s+"-circleEnd").attr("class","marker "+s).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"),c.append("marker").attr("id",B+"_"+s+"-circleStart").attr("class","marker "+s).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"),c.append("marker").attr("id",B+"_"+s+"-circleEnd-margin").attr("class","marker "+s).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),c.append("marker").attr("id",B+"_"+s+"-circleStart-margin").attr("class","marker "+s).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),D1=e((c,s,B)=>{c.append("marker").attr("id",B+"_"+s+"-crossEnd").attr("class","marker cross "+s).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"),c.append("marker").attr("id",B+"_"+s+"-crossStart").attr("class","marker cross "+s).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"),c.append("marker").attr("id",B+"_"+s+"-crossEnd-margin").attr("class","marker cross "+s).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),c.append("marker").attr("id",B+"_"+s+"-crossStart-margin").attr("class","marker cross "+s).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),P1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-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"),R1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{transitionColor:I}=_;c.append("defs").append("marker").attr("id",B+"_"+s+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),c.append("defs").append("marker").attr("id",B+"_"+s+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${I}`)},"barbNeo"),q1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-onlyOneStart").attr("class","marker onlyOne "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-onlyOneEnd").attr("class","marker onlyOne "+s).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"),z1=e((c,s,B)=>{let L=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrOneStart").attr("class","marker zeroOrOne "+s).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");L.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),L.append("path").attr("d","M9,0 L9,18");let _=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+s).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");_.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),_.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),W1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-oneOrMoreStart").attr("class","marker oneOrMore "+s).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"),c.append("defs").append("marker").attr("id",B+"_"+s+"-oneOrMoreEnd").attr("class","marker oneOrMore "+s).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"),N1=e((c,s,B)=>{let L=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+s).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");L.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),L.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let _=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+s).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");_.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),_.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),H1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{strokeWidth:I}=_;c.append("defs").append("marker").attr("id",B+"_"+s+"-onlyOneStart").attr("class","marker onlyOne "+s).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${I}`),c.append("defs").append("marker").attr("id",B+"_"+s+"-onlyOneEnd").attr("class","marker onlyOne "+s).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${I}`)},"only_one_neo"),Y1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{strokeWidth:I,mainBkg:O}=_,D=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrOneStart").attr("class","marker zeroOrOne "+s).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");D.append("circle").attr("fill",O??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${I}`).attr("r",6),D.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${I}`);let P=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+s).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");P.append("circle").attr("fill",O??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${I}`).attr("r",6),P.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${I}`)},"zero_or_one_neo"),j1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{strokeWidth:I}=_;c.append("defs").append("marker").attr("id",B+"_"+s+"-oneOrMoreStart").attr("class","marker oneOrMore "+s).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${I}`),c.append("defs").append("marker").attr("id",B+"_"+s+"-oneOrMoreEnd").attr("class","marker oneOrMore "+s).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${I}`)},"one_or_more_neo"),X1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{strokeWidth:I,mainBkg:O}=_,D=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+s).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");D.append("circle").attr("fill",O??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${I}`),D.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${I}`);let P=c.append("defs").append("marker").attr("id",B+"_"+s+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+s).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");P.append("circle").attr("fill",O??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${I}`),P.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${I}`)},"zero_or_more_neo"),U1=e((c,s,B)=>{c.append("defs").append("marker").attr("id",B+"_"+s+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
295
- L20,10
296
- M20,10
297
- L0,20`)},"requirement_arrow"),G1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{strokeWidth:I}=_;c.append("defs").append("marker").attr("id",B+"_"+s+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${I}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
298
- L20,10
299
- M20,10
300
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),V1=e((c,s,B)=>{let L=c.append("defs").append("marker").attr("id",B+"_"+s+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");L.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),L.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),L.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Z1=e((c,s,B)=>{let L=u(),{themeVariables:_}=L,{strokeWidth:I}=_,O=c.append("defs").append("marker").attr("id",B+"_"+s+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");O.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),O.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),O.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),O.selectAll("*").attr("stroke-width",`${I}`)},"requirement_contains_neo"),K1={extension:F1,composition:M1,aggregation:A1,dependency:E1,lollipop:$1,point:I1,circle:O1,cross:D1,barb:P1,barbNeo:R1,only_one:q1,zero_or_one:z1,one_or_more:W1,zero_or_more:N1,only_one_neo:H1,zero_or_one_neo:Y1,one_or_more_neo:j1,zero_or_more_neo:X1,requirement_arrow:U1,requirement_contains:V1,requirement_arrow_neo:G1,requirement_contains_neo:Z1},Kt=L1;var Q1={common:l,getConfig:u,insertCluster:ct,insertEdge:Xt,insertEdgeLabel:Ft,insertMarkers:Kt,insertNode:Qe,interpolateToCurve:va,labelHelper:pe,log:t,positionEdgeLabel:Qn},Fs={},Ai=e((c)=>{for(let s of c)Fs[s.name]=s},"registerLayoutLoaders"),J1=e(()=>{Ai([{name:"dagre",loader:e(async()=>await (T("bqdm7wpd"),import("./dagre-VZM6K2ZE-bqdm7wpd.js")),"loader")},{name:"swimlane",loader:e(async()=>await (T("gkw4xce3"),import("./swimlanes-SLNWSIFB-gkw4xce3.js")),"loader")},{name:"cose-bilkent",loader:e(async()=>await (T("nm39npq0"),import("./cose-bilkent-JH36ORCC-nm39npq0.js")),"loader")}])},"registerDefaultLayoutLoaders");J1();var fe=e(async(c,s,B)=>{if(!(c.layoutAlgorithm in Fs))throw Error(`Unknown layout algorithm: ${c.layoutAlgorithm}`);if(c.diagramId)for(let Y of c.nodes){let G=Y.domId||Y.id;Y.domId=`${c.diagramId}-${G}`}let L=Fs[c.layoutAlgorithm],_=await L.loader(),{theme:I,themeVariables:O}=c.config,{useGradient:D,gradientStart:P,gradientStop:W}=O,R=s.attr("id");if(s.append("defs").append("filter").attr("id",`${R}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${I?.includes("dark")?"#FFFFFF":"#000000"}`),s.append("defs").append("filter").attr("id",`${R}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${I?.includes("dark")?"#FFFFFF":"#000000"}`),D){let Y=s.append("linearGradient").attr("id",s.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");Y.append("svg:stop").attr("offset","0%").attr("stop-color",P).attr("stop-opacity",1),Y.append("svg:stop").attr("offset","100%").attr("stop-color",W).attr("stop-opacity",1)}return _.render(c,s,Q1,{algorithm:L.algorithm},B)},"render"),Ce=e((c="",{fallback:s="dagre"}={})=>{if(c in Fs)return c;if(s in Fs)return t.warn(`Layout algorithm ${c} is not registered. Using ${s} as fallback.`),s;throw Error(`Both layout algorithms ${c} and ${s} are not registered.`)},"getRegisteredLayoutAlgorithm");
301
- export{e,st,Ln,t,Fr,S,te,q,N,fr,i,a,F,j,ot,x,fi,Gt,$e,Ni,Di,Pi,pi,mi,u,Oi,zr,Gr,M,gi,yi,Lt,Hr,Mn,$i,Ht,w,ht,lt,H,pr,mr,l,k,Ie,Nn,Bi,Dn,d,f,p,m,g,b,v,r,gr,Wr,yr,Ur,Pn,n,Mt,vr,Nt,Xe,bi,ce,br,Fi,ft,Wt,ie,xr,z,xi,ue,Dt,zi,On,Ke,Ut,ae,wr,qr,qt,Gi,wi,$n,Vr,Le,Be,A,Ze,Je,Yr,y,pt,Pt,mt,jr,Ot,Vt,Yt,jt,Xr,Kr,Zr,Jr,Bn,Qr,Tr,en,Fn,zn,Gn,Hn,Wn,Un,qn,Vn,Yn,gt,tn,jn,Ti,Hi,Xn,ki,Ci,$t,rn,de,nn,Kn,he,E,h,Wi,Te,Me,Ne,an,Si,Bt,ke,Zn,Ei,Z,o,C,ct,sn,_i,Qe,Ui,on,yt,Fe,Q,Jn,kr,X,ln,Ft,Qn,Xt,Kt,Ai,fe,Ce};