@kabmo-labs/kabmo 0.49.0 → 0.51.0
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.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +606 -560
- package/dist/client/static/js/{Body-9h5hd351.js → Body-s3nh6vet.js} +3 -3
- package/dist/client/static/js/{CsvGrid-s05k1q18.js → CsvGrid-j4h6cpnn.js} +2 -2
- package/dist/client/static/js/{DocxView-x6sjw5ht.js → DocxView-197x16zq.js} +3 -3
- package/dist/client/static/js/{DrawioView-jashn8sf.js → DrawioView-v6ps0cm5.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-eygzgtyc.js → HtmlPreview-a2t5zngp.js} +1 -1
- package/dist/client/static/js/ImageView-ar7hz7jx.js +1 -0
- package/dist/client/static/js/LayoutWrapper-epef152a.js +2 -0
- package/dist/client/static/js/MergeDiffView-7rwjvzk5.js +1 -0
- package/dist/client/static/js/Modal-9nxt67fm.js +60 -0
- package/dist/client/static/js/{PdfView-syhjmyqf.js → PdfView-gzhcym20.js} +1 -1
- package/dist/client/static/js/SessionsView-3h872gpe.js +1 -0
- package/dist/client/static/js/{SheetView-26r0e506.js → SheetView-baaynkb4.js} +22 -22
- package/dist/client/static/js/{SvgPreview-2fk85jzz.js → SvgPreview-jzcqwwcc.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-fdka7pxr.js → abnfDiagram-O67JEVCF-grb1sfhr.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-3hkq8grc.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-9084jzwr.js +36 -0
- package/dist/client/static/js/{astro-rn2bvwpm.js → astro-m3fcq2sa.js} +1 -1
- package/dist/client/static/js/bash-n7wcmq3s.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-vpcmd3vx.js → blockDiagram-BEXU5L5S-qqcjrg1b.js} +8 -8
- package/dist/client/static/js/c-ypdp030b.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-1rgpdnbq.js → c4Diagram-YGBWAQC7-gc8fqbpc.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-fbsejvb9.js → classDiagram-v2-NBCMYWYE-pp6060kq.js} +9 -9
- package/dist/client/static/js/cose-bilkent-JH36ORCC-744ekavk.js +1 -0
- package/dist/client/static/js/cpp-cxwev3gs.js +1 -0
- package/dist/client/static/js/css-6mxcqf8c.js +1 -0
- package/dist/client/static/js/css-9gak6bze.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-9m18e6m5.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-7ta5vbrw.js → cynefinDiagram-VND7K2PF-57dja6g9.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-b8gtt32x.js → dagre-6A5THRUB-de4xrbrw.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-7emepy7h.js → diagram-22UHCM2B-ky3ncyv8.js} +21 -21
- package/dist/client/static/js/diagram-3UASUU5V-zgg82bz9.js +24 -0
- package/dist/client/static/js/{diagram-ATOU4E4O-t113exk3.js → diagram-ATOU4E4O-r4s13e4n.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-pyj3x97y.js → diagram-CDSNMT55-my21t0kq.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-183sgpjh.js → diagram-MLGK6HIB-pvt20jtj.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-fmbj4hcx.js → diagram-MPIPVDR6-as9dk4f3.js} +2 -2
- package/dist/client/static/js/{dockerfile-qay672za.js → dockerfile-3b5caedj.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-eafvfws2.js → ebnfDiagram-ZINNZB2B-tj3hkcj4.js} +1 -1
- package/dist/client/static/js/{elixir-t8bep87c.js → elixir-7q2k61zb.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-573f1vfs.js → elk-276RUBZZ-5e7wczf3.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-4z1r88ej.js → erDiagram-OPXOYQCR-5jje7qrh.js} +12 -12
- package/dist/client/static/js/{erlang-261km7r1.js → erlang-tjsd7n4d.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-d4egnv9v.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-pdeqndnd.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-49jd7msz.js → ganttDiagram-FUAMR5RP-7hresycc.js} +6 -6
- package/dist/client/static/js/gitGraph-4MIJSDKK-grqv890n.js +1 -0
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-8m202jb7.js +106 -0
- package/dist/client/static/js/graphql-6rwdfcnf.js +1 -0
- package/dist/client/static/js/html-p76eszt9.js +1 -0
- package/dist/client/static/js/{index-0w4jqzqk.js → index-0prwdwyb.js} +2 -2
- package/dist/client/static/js/{index-3v8k8ms3.js → index-0y6tstk8.js} +1 -1
- package/dist/client/static/js/index-20hj80g4.js +4 -0
- package/dist/client/static/js/index-21421tq7.js +2 -0
- package/dist/client/static/js/{index-gg910gpv.js → index-254387vg.js} +2 -2
- package/dist/client/static/js/index-2y4gk5q5.js +2 -0
- package/dist/client/static/js/index-3fk8grhz.js +2 -0
- package/dist/client/static/js/index-3rrdmk9m.js +2 -0
- package/dist/client/static/js/{index-rz0tz4hg.js → index-3sz9cztk.js} +1 -1
- package/dist/client/static/js/index-4m2d73m3.css +1 -0
- package/dist/client/static/js/{index-2bf0txsp.js → index-4nvcwtvr.js} +2 -2
- package/dist/client/static/js/index-4ppap7vb.js +9 -0
- package/dist/client/static/js/{index-qs4n116g.js → index-4tbdws4r.js} +2 -2
- package/dist/client/static/js/index-56hy2hcy.js +1 -0
- package/dist/client/static/js/{index-7rmps91t.js → index-60g0e74a.js} +2 -2
- package/dist/client/static/js/{index-zp40g8ah.js → index-7ag37ghj.js} +12 -12
- package/dist/client/static/js/{index-z6y8j93w.js → index-7ehcjb3r.js} +7 -7
- package/dist/client/static/js/index-899yw6fh.js +2 -0
- package/dist/client/static/js/{index-2yzt8h3d.js → index-8pqx5n2p.js} +2 -2
- package/dist/client/static/js/{index-dh060b7r.js → index-91jm3ywm.js} +2 -2
- package/dist/client/static/js/{index-yg083mk0.js → index-9qf2h9jb.js} +6 -6
- package/dist/client/static/js/{index-tcfpzqb9.js → index-9rp7h1nv.js} +20 -20
- package/dist/client/static/js/index-9rr23e0e.js +2 -0
- package/dist/client/static/js/index-9wj4ma9g.js +3 -0
- package/dist/client/static/js/index-awtk0djy.js +1 -0
- package/dist/client/static/js/{index-4dnc1kys.js → index-awz6pyd0.js} +2 -2
- package/dist/client/static/js/index-cvx1vkrx.js +1 -0
- package/dist/client/static/js/{index-c3whkrwa.js → index-cwwg7k5f.js} +33 -33
- package/dist/client/static/js/{index-ykc14gez.js → index-dzatbdws.js} +6 -6
- package/dist/client/static/js/{index-j37m7pn9.js → index-e6ew77ph.js} +2 -2
- package/dist/client/static/js/{index-tb35a328.js → index-ej1va073.js} +2 -2
- package/dist/client/static/js/{index-4ccs971z.js → index-er7pj5k6.js} +2 -2
- package/dist/client/static/js/index-fm0t4pct.js +4 -0
- package/dist/client/static/js/{index-0857zpr0.js → index-g5wp6ksw.js} +2 -2
- package/dist/client/static/js/{index-nzvte8s5.js → index-gy4mtr2e.js} +2 -2
- package/dist/client/static/js/{index-1yq96wpa.js → index-j9y4tjk0.js} +2 -2
- package/dist/client/static/js/{index-7ff9scbm.js → index-kt7c42n7.js} +2 -2
- package/dist/client/static/js/index-ktmb341a.js +468 -0
- package/dist/client/static/js/{index-taev57jw.js → index-m6zncj00.js} +2 -2
- package/dist/client/static/js/{index-dmc82cxb.js → index-mpyd7qxj.js} +2 -2
- package/dist/client/static/js/{index-1p880x6e.js → index-ms80nne4.js} +2 -2
- package/dist/client/static/js/{index-yyjw1ty9.js → index-my856e49.js} +2 -2
- package/dist/client/static/js/{index-pygy21w5.js → index-nnqyew8n.js} +2 -2
- package/dist/client/static/js/{index-qwxawph7.js → index-nt17ejrm.js} +2 -2
- package/dist/client/static/js/index-pvv340b4.js +2 -0
- package/dist/client/static/js/{index-nbm5r9g1.js → index-pxr36neg.js} +2 -2
- package/dist/client/static/js/{index-5ztdqm1w.js → index-q0k1am0g.js} +2 -2
- package/dist/client/static/js/{index-tc6k8qt7.js → index-qrpx4sk1.js} +2 -2
- package/dist/client/static/js/{index-473hk8nb.js → index-r2zsw7nw.js} +9 -9
- package/dist/client/static/js/{index-gaqjrzdb.js → index-rbkvw2xs.js} +2 -2
- package/dist/client/static/js/{index-wbsvg1d9.js → index-scmtzcv1.js} +2 -2
- package/dist/client/static/js/{index-bmaktvm2.js → index-syvkpnc8.js} +1 -1
- package/dist/client/static/js/index-tfqqsj2g.js +1 -0
- package/dist/client/static/js/{index-4z5ram7g.js → index-tj7xr4ta.js} +1 -1
- package/dist/client/static/js/{index-h8hjcdj1.js → index-wvw70pgd.js} +2 -2
- package/dist/client/static/js/{index-5dn4159w.js → index-wxs0x3g1.js} +2 -2
- package/dist/client/static/js/index-x507ndnc.js +314 -0
- package/dist/client/static/js/{index-gr8sqjpz.js → index-x87scjpa.js} +1 -1
- package/dist/client/static/js/{index-s5vegk6q.js → index-xtrsvm0d.js} +2 -2
- package/dist/client/static/js/{index-e8mt8rag.js → index-y1j18rha.js} +2 -2
- package/dist/client/static/js/{index-7dqq7cjp.js → index-yv2ervdj.js} +5 -5
- package/dist/client/static/js/{index-gz7kvpnm.js → index-z2pmt1bc.js} +1 -1
- package/dist/client/static/js/{index-5p8dwr4y.js → index-z446edg9.js} +1 -1
- package/dist/client/static/js/{index-a4636gt1.js → index-zkgqa0c2.js} +2 -2
- package/dist/client/static/js/index-zwbw177x.js +2 -0
- package/dist/client/static/js/info-A6RAGUB7-rzpg7qk1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-xsar9j6v.js → infoDiagram-VRGFBTTK-5mb5w005.js} +2 -2
- package/dist/client/static/js/ini-kjcpgebh.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g2rvt9jp.js → ishikawaDiagram-OU5B5YK6-zk7fa0fm.js} +2 -2
- package/dist/client/static/js/java-0bcyv1jt.js +1 -0
- package/dist/client/static/js/javascript-0mqgcvps.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-q95v18zc.js → journeyDiagram-ZHPQQLJL-8jd7b2aw.js} +6 -6
- package/dist/client/static/js/json-mb8k0b1n.js +1 -0
- package/dist/client/static/js/jsx-8p6dqgpq.js +1 -0
- package/dist/client/static/js/{julia-pe5vpc2m.js → julia-nwh5w343.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-2e7m7ds3.js → kanban-definition-PNTS6WVX-yp9rks4k.js} +7 -7
- package/dist/client/static/js/lua-nxnqww9z.js +1 -0
- package/dist/client/static/js/markdown-8gbyxxjd.js +1 -0
- package/dist/client/static/js/mermaid.core-kxsxr8ec.js +12 -0
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-banecvf8.js → mindmap-definition-NLK3R4M7-anx2kj3b.js} +7 -7
- package/dist/client/static/js/one-dark-pro-wyegjr0d.js +1 -0
- package/dist/client/static/js/one-light-kp6c3eqh.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-eac14hsq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-6erykm1c.js → pegDiagram-GJSIUBJH-9egqyzkc.js} +1 -1
- package/dist/client/static/js/{perl-cc2eqye8.js → perl-wb4wtc9x.js} +1 -1
- package/dist/client/static/js/{php-p9bvnpsv.js → php-9g594k9f.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-a9xqvysf.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-jn1d905q.js → pieDiagram-5QR66LMP-f3dvprbm.js} +3 -3
- package/dist/client/static/js/properties-d5bwhgwz.js +1 -0
- package/dist/client/static/js/python-fdwwjjhh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-sz4afnp1.js → quadrantDiagram-O4NWA36T-qsghd295.js} +6 -6
- package/dist/client/static/js/r-4d2ygtfj.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-jv2pm0fe.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-j74sc0b6.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-eaf19baz.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-d4j5nq31.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-ba862a9p.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ewzhhth2.js → railroadDiagram-XR7U4H2S-6vmazht2.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-fcs3xd42.js → requirementDiagram-PLB6GJNP-phs0wn1v.js} +6 -6
- package/dist/client/static/js/{ruby-65s2ca5d.js → ruby-c4hxsegh.js} +1 -1
- package/dist/client/static/js/{rust-ec1j2hwy.js → rust-e4whdswc.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2r829rjf.js → sankeyDiagram-IPEJSGJF-vkktegjk.js} +5 -5
- package/dist/client/static/js/{sass-p6cssgq8.js → sass-6yxywx7t.js} +1 -1
- package/dist/client/static/js/{scss-qfx8wt3b.js → scss-9wz47c6t.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3mnte9tv.js → sequenceDiagram-PO4LG4MO-37e6se72.js} +13 -13
- package/dist/client/static/js/{sizeCapture-INFHLROL-r6hf9265.js → sizeCapture-INFHLROL-3b4nsa4s.js} +1 -1
- package/dist/client/static/js/sql-sd00wgem.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-hm2f0wdb.js → stateDiagram-v2-GCMORJYK-2nnyqs9x.js} +6 -6
- package/dist/client/static/js/{svelte-jz3a190v.js → svelte-mm3jfpje.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-s58xzqhw.js → swimlanes-2SLR337P-eezd46ps.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-h78096xp.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-ezm1c4pz.js → timeline-definition-EJHVYXUP-pz0f2b4h.js} +12 -12
- package/dist/client/static/js/treeView-Q6P3EWNA-e8yb44pd.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-zvdv84vp.js +1 -0
- package/dist/client/static/js/tsx-dk8rpgtw.js +1 -0
- package/dist/client/static/js/typescript-5txwpd9t.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-ryvgs5ac.js → usecaseDiagram-POWQR4AR-hvg7a87b.js} +82 -82
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-rd5prsf1.js → vennDiagram-UO4OBE2U-03zh9phs.js} +8 -8
- package/dist/client/static/js/{vue-rv4pea8r.js → vue-rcdqpz7q.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hbv0cg4s.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-1kt8q8a4.js → wardleyDiagram-VNRHLVJA-xy77th92.js} +4 -4
- package/dist/client/static/js/xml-vtrdnrn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-q39bbgq4.js → xychartDiagram-PMCCYNJV-h48448cm.js} +4 -4
- package/dist/client/static/js/yaml-6k1tmwtm.js +1 -0
- package/package.json +2 -1
- package/src/client/components/common/MarkdownRenderer.tsx +31 -34
- package/src/client/components/common/ViewportSelector.tsx +4 -0
- package/src/client/components/common/command-palette/index.tsx +5 -2
- package/src/client/components/common/header-button/index.tsx +10 -2
- package/src/client/components/common/markdown-inline-file.test.tsx +131 -0
- package/src/client/components/common/search-select/OptionList.tsx +164 -0
- package/src/client/components/common/search-select/index.tsx +159 -136
- package/src/client/components/common/search-select/option.ts +16 -0
- package/src/client/components/common/search-select/search-select.test.tsx +61 -2
- package/src/client/components/common/sort-menu/index.tsx +9 -4
- package/src/client/components/layout/session-sidebar/HarnessFilter.tsx +26 -6
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +45 -49
- package/src/client/components/layout/session-sidebar/scheduler-modal/TaskForm.tsx +31 -25
- package/src/client/components/settings/ProjectSelectorDropdown.tsx +40 -101
- package/src/client/components/settings/apply-side-effects.test.ts +16 -0
- package/src/client/components/settings/apply-side-effects.ts +8 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/HarnessSettings.tsx +8 -0
- package/src/client/components/settings/categories/TokenUsageSettings.tsx +26 -3
- package/src/client/components/settings/categories/agent-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.test.tsx +97 -0
- package/src/client/components/settings/categories/appearance-settings/RightSideSection.tsx +94 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +4 -3
- package/src/client/components/settings/categories/command-settings/DetailPane.tsx +12 -10
- package/src/client/components/settings/categories/dictation-settings/CaptureSection.tsx +13 -18
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +8 -9
- package/src/client/components/settings/categories/harness-settings/AccountLoginPanel.tsx +224 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.test.tsx +139 -0
- package/src/client/components/settings/categories/harness-settings/AccountsPanel.tsx +349 -0
- package/src/client/components/settings/categories/harness-settings/AddAccountForm.tsx +58 -0
- package/src/client/components/settings/categories/harness-settings/HarnessCard.tsx +33 -0
- package/src/client/components/settings/categories/keyboard-settings/ComposerKeys.tsx +10 -10
- package/src/client/components/settings/categories/mcp-settings/AdvancedSection.tsx +21 -18
- package/src/client/components/settings/categories/mcp-settings/DetailPane.tsx +12 -7
- package/src/client/components/settings/categories/omp-settings/PresetBar.tsx +11 -11
- package/src/client/components/settings/categories/omp-settings/RoleEditor.test.ts +14 -11
- package/src/client/components/settings/categories/omp-settings/RowEditor.tsx +17 -16
- package/src/client/components/settings/categories/plugin-settings/MarketplacePane.tsx +11 -9
- package/src/client/components/settings/categories/plugin-settings/SettingsSection.tsx +10 -9
- package/src/client/components/settings/categories/provider-settings/AddModelModal.tsx +10 -8
- package/src/client/components/settings/categories/provider-settings/DialectFields.tsx +40 -24
- package/src/client/components/settings/categories/provider-settings/EntryAdvanced.tsx +13 -9
- package/src/client/components/settings/categories/provider-settings/EntryModal.tsx +22 -17
- package/src/client/components/settings/categories/provider-settings/PresetPicker.tsx +79 -50
- package/src/client/components/settings/categories/provider-settings/model-dialogs.test.tsx +14 -7
- package/src/client/components/settings/categories/token-usage-settings/HarnessFilter.tsx +59 -0
- package/src/client/components/settings/categories/token-usage-settings/panel.test.tsx +37 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.test.ts +10 -0
- package/src/client/components/settings/categories/usage-settings/limit-groups.ts +4 -1
- package/src/client/components/settings/categories/usage-settings/providers.ts +28 -0
- package/src/client/components/settings/categories/usage-settings/usage-visibility.test.ts +60 -0
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +147 -5
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.tsx +27 -3
- package/src/client/components/settings/categories/voice-settings/speech/EndpointSection.tsx +11 -3
- package/src/client/components/settings/categories/voice-settings/speech/EngineSection.tsx +32 -2
- package/src/client/components/settings/categories/voice-settings/speech/ModelsSection.tsx +277 -0
- package/src/client/components/settings/categories/voice-settings/speech/TestSection.tsx +2 -1
- package/src/client/components/settings/categories/voice-settings/speech/VoiceSection.tsx +123 -50
- package/src/client/components/workspace/btw-panel/TopicMenu.tsx +20 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.speech.test.tsx +35 -6
- package/src/client/components/workspace/chat-timeline/SpeechButton.tsx +111 -36
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +21 -6
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +7 -4
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +22 -6
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +17 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/index.tsx +8 -65
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.test.ts +12 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.test.ts +35 -218
- package/src/client/components/workspace/chat-timeline/tool-renderers/registry.ts +40 -177
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.test.tsx +79 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/FallbackToolJson.tsx +86 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolBody.tsx +25 -16
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/card-header.test.ts +4 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/tool-view.ts +11 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.plugin.test.ts +3 -1
- package/src/client/components/workspace/file-explorer/ArchiveModals.tsx +15 -15
- package/src/client/components/workspace/git-panel/BranchToolbar.tsx +30 -5
- package/src/client/components/workspace/usage-panel/index.test.tsx +92 -12
- package/src/client/components/workspace/usage-panel/index.tsx +48 -12
- package/src/client/data/mock/chat.ts +17 -0
- package/src/client/data/mock/token-usage.ts +53 -10
- package/src/client/data/samples/tools-session.ts +8 -5
- package/src/client/hooks/chat/timeline/reader-input.ts +53 -1
- package/src/client/hooks/chat/timeline/scroll-activity.test.ts +103 -0
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +9 -4
- package/src/client/hooks/chat/timeline/scroll.ts +19 -2
- package/src/client/hooks/editor/font.test.ts +21 -0
- package/src/client/hooks/editor/font.ts +12 -9
- package/src/client/hooks/models/harness-accounts.ts +143 -0
- package/src/client/hooks/models/harness-catalog.ts +9 -2
- package/src/client/hooks/models/use-harnesses-controller.ts +12 -0
- package/src/client/hooks/models/use-harnesses.ts +14 -0
- package/src/client/hooks/settings/hide-empty-providers.test.ts +132 -0
- package/src/client/hooks/settings/hide-empty-providers.ts +49 -0
- package/src/client/hooks/settings/local-tts-models.ts +164 -0
- package/src/client/hooks/settings/useTokenUsage.ts +7 -2
- package/src/client/hooks/tts/tts-context.ts +6 -0
- package/src/client/hooks/tts/use-tts-player.ts +10 -0
- package/src/client/hooks/ui/markdown-render.ts +9 -1
- package/src/client/hooks/ui/markdown-scoped-links.ts +77 -0
- package/src/client/hooks/ui/open-inline-file.test.ts +144 -0
- package/src/client/hooks/ui/open-inline-file.ts +71 -0
- package/src/client/hooks/workspace/panel-tabs.ts +1 -1
- package/src/client/hooks/workspace/right-side.test.ts +75 -1
- package/src/client/hooks/workspace/right-side.ts +71 -10
- package/src/client/lib/commands/overlays.ts +16 -2
- package/src/client/lib/tts/player.test.ts +61 -0
- package/src/client/lib/tts/player.ts +120 -41
- package/src/client/tailwind.css +16 -0
- package/src/server/lib/antigravity/home.server.ts +27 -0
- package/src/server/lib/chat/normalize-tools.server.test.ts +79 -0
- package/src/server/lib/chat/normalize-tools.server.ts +87 -0
- package/src/server/lib/db/schema.ts +5 -1
- package/src/server/lib/harness/account-identity.server.ts +163 -0
- package/src/server/lib/harness/account-login.server.test.ts +151 -0
- package/src/server/lib/harness/account-login.server.ts +232 -0
- package/src/server/lib/harness/accounts.server.ts +339 -0
- package/src/server/lib/harness/accounts.test.ts +147 -0
- package/src/server/lib/harness/acp/background-probe.test.ts +314 -0
- package/src/server/lib/harness/acp/background-probe.ts +288 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +37 -1
- package/src/server/lib/harness/acp/background-replay.ts +8 -3
- package/src/server/lib/harness/acp/background-work.test.ts +4 -194
- package/src/server/lib/harness/acp/background-work.ts +4 -207
- package/src/server/lib/harness/acp/client.ts +3 -0
- package/src/server/lib/harness/acp/commands.ts +2 -2
- package/src/server/lib/harness/acp/frames-tool-shapes.test.ts +41 -13
- package/src/server/lib/harness/acp/frames-vendor-names.test.ts +209 -0
- package/src/server/lib/harness/acp/frames.test.ts +11 -20
- package/src/server/lib/harness/acp/frames.ts +5 -3
- package/src/server/lib/harness/acp/mapper.ts +5 -41
- package/src/server/lib/harness/acp/one-shot.server.ts +4 -2
- package/src/server/lib/harness/acp/prewarm.server.ts +21 -16
- package/src/server/lib/harness/acp/replay-transcript.ts +6 -1
- package/src/server/lib/harness/acp/session-background.test.ts +2 -1
- package/src/server/lib/harness/acp/session-intake.test.ts +8 -0
- package/src/server/lib/harness/acp/session-intake.ts +12 -3
- package/src/server/lib/harness/acp/session-options.ts +2 -0
- package/src/server/lib/harness/acp/session-process.ts +1 -0
- package/src/server/lib/harness/acp/session-wiring.test.ts +2 -0
- package/src/server/lib/harness/acp/session-wiring.ts +22 -0
- package/src/server/lib/harness/acp/session.ts +3 -3
- package/src/server/lib/harness/acp/stdio.test.ts +52 -0
- package/src/server/lib/harness/acp/stdio.ts +7 -1
- package/src/server/lib/harness/acp/subagent-frames.test.ts +1 -1
- package/src/server/lib/harness/acp/subagent-frames.ts +0 -2
- package/src/server/lib/harness/acp/tool-calls.ts +5 -16
- package/src/server/lib/harness/acp/tool-identity.test.ts +69 -8
- package/src/server/lib/harness/acp/tool-identity.ts +58 -10
- package/src/server/lib/harness/acp/tool-shape.ts +5 -3
- package/src/server/lib/harness/auto-probe.server.ts +2 -2
- package/src/server/lib/harness/codex/transcript.server.test.ts +3 -1
- package/src/server/lib/harness/codex/transcript.server.ts +8 -15
- package/src/server/lib/harness/launch-table.ts +6 -1
- package/src/server/lib/harness/launch.ts +1 -0
- package/src/server/lib/harness/schema.server.ts +37 -0
- package/src/server/lib/harness/session-delete.server.ts +4 -2
- package/src/server/lib/harness/session-import.server.ts +21 -7
- package/src/server/lib/harness/session-store.server.test.ts +12 -0
- package/src/server/lib/harness/session-store.server.ts +21 -6
- package/src/server/lib/harness/session-transcript.server.ts +2 -1
- package/src/server/lib/harness/spawn.server.ts +27 -6
- package/src/server/lib/lifecycle/paths.ts +12 -0
- package/src/server/lib/models/provider-icon-fetch.test.ts +57 -3
- package/src/server/lib/models/provider-icon-fetch.ts +9 -1
- package/src/server/lib/models/provider-icon-store.server.ts +61 -0
- package/src/server/lib/models/provider-icon-store.test.ts +55 -0
- package/src/server/lib/models/provider-icon-svg.ts +57 -0
- package/src/server/lib/omp/session/messages.ts +5 -1
- package/src/server/lib/realtime/topics/peer-relay.server.ts +9 -1
- package/src/server/lib/realtime/topics/session.server.ts +5 -1
- package/src/server/lib/schedule/runtime.server.ts +4 -1
- package/src/server/lib/sessions/dispatch.server.ts +4 -1
- package/src/server/lib/sessions/fork.server.ts +2 -0
- package/src/server/lib/sessions/resolve.server.ts +4 -0
- package/src/server/lib/sessions/spawn.server.ts +4 -2
- package/src/server/lib/tts/engines/adapters.test.ts +50 -8
- package/src/server/lib/tts/engines/deepgram.ts +30 -9
- package/src/server/lib/tts/engines/elevenlabs.ts +6 -0
- package/src/server/lib/tts/engines/gemini.ts +116 -0
- package/src/server/lib/tts/engines/index.ts +14 -0
- package/src/server/lib/tts/engines/local.ts +53 -0
- package/src/server/lib/tts/engines/openai.ts +21 -4
- package/src/server/lib/tts/engines/sherpa-onnx-node.d.ts +38 -0
- package/src/server/lib/tts/engines/sherpa.test.ts +53 -0
- package/src/server/lib/tts/engines/sherpa.ts +287 -0
- package/src/server/lib/tts/local-models.server.ts +257 -0
- package/src/server/lib/tts/local-request.test.ts +66 -0
- package/src/server/lib/tts/local-request.ts +59 -0
- package/src/server/lib/tts/model-manifest.server.test.ts +71 -0
- package/src/server/lib/tts/model-manifest.server.ts +154 -0
- package/src/server/lib/tts/settings.server.ts +7 -4
- package/src/server/lib/tts/wav.test.ts +37 -0
- package/src/server/lib/tts/wav.ts +43 -0
- package/src/server/lib/usage/antigravity-quota.test.ts +249 -0
- package/src/server/lib/usage/antigravity-quota.ts +197 -0
- package/src/server/lib/usage/antigravity.test.ts +20 -0
- package/src/server/lib/usage/antigravity.ts +267 -0
- package/src/server/lib/usage/index-harness.test.ts +162 -0
- package/src/server/lib/usage/index-parse.test.ts +1 -0
- package/src/server/lib/usage/index-parse.ts +12 -4
- package/src/server/lib/usage/index-query.server.ts +64 -2
- package/src/server/lib/usage/index-scan.server.ts +68 -152
- package/src/server/lib/usage/index-schema.server.ts +24 -8
- package/src/server/lib/usage/index-schema.test.ts +54 -0
- package/src/server/lib/usage/index-sources.server.ts +54 -0
- package/src/server/lib/usage/providers.server.test.ts +67 -1
- package/src/server/lib/usage/providers.server.ts +82 -3
- package/src/server/lib/usage/sources/claude.server.ts +187 -0
- package/src/server/lib/usage/sources/claude.test.ts +86 -0
- package/src/server/lib/usage/sources/codex.server.ts +155 -0
- package/src/server/lib/usage/sources/codex.test.ts +53 -0
- package/src/server/lib/usage/sources/dsh.server.ts +120 -0
- package/src/server/lib/usage/sources/dsh.test.ts +49 -0
- package/src/server/lib/usage/sources/helpers.ts +191 -0
- package/src/server/lib/usage/sources/jsonl.server.ts +78 -0
- package/src/server/lib/usage/sources/jsonl.test.ts +72 -0
- package/src/server/lib/usage/sources/omp.server.ts +124 -0
- package/src/server/lib/usage/sources/opencode.server.ts +203 -0
- package/src/server/lib/usage/sources/opencode.test.ts +104 -0
- package/src/server/lib/usage/sources/qwen.server.ts +122 -0
- package/src/server/lib/usage/sources/qwen.test.ts +62 -0
- package/src/server/lib/usage/sources/types.ts +53 -0
- package/src/server/lib/usage/sources/zcode.server.ts +131 -0
- package/src/server/lib/usage/sources/zcode.test.ts +87 -0
- package/src/server/routes/agent/harness-command.ts +2 -0
- package/src/server/routes/agent/prewarm.ts +7 -2
- package/src/server/routes/chat/session-legacy-tools.test.ts +132 -0
- package/src/server/routes/chat/session.ts +10 -4
- package/src/server/routes/harness/accounts.test.ts +99 -0
- package/src/server/routes/harness/accounts.ts +106 -0
- package/src/server/routes/harness/root.ts +13 -1
- package/src/server/routes/sessions/local-image.ts +2 -2
- package/src/server/routes/telemetry/tokens.test.ts +20 -0
- package/src/server/routes/telemetry/tokens.ts +12 -3
- package/src/server/routes/tts/index.ts +2 -0
- package/src/server/routes/tts/models.test.ts +148 -0
- package/src/server/routes/tts/models.ts +89 -0
- package/src/server/routes/tts/speak.test.ts +40 -0
- package/src/shared/lib/chat/tool/normalize.ts +67 -0
- package/src/shared/lib/chat/tool/render-key.test.ts +167 -0
- package/src/shared/lib/chat/tool/render-key.ts +247 -0
- package/src/shared/lib/chat/tool/tool-aliases.test.ts +42 -0
- package/src/shared/lib/chat/tool/tool-aliases.ts +59 -12
- package/src/shared/lib/fs/open-reference.test.ts +64 -0
- package/src/shared/lib/fs/open-reference.ts +74 -0
- package/src/shared/lib/harness/accounts.test.ts +41 -0
- package/src/shared/lib/harness/accounts.ts +175 -0
- package/src/shared/lib/icons/tint-hues.generated.ts +26 -25
- package/src/shared/lib/markdown/ascii-art.test.ts +154 -0
- package/src/shared/lib/markdown/ascii-art.ts +158 -0
- package/src/shared/lib/markdown/inline-file.test.ts +100 -0
- package/src/shared/lib/markdown/inline-file.ts +213 -0
- package/src/shared/lib/markdown/marked.ts +24 -2
- package/src/shared/lib/models/provider/identity.test.ts +34 -0
- package/src/shared/lib/models/provider/identity.ts +28 -0
- package/src/shared/lib/omp/session/messages-map.test.ts +2 -1
- package/src/shared/lib/omp/session/messages-parse.ts +3 -2
- package/src/shared/lib/omp/session/parse-message-blocks.ts +14 -0
- package/src/shared/lib/omp/subagent/transcript-client.ts +5 -1
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/tts/engines.test.ts +39 -2
- package/src/shared/lib/tts/engines.ts +87 -61
- package/src/shared/lib/tts/local-models.test.ts +69 -0
- package/src/shared/lib/tts/local-models.ts +200 -0
- package/src/shared/lib/tts/settings.ts +1 -1
- package/src/shared/lib/tts/speakable.test.ts +21 -1
- package/src/shared/lib/tts/speakable.ts +66 -33
- package/src/shared/lib/tts/voices.ts +204 -0
- package/src/shared/lib/workspace/right-side-hidden.ts +57 -0
- package/src/shared/lib/workspace/session-state/store.ts +7 -5
- package/src/shared/types/chat.ts +3 -0
- package/src/shared/types/harness.ts +5 -0
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +12 -0
- package/src/shared/types/tokenUsage.ts +21 -0
- package/src/shared/types/tool-render.ts +37 -0
- package/src/test-support/preload.ts +9 -0
- package/dist/client/static/js/ImageView-g50pk5pt.js +0 -1
- package/dist/client/static/js/LayoutWrapper-tag0qpts.js +0 -2
- package/dist/client/static/js/MergeDiffView-c4mb8m1w.js +0 -1
- package/dist/client/static/js/Modal-pf9p6m1k.js +0 -59
- package/dist/client/static/js/SessionsView-2r1grxxs.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-ee9wjsht.js +0 -1
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-278nx8rt.js +0 -36
- package/dist/client/static/js/bash-36shcpcw.js +0 -1
- package/dist/client/static/js/c-kxeqssf9.js +0 -1
- package/dist/client/static/js/cose-bilkent-JH36ORCC-ydq7mvy0.js +0 -1
- package/dist/client/static/js/cpp-wtk1s3d7.js +0 -1
- package/dist/client/static/js/css-0a0r6rp3.js +0 -1
- package/dist/client/static/js/css-xhnrhg4e.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-gs16zjqa.js +0 -1
- package/dist/client/static/js/diagram-3UASUU5V-06nptkzc.js +0 -24
- package/dist/client/static/js/eventmodeling-NTZA5JFV-ftz7zrz5.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-ax0qfmp3.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-3rtkds4s.js +0 -1
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-5p9mgq7n.js +0 -106
- package/dist/client/static/js/graphql-w9ajhndp.js +0 -1
- package/dist/client/static/js/html-krfbq5wp.js +0 -1
- package/dist/client/static/js/index-05n22cg9.js +0 -4
- package/dist/client/static/js/index-14dgbjsm.js +0 -2
- package/dist/client/static/js/index-2jgx68m0.js +0 -1
- package/dist/client/static/js/index-333rq9yy.js +0 -1
- package/dist/client/static/js/index-38g2eevc.js +0 -314
- package/dist/client/static/js/index-80fjn77c.js +0 -2
- package/dist/client/static/js/index-9wc36am3.css +0 -1
- package/dist/client/static/js/index-bvpzzhn2.js +0 -4
- package/dist/client/static/js/index-e19dbqd3.js +0 -2
- package/dist/client/static/js/index-epzvftkq.js +0 -1
- package/dist/client/static/js/index-fbg5vhhw.js +0 -2
- package/dist/client/static/js/index-mbtenbyc.js +0 -9
- package/dist/client/static/js/index-pv4z2mp2.js +0 -463
- package/dist/client/static/js/index-t522tpxt.js +0 -3
- package/dist/client/static/js/index-xw1bptp5.js +0 -2
- package/dist/client/static/js/index-yr3exz70.js +0 -2
- package/dist/client/static/js/index-zdw8bd5t.js +0 -2
- package/dist/client/static/js/index-zyefab6q.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-vr5mxm6f.js +0 -1
- package/dist/client/static/js/ini-zx7x1jj1.js +0 -1
- package/dist/client/static/js/java-bbw6kdcr.js +0 -1
- package/dist/client/static/js/javascript-p2a8rbpw.js +0 -1
- package/dist/client/static/js/json-zh7m2fyg.js +0 -1
- package/dist/client/static/js/jsx-3zyyt0eh.js +0 -1
- package/dist/client/static/js/lua-d656k76a.js +0 -1
- package/dist/client/static/js/markdown-b5w681mm.js +0 -1
- package/dist/client/static/js/mermaid.core-dzajkp0g.js +0 -12
- package/dist/client/static/js/one-dark-pro-z965dedc.js +0 -1
- package/dist/client/static/js/one-light-capdx801.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ncb5xxtn.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-ff8fpvc4.js +0 -1
- package/dist/client/static/js/properties-3c6rmnqp.js +0 -1
- package/dist/client/static/js/python-a3x3zpv1.js +0 -1
- package/dist/client/static/js/r-7h3gwype.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-gbj4b1hf.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-ndv5tqgr.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-yjzj09s1.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e6pw7e5z.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9734dxy4.js +0 -1
- package/dist/client/static/js/sql-7a5vavm0.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-z4pt2kn1.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-rs10d4p5.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-ey6c5x9f.js +0 -1
- package/dist/client/static/js/tsx-4a9b8tqf.js +0 -1
- package/dist/client/static/js/typescript-kas107wb.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-kd9swrdr.js +0 -1
- package/dist/client/static/js/xml-3g4bdtpa.js +0 -1
- package/dist/client/static/js/yaml-ktxjn917.js +0 -1
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
import{Gt}from"./index-pv4z2mp2.js";import{yn,Mn}from"./index-2yzt8h3d.js";var zp=Mn(function(ia,oa){(function(r,e){typeof ia=="object"&&typeof oa<"u"?oa.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(ia,function(){var r=1000,e=60000,i=3600000,s="millisecond",o="second",a="minute",c="hour",n="day",d="week",f="month",u="quarter",p="year",x="date",b="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(lt){var N=["th","st","nd","rd"],K=lt%100;return"["+lt+(N[(K-20)%10]||N[K]||N[0])+"]"}},_=function(lt,N,K){var et=String(lt);return!et||et.length>=N?lt:""+Array(N+1-et.length).join(K)+lt},v={s:_,z:function(lt){var N=-lt.utcOffset(),K=Math.abs(N),et=Math.floor(K/60),U=K%60;return(N<=0?"+":"-")+_(et,2,"0")+":"+_(U,2,"0")},m:function lt(N,K){if(N.date()<K.date())return-lt(K,N);var et=12*(K.year()-N.year())+(K.month()-N.month()),U=N.clone().add(et,f),ut=K-U<0,ct=N.clone().add(et+(ut?-1:1),f);return+(-(et+(K-U)/(ut?U-ct:ct-U))||0)},a:function(lt){return lt<0?Math.ceil(lt)||0:Math.floor(lt)},p:function(lt){return{M:f,y:p,w:d,d:n,D:x,h:c,m:a,s:o,ms:s,Q:u}[lt]||String(lt||"").toLowerCase().replace(/s$/,"")},u:function(lt){return lt===void 0}},E="en",D={};D[E]=B;var P="$isDayjsObject",Z=function(lt){return lt instanceof ft||!(!lt||!lt[P])},Q=function lt(N,K,et){var U;if(!N)return E;if(typeof N=="string"){var ut=N.toLowerCase();D[ut]&&(U=ut),K&&(D[ut]=K,U=ut);var ct=N.split("-");if(!U&&ct.length>1)return lt(ct[0])}else{var _t=N.name;D[_t]=N,U=_t}return!et&&U&&(E=U),U||!et&&E},tt=function(lt,N){if(Z(lt))return lt.clone();var K=typeof N=="object"?N:{};return K.date=lt,K.args=arguments,new ft(K)},ot=v;ot.l=Q,ot.i=Z,ot.w=function(lt,N){return tt(lt,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var ft=function(){function lt(K){this.$L=Q(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[P]=!0}var N=lt.prototype;return N.parse=function(K){this.$d=function(et){var{date:U,utc:ut}=et;if(U===null)return new Date(NaN);if(ot.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var ct=U.match(S);if(ct){var _t=ct[2]-1||0,Lt=(ct[7]||"0").substring(0,3);return ut?new Date(Date.UTC(ct[1],_t,ct[3]||1,ct[4]||0,ct[5]||0,ct[6]||0,Lt)):new Date(ct[1],_t,ct[3]||1,ct[4]||0,ct[5]||0,ct[6]||0,Lt)}}return new Date(U)}(K),this.init()},N.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},N.$utils=function(){return ot},N.isValid=function(){return this.$d.toString()!==b},N.isSame=function(K,et){var U=tt(K);return this.startOf(et)<=U&&U<=this.endOf(et)},N.isAfter=function(K,et){return tt(K)<this.startOf(et)},N.isBefore=function(K,et){return this.endOf(et)<tt(K)},N.$g=function(K,et,U){return ot.u(K)?this[et]:this.set(U,K)},N.unix=function(){return Math.floor(this.valueOf()/1000)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(K,et){var U=this,ut=!!ot.u(et)||et,ct=ot.p(K),_t=function(Wt,Xt){var zt=ot.w(U.$u?Date.UTC(U.$y,Xt,Wt):new Date(U.$y,Xt,Wt),U);return ut?zt:zt.endOf(n)},Lt=function(Wt,Xt){return ot.w(U.toDate()[Wt].apply(U.toDate("s"),(ut?[0,0,0,0]:[23,59,59,999]).slice(Xt)),U)},jt=this.$W,Ut=this.$M,Qt=this.$D,re="set"+(this.$u?"UTC":"");switch(ct){case p:return ut?_t(1,0):_t(31,11);case f:return ut?_t(1,Ut):_t(0,Ut+1);case d:var Dt=this.$locale().weekStart||0,Et=(jt<Dt?jt+7:jt)-Dt;return _t(ut?Qt-Et:Qt+(6-Et),Ut);case n:case x:return Lt(re+"Hours",0);case c:return Lt(re+"Minutes",1);case a:return Lt(re+"Seconds",2);case o:return Lt(re+"Milliseconds",3);default:return this.clone()}},N.endOf=function(K){return this.startOf(K,!1)},N.$set=function(K,et){var U,ut=ot.p(K),ct="set"+(this.$u?"UTC":""),_t=(U={},U[n]=ct+"Date",U[x]=ct+"Date",U[f]=ct+"Month",U[p]=ct+"FullYear",U[c]=ct+"Hours",U[a]=ct+"Minutes",U[o]=ct+"Seconds",U[s]=ct+"Milliseconds",U)[ut],Lt=ut===n?this.$D+(et-this.$W):et;if(ut===f||ut===p){var jt=this.clone().set(x,1);jt.$d[_t](Lt),jt.init(),this.$d=jt.set(x,Math.min(this.$D,jt.daysInMonth())).$d}else _t&&this.$d[_t](Lt);return this.init(),this},N.set=function(K,et){return this.clone().$set(K,et)},N.get=function(K){return this[ot.p(K)]()},N.add=function(K,et){var U,ut=this;K=Number(K);var ct=ot.p(et),_t=function(Ut){var Qt=tt(ut);return ot.w(Qt.date(Qt.date()+Math.round(Ut*K)),ut)};if(ct===f)return this.set(f,this.$M+K);if(ct===p)return this.set(p,this.$y+K);if(ct===n)return _t(1);if(ct===d)return _t(7);var Lt=(U={},U[a]=e,U[c]=i,U[o]=r,U)[ct]||1,jt=this.$d.getTime()+K*Lt;return ot.w(jt,this)},N.subtract=function(K,et){return this.add(-1*K,et)},N.format=function(K){var et=this,U=this.$locale();if(!this.isValid())return U.invalidDate||b;var ut=K||"YYYY-MM-DDTHH:mm:ssZ",ct=ot.z(this),_t=this.$H,Lt=this.$m,jt=this.$M,{weekdays:Ut,months:Qt,meridiem:re}=U,Dt=function(Xt,zt,he,le){return Xt&&(Xt[zt]||Xt(et,ut))||he[zt].slice(0,le)},Et=function(Xt){return ot.s(_t%12||12,Xt,"0")},Wt=re||function(Xt,zt,he){var le=Xt<12?"AM":"PM";return he?le.toLowerCase():le};return ut.replace(T,function(Xt,zt){return zt||function(he){switch(he){case"YY":return String(et.$y).slice(-2);case"YYYY":return ot.s(et.$y,4,"0");case"M":return jt+1;case"MM":return ot.s(jt+1,2,"0");case"MMM":return Dt(U.monthsShort,jt,Qt,3);case"MMMM":return Dt(Qt,jt);case"D":return et.$D;case"DD":return ot.s(et.$D,2,"0");case"d":return String(et.$W);case"dd":return Dt(U.weekdaysMin,et.$W,Ut,2);case"ddd":return Dt(U.weekdaysShort,et.$W,Ut,3);case"dddd":return Ut[et.$W];case"H":return String(_t);case"HH":return ot.s(_t,2,"0");case"h":return Et(1);case"hh":return Et(2);case"a":return Wt(_t,Lt,!0);case"A":return Wt(_t,Lt,!1);case"m":return String(Lt);case"mm":return ot.s(Lt,2,"0");case"s":return String(et.$s);case"ss":return ot.s(et.$s,2,"0");case"SSS":return ot.s(et.$ms,3,"0");case"Z":return ct}return null}(Xt)||ct.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(K,et,U){var ut,ct=this,_t=ot.p(et),Lt=tt(K),jt=(Lt.utcOffset()-this.utcOffset())*e,Ut=this-Lt,Qt=function(){return ot.m(ct,Lt)};switch(_t){case p:ut=Qt()/12;break;case f:ut=Qt();break;case u:ut=Qt()/3;break;case d:ut=(Ut-jt)/604800000;break;case n:ut=(Ut-jt)/86400000;break;case c:ut=Ut/i;break;case a:ut=Ut/e;break;case o:ut=Ut/r;break;default:ut=Ut}return U?ut:ot.a(ut)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return D[this.$L]},N.locale=function(K,et){if(!K)return this.$L;var U=this.clone(),ut=Q(K,et,!0);return ut&&(U.$L=ut),U},N.clone=function(){return ot.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},lt}(),dt=ft.prototype;return tt.prototype=dt,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",p],["$D",x]].forEach(function(lt){dt[lt[1]]=function(N){return this.$g(N,lt[0],lt[1])}}),tt.extend=function(lt,N){return lt.$i||(lt(N,ft,tt),lt.$i=!0),tt},tt.locale=Q,tt.isDayjs=Z,tt.unix=function(lt){return tt(1000*lt)},tt.en=D[E],tt.Ls=D,tt.p={},tt})});var tf=Mn(function(Qd){Object.defineProperty(Qd,"__esModule",{value:!0});Qd.BLANK_URL=Qd.relativeFirstCharacters=Qd.whitespaceEscapeCharsRegex=Qd.urlSchemeRegex=Qd.ctrlCharactersRegex=Qd.htmlCtrlEntityRegex=Qd.htmlEntitiesRegex=Qd.invalidProtocolRegex=void 0;Qd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Qd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Qd.htmlCtrlEntityRegex=/&(newline|tab);/gi;Qd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Qd.urlSchemeRegex=/^.+(:|:)/gim;Qd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Qd.relativeFirstCharacters=[".","/"];Qd.BLANK_URL="about:blank"});var ul=Mn(function(rf){Object.defineProperty(rf,"__esModule",{value:!0});rf.sanitizeUrl=Sb;var ve=tf();function bb(r){return ve.relativeFirstCharacters.indexOf(r[0])>-1}function kb(r){var e=r.replace(ve.ctrlCharactersRegex,"");return e.replace(ve.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function wb(r){return URL.canParse(r)}function ef(r){try{return decodeURIComponent(r)}catch(e){return r}}function Sb(r){if(!r)return ve.BLANK_URL;var e,i=ef(r.trim());do i=kb(i).replace(ve.htmlCtrlEntityRegex,"").replace(ve.ctrlCharactersRegex,"").replace(ve.whitespaceEscapeCharsRegex,"").trim(),i=ef(i),e=i.match(ve.ctrlCharactersRegex)||i.match(ve.htmlEntitiesRegex)||i.match(ve.htmlCtrlEntityRegex)||i.match(ve.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return ve.BLANK_URL;if(bb(s))return s;var o=s.trimStart(),a=o.match(ve.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(ve.invalidProtocolRegex.test(c))return ve.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!wb(n))return ve.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var Bc=Object.defineProperty,t=(r,e)=>Bc(r,"name",{value:e,configurable:!0}),vo=(r,e)=>{for(var i in e)Bc(r,i,{get:e[i],enumerable:!0})};var _c=yn(zp(),1),ir={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:t((...r)=>{},"trace"),debug:t((...r)=>{},"debug"),info:t((...r)=>{},"info"),warn:t((...r)=>{},"warn"),error:t((...r)=>{},"error"),fatal:t((...r)=>{},"fatal")},id=t(function(r="fatal"){let e=ir.fatal;if(typeof r==="string"){if(r.toLowerCase()in ir)e=ir[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=ir.fatal)l.fatal=console.error?console.error.bind(console,Oe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Oe("FATAL"));if(e<=ir.error)l.error=console.error?console.error.bind(console,Oe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Oe("ERROR"));if(e<=ir.warn)l.warn=console.warn?console.warn.bind(console,Oe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Oe("WARN"));if(e<=ir.info)l.info=console.info?console.info.bind(console,Oe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Oe("INFO"));if(e<=ir.debug)l.debug=console.debug?console.debug.bind(console,Oe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Oe("DEBUG"));if(e<=ir.trace)l.trace=console.debug?console.debug.bind(console,Oe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Oe("TRACE"))},"setLogLevel"),Oe=t((r)=>`%c${_c.default().format("ss.SSS")} : ${r} : `,"format");var Wo={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:(r)=>r>=255?255:r<0?0:r,g:(r)=>r>=255?255:r<0?0:r,b:(r)=>r>=255?255:r<0?0:r,h:(r)=>r%360,s:(r)=>r>=100?100:r<0?0:r,l:(r)=>r>=100?100:r<0?0:r,a:(r)=>r>=1?1:r<0?0:r},toLinear:(r)=>{let e=r/255;return r>0.03928?Math.pow((e+0.055)/1.055,2.4):e/12.92},hue2rgb:(r,e,i)=>{if(i<0)i+=1;if(i>1)i-=1;if(i<0.16666666666666666)return r+(e-r)*6*i;if(i<0.5)return e;if(i<0.6666666666666666)return r+(e-r)*(0.6666666666666666-i)*6;return r},hsl2rgb:({h:r,s:e,l:i},s)=>{if(!e)return i*2.55;r/=360,e/=100,i/=100;let o=i<0.5?i*(1+e):i+e-i*e,a=2*i-o;switch(s){case"r":return Wo.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return Wo.hue2rgb(a,o,r)*255;case"b":return Wo.hue2rgb(a,o,r-0.3333333333333333)*255}},rgb2hsl:({r,g:e,b:i},s)=>{r/=255,e/=255,i/=255;let o=Math.max(r,e,i),a=Math.min(r,e,i),c=(o+a)/2;if(s==="l")return c*100;if(o===a)return 0;let n=o-a,d=c>0.5?n/(2-o-a):n/(o+a);if(s==="s")return d*100;switch(o){case r:return((e-i)/n+(e<i?6:0))*60;case e:return((i-r)/n+2)*60;case i:return((r-e)/n+4)*60;default:return-1}}},Lc=Wo;var Sy={clamp:(r,e,i)=>{if(e>i)return Math.min(e,Math.max(i,r));return Math.min(i,Math.max(e,r))},round:(r)=>Math.round(r*10000000000)/10000000000},Fc=Sy;var Ty={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Mc=Ty;var By={channel:Lc,lang:Fc,unit:Mc},qt=By;var or={};for(let r=0;r<=255;r++)or[r]=qt.unit.dec2hex(r);var ye={ALL:0,RGB:1,HSL:2};class Ec{constructor(){this.type=ye.ALL}get(){return this.type}set(r){if(this.type&&this.type!==r)throw Error("Cannot change both RGB and HSL channels at the same time");this.type=r}reset(){this.type=ye.ALL}is(r){return this.type===r}}var $c=Ec;class Ic{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new $c}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=ye.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=qt.channel.rgb2hsl(r,"h");if(i===void 0)r.s=qt.channel.rgb2hsl(r,"s");if(s===void 0)r.l=qt.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=qt.channel.hsl2rgb(r,"r");if(i===void 0)r.g=qt.channel.hsl2rgb(r,"g");if(s===void 0)r.b=qt.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(ye.HSL)&&e!==void 0)return e;return this._ensureHSL(),qt.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(ye.HSL)&&e!==void 0)return e;return this._ensureHSL(),qt.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(ye.HSL)&&e!==void 0)return e;return this._ensureHSL(),qt.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(ye.RGB)&&e!==void 0)return e;return this._ensureRGB(),qt.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(ye.RGB)&&e!==void 0)return e;return this._ensureRGB(),qt.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(ye.RGB)&&e!==void 0)return e;return this._ensureRGB(),qt.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(ye.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(ye.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(ye.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(ye.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(ye.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(ye.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Oc=Ic;var _y=new Oc({r:0,g:0,b:0,a:0},"transparent"),fr=_y;var Dc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Dc.re);if(!e)return;let i=e[1],s=parseInt(i,16),o=i.length,a=o%4===0,c=o>4,n=c?1:17,d=c?8:4,f=a?0:-1,u=c?255:15;return fr.set({r:(s>>d*(f+3)&u)*n,g:(s>>d*(f+2)&u)*n,b:(s>>d*(f+1)&u)*n,a:a?(s&u)*n/255:1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`#${or[Math.round(e)]}${or[Math.round(i)]}${or[Math.round(s)]}${or[Math.round(o*255)]}`;else return`#${or[Math.round(e)]}${or[Math.round(i)]}${or[Math.round(s)]}`}},Sr=Dc;var No={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:(r)=>{let e=r.match(No.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return qt.channel.clamp.h(parseFloat(i)*0.9);case"rad":return qt.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return qt.channel.clamp.h(parseFloat(i)*360)}}return qt.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(No.re);if(!i)return;let[,s,o,a,c,n]=i;return fr.set({h:No._hue2deg(s),s:qt.channel.clamp.s(parseFloat(o)),l:qt.channel.clamp.l(parseFloat(a)),a:c?qt.channel.clamp.a(n?parseFloat(c)/100:parseFloat(c)):1},r)},stringify:(r)=>{let{h:e,s:i,l:s,a:o}=r;if(o<1)return`hsla(${qt.lang.round(e)}, ${qt.lang.round(i)}%, ${qt.lang.round(s)}%, ${o})`;else return`hsl(${qt.lang.round(e)}, ${qt.lang.round(i)}%, ${qt.lang.round(s)}%)`}},Fi=No;var zo={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:(r)=>{r=r.toLowerCase();let e=zo.colors[r];if(!e)return;return Sr.parse(e)},stringify:(r)=>{let e=Sr.stringify(r);for(let i in zo.colors)if(zo.colors[i]===e)return i;return}},sa=zo;var Pc={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:(r)=>{let e=r.charCodeAt(0);if(e!==114&&e!==82)return;let i=r.match(Pc.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return fr.set({r:qt.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:qt.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:qt.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?qt.channel.clamp.a(u?parseFloat(f)/100:parseFloat(f)):1},r)},stringify:(r)=>{let{r:e,g:i,b:s,a:o}=r;if(o<1)return`rgba(${qt.lang.round(e)}, ${qt.lang.round(i)}, ${qt.lang.round(s)}, ${qt.lang.round(o)})`;else return`rgb(${qt.lang.round(e)}, ${qt.lang.round(i)}, ${qt.lang.round(s)})`}},Mi=Pc;var vy={format:{keyword:sa,hex:Sr,rgb:Mi,rgba:Mi,hsl:Fi,hsla:Fi},parse:(r)=>{if(typeof r!=="string")return r;let e=Sr.parse(r)||Mi.parse(r)||Fi.parse(r)||sa.parse(r);if(e)return e;throw Error(`Unsupported color format: "${r}"`)},stringify:(r)=>{if(!r.changed&&r.color)return r.color;if(r.type.is(ye.HSL)||r.data.r===void 0)return Fi.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return Mi.stringify(r);else return Sr.stringify(r)}},xe=vy;var Ly=(r,e)=>{let i=xe.parse(r);for(let s in e)i[s]=qt.channel.clamp[s](e[s]);return xe.stringify(i)},Ho=Ly;var Fy=(r,e,i=0,s=1)=>{if(typeof r!=="number")return Ho(r,{a:e});let o=fr.set({r:qt.channel.clamp.r(r),g:qt.channel.clamp.g(e),b:qt.channel.clamp.b(i),a:qt.channel.clamp.a(s)});return xe.stringify(o)},At=Fy;var My=(r,e)=>qt.lang.round(xe.parse(r)[e]),ha=My;var Ay=(r)=>{let{r:e,g:i,b:s}=xe.parse(r),o=0.2126*qt.channel.toLinear(e)+0.7152*qt.channel.toLinear(i)+0.0722*qt.channel.toLinear(s);return qt.lang.round(o)},Rc=Ay;var Ey=(r)=>Rc(r)>=0.5,qc=Ey;var $y=(r)=>!qc(r),Se=$y;var Iy=(r,e,i)=>{let s=xe.parse(r),o=s[e],a=qt.channel.clamp[e](o+i);if(o!==a)s[e]=a;return xe.stringify(s)},lc=Iy;var Oy=(r,e)=>lc(r,"l",e),g=Oy;var Dy=(r,e)=>lc(r,"l",-e),A=Dy;var Py=(r,e)=>{let i=xe.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return Ho(r,s)},F=Py;var Ry=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=xe.parse(r),{r:n,g:d,b:f,a:u}=xe.parse(e),p=i/100,x=p*2-1,b=c-u,T=((x*b===-1?x:(x+b)/(1+x*b))+1)/2,B=1-T,_=s*T+n*B,v=o*T+d*B,E=a*T+f*B,D=c*p+u*(1-p);return At(_,v,E,D)},Wc=Ry;var qy=(r,e=100)=>{let i=xe.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Wc(i,r,e)},J=qy;var Eg=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Nr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wy=/\s/,Ny=t((r)=>{let e="",i=0,s=0;while(s<r.length){let o=r.indexOf("%%",s);if(o===-1)break;let a=r.indexOf(`
|
|
2
|
-
`,o);if(a===-1)break;let c=o;while(c>i&&Wy.test(r[c-1]))c--;e+=r.slice(i,c)+`
|
|
3
|
-
`,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),Bg=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},Wi={},cc=t(function(r,e){r=Ny(r.replace(Eg,"").replace(Nr,""));for(let[i,{detector:s}]of Object.entries(Wi))if(s(r,e))return i;throw new Bg(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Up=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)jc(e,i,s)},"registerLazyLoadedDiagrams"),jc=t((r,e,i)=>{if(Wi[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);Wi[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),qA=t((r)=>Wi[r].loader,"getDiagramLoader"),aa=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>aa(r,o,s)),r;else if(Array.isArray(e)&&Array.isArray(r))return e.forEach((o)=>{if(!r.includes(o))r.push(o)}),r;if(r===void 0||r===null||i<=0)if(r!==void 0&&r!==null&&typeof r==="object"&&typeof e==="object")return Object.assign(r,e);else return e;if(e!==void 0&&e!==null&&typeof r==="object"&&typeof e==="object"){let o=r;Object.entries(e).forEach(([a,c])=>{if(typeof c==="object"){if(c===null)return;if(!Object.hasOwn(r,a))Object.defineProperty(r,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0});if(o[a]===void 0)o[a]=Array.isArray(c)?[]:{};if(typeof o[a]==="object")o[a]=aa(o[a],c,{depth:i-1})}else if(typeof o[a]!=="object")if(Object.hasOwn(r,a))o[a]=c;else Object.defineProperty(r,a,{value:c,writable:!0,enumerable:!0,configurable:!0})})}return r},"assignWithDepth"),nt=aa,je="#ffffff",Ue="#f2f2f2",Zt=t((r,e)=>e?F(r,{s:-40,l:10}):F(r,{s:-40,l:-10}),"mkBorder"),zy=class{static{t(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(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||g(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||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||F(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||F(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(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||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(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??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);if(e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]}),Object.hasOwn(r,"nodeBorder")&&!Object.hasOwn(r,"useGradient"))this.useGradient=!1}},Hy=t((r)=>{let e=new zy;return e.calculate(r),e},"getThemeVariables"),Yy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=At(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=At(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=At(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||g(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=g(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=g(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=g(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=J(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=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||F(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||F(this.mainBkg,{h:30,s:-30,l:-(-7+r*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??g(this["cScale"+r],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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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=g(this.secondaryColor,20),this.git1=g(this.pie2||this.secondaryColor,20),this.git2=g(this.pie3||this.tertiaryColor,20),this.git3=g(this.pie4||F(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||F(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||F(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||F(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||F(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||g("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||g("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||g("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||g("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||g(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||g(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||g(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||g(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},jy=t((r)=>{let e=new Yy;return e.calculate(r),e},"getThemeVariables"),Uy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=F(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Zt(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=At(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||F(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||F(this.mainBkg,{h:30,l:-(7+r*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||J(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||J(this.labelTextColor);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||g(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=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||F(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-30}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||F(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||F(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??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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(J(this.git0),25),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(Object.keys(this).forEach((i)=>{if(this[i]==="calculated")this[i]=void 0}),typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Kt=t((r)=>{let e=new Uy;return e.calculate(r),e},"getThemeVariables"),Xy=class{static{t(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=g("#cde498",10),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.primaryColor),this.lineColor=J(this.background),this.textColor=J(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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=A(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||F(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||F(this.mainBkg,{h:30,s:-30,l:-(8+r*5)});if(this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||g(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||g(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=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(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||F(this.primaryColor,{l:-30}),this.pie5=this.pie5||F(this.secondaryColor,{l:-30}),this.pie6=this.pie6||F(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||F(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??F(this.primaryColor,{l:-30}),this.venn2=this.venn2??F(this.secondaryColor,{l:-30}),this.venn3=this.venn3??F(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??F(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??F(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??F(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??F(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??F(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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||J(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Gy=t((r)=>{let e=new Xy;return e.calculate(r),e},"getThemeVariables"),Vy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.lineColor=J(this.background),this.textColor=J(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||g(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=g(this.contrast,55),this.border2=this.contrast,this.actorBorder=g(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||J(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)if(this.darkMode)this["cScalePeer"+r]=this["cScalePeer"+r]||g(this["cScale"+r],10);else this["cScalePeer"+r]=this["cScalePeer"+r]||A(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||F(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||F(this.mainBkg,{l:-(8+r*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=g(this.contrast,30),this.sectionBkgColor2=g(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=g(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=F(this.primaryColor,{h:64}),this.fillType3=F(this.secondaryColor,{h:64}),this.fillType4=F(this.primaryColor,{h:-64}),this.fillType5=F(this.secondaryColor,{h:-64}),this.fillType6=F(this.primaryColor,{h:128}),this.fillType7=F(this.secondaryColor,{h:128});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+r]=this["cScale"+r];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 r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this["cScale"+r];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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||F(this.primaryColor,{h:-30}),this.git4=this.pie5||F(this.primaryColor,{h:-60}),this.git5=this.pie6||F(this.primaryColor,{h:-90}),this.git6=this.pie7||F(this.primaryColor,{h:60}),this.git7=this.pie8||F(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Ky=t((r)=>{let e=new Vy;return e.calculate(r),e},"getThemeVariables"),Zy=class{static{t(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=Zt(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Se(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=F(r,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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||r,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||F(r,{h:30}),this.cScale4=this.cScale4||F(r,{h:60}),this.cScale5=this.cScale5||F(r,{h:90}),this.cScale6=this.cScale6||F(r,{h:120}),this.cScale7=this.cScale7||F(r,{h:150}),this.cScale8=this.cScale8||F(r,{h:210,l:150}),this.cScale9=this.cScale9||F(r,{h:270}),this.cScale10=this.cScale10||F(r,{h:300}),this.cScale11=this.cScale11||F(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||F(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||F(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||F(r,{h:64}),this.fillType3=this.fillType3||F(e,{h:64}),this.fillType4=this.fillType4||F(r,{h:-64}),this.fillType5=this.fillType5||F(e,{h:-64}),this.fillType6=this.fillType6||F(r,{h:128}),this.fillType7=this.fillType7||F(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||F(r,{l:-10}),this.pie5=this.pie5||F(e,{l:-10}),this.pie6=this.pie6||F(i,{l:-10}),this.pie7=this.pie7||F(r,{h:60,l:-10}),this.pie8=this.pie8||F(r,{h:-60,l:-10}),this.pie9=this.pie9||F(r,{h:120,l:0}),this.pie10=this.pie10||F(r,{h:60,l:-20}),this.pie11=this.pie11||F(r,{h:-60,l:-20}),this.pie12=this.pie12||F(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||F(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||F(r,{h:-30}),this.git4=this.git4||F(r,{h:-60}),this.git5=this.git5||F(r,{h:-90}),this.git6=this.git6||F(r,{h:60}),this.git7=this.git7||F(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},Qy=t((r)=>{let e=new Zy;return e.calculate(r),e},"getThemeVariables"),Jy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=At(255,255,255,0.25),this.arrowheadColor=J(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||F(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||F(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(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||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}};var tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(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=Zt("#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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Se(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=F(r,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||r,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=A(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||F(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||F(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||r,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||F(r,{h:64}),this.fillType3=this.fillType3||F(e,{h:64}),this.fillType4=this.fillType4||F(r,{h:-64}),this.fillType5=this.fillType5||F(e,{h:-64}),this.fillType6=this.fillType6||F(r,{h:128}),this.fillType7=this.fillType7||F(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||F(r,{l:-10}),this.pie5=this.pie5||F(e,{l:-10}),this.pie6=this.pie6||F(i,{l:-10}),this.pie7=this.pie7||F(r,{h:60,l:-10}),this.pie8=this.pie8||F(r,{h:-60,l:-10}),this.pie9=this.pie9||F(r,{h:120,l:0}),this.pie10=this.pie10||F(r,{h:60,l:-20}),this.pie11=this.pie11||F(r,{h:-60,l:-20}),this.pie12=this.pie12||F(r,{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||r,this.quadrant2Fill=this.quadrant2Fill||F(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||F(r,{h:-30}),this.git4=this.git4||F(r,{h:-60}),this.git5=this.git5||F(r,{h:-90}),this.git6=this.git6||F(r,{h:60}),this.git7=this.git7||F(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},rx=t((r)=>{let e=new ex;return e.calculate(r),e},"getThemeVariables"),ix=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=At(255,255,255,0.25),this.arrowheadColor=J(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||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||F(this.primaryColor,{h:30}),this.cScale4=this.cScale4||F(this.primaryColor,{h:60}),this.cScale5=this.cScale5||F(this.primaryColor,{h:90}),this.cScale6=this.cScale6||F(this.primaryColor,{h:120}),this.cScale7=this.cScale7||F(this.primaryColor,{h:150}),this.cScale8=this.cScale8||F(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||F(this.primaryColor,{h:270}),this.cScale10=this.cScale10||F(this.primaryColor,{h:300}),this.cScale11=this.cScale11||F(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=A(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||J(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)if(this.darkMode)this["cScalePeer"+e]=this["cScalePeer"+e]||g(this["cScale"+e],10);else this["cScalePeer"+e]=this["cScalePeer"+e]||A(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||F(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||F(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});if(this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||F(this.primaryColor,{h:64}),this.fillType3=this.fillType3||F(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||F(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||F(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||F(this.primaryColor,{h:128}),this.fillType7=this.fillType7||F(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||F(this.primaryColor,{l:-10}),this.pie5=this.pie5||F(this.secondaryColor,{l:-10}),this.pie6=this.pie6||F(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||F(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||F(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||F(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||F(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||F(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||F(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||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ox=t((r)=>{let e=new ix;return e.calculate(r),e},"getThemeVariables"),sx=class{static{t(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=Zt("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Se(this.background)?g(this.background,4):A(this.background,4));let r="#ECECFE",e="#E9E9F1",i=F(r,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||r,this.activeTaskBorderColor=this.activeTaskBorderColor||r,this.activeTaskBkgColor=this.activeTaskBkgColor||g(r,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||J(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)if(this.darkMode)this["cScalePeer"+o]=this["cScalePeer"+o]||g(this["cScale"+o],10);else this["cScalePeer"+o]=this["cScalePeer"+o]||A(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;let s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||F(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||F(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor;for(let o=0;o<8;o++)this["fillType"+o]=this["fillType"+o]||this.bkgColorArray[o];for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["pie"+(o+1)]=this["pie"+(o+1)]||this["cScale"+o];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 o=0;o<8;o++)this["venn"+(o+1)]=this["venn"+(o+1)]??this.borderColorArray[o%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||r,this.quadrant2Fill=this.quadrant2Fill||F(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||r,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||r,this.git1=this.git1||e,this.git2=this.git2||i,this.git3=this.git3||F(r,{h:-30}),this.git4=this.git4||F(r,{h:-60}),this.git5=this.git5||F(r,{h:-90}),this.git6=this.git6||F(r,{h:60}),this.git7=this.git7||F(r,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},ax=t((r)=>{let e=new sx;return e.calculate(r),e},"getThemeVariables"),nx=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=F(this.primaryColor,{h:-160}),this.primaryBorderColor=J(this.background),this.secondaryBorderColor=Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Zt(this.tertiaryColor,this.darkMode),this.primaryTextColor=J(this.primaryColor),this.secondaryTextColor=J(this.secondaryColor),this.tertiaryTextColor=J(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(J("#323D47"),10),this.border1="#ccc",this.border2=At(255,255,255,0.25),this.arrowheadColor=J(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||F(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||F(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Zt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Zt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Zt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Zt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||J(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||J(this.tertiaryColor),this.lineColor=this.lineColor||J(this.background),this.arrowheadColor=this.arrowheadColor||J(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.secondBkg=this.secondBkg==="calculated"?g(this.mainBkg,16):this.secondBkg,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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||J(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||g(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||J(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)if(this.darkMode)this["cScalePeer"+i]=this["cScalePeer"+i]||g(this["cScale"+i],10);else this["cScalePeer"+i]=this["cScalePeer"+i]||A(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=A(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||F(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||F(this.mainBkg,{h:180,s:-15,l:r*(8+i*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((i,s)=>{this["fillType"+s]=this["fillType"+s]||i});for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["pie"+(i+1)]=this["pie"+(i+1)]||this["cScale"+i];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 i=0;i<8;i++)this["venn"+(i+1)]=this["venn"+(i+1)]??this.borderColorArray[i%this.borderColorArray.length];if(this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||F(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||F(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||F(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||F(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||F(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||F(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Se(this.quadrant1Fill)?g(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,legendTextColor:this.xyChart?.legendTextColor||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||F(this.primaryColor,{h:-30}),this.git4=this.git4||F(this.primaryColor,{h:-60}),this.git5=this.git5||F(this.primaryColor,{h:-90}),this.git6=this.git6||F(this.primaryColor,{h:60}),this.git7=this.git7||F(this.primaryColor,{h:120}),this.darkMode)this.git0=g(this.git0,25),this.git1=g(this.git1,25),this.git2=g(this.git2,25),this.git3=g(this.git3,25),this.git4=g(this.git4,25),this.git5=g(this.git5,25),this.git6=g(this.git6,25),this.git7=g(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||J(this.git0),this.gitInv1=this.gitInv1||J(this.git1),this.gitInv2=this.gitInv2||J(this.git2),this.gitInv3=this.gitInv3||J(this.git3),this.gitInv4=this.gitInv4||J(this.git4),this.gitInv5=this.gitInv5||J(this.git5),this.gitInv6=this.gitInv6||J(this.git6),this.gitInv7=this.gitInv7||J(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||je,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ue}calculate(r){if(typeof r!=="object"){this.updateColors();return}let e=Object.keys(r);e.forEach((i)=>{this[i]=r[i]}),this.updateColors(),e.forEach((i)=>{this[i]=r[i]})}},lx=t((r)=>{let e=new nx;return e.calculate(r),e},"getThemeVariables"),ko={base:{getThemeVariables:Hy},dark:{getThemeVariables:jy},default:{getThemeVariables:Kt},forest:{getThemeVariables:Gy},neutral:{getThemeVariables:Ky},neo:{getThemeVariables:Qy},"neo-dark":{getThemeVariables:tx},redux:{getThemeVariables:rx},"redux-dark":{getThemeVariables:ox},"redux-color":{getThemeVariables:ax},"redux-dark-color":{getThemeVariables:lx}},me={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,showLegend:!0,legendFontSize:14,legendPadding:10,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,theme:"redux-color",look:"neo",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},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",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},Uc={...me,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:ko.default.getThemeVariables(),sequence:{...me.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:me.class?.theme,look:me.class?.look,layout:me.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...me.gantt,tickInterval:void 0,useWidth:void 0},c4:{...me.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...me.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...me.pie,useWidth:984},xyChart:{...me.xyChart,useWidth:void 0},requirement:{...me.requirement,useWidth:void 0},packet:{...me.packet},eventmodeling:{...me.eventmodeling},treeView:{...me.treeView,useWidth:void 0},radar:{...me.radar},usecase:{...me.usecase},railroad:{...me.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:{...me.ishikawa},sankey:{...me.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:{...me.venn},cynefin:{...me.cynefin}},Xc=t((r,e="")=>Object.keys(r).reduce((i,s)=>{if(Array.isArray(r[s]))return i;else if(typeof r[s]==="object"&&r[s]!==null)return[...i,e+s,...Xc(r[s],"")];return[...i,e+s]},[]),"keyify"),hx=new Set(Xc(Uc,"")),Y=Uc,cx={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},ux=t((r)=>cx[r]??r,"getDiagramConfigKey"),dx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},fx=t((r,e)=>{for(let i of Object.keys(r)){let s=r[i];if(i.startsWith("__")||i.includes("proto")||i.includes("constr")||typeof s!=="string"||!e.test(s))l.debug("sanitize deleting dictionary entry:",i,s),delete r[i]}},"sanitizeDictionaryConfig"),$i=t((r)=>{if(l.debug("sanitizeDirective called with",r),typeof r!=="object"||r==null)return;if(Array.isArray(r)){r.forEach((e)=>$i(e));return}for(let e of Object.keys(r)){if(l.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!hx.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=dx[e];if(s)fx(r[e],s);else l.debug("sanitizing object",e),$i(r[e]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let s of i)if(e.includes(s))l.debug("sanitizing css option",e),r[e]=Ig(r[e])}if(r.themeVariables)for(let e of Object.keys(r.themeVariables)){let i=r.themeVariables[e];if(i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/))r.themeVariables[e]=""}l.debug("After sanitization",r)},"sanitizeDirective"),Ig=t((r)=>{let e=0,i=0;for(let s of r){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";if(s==="{")e++;else if(s==="}")i++}if(e!==i)return"{ /* ERROR: Unbalanced CSS */ }";return r},"sanitizeCss"),ai=Object.freeze(Y),px=["theme","look","layout"],gx=new Set(["classic","handDrawn","neo"]),mx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(ko,e);return r!=="look"||gx.has(e)},"isUsableAppearance"),yx=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&mx(i,o))},"readAppearance"),Yr=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Le=nt({},ai),Uo,Xo={},sr=[],Ai=nt({},ai),Ei,xx=t((r,e)=>{if(!Ei)return;let i=[e,...[...sr].reverse(),Xo,ai],s=r[Ei];for(let o of px)for(let a of i){let c=yx(a,Ei,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),zr=t((r,e)=>{let i=nt({},r),s={};for(let a of e)Gc(a),s=nt(s,a);if(i=nt(i,s),xx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(ko,i.theme)){let a=nt({},Uo),c=nt(a.themeVariables||{},s.themeVariables);i.themeVariables=ko[i.theme].getThemeVariables(c)}return Ai=i,bx(Ai),Ai},"updateCurrentConfig"),Gp=t((r)=>{Ei=r===void 0?void 0:ux(r),zr(Le,sr)},"setDiagramConfigScope"),HA=t((r)=>{if(Le=nt({},ai),Le=nt(Le,r),Xo=nt({},r),r.theme&&Object.hasOwn(ko,r.theme))Le.themeVariables=ko[r.theme].getThemeVariables(r.themeVariables);return zr(Le,sr),Le},"setSiteConfig"),WA=t((r)=>{Uo=nt({},r)},"saveConfigFromInitialize"),KA=t((r)=>(Le=nt(Le,r),Xo=nt(Xo,r),zr(Le,sr),Le),"updateSiteConfig"),_g=t(()=>nt({},Le),"getSiteConfig"),Sg=t((r)=>(zr(Ai,[r]),C()),"setConfig"),C=t(()=>nt({},Ai),"getConfig"),Gc=t((r)=>{if(!r)return;["secure",...Le.secure??[]].forEach((e)=>{if(Object.hasOwn(r,e))l.debug(`Denied attempt to modify a secure key ${e}`,r[e]),delete r[e]}),Object.keys(r).forEach((e)=>{if(e.startsWith("__"))delete r[e]}),Object.keys(r).forEach((e)=>{if(typeof r[e]==="string"&&(r[e].includes("<")||r[e].includes(">")||r[e].includes("url(data:")))delete r[e];if(typeof r[e]==="object")Gc(r[e])})},"sanitize"),VA=t((r)=>{if($i(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};sr.push(r),zr(Le,sr)},"addDirective"),sd=t((r=Le)=>{sr=[],Ei=void 0,zr(r,sr)},"reset"),Cx={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=t((r)=>{if(Nc[r])return;l.warn(Cx[r]),Nc[r]=!0},"issueWarning"),bx=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)Vc("LAZY_LOAD_DEPRECATED")},"checkConfig"),YA=t(()=>{let r={};if(Uo)r=nt(r,Uo);for(let e of sr)r=nt(r,e);return r},"getUserDefinedConfig"),Vt=t((r)=>{if(r.flowchart?.htmlLabels!=null)Vc("FLOWCHART_HTML_LABELS_DEPRECATED");return Yr(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),sl=/<\/?br\s*\/?>/gi,kx=new RegExp(sl.source,"i"),wx=t((r)=>{if(!r)return[""];return Qc(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Sx=(()=>{let r=!1;return()=>{if(!r)Kc(),r=!0}})();function Kc(){Gt.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Gt.addHook("afterSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("data-temp-href-target")){if(e.setAttribute("target",e.getAttribute("data-temp-href-target")??""),e.removeAttribute("data-temp-href-target"),e.getAttribute("target")==="_blank")e.setAttribute("rel","noopener")}})}t(Kc,"setupDompurifyHooks");var Zc=t((r)=>(Sx(),Gt.sanitize(r)),"removeScript"),zc=t((r,e)=>{if(Vt(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=Zc(r);else if(i!=="loose")r=Qc(r),r=r.replace(/</g,"<").replace(/>/g,">"),r=r.replace(/=/g,"="),r=vx(r)}return r},"sanitizeMore"),ee=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Gt.sanitize(zc(r,e),e.dompurifyConfig).toString();else r=Gt.sanitize(zc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),Tx=t((r,e)=>{if(typeof r==="string")return ee(r,e);return r.flat().map((i)=>ee(i,e))},"sanitizeTextOrArray"),Bx=t((r)=>kx.test(r),"hasBreaks"),_x=t((r)=>r.split(sl),"splitBreaks"),vx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Qc=t((r)=>r.replace(sl,"#br#"),"breakToPlaceholder"),Tg=t((r)=>{let e="";if(r)e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e);return e},"getUrl"),Lx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Fx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),xo=t(function(r){let e=r.split(/(,)/),i=[];for(let s=0;s<e.length;s++){let o=e[s];if(o===","&&s>0&&s+1<e.length){let a=e[s-1],c=e[s+1];if(Mx(a,c))o=a+","+c,s++,i.pop()}i.push(Ax(o))}return i.join("")},"parseGenericTypes"),na=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Mx=t((r,e)=>{let i=na(r,"~"),s=na(e,"~");return i===1&&s===1},"shouldCombineSets"),Ax=t((r)=>{let e=na(r,"~"),i=!1;if(e<=1)return r;if(e%2!==0&&r.startsWith("~"))r=r.substring(1),i=!0;let s=[...r],o=s.indexOf("~"),a=s.lastIndexOf("~");while(o!==-1&&a!==-1&&o!==a)s[o]="<",s[a]=">",o=s.indexOf("~"),a=s.lastIndexOf("~");if(i)s.unshift("~");return s.join("")},"processSet"),Hc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Yo=/\$\$(.*?)\$\$/g,Tt=t((r)=>(r.match(Yo)?.length??0)>0,"hasKatex"),uc=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await dc(r,e),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let o={width:i.clientWidth,height:i.clientHeight};return i.remove(),o},"calculateMathMLDimensions"),Ex=t(async(r,e)=>{if(!Tt(r))return r;if(!(Hc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Yo,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Hc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(sl).map((o)=>Tt(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Yo,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Yo,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),dc=t(async(r,e)=>ee(await Ex(r,e),e),"renderKatexSanitized"),w={getRows:wx,sanitizeText:ee,sanitizeTextOrArray:Tx,hasBreaks:Bx,splitBreaks:_x,lineBreakRegex:sl,removeScript:Zc,getUrl:Tg,evaluate:Yr,getMax:Lx,getMin:Fx},$x=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Ix=t(function(r,e,i){let s=new Map;if(i)s.set("width","100%"),s.set("style",`max-width: ${e}px;`);else s.set("height",r),s.set("width",e);return s},"calculateSvgSizeAttrs"),te=t(function(r,e,i,s){let o=Ix(e,i,s);$x(r,o)},"configureSvgSize"),Jr=t(function(r,e,i,s){let o=e.node().getBBox(),{width:a,height:c}=o;l.info(`SVG bounds: ${a}x${c}`,o);let n=0,d=0;l.info(`Graph bounds: ${n}x${d}`,r),n=a+i*2,d=c+i*2,l.info(`Calculated bounds: ${n}x${d}`),te(e,d,n,s);let f=`${o.x-i} ${o.y-i} ${o.width+2*i} ${o.height+2*i}`;e.attr("viewBox",f)},"setupGraphViewbox"),jo={};function jp(r){return[...r.cssRules].map((e)=>e.cssText).join(`
|
|
4
|
-
`)}t(jp,"cssStyleSheetToString");var Ox=t((r,e,i,s)=>{let o="";if(r in jo&&jo[r])o=jo[r]({...i,svgId:s});else l.warn(`No theme found for ${r}`);return`& {
|
|
5
|
-
font-family: ${i.fontFamily};
|
|
6
|
-
font-size: ${i.fontSize};
|
|
7
|
-
fill: ${i.textColor}
|
|
8
|
-
}
|
|
9
|
-
@keyframes edge-animation-frame {
|
|
10
|
-
from {
|
|
11
|
-
stroke-dashoffset: 0;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
@keyframes dash {
|
|
15
|
-
to {
|
|
16
|
-
stroke-dashoffset: 0;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
& .edge-animation-slow {
|
|
20
|
-
stroke-dasharray: 9,5 !important;
|
|
21
|
-
stroke-dashoffset: 900;
|
|
22
|
-
animation: dash 50s linear infinite;
|
|
23
|
-
stroke-linecap: round;
|
|
24
|
-
}
|
|
25
|
-
& .edge-animation-fast {
|
|
26
|
-
stroke-dasharray: 9,5 !important;
|
|
27
|
-
stroke-dashoffset: 900;
|
|
28
|
-
animation: dash 20s linear infinite;
|
|
29
|
-
stroke-linecap: round;
|
|
30
|
-
}
|
|
31
|
-
/* Classes common for multiple diagrams */
|
|
32
|
-
|
|
33
|
-
& .error-icon {
|
|
34
|
-
fill: ${i.errorBkgColor};
|
|
35
|
-
}
|
|
36
|
-
& .error-text {
|
|
37
|
-
fill: ${i.errorTextColor};
|
|
38
|
-
stroke: ${i.errorTextColor};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
& .edge-thickness-normal {
|
|
42
|
-
stroke-width: ${i.strokeWidth??1}px;
|
|
43
|
-
}
|
|
44
|
-
& .edge-thickness-thick {
|
|
45
|
-
stroke-width: 3.5px
|
|
46
|
-
}
|
|
47
|
-
& .edge-pattern-solid {
|
|
48
|
-
stroke-dasharray: 0;
|
|
49
|
-
}
|
|
50
|
-
& .edge-thickness-invisible {
|
|
51
|
-
stroke-width: 0;
|
|
52
|
-
fill: none;
|
|
53
|
-
}
|
|
54
|
-
& .edge-pattern-dashed{
|
|
55
|
-
stroke-dasharray: 3;
|
|
56
|
-
}
|
|
57
|
-
.edge-pattern-dotted {
|
|
58
|
-
stroke-dasharray: 2;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
& .marker {
|
|
62
|
-
fill: ${i.lineColor};
|
|
63
|
-
stroke: ${i.lineColor};
|
|
64
|
-
}
|
|
65
|
-
& .marker.cross {
|
|
66
|
-
stroke: ${i.lineColor};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
& svg {
|
|
70
|
-
font-family: ${i.fontFamily};
|
|
71
|
-
font-size: ${i.fontSize};
|
|
72
|
-
}
|
|
73
|
-
& p {
|
|
74
|
-
margin: 0
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
${o}
|
|
78
|
-
.node .neo-node {
|
|
79
|
-
stroke: ${i.nodeBorder};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
83
|
-
stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
|
|
84
|
-
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
|
|
85
|
-
}
|
|
86
|
-
[data-look="neo"].swimlane.cluster rect {
|
|
87
|
-
filter: none;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
[data-look="neo"].node path {
|
|
92
|
-
stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
|
|
93
|
-
stroke-width: ${i.strokeWidth??1}px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
[data-look="neo"].node .outer-path {
|
|
97
|
-
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
[data-look="neo"].node .neo-line path {
|
|
101
|
-
stroke: ${i.nodeBorder};
|
|
102
|
-
filter: none;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
[data-look="neo"].node circle{
|
|
106
|
-
stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
|
|
107
|
-
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
[data-look="neo"].node circle .state-start{
|
|
111
|
-
fill: #000000;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
[data-look="neo"].icon-shape .icon {
|
|
115
|
-
fill: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
|
|
116
|
-
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
120
|
-
stroke: ${i.useGradient?"url("+s+"-gradient)":i.nodeBorder};
|
|
121
|
-
filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${s}-drop-shadow)`):"none"};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
${e}
|
|
125
|
-
`},"getStyles"),Dx=t((r,e)=>{if(e!==void 0)jo[r]=e},"addStylesForDiagram"),JA=Ox,qp={};vo(qp,{clear:()=>M,getAccDescription:()=>j,getAccTitle:()=>G,getDiagramTitle:()=>q,setAccDescription:()=>z,setAccTitle:()=>O,setDiagramTitle:()=>H});var la="",ca="",ua="",da=t((r)=>ee(r,C()),"sanitizeText"),M=t(()=>{la="",ua="",ca=""},"clear"),O=t((r)=>{la=da(r).replace(/^\s+/g,"")},"setAccTitle"),G=t(()=>la,"getAccTitle"),z=t((r)=>{ua=da(r).replace(/\n\s+/g,`
|
|
126
|
-
`)},"setAccDescription"),j=t(()=>ua,"getAccDescription"),H=t((r)=>{ca=da(r)},"setDiagramTitle"),q=t(()=>ca,"getDiagramTitle"),Yc=l,Px=id,m=C,ba=Sg,Ki=ai,Vo=t((r)=>ee(r,m()),"sanitizeText"),pc=Jr,Rx=t(()=>qp,"getCommonDb"),Go={},ld=t((r,e,i)=>{if(Go[r])Yc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(Go[r]=e,i)jc(r,i);Dx(r,e.styles),e.injectUtils?.(Yc,Px,m,Vo,pc,Rx(),()=>{})},"registerDiagram"),Hp=t((r)=>{if(r in Go)return Go[r];throw new qx(r)},"getDiagram"),qx=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class Ii extends Map{constructor(r,e=zx){super();if(Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),r!=null)for(let[i,s]of r)this.set(i,s)}get(r){return super.get(Jc(this,r))}has(r){return super.has(Jc(this,r))}set(r,e){return super.set(Wx(this,r),e)}delete(r){return super.delete(Nx(this,r))}}function Jc({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Wx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Nx({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function zx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Hx={value:()=>{}};function eu(){for(var r=0,e=arguments.length,i={},s;r<e;++r){if(!(s=arguments[r]+"")||s in i||/[\s.]/.test(s))throw Error("illegal type: "+s);i[s]=[]}return new Ko(i)}function Ko(r){this._=r}function Yx(r,e){return r.trim().split(/^|\s+/).map(function(i){var s="",o=i.indexOf(".");if(o>=0)s=i.slice(o+1),i=i.slice(0,o);if(i&&!e.hasOwnProperty(i))throw Error("unknown type: "+i);return{type:i,name:s}})}Ko.prototype=eu.prototype={constructor:Ko,on:function(r,e){var i=this._,s=Yx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=jx(i[o],r.name)))return o;return}if(e!=null&&typeof e!=="function")throw Error("invalid callback: "+e);while(++a<c)if(o=(r=s[a]).type)i[o]=tu(i[o],r.name,e);else if(e==null)for(o in i)i[o]=tu(i[o],r.name,null);return this},copy:function(){var r={},e=this._;for(var i in e)r[i]=e[i].slice();return new Ko(r)},call:function(r,e){if((o=arguments.length-2)>0)for(var i=Array(o),s=0,o,a;s<o;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(a=this._[r],s=0,o=a.length;s<o;++s)a[s].value.apply(e,i)},apply:function(r,e,i){if(!this._.hasOwnProperty(r))throw Error("unknown type: "+r);for(var s=this._[r],o=0,a=s.length;o<a;++o)s[o].value.apply(e,i)}};function jx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function tu(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Hx,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var fa=eu;var Zo="http://www.w3.org/1999/xhtml",pa={svg:"http://www.w3.org/2000/svg",xhtml:Zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xe(r){var e=r+="",i=e.indexOf(":");if(i>=0&&(e=r.slice(0,i))!=="xmlns")r=r.slice(i+1);return pa.hasOwnProperty(e)?{space:pa[e],local:r}:r}function Ux(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Zo&&e.documentElement.namespaceURI===Zo?e.createElement(r):e.createElementNS(i,r)}}function Xx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Oi(r){var e=Xe(r);return(e.local?Xx:Ux)(e)}function Gx(){}function gr(r){return r==null?Gx:function(){return this.querySelector(r)}}function ga(r){if(typeof r!=="function")r=gr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=Array(c),d,f,u=0;u<c;++u)if((d=a[u])&&(f=r.call(d,d.__data__,u,a))){if("__data__"in d)f.__data__=d.__data__;n[u]=f}return new fe(s,this._parents)}function ma(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Vx(){return[]}function Hr(r){return r==null?Vx:function(){return this.querySelectorAll(r)}}function Kx(r){return function(){return ma(r.apply(this,arguments))}}function Ca(r){if(typeof r==="function")r=Kx(r);else r=Hr(r);for(var e=this._groups,i=e.length,s=[],o=[],a=0;a<i;++a)for(var c=e[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])s.push(r.call(d,d.__data__,f,c)),o.push(d);return new fe(s,o)}function jr(r){return function(){return this.matches(r)}}function Qo(r){return function(e){return e.matches(r)}}var Zx=Array.prototype.find;function Qx(r){return function(){return Zx.call(this.children,r)}}function Jx(){return this.firstElementChild}function wa(r){return this.select(r==null?Jx:Qx(typeof r==="function"?r:Qo(r)))}var t0=Array.prototype.filter;function e0(){return Array.from(this.children)}function r0(r){return function(){return t0.call(this.children,r)}}function Sa(r){return this.selectAll(r==null?e0:r0(typeof r==="function"?r:Qo(r)))}function Ta(r){if(typeof r!=="function")r=jr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new fe(s,this._parents)}function Di(r){return Array(r.length)}function Ba(){return new fe(this._enter||this._groups.map(Di),this._parents)}function Pi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Pi.prototype={constructor:Pi,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,e){return this._parent.insertBefore(r,e)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};function _a(r){return function(){return r}}function i0(r,e,i,s,o,a){var c=0,n,d=e.length,f=a.length;for(;c<f;++c)if(n=e[c])n.__data__=a[c],s[c]=n;else i[c]=new Pi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function o0(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,p=a.length,x=Array(u),b;for(n=0;n<u;++n)if(d=e[n])if(x[n]=b=c.call(d,d.__data__,n,e)+"",f.has(b))o[n]=d;else f.set(b,d);for(n=0;n<p;++n)if(b=c.call(r,a[n],n,a)+"",d=f.get(b))s[n]=d,d.__data__=a[n],f.delete(b);else i[n]=new Pi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(x[n])===d)o[n]=d}function s0(r){return r.__data__}function La(r,e){if(!arguments.length)return Array.from(this,s0);var i=e?o0:i0,s=this._parents,o=this._groups;if(typeof r!=="function")r=_a(r);for(var a=o.length,c=Array(a),n=Array(a),d=Array(a),f=0;f<a;++f){var u=s[f],p=o[f],x=p.length,b=a0(r.call(u,u&&u.__data__,f,s)),S=b.length,T=n[f]=Array(S),B=c[f]=Array(S),_=d[f]=Array(x);i(u,p,T,B,_,b,e);for(var v=0,E=0,D,P;v<S;++v)if(D=T[v]){if(v>=E)E=v+1;while(!(P=B[E])&&++E<S);D._next=P||null}}return c=new fe(c,s),c._enter=n,c._exit=d,c}function a0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Fa(){return new fe(this._exit||this._groups.map(Di),this._parents)}function Ma(r,e,i){var s=this.enter(),o=this,a=this.exit();if(typeof r==="function"){if(s=r(s),s)s=s.selection()}else s=s.append(r+"");if(e!=null){if(o=e(o),o)o=o.selection()}if(i==null)a.remove();else i(a);return s&&o?s.merge(o).order():o}function Aa(r){var e=r.selection?r.selection():r;for(var i=this._groups,s=e._groups,o=i.length,a=s.length,c=Math.min(o,a),n=Array(o),d=0;d<c;++d)for(var f=i[d],u=s[d],p=f.length,x=n[d]=Array(p),b,S=0;S<p;++S)if(b=f[S]||u[S])x[S]=b;for(;d<o;++d)n[d]=i[d];return new fe(n,this._parents)}function Ea(){for(var r=this._groups,e=-1,i=r.length;++e<i;)for(var s=r[e],o=s.length-1,a=s[o],c;--o>=0;)if(c=s[o]){if(a&&c.compareDocumentPosition(a)^4)a.parentNode.insertBefore(c,a);a=c}return this}function $a(r){if(!r)r=n0;function e(p,x){return p&&x?r(p.__data__,x.__data__):!p-!x}for(var i=this._groups,s=i.length,o=Array(s),a=0;a<s;++a){for(var c=i[a],n=c.length,d=o[a]=Array(n),f,u=0;u<n;++u)if(f=c[u])d[u]=f;d.sort(e)}return new fe(o,this._parents).order()}function n0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function Ia(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Oa(){return Array.from(this)}function Da(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length;o<a;++o){var c=s[o];if(c)return c}return null}function Pa(){let r=0;for(let e of this)++r;return r}function Ra(){return!this.node()}function qa(r){for(var e=this._groups,i=0,s=e.length;i<s;++i)for(var o=e[i],a=0,c=o.length,n;a<c;++a)if(n=o[a])r.call(n,n.__data__,a,o);return this}function l0(r){return function(){this.removeAttribute(r)}}function h0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function c0(r,e){return function(){this.setAttribute(r,e)}}function u0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function d0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function f0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttributeNS(r.space,r.local);else this.setAttributeNS(r.space,r.local,i)}}function Wa(r,e){var i=Xe(r);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((e==null?i.local?h0:l0:typeof e==="function"?i.local?f0:d0:i.local?u0:c0)(i,e))}function Ri(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function p0(r){return function(){this.style.removeProperty(r)}}function g0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function m0(r,e,i){return function(){var s=e.apply(this,arguments);if(s==null)this.style.removeProperty(r);else this.style.setProperty(r,s,i)}}function Na(r,e,i){return arguments.length>1?this.each((e==null?p0:typeof e==="function"?m0:g0)(r,e,i==null?"":i)):yr(this.node(),r)}function yr(r,e){return r.style.getPropertyValue(e)||Ri(r).getComputedStyle(r,null).getPropertyValue(e)}function y0(r){return function(){delete this[r]}}function x0(r,e){return function(){this[r]=e}}function C0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)delete this[r];else this[r]=i}}function za(r,e){return arguments.length>1?this.each((e==null?y0:typeof e==="function"?C0:x0)(r,e)):this.node()[r]}function ru(r){return r.trim().split(/^|\s+/)}function Ha(r){return r.classList||new iu(r)}function iu(r){this._node=r,this._names=ru(r.getAttribute("class")||"")}iu.prototype={add:function(r){var e=this._names.indexOf(r);if(e<0)this._names.push(r),this._node.setAttribute("class",this._names.join(" "))},remove:function(r){var e=this._names.indexOf(r);if(e>=0)this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(r){return this._names.indexOf(r)>=0}};function ou(r,e){var i=Ha(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function su(r,e){var i=Ha(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function b0(r){return function(){ou(this,r)}}function k0(r){return function(){su(this,r)}}function w0(r,e){return function(){(e.apply(this,arguments)?ou:su)(this,r)}}function ja(r,e){var i=ru(r+"");if(arguments.length<2){var s=Ha(this.node()),o=-1,a=i.length;while(++o<a)if(!s.contains(i[o]))return!1;return!0}return this.each((typeof e==="function"?w0:e?b0:k0)(i,e))}function S0(){this.textContent=""}function T0(r){return function(){this.textContent=r}}function B0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function Ua(r){return arguments.length?this.each(r==null?S0:(typeof r==="function"?B0:T0)(r)):this.node().textContent}function _0(){this.innerHTML=""}function v0(r){return function(){this.innerHTML=r}}function L0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function Xa(r){return arguments.length?this.each(r==null?_0:(typeof r==="function"?L0:v0)(r)):this.node().innerHTML}function F0(){if(this.nextSibling)this.parentNode.appendChild(this)}function Ga(){return this.each(F0)}function M0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ka(){return this.each(M0)}function Za(r){var e=typeof r==="function"?r:Oi(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function A0(){return null}function Qa(r,e){var i=typeof r==="function"?r:Oi(r),s=e==null?A0:typeof e==="function"?e:gr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function E0(){var r=this.parentNode;if(r)r.removeChild(this)}function Ja(){return this.each(E0)}function $0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function I0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function tn(r){return this.select(r?I0:$0)}function en(r){return arguments.length?this.property("__data__",r):this.node().__data__}function O0(r){return function(e){r.call(this,e,this.__data__)}}function D0(r){return r.trim().split(/^|\s+/).map(function(e){var i="",s=e.indexOf(".");if(s>=0)i=e.slice(s+1),e=e.slice(0,s);return{type:e,name:i}})}function P0(r){return function(){var e=this.__on;if(!e)return;for(var i=0,s=-1,o=e.length,a;i<o;++i)if(a=e[i],(!r.type||a.type===r.type)&&a.name===r.name)this.removeEventListener(a.type,a.listener,a.options);else e[++s]=a;if(++s)e.length=s;else delete this.__on}}function R0(r,e,i){return function(){var s=this.__on,o,a=O0(e);if(s){for(var c=0,n=s.length;c<n;++c)if((o=s[c]).type===r.type&&o.name===r.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=i),o.value=e;return}}if(this.addEventListener(r.type,a,i),o={type:r.type,name:r.name,value:e,listener:a,options:i},!s)this.__on=[o];else s.push(o)}}function rn(r,e,i){var s=D0(r+""),o,a=s.length,c;if(arguments.length<2){var n=this.node().__on;if(n){for(var d=0,f=n.length,u;d<f;++d)for(o=0,u=n[d];o<a;++o)if((c=s[o]).type===u.type&&c.name===u.name)return u.value}return}n=e?R0:P0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function au(r,e,i){var s=Ri(r),o=s.CustomEvent;if(typeof o==="function")o=new o(e,i);else if(o=s.document.createEvent("Event"),i)o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail;else o.initEvent(e,!1,!1);r.dispatchEvent(o)}function q0(r,e){return function(){return au(this,r,e)}}function W0(r,e){return function(){return au(this,r,e.apply(this,arguments))}}function on(r,e){return this.each((typeof e==="function"?W0:q0)(r,e))}function*sn(){for(var r=this._groups,e=0,i=r.length;e<i;++e)for(var s=r[e],o=0,a=s.length,c;o<a;++o)if(c=s[o])yield c}var an=[null];function fe(r,e){this._groups=r,this._parents=e}function nu(){return new fe([[document.documentElement]],an)}function N0(){return this}fe.prototype=nu.prototype={constructor:fe,select:ga,selectAll:Ca,selectChild:wa,selectChildren:Sa,filter:Ta,data:La,enter:Ba,exit:Fa,join:Ma,merge:Aa,selection:N0,order:Ea,sort:$a,call:Ia,nodes:Oa,node:Da,size:Pa,empty:Ra,each:qa,attr:Wa,style:Na,property:za,classed:ja,text:Ua,html:Xa,raise:Ga,lower:Ka,append:Za,insert:Qa,remove:Ja,clone:tn,datum:en,on:rn,dispatch:on,[Symbol.iterator]:sn};var ar=nu;function h(r){return typeof r==="string"?new fe([[document.querySelector(r)]],[document.documentElement]):new fe([[r]],an)}function Vi(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function mc(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function Yi(){}var qi=0.7,es=1/qi,Ur="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z0=/^#([0-9a-f]{3,8})$/,H0=new RegExp(`^rgb\\(${Ur},${Ur},${Ur}\\)$`),Y0=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),j0=new RegExp(`^rgba\\(${Ur},${Ur},${Ur},${Ni}\\)$`),U0=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${Ni}\\)$`),X0=new RegExp(`^hsl\\(${Ni},${Ge},${Ge}\\)$`),G0=new RegExp(`^hsla\\(${Ni},${Ge},${Ge},${Ni}\\)$`),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};Vi(Yi,Va,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:hu,formatHex:hu,formatHex8:V0,formatHsl:K0,formatRgb:cu,toString:cu});function hu(){return this.rgb().formatHex()}function V0(){return this.rgb().formatHex8()}function K0(){return mu(this).formatHsl()}function cu(){return this.rgb().formatRgb()}function Va(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=z0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?uu(e):i===3?new On(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Jo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Jo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=H0.exec(r))?new On(e[1],e[2],e[3],1):(e=Y0.exec(r))?new On(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=j0.exec(r))?Jo(e[1],e[2],e[3],e[4]):(e=U0.exec(r))?Jo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=X0.exec(r))?pu(e[1],e[2]/100,e[3]/100,1):(e=G0.exec(r))?pu(e[1],e[2]/100,e[3]/100,e[4]):lu.hasOwnProperty(r)?uu(lu[r]):r==="transparent"?new On(NaN,NaN,NaN,0):null}function uu(r){return new On(r>>16&255,r>>8&255,r&255,1)}function Jo(r,e,i,s){if(s<=0)r=e=i=NaN;return new On(r,e,i,s)}function Dg(r){if(!(r instanceof Yi))r=Va(r);if(!r)return new On;return r=r.rgb(),new On(r.r,r.g,r.b,r.opacity)}function Gr(r,e,i,s){return arguments.length===1?Dg(r):new On(r,e,i,s==null?1:s)}function On(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}Vi(On,Gr,mc(Yi,{brighter(r){return r=r==null?es:Math.pow(es,r),new On(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?qi:Math.pow(qi,r),new On(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new On(Br(this.r),Br(this.g),Br(this.b),rs(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:Z0,formatRgb:fu,toString:fu}));function du(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}`}function Z0(){return`#${Tr(this.r)}${Tr(this.g)}${Tr(this.b)}${Tr((isNaN(this.opacity)?1:this.opacity)*255)}`}function fu(){let r=rs(this.opacity);return`${r===1?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${r===1?")":`, ${r})`}`}function rs(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Br(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function Tr(r){return r=Br(r),(r<16?"0":"")+r.toString(16)}function pu(r,e,i,s){if(s<=0)r=e=i=NaN;else if(i<=0||i>=1)r=e=NaN;else if(e<=0)r=NaN;return new Re(r,e,i,s)}function mu(r){if(r instanceof Re)return new Re(r.h,r.s,r.l,r.opacity);if(!(r instanceof Yi))r=Va(r);if(!r)return new Re;if(r instanceof Re)return r;r=r.rgb();var e=r.r/255,i=r.g/255,s=r.b/255,o=Math.min(e,i,s),a=Math.max(e,i,s),c=NaN,n=a-o,d=(a+o)/2;if(n){if(e===a)c=(i-s)/n+(i<s)*6;else if(i===a)c=(s-e)/n+2;else c=(e-i)/n+4;n/=d<0.5?a+o:2-a-o,c*=60}else n=d>0&&d<1?0:c;return new Re(c,n,d,r.opacity)}function yu(r,e,i,s){return arguments.length===1?mu(r):new Re(r,e,i,s==null?1:s)}function Re(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}Vi(Re,yu,mc(Yi,{brighter(r){return r=r==null?es:Math.pow(es,r),new Re(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?qi:Math.pow(qi,r),new Re(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,e=isNaN(r)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<0.5?i:1-i)*e,o=2*i-s;return new On(nn(r>=240?r-240:r+120,o,s),nn(r,o,s),nn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new Re(gu(this.h),ts(this.s),ts(this.l),rs(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 r=rs(this.opacity);return`${r===1?"hsl(":"hsla("}${gu(this.h)}, ${ts(this.s)*100}%, ${ts(this.l)*100}%${r===1?")":`, ${r})`}`}}));function gu(r){return r=(r||0)%360,r<0?r+360:r}function ts(r){return Math.max(0,Math.min(1,r||0))}function nn(r,e,i){return(r<60?e+(i-e)*r/60:r<180?i:r<240?e+(i-e)*(240-r)/60:e)*255}function ln(r,e,i,s,o){var a=r*r,c=a*r;return((1-3*r+3*a-c)*e+(4-6*a+3*c)*i+(1+3*r+3*a-3*c)*s+c*o)/6}function hn(r){var e=r.length-1;return function(i){var s=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),o=r[s],a=r[s+1],c=s>0?r[s-1]:2*o-a,n=s<e-1?r[s+2]:2*a-o;return ln((i-s/e)*e,c,o,a,n)}}function cn(r){var e=r.length;return function(i){var s=Math.floor(((i%=1)<0?++i:i)*e),o=r[(s+e-1)%e],a=r[s%e],c=r[(s+1)%e],n=r[(s+2)%e];return ln((i-s/e)*e,o,a,c,n)}}var fc=(r)=>()=>r;function xu(r,e){return function(i){return r+i*e}}function Q0(r,e,i){return r=Math.pow(r,i),e=Math.pow(e,i)-r,i=1/i,function(s){return Math.pow(r+s*e,i)}}function ZA(r,e){var i=e-r;return i?xu(r,i>180||i<-180?i-360*Math.round(i/360):i):fc(isNaN(r)?e:r)}function Cu(r){return(r=+r)===1?oi:function(e,i){return i-e?Q0(e,i,r):fc(isNaN(e)?i:e)}}function oi(r,e){var i=e-r;return i?xu(r,i):fc(isNaN(r)?e:r)}var ll=function r(e){var i=Cu(e);function s(o,a){var c=i((o=Gr(o)).r,(a=Gr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=oi(o.opacity,a.opacity);return function(u){return o.r=c(u),o.g=n(u),o.b=d(u),o.opacity=f(u),o+""}}return s.gamma=r,s}(1);function bu(r){return function(e){var i=e.length,s=Array(i),o=Array(i),a=Array(i),c,n;for(c=0;c<i;++c)n=Gr(e[c]),s[c]=n.r||0,o[c]=n.g||0,a[c]=n.b||0;return s=r(s),o=r(o),a=r(a),n.opacity=1,function(d){return n.r=s(d),n.g=o(d),n.b=a(d),n+""}}}var J0=bu(hn),tC=bu(cn);function Qn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var dn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,un=new RegExp(dn.source,"g");function eC(r){return function(){return r}}function rC(r){return function(e){return r(e)+""}}function gc(r,e){var i=dn.lastIndex=un.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=dn.exec(r))&&(o=un.exec(e))){if((a=o.index)>i)if(a=e.slice(i,a),n[c])n[c]+=a;else n[++c]=a;if((s=s[0])===(o=o[0]))if(n[c])n[c]+=o;else n[++c]=o;else n[++c]=null,d.push({i:c,x:Qn(s,o)});i=un.lastIndex}if(i<e.length)if(a=e.slice(i),n[c])n[c]+=a;else n[++c]=a;return n.length<2?d[0]?rC(d[0].x):eC(e):(e=d.length,function(f){for(var u=0,p;u<e;++u)n[(p=d[u]).i]=p.x(f);return n.join("")})}var ku=180/Math.PI,is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function os(r,e,i,s,o,a){var c,n,d;if(c=Math.sqrt(r*r+e*e))r/=c,e/=c;if(d=r*i+e*s)i-=r*d,s-=e*d;if(n=Math.sqrt(i*i+s*s))i/=n,s/=n,d/=n;if(r*s<e*i)r=-r,e=-e,d=-d,c=-c;return{translateX:o,translateY:a,rotate:Math.atan2(e,r)*ku,skewX:Math.atan(d)*ku,scaleX:c,scaleY:n}}var ss;function wu(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?is:os(e.a,e.b,e.c,e.d,e.e,e.f)}function Su(r){if(r==null)return is;if(!ss)ss=document.createElementNS("http://www.w3.org/2000/svg","g");if(ss.setAttribute("transform",r),!(r=ss.transform.baseVal.consolidate()))return is;return r=r.matrix,os(r.a,r.b,r.c,r.d,r.e,r.f)}function Tu(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,p,x,b,S){if(f!==p||u!==x){var T=b.push("translate(",null,e,null,i);S.push({i:T-4,x:Qn(f,p)},{i:T-2,x:Qn(u,x)})}else if(p||x)b.push("translate("+p+e+x+i)}function c(f,u,p,x){if(f!==u){if(f-u>180)u+=360;else if(u-f>180)f+=360;x.push({i:p.push(o(p)+"rotate(",null,s)-2,x:Qn(f,u)})}else if(u)p.push(o(p)+"rotate("+u+s)}function n(f,u,p,x){if(f!==u)x.push({i:p.push(o(p)+"skewX(",null,s)-2,x:Qn(f,u)});else if(u)p.push(o(p)+"skewX("+u+s)}function d(f,u,p,x,b,S){if(f!==p||u!==x){var T=b.push(o(b)+"scale(",null,",",null,")");S.push({i:T-4,x:Qn(f,p)},{i:T-2,x:Qn(u,x)})}else if(p!==1||x!==1)b.push(o(b)+"scale("+p+","+x+")")}return function(f,u){var p=[],x=[];return f=r(f),u=r(u),a(f.translateX,f.translateY,u.translateX,u.translateY,p,x),c(f.rotate,u.rotate,p,x),n(f.skewX,u.skewX,p,x),d(f.scaleX,f.scaleY,u.scaleX,u.scaleY,p,x),f=u=null,function(b){var S=-1,T=x.length,B;while(++S<T)p[(B=x[S]).i]=B.x(b);return p.join("")}}}var pn=Tu(wu,"px, ","px)","deg)"),gn=Tu(Su,", ",")",")");var Vr=0,Hi=0,zi=0,_u=1000,as,ji,ns=0,_r=0,ls=0,Ui=typeof performance==="object"&&performance.now?performance:Date,vu=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Qi(){return _r||(vu(iC),_r=Ui.now()+ls)}function iC(){_r=0}function Gi(){this._call=this._time=this._next=null}Gi.prototype=hs.prototype={constructor:Gi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Qi():+i)+(e==null?0:+e),!this._next&&ji!==this){if(ji)ji._next=this;else as=this;ji=this}this._call=r,this._time=i,mn()},stop:function(){if(this._call)this._call=null,this._time=1/0,mn()}};function hs(r,e,i){var s=new Gi;return s.restart(r,e,i),s}function Lu(){Qi(),++Vr;var r=as,e;while(r){if((e=_r-r._time)>=0)r._call.call(void 0,e);r=r._next}--Vr}function Bu(){_r=(ns=Ui.now())+ls,Vr=Hi=0;try{Lu()}finally{Vr=0,sC(),_r=0}}function oC(){var r=Ui.now(),e=r-ns;if(e>_u)ls-=e,ns=r}function sC(){var r,e=as,i,s=1/0;while(e)if(e._call){if(s>e._time)s=e._time;r=e,e=e._next}else i=e._next,e._next=null,e=r?r._next=i:as=i;ji=r,mn(s)}function mn(r){if(Vr)return;if(Hi)Hi=clearTimeout(Hi);var e=r-_r;if(e>24){if(r<1/0)Hi=setTimeout(Bu,r-Ui.now()-ls);if(zi)zi=clearInterval(zi)}else{if(!zi)ns=Ui.now(),zi=setInterval(oC,_u);Vr=1,vu(Bu)}}function to(r,e,i){var s=new Gi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var aC=fa("start","end","cancel","interrupt"),nC=[],Au=0,Fu=1,us=2,cs=3,Mu=4,ds=5,eo=6;function nr(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;lC(r,i,{name:e,index:s,group:o,on:aC,tween:nC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Au})}function ro(r,e){var i=Ce(r,e);if(i.state>Au)throw Error("too late; already scheduled");return i}function ke(r,e){var i=Ce(r,e);if(i.state>cs)throw Error("too late; already running");return i}function Ce(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function lC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=hs(a,0,i.time);function a(f){if(i.state=Fu,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,p,x,b;if(i.state!==Fu)return d();for(u in s){if(b=s[u],b.name!==i.name)continue;if(b.state===cs)return to(c);if(b.state===Mu)b.state=eo,b.timer.stop(),b.on.call("interrupt",r,r.__data__,b.index,b.group),delete s[u];else if(+u<e)b.state=eo,b.timer.stop(),b.on.call("cancel",r,r.__data__,b.index,b.group),delete s[u]}if(to(function(){if(i.state===cs)i.state=Mu,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=us,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==us)return;i.state=cs,o=Array(x=i.tween.length);for(u=0,p=-1;u<x;++u)if(b=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++p]=b;o.length=p+1}function n(f){var u=f<i.duration?i.ease.call(null,f/i.duration):(i.timer.restart(d),i.state=ds,1),p=-1,x=o.length;while(++p<x)o[p].call(r,u);if(i.state===ds)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=eo,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function io(r,e){var i=r.__transition,s,o,a=!0,c;if(!i)return;e=e==null?null:e+"";for(c in i){if((s=i[c]).name!==e){a=!1;continue}o=s.state>us&&s.state<ds,s.state=eo,s.timer.stop(),s.on.call(o?"interrupt":"cancel",r,r.__data__,s.index,s.group),delete i[c]}if(a)delete r.__transition}function xn(r){return this.each(function(){io(this,r)})}function hC(r,e){var i,s;return function(){var o=ke(this,r),a=o.tween;if(a!==i){s=i=a;for(var c=0,n=s.length;c<n;++c)if(s[c].name===e){s=s.slice(),s.splice(c,1);break}}o.tween=s}}function cC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=ke(this,r),c=a.tween;if(c!==s){o=(s=c).slice();for(var n={name:e,value:i},d=0,f=o.length;d<f;++d)if(o[d].name===e){o[d]=n;break}if(d===f)o.push(n)}a.tween=o}}function Cn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=Ce(this.node(),i).tween;for(var o=0,a=s.length,c;o<a;++o)if((c=s[o]).name===r)return c.value;return null}return this.each((e==null?hC:cC)(i,r,e))}function Kr(r,e,i){var s=r._id;return r.each(function(){var o=ke(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return Ce(o,s).value[e]}}function oo(r,e){var i;return(typeof e==="number"?Qn:e instanceof Va?ll:(i=Va(e))?(e=i,ll):gc)(r,e)}function uC(r){return function(){this.removeAttribute(r)}}function dC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function fC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttribute(r);return c===o?null:c===s?a:a=e(s=c,i)}}function pC(r,e,i){var s,o=i+"",a;return function(){var c=this.getAttributeNS(r.space,r.local);return c===o?null:c===s?a:a=e(s=c,i)}}function gC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttribute(r);return c=this.getAttribute(r),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function mC(r,e,i){var s,o,a;return function(){var c,n=i(this),d;if(n==null)return void this.removeAttributeNS(r.space,r.local);return c=this.getAttributeNS(r.space,r.local),d=n+"",c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function bn(r,e){var i=Xe(r),s=i==="transform"?gn:oo;return this.attrTween(r,typeof e==="function"?(i.local?mC:gC)(i,s,Kr(this,"attr."+r,e)):e==null?(i.local?dC:uC)(i):(i.local?pC:fC)(i,s,e))}function yC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function xC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function CC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&xC(r,a);return i}return o._value=e,o}function bC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&yC(r,a);return i}return o._value=e,o}function kn(r,e){var i="attr."+r;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!=="function")throw Error();var s=Xe(r);return this.tween(i,(s.local?CC:bC)(s,e))}function kC(r,e){return function(){ro(this,r).delay=+e.apply(this,arguments)}}function wC(r,e){return e=+e,function(){ro(this,r).delay=e}}function wn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?kC:wC)(e,r)):Ce(this.node(),e).delay}function SC(r,e){return function(){ke(this,r).duration=+e.apply(this,arguments)}}function TC(r,e){return e=+e,function(){ke(this,r).duration=e}}function Sn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?SC:TC)(e,r)):Ce(this.node(),e).duration}function BC(r,e){if(typeof e!=="function")throw Error();return function(){ke(this,r).ease=e}}function Tn(r){var e=this._id;return arguments.length?this.each(BC(e,r)):Ce(this.node(),e).ease}function _C(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();ke(this,r).ease=i}}function Bn(r){if(typeof r!=="function")throw Error();return this.each(_C(this._id,r))}function _n(r){if(typeof r!=="function")r=jr(r);for(var e=this._groups,i=e.length,s=Array(i),o=0;o<i;++o)for(var a=e[o],c=a.length,n=s[o]=[],d,f=0;f<c;++f)if((d=a[f])&&r.call(d,d.__data__,f,a))n.push(d);return new Fe(s,this._parents,this._name,this._id)}function vn(r){if(r._id!==this._id)throw Error();for(var e=this._groups,i=r._groups,s=e.length,o=i.length,a=Math.min(s,o),c=Array(s),n=0;n<a;++n)for(var d=e[n],f=i[n],u=d.length,p=c[n]=Array(u),x,b=0;b<u;++b)if(x=d[b]||f[b])p[b]=x;for(;n<s;++n)c[n]=e[n];return new Fe(c,this._parents,this._name,this._id)}function vC(r){return(r+"").trim().split(/^|\s+/).every(function(e){var i=e.indexOf(".");if(i>=0)e=e.slice(0,i);return!e||e==="start"})}function LC(r,e,i){var s,o,a=vC(e)?ro:ke;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function Ln(r,e){var i=this._id;return arguments.length<2?Ce(this.node(),i).on.on(r):this.each(LC(i,r,e))}function FC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function Fn(){return this.on("end.remove",FC(this._id))}function An(r){var e=this._name,i=this._id;if(typeof r!=="function")r=gr(r);for(var s=this._groups,o=s.length,a=Array(o),c=0;c<o;++c)for(var n=s[c],d=n.length,f=a[c]=Array(d),u,p,x=0;x<d;++x)if((u=n[x])&&(p=r.call(u,u.__data__,x,n))){if("__data__"in u)p.__data__=u.__data__;f[x]=p,nr(f[x],e,i,x,f,Ce(u,i))}return new Fe(a,this._parents,e,i)}function En(r){var e=this._name,i=this._id;if(typeof r!=="function")r=Hr(r);for(var s=this._groups,o=s.length,a=[],c=[],n=0;n<o;++n)for(var d=s[n],f=d.length,u,p=0;p<f;++p)if(u=d[p]){for(var x=r.call(u,u.__data__,p,d),b,S=Ce(u,i),T=0,B=x.length;T<B;++T)if(b=x[T])nr(b,e,i,T,x,S);a.push(x),c.push(u)}return new Fe(a,c,e,i)}var MC=ar.prototype.constructor;function In(){return new MC(this._groups,this._parents)}function AC(r,e){var i,s,o;return function(){var a=yr(this,r),c=(this.style.removeProperty(r),yr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function Eu(r){return function(){this.style.removeProperty(r)}}function EC(r,e,i){var s,o=i+"",a;return function(){var c=yr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function $C(r,e,i){var s,o,a;return function(){var c=yr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),yr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function IC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=ke(this,r),f=d.on,u=d.value[a]==null?n||(n=Eu(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function Dn(r,e,i){var s=(r+="")==="transform"?pn:oo;return e==null?this.styleTween(r,AC(r,s)).on("end.style."+r,Eu(r)):typeof e==="function"?this.styleTween(r,$C(r,s,Kr(this,"style."+r,e))).each(IC(this._id,r)):this.styleTween(r,EC(r,s,e),i).on("end.style."+r,null)}function OC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function DC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&OC(r,c,i);return s}return a._value=e,a}function Pn(r,e,i){var s="style."+(r+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(e==null)return this.tween(s,null);if(typeof e!=="function")throw Error();return this.tween(s,DC(r,e,i==null?"":i))}function PC(r){return function(){this.textContent=r}}function RC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function qn(r){return this.tween("text",typeof r==="function"?RC(Kr(this,"text",r)):PC(r==null?"":r+""))}function qC(r){return function(e){this.textContent=r.call(this,e)}}function WC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&qC(o);return e}return s._value=r,s}function Wn(r){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(r==null)return this.tween(e,null);if(typeof r!=="function")throw Error();return this.tween(e,WC(r))}function Nn(){var r=this._name,e=this._id,i=fs();for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f]){var u=Ce(d,e);nr(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Fe(s,this._parents,r,i)}function Hn(){var r,e,i=this,s=i._id,o=i.size();return new Promise(function(a,c){var n={value:c},d={value:function(){if(--o===0)a()}};if(i.each(function(){var f=ke(this,s),u=f.on;if(u!==r)e=(r=u).copy(),e._.cancel.push(n),e._.interrupt.push(n),e._.end.push(d);f.on=e}),o===0)a()})}var NC=0;function Fe(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function $u(r){return ar().transition(r)}function fs(){return++NC}var lr=ar.prototype;Fe.prototype=$u.prototype={constructor:Fe,select:An,selectAll:En,selectChild:lr.selectChild,selectChildren:lr.selectChildren,filter:_n,merge:vn,selection:In,transition:Nn,call:lr.call,nodes:lr.nodes,node:lr.node,size:lr.size,empty:lr.empty,each:lr.each,on:Ln,attr:bn,attrTween:kn,style:Dn,styleTween:Pn,text:qn,textTween:Wn,remove:Fn,tween:Cn,delay:wn,duration:Sn,ease:Tn,easeVarying:Bn,end:Hn,[Symbol.iterator]:lr[Symbol.iterator]};function ps(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var zC={time:null,delay:0,duration:250,ease:ps};function HC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function Yn(r){var e,i;if(r instanceof Fe)e=r._id,r=r._name;else e=fs(),(i=zC).time=Qi(),r=r==null?null:r+"";for(var s=this._groups,o=s.length,a=0;a<o;++a)for(var c=s[a],n=c.length,d,f=0;f<n;++f)if(d=c[f])nr(d,r,e,f,c,i||HC(d,e));return new Fe(s,this._parents,r,e)}ar.prototype.interrupt=xn;ar.prototype.transition=Yn;var{abs:eF,max:rF,min:iF}=Math;function Iu(r){return[+r[0],+r[1]]}function YC(r){return[Iu(r[0]),Iu(r[1])]}var oF={name:"x",handles:["w","e"].map(jn),input:function(r,e){return r==null?null:[[+r[0],e[0][1]],[+r[1],e[1][1]]]},output:function(r){return r&&[r[0][0],r[1][0]]}},sF={name:"y",handles:["n","s"].map(jn),input:function(r,e){return r==null?null:[[e[0][0],+r[0]],[e[1][0],+r[1]]]},output:function(r){return r&&[r[0][1],r[1][1]]}},aF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(jn),input:function(r){return r==null?null:YC(r)},output:function(r){return r}};function jn(r){return{type:r}}var Un=Math.PI,Gn=2*Un;var jC=Gn-0.000001;function Ou(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function UC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Ou;let i=10**e;return function(s){this._+=s[0];for(let o=1,a=s.length;o<a;++o)this._+=Math.round(arguments[o]*i)/i+s[o]}}class Qr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Ou:UC(r)}moveTo(r,e){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null)this._x1=this._x0,this._y1=this._y0,this._append`Z`}lineTo(r,e){this._append`L${this._x1=+r},${this._y1=+e}`}quadraticCurveTo(r,e,i,s){this._append`Q${+r},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(r,e,i,s,o,a){this._append`C${+r},${+e},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(r,e,i,s,o){if(r=+r,e=+e,i=+i,s=+s,o=+o,o<0)throw Error(`negative radius: ${o}`);let a=this._x1,c=this._y1,n=i-r,d=s-e,f=a-r,u=c-e,p=f*f+u*u;if(this._x1===null)this._append`M${this._x1=r},${this._y1=e}`;else if(!(p>0.000001));else if(!(Math.abs(u*n-d*f)>0.000001)||!o)this._append`L${this._x1=r},${this._y1=e}`;else{let x=i-a,b=s-c,S=n*n+d*d,T=x*x+b*b,B=Math.sqrt(S),_=Math.sqrt(p),v=o*Math.tan((Un-Math.acos((S+p-T)/(2*B*_)))/2),E=v/_,D=v/B;if(Math.abs(E-1)>0.000001)this._append`L${r+E*f},${e+E*u}`;this._append`A${o},${o},0,0,${+(u*x>f*b)},${this._x1=r+D*n},${this._y1=e+D*d}`}}arc(r,e,i,s,o,a){if(r=+r,e=+e,i=+i,a=!!a,i<0)throw Error(`negative radius: ${i}`);let c=i*Math.cos(s),n=i*Math.sin(s),d=r+c,f=e+n,u=1^a,p=a?s-o:o-s;if(this._x1===null)this._append`M${d},${f}`;else if(Math.abs(this._x1-d)>0.000001||Math.abs(this._y1-f)>0.000001)this._append`L${d},${f}`;if(!i)return;if(p<0)p=p%Gn+Gn;if(p>jC)this._append`A${i},${i},0,1,${u},${r-c},${e-n}A${i},${i},0,1,${u},${this._x1=d},${this._y1=f}`;else if(p>0.000001)this._append`A${i},${i},0,${+(p>=Un)},${u},${this._x1=r+i*Math.cos(o)},${this._y1=e+i*Math.sin(o)}`}rect(r,e,i,s){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Du(){return new Qr}Du.prototype=Qr.prototype;function wo(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var Vn=Symbol("implicit");function Jn(){var r=new Ii,e=[],i=[],s=Vn;function o(a){let c=r.get(a);if(c===void 0){if(s!==Vn)return s;r.set(a,c=e.push(a)-1)}return i[c%i.length]}return o.domain=function(a){if(!arguments.length)return e.slice();e=[],r=new Ii;for(let c of a){if(r.has(c))continue;r.set(c,e.push(c)-1)}return o},o.range=function(a){return arguments.length?(i=Array.from(a),o):i.slice()},o.unknown=function(a){return arguments.length?(s=a,o):s},o.copy=function(){return Jn(e,i).unknown(s)},wo.apply(o,arguments),o}function wt(r){return function(){return r}}var{abs:Kn,atan2:we,cos:xr,max:Pu,min:gs,sin:qe,sqrt:vr}=Math,be=0.000000000001,ti=Math.PI,so=ti/2,Ac=2*ti;function Ru(r){return r>1?0:r<-1?ti:Math.acos(r)}function tl(r){return r>=1?so:r<=-1?-so:Math.asin(r)}function ms(r){let e=3;return r.digits=function(i){if(!arguments.length)return e;if(i==null)e=null;else{let s=Math.floor(i);if(!(s>=0))throw RangeError(`invalid digits: ${i}`);e=s}return r},()=>new Qr(e)}function XC(r){return r.innerRadius}function GC(r){return r.outerRadius}function VC(r){return r.startAngle}function KC(r){return r.endAngle}function ZC(r){return r&&r.padAngle}function QC(r,e,i,s,o,a,c,n){var d=i-r,f=s-e,u=c-o,p=n-a,x=p*d-u*f;if(x*x<be)return;return x=(u*(e-a)-p*(r-o))/x,[r+x*d,e+x*f]}function ys(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/vr(n*n+d*d),u=f*d,p=-f*n,x=r+u,b=e+p,S=i+u,T=s+p,B=(x+S)/2,_=(b+T)/2,v=S-x,E=T-b,D=v*v+E*E,P=o-a,Z=x*T-S*b,Q=(E<0?-1:1)*vr(Pu(0,P*P*D-Z*Z)),tt=(Z*E-v*Q)/D,ot=(-Z*v-E*Q)/D,ft=(Z*E+v*Q)/D,dt=(-Z*v+E*Q)/D,lt=tt-B,N=ot-_,K=ft-B,et=dt-_;if(lt*lt+N*N>K*K+et*et)tt=ft,ot=dt;return{cx:tt,cy:ot,x01:-u,y01:-p,x11:tt*(o/P-1),y11:ot*(o/P-1)}}function Zr(){var r=XC,e=GC,i=wt(0),s=null,o=VC,a=KC,c=ZC,n=null,d=ms(f);function f(){var u,p,x=+r.apply(this,arguments),b=+e.apply(this,arguments),S=o.apply(this,arguments)-so,T=a.apply(this,arguments)-so,B=Kn(T-S),_=T>S;if(!n)n=u=d();if(b<x)p=b,b=x,x=p;if(!(b>be))n.moveTo(0,0);else if(B>Ac-be){if(n.moveTo(b*xr(S),b*qe(S)),n.arc(0,0,b,S,T,!_),x>be)n.moveTo(x*xr(T),x*qe(T)),n.arc(0,0,x,T,S,_)}else{var v=S,E=T,D=S,P=T,Z=B,Q=B,tt=c.apply(this,arguments)/2,ot=tt>be&&(s?+s.apply(this,arguments):vr(x*x+b*b)),ft=gs(Kn(b-x)/2,+i.apply(this,arguments)),dt=ft,lt=ft,N,K;if(ot>be){var et=tl(ot/x*qe(tt)),U=tl(ot/b*qe(tt));if((Z-=et*2)>be)et*=_?1:-1,D+=et,P-=et;else Z=0,D=P=(S+T)/2;if((Q-=U*2)>be)U*=_?1:-1,v+=U,E-=U;else Q=0,v=E=(S+T)/2}var ut=b*xr(v),ct=b*qe(v),_t=x*xr(P),Lt=x*qe(P);if(ft>be){var jt=b*xr(E),Ut=b*qe(E),Qt=x*xr(D),re=x*qe(D),Dt;if(B<ti)if(Dt=QC(ut,ct,Qt,re,jt,Ut,_t,Lt)){var Et=ut-Dt[0],Wt=ct-Dt[1],Xt=jt-Dt[0],zt=Ut-Dt[1],he=1/qe(Ru((Et*Xt+Wt*zt)/(vr(Et*Et+Wt*Wt)*vr(Xt*Xt+zt*zt)))/2),le=vr(Dt[0]*Dt[0]+Dt[1]*Dt[1]);dt=gs(ft,(x-le)/(he-1)),lt=gs(ft,(b-le)/(he+1))}else dt=lt=0}if(!(Q>be))n.moveTo(ut,ct);else if(lt>be)if(N=ys(Qt,re,ut,ct,b,lt,_),K=ys(jt,Ut,_t,Lt,b,lt,_),n.moveTo(N.cx+N.x01,N.cy+N.y01),lt<ft)n.arc(N.cx,N.cy,lt,we(N.y01,N.x01),we(K.y01,K.x01),!_);else n.arc(N.cx,N.cy,lt,we(N.y01,N.x01),we(N.y11,N.x11),!_),n.arc(0,0,b,we(N.cy+N.y11,N.cx+N.x11),we(K.cy+K.y11,K.cx+K.x11),!_),n.arc(K.cx,K.cy,lt,we(K.y11,K.x11),we(K.y01,K.x01),!_);else n.moveTo(ut,ct),n.arc(0,0,b,v,E,!_);if(!(x>be)||!(Z>be))n.lineTo(_t,Lt);else if(dt>be)if(N=ys(_t,Lt,jt,Ut,x,-dt,_),K=ys(ut,ct,Qt,re,x,-dt,_),n.lineTo(N.cx+N.x01,N.cy+N.y01),dt<ft)n.arc(N.cx,N.cy,dt,we(N.y01,N.x01),we(K.y01,K.x01),!_);else n.arc(N.cx,N.cy,dt,we(N.y01,N.x01),we(N.y11,N.x11),!_),n.arc(0,0,x,we(N.cy+N.y11,N.cx+N.x11),we(K.cy+K.y11,K.cx+K.x11),_),n.arc(K.cx,K.cy,dt,we(K.y11,K.x11),we(K.y01,K.x01),!_);else n.arc(0,0,x,P,D,_)}if(n.closePath(),u)return n=null,u+""||null}return f.centroid=function(){var u=(+r.apply(this,arguments)+ +e.apply(this,arguments))/2,p=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ti/2;return[xr(p)*u,qe(p)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:wt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:wt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:wt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:wt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:wt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:wt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:wt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var qF=Array.prototype.slice;function cd(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function qu(r){this._context=r}qu.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:this._context.lineTo(r,e);break}}};function ya(r){return new qu(r)}function Wu(r){return r[0]}function Nu(r){return r[1]}function cl(r,e){var i=wt(!0),s=null,o=ya,a=null,c=ms(n);r=typeof r==="function"?r:r===void 0?Wu:wt(r),e=typeof e==="function"?e:e===void 0?Nu:wt(e);function n(d){var f,u=(d=cd(d)).length,p,x=!1,b;if(s==null)a=o(b=c());for(f=0;f<=u;++f){if(!(f<u&&i(p=d[f],f,d))===x)if(x=!x)a.lineStart();else a.lineEnd();if(x)a.point(+r(p,f,d),+e(p,f,d))}if(b)return a=null,b+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:wt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:wt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:wt(!!d),n):i},n.curve=function(d){return arguments.length?(o=d,s!=null&&(a=o(s)),n):o},n.context=function(d){return arguments.length?(d==null?s=a=null:a=o(s=d),n):s},n}class el{constructor(r,e){this._context=r,this._x=e}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(r,e){switch(r=+r,e=+e,this._point){case 0:{if(this._point=1,this._line)this._context.lineTo(r,e);else this._context.moveTo(r,e);break}case 1:this._point=2;default:{if(this._x)this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,e,r,e);else this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,r,this._y0,r,e);break}}this._x0=r,this._y0=e}}function ao(r){return new el(r,!0)}function no(r){return new el(r,!1)}function $e(){}function ei(r,e,i){r._context.bezierCurveTo((2*r._x0+r._x1)/3,(2*r._y0+r._y1)/3,(r._x0+2*r._x1)/3,(r._y0+2*r._y1)/3,(r._x0+4*r._x1+e)/6,(r._y0+4*r._y1+i)/6)}function lo(r){this._context=r}lo.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:ei(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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);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:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Lr(r){return new lo(r)}function zu(r){this._context=r}zu.prototype={areaStart:$e,areaEnd:$e,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x2=r,this._y2=e;break;case 1:this._point=2,this._x3=r,this._y3=e;break;case 2:this._point=3,this._x4=r,this._y4=e,this._context.moveTo((this._x0+4*this._x1+r)/6,(this._y0+4*this._y1+e)/6);break;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function xs(r){return new zu(r)}function Hu(r){this._context=r}Hu.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+r)/6,s=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:ei(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function Cs(r){return new Hu(r)}function Yu(r,e){this._basis=new lo(r),this._beta=e}Yu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var r=this._x,e=this._y,i=r.length-1;if(i>0){var s=r[0],o=e[0],a=r[i]-s,c=e[i]-o,n=-1,d;while(++n<=i)d=n/i,this._basis.point(this._beta*r[n]+(1-this._beta)*(s+d*a),this._beta*e[n]+(1-this._beta)*(o+d*c))}this._x=this._y=null,this._basis.lineEnd()},point:function(r,e){this._x.push(+r),this._y.push(+e)}};var rl=function r(e){function i(s){return e===1?new lo(s):new Yu(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function ri(r,e,i){r._context.bezierCurveTo(r._x1+r._k*(r._x2-r._x0),r._y1+r._k*(r._y2-r._y0),r._x2+r._k*(r._x1-e),r._y2+r._k*(r._y1-i),r._x2,r._y2)}function bs(r,e){this._context=r,this._k=(1-e)/6}bs.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:ri(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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2,this._x1=r,this._y1=e;break;case 2:this._point=3;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ho=function r(e){function i(s){return new bs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ks(r,e){this._context=r,this._k=(1-e)/6}ks.prototype={areaStart:$e,areaEnd:$e,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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var il=function r(e){function i(s){return new ks(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ws(r,e){this._context=r,this._k=(1-e)/6}ws.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(r,e){switch(r=+r,e=+e,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:ri(this,r,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ol=function r(e){function i(s){return new ws(s,e)}return i.tension=function(s){return r(+s)},i}(0);function co(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>be){var n=2*r._l01_2a+3*r._l01_a*r._l12_a+r._l12_2a,d=3*r._l01_a*(r._l01_a+r._l12_a);s=(s*n-r._x0*r._l12_2a+r._x2*r._l01_2a)/d,o=(o*n-r._y0*r._l12_2a+r._y2*r._l01_2a)/d}if(r._l23_a>be){var f=2*r._l23_2a+3*r._l23_a*r._l12_a+r._l12_2a,u=3*r._l23_a*(r._l23_a+r._l12_a);a=(a*f+r._x1*r._l23_2a-e*r._l12_2a)/u,c=(c*f+r._y1*r._l23_2a-i*r._l12_2a)/u}r._context.bezierCurveTo(s,o,a,c,r._x2,r._y2)}function ju(r,e){this._context=r,this._alpha=e}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(){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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3;default:co(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var uo=function r(e){function i(s){return e?new ju(s,e):new bs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Uu(r,e){this._context=r,this._alpha=e}Uu.prototype={areaStart:$e,areaEnd:$e,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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=r,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=r,this._y4=e);break;case 2:this._point=3,this._x5=r,this._y5=e;break;default:co(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var al=function r(e){function i(s){return e?new Uu(s,e):new ks(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Xu(r,e){this._context=r,this._alpha=e}Xu.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(r,e){if(r=+r,e=+e,this._point){var i=this._x2-r,s=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+s*s,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:co(this,r,e);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=r,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var nl=function r(e){function i(s){return e?new Xu(s,e):new ws(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function Gu(r){this._context=r}Gu.prototype={areaStart:$e,areaEnd:$e,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(r,e){if(r=+r,e=+e,this._point)this._context.lineTo(r,e);else this._point=1,this._context.moveTo(r,e)}};function Ss(r){return new Gu(r)}function Vu(r){return r<0?-1:1}function Ku(r,e,i){var s=r._x1-r._x0,o=e-r._x1,a=(r._y1-r._y0)/(s||o<0&&-0),c=(i-r._y1)/(o||s<0&&-0),n=(a*o+c*s)/(s+o);return(Vu(a)+Vu(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function Zu(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function hl(r,e,i){var{_x0:s,_y0:o,_x1:a,_y1:c}=r,n=(a-s)/3;r._context.bezierCurveTo(s+n,o+n*e,a-n,c-n*i,a,c)}function Ts(r){this._context=r}Ts.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:hl(this,this._t0,Zu(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(r,e){var i=NaN;if(r=+r,e=+e,r===this._x1&&e===this._y1)return;switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;break;case 2:this._point=3,hl(this,Zu(this,i=Ku(this,r,e)),i);break;default:hl(this,this._t0,i=Ku(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function Qu(r){this._context=new Ju(r)}(Qu.prototype=Object.create(Ts.prototype)).point=function(r,e){Ts.prototype.point.call(this,e,r)};function Ju(r){this._context=r}Ju.prototype={moveTo:function(r,e){this._context.moveTo(e,r)},closePath:function(){this._context.closePath()},lineTo:function(r,e){this._context.lineTo(e,r)},bezierCurveTo:function(r,e,i,s,o,a){this._context.bezierCurveTo(e,r,s,i,a,o)}};function fo(r){return new Ts(r)}function po(r){return new Qu(r)}function ed(r){this._context=r}ed.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var r=this._x,e=this._y,i=r.length;if(i)if(this._line?this._context.lineTo(r[0],e[0]):this._context.moveTo(r[0],e[0]),i===2)this._context.lineTo(r[1],e[1]);else{var s=td(r),o=td(e);for(var a=0,c=1;c<i;++a,++c)this._context.bezierCurveTo(s[0][a],o[0][a],s[1][a],o[1][a],r[c],e[c])}if(this._line||this._line!==0&&i===1)this._context.closePath();this._line=1-this._line,this._x=this._y=null},point:function(r,e){this._x.push(+r),this._y.push(+e)}};function td(r){var e,i=r.length-1,s,o=Array(i),a=Array(i),c=Array(i);o[0]=0,a[0]=2,c[0]=r[0]+2*r[1];for(e=1;e<i-1;++e)o[e]=1,a[e]=4,c[e]=4*r[e]+2*r[e+1];o[i-1]=2,a[i-1]=7,c[i-1]=8*r[i-1]+r[i];for(e=1;e<i;++e)s=o[e]/a[e-1],a[e]-=s,c[e]-=s*c[e-1];o[i-1]=c[i-1]/a[i-1];for(e=i-2;e>=0;--e)o[e]=(c[e]-o[e+1])/a[e];a[i-1]=(r[i]+o[i-1])/2;for(e=0;e<i-1;++e)a[e]=2*r[e+1]-o[e+1];return[o,a]}function ni(r){return new ed(r)}function Bs(r,e){this._context=r,this._t=e}Bs.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(r,e){switch(r=+r,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,e):this._context.moveTo(r,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(r,e);else{var i=this._x*(1-this._t)+r*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}break}}this._x=r,this._y=e}};function li(r){return new Bs(r,0.5)}function go(r){return new Bs(r,0)}function mo(r){return new Bs(r,1)}function Cr(r,e,i){this.k=r,this.x=e,this.y=i}Cr.prototype={constructor:Cr,scale:function(r){return r===1?this:new Cr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new Cr(this.k,this.x+this.k*r,this.y+this.k*e)},apply:function(r){return[r[0]*this.k+this.x,r[1]*this.k+this.y]},applyX:function(r){return r*this.k+this.x},applyY:function(r){return r*this.k+this.y},invert:function(r){return[(r[0]-this.x)/this.k,(r[1]-this.y)/this.k]},invertX:function(r){return(r-this.x)/this.k},invertY:function(r){return(r-this.y)/this.k},rescaleX:function(r){return r.copy().domain(r.range().map(this.invertX,this).map(r.invert,r))},rescaleY:function(r){return r.copy().domain(r.range().map(this.invertY,this).map(r.invert,r))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var fl=new Cr(1,0,0);gl.prototype=Cr.prototype;function gl(r){while(!r.__zoom)if(!(r=r.parentNode))return fl;return r.__zoom}var ge=t((r)=>{let{securityLevel:e}=m(),i=h("body");if(e==="sandbox"){let a=h(`#i${r}`).node()?.contentDocument??document;i=h(a.body)}return i.select(`#${r}`)},"selectSvgElement");function Pd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(Pd,"getDefaultExportFromCjs");var Be={},_s={},br={},rd;function hi(){if(rd)return br;rd=1;function r(c){return typeof c>"u"||c===null}t(r,"isNothing");function e(c){return typeof c==="object"&&c!==null}t(e,"isObject");function i(c){if(Array.isArray(c))return c;else if(r(c))return[];return[c]}t(i,"toArray");function s(c,n){if(n){let d=Object.keys(n);for(let f=0,u=d.length;f<u;f+=1){let p=d[f];c[p]=n[p]}}return c}t(s,"extend");function o(c,n){let d="";for(let f=0;f<n;f+=1)d+=c;return d}t(o,"repeat");function a(c){return c===0&&Number.NEGATIVE_INFINITY===1/c}return t(a,"isNegativeZero"),br.isNothing=r,br.isObject=e,br.toArray=i,br.repeat=o,br.isNegativeZero=a,br.extend=s,br}t(hi,"requireCommon");var yl,od;function ci(){if(od)return yl;od=1;function r(i,s){let o="",a=i.reason||"(unknown reason)";if(!i.mark)return a;if(i.mark.name)o+='in "'+i.mark.name+'" ';if(o+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!s&&i.mark.snippet)o+=`
|
|
127
|
-
|
|
128
|
-
`+i.mark.snippet;return a+" "+o}t(r,"formatError");function e(i,s){if(Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return t(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=t(function(s){return this.name+": "+r(this,s)},"toString"),yl=e,yl}t(ci,"requireException");var xl,ad;function Rd(){if(ad)return xl;ad=1;let r=hi();function e(o,a,c,n,d){let f="",u="",p=Math.floor(d/2)-1;if(n-a>p)f=" ... ",a=n-p+f.length;if(c-n>p)u=" ...",c=n+p-u.length;return{str:f+o.slice(a,c).replace(/\t/g,"→")+u,pos:n-a+f.length}}t(e,"getLine");function i(o,a){return r.repeat(" ",a-o.length)+o}t(i,"padStart");function s(o,a){if(a=Object.create(a||null),!o.buffer)return null;if(!a.maxLength)a.maxLength=79;if(typeof a.indent!=="number")a.indent=1;if(typeof a.linesBefore!=="number")a.linesBefore=3;if(typeof a.linesAfter!=="number")a.linesAfter=2;let c=/\r?\n|\r|\0/g,n=[0],d=[],f,u=-1;while(f=c.exec(o.buffer))if(d.push(f.index),n.push(f.index+f[0].length),o.position<=f.index&&u<0)u=n.length-2;if(u<0)u=n.length-1;let p="",x=Math.min(o.line+a.linesAfter,d.length).toString().length,b=a.maxLength-(a.indent+x+3);for(let T=1;T<=a.linesBefore;T++){if(u-T<0)break;let B=e(o.buffer,n[u-T],d[u-T],o.position-(n[u]-n[u-T]),b);p=r.repeat(" ",a.indent)+i((o.line-T+1).toString(),x)+" | "+B.str+`
|
|
129
|
-
`+p}let S=e(o.buffer,n[u],d[u],o.position,b);p+=r.repeat(" ",a.indent)+i((o.line+1).toString(),x)+" | "+S.str+`
|
|
130
|
-
`,p+=r.repeat("-",a.indent+x+3+S.pos)+`^
|
|
131
|
-
`;for(let T=1;T<=a.linesAfter;T++){if(u+T>=d.length)break;let B=e(o.buffer,n[u+T],d[u+T],o.position-(n[u]-n[u+T]),b);p+=r.repeat(" ",a.indent)+i((o.line+T+1).toString(),x)+" | "+B.str+`
|
|
132
|
-
`}return p.replace(/\n$/,"")}return t(s,"makeSnippet"),xl=s,xl}t(Rd,"requireSnippet");var Cl,nd;function _e(){if(nd)return Cl;nd=1;let r=ci(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(a){let c={};if(a!==null)Object.keys(a).forEach(function(n){a[n].forEach(function(d){c[String(d)]=n})});return c}t(s,"compileStyleAliases");function o(a,c){if(c=c||{},Object.keys(c).forEach(function(n){if(e.indexOf(n)===-1)throw new r('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=c,this.tag=a,this.kind=c.kind||null,this.resolve=c.resolve||function(){return!0},this.construct=c.construct||function(n){return n},this.instanceOf=c.instanceOf||null,this.predicate=c.predicate||null,this.represent=c.represent||null,this.representName=c.representName||null,this.defaultStyle=c.defaultStyle||null,this.multi=c.multi||!1,this.styleAliases=s(c.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return t(o,"Type2"),Cl=o,Cl}t(_e,"requireType");var bl,hd;function ql(){if(hd)return bl;hd=1;let r=ci(),e=_e();function i(a,c){let n=[];return a[c].forEach(function(d){let f=n.length;n.forEach(function(u,p){if(u.tag===d.tag&&u.kind===d.kind&&u.multi===d.multi)f=p}),n[f]=d}),n}t(i,"compileList");function s(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function c(n){if(n.multi)a.multi[n.kind].push(n),a.multi.fallback.push(n);else a[n.kind][n.tag]=a.fallback[n.tag]=n}t(c,"collectType");for(let n=0,d=arguments.length;n<d;n+=1)arguments[n].forEach(c);return a}t(s,"compileMap");function o(a){return this.extend(a)}return t(o,"Schema2"),o.prototype.extend=t(function(c){let n=[],d=[];if(c instanceof e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else if(c&&(Array.isArray(c.implicit)||Array.isArray(c.explicit))){if(c.implicit)n=n.concat(c.implicit);if(c.explicit)d=d.concat(c.explicit)}else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),d.forEach(function(u){if(!(u instanceof e))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(o.prototype);return f.implicit=(this.implicit||[]).concat(n),f.explicit=(this.explicit||[]).concat(d),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=s(f.compiledImplicit,f.compiledExplicit),f},"extend"),bl=o,bl}t(ql,"requireSchema");var kl,yd;function Wl(){if(yd)return kl;return yd=1,kl=new(_e())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),kl}t(Wl,"requireStr");var wl,xd;function Nl(){if(xd)return wl;return xd=1,wl=new(_e())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),wl}t(Nl,"requireSeq");var Sl,Cd;function zl(){if(Cd)return Sl;return Cd=1,Sl=new(_e())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),Sl}t(zl,"requireMap");var Tl,bd;function Hl(){if(bd)return Tl;return bd=1,Tl=new(ql())({explicit:[Wl(),Nl(),zl()]}),Tl}t(Hl,"requireFailsafe");var Bl,kd;function Yl(){if(kd)return Bl;kd=1;let r=_e();function e(o){if(o===null)return!0;let a=o.length;return a===1&&o==="~"||a===4&&(o==="null"||o==="Null"||o==="NULL")}t(e,"resolveYamlNull");function i(){return null}t(i,"constructYamlNull");function s(o){return o===null}return t(s,"isNull"),Bl=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{canonical:t(function(){return"~"},"canonical"),lowercase:t(function(){return"null"},"lowercase"),uppercase:t(function(){return"NULL"},"uppercase"),camelcase:t(function(){return"Null"},"camelcase"),empty:t(function(){return""},"empty")},defaultStyle:"lowercase"}),Bl}t(Yl,"require_null");var _l,wd;function jl(){if(wd)return _l;wd=1;let r=_e();function e(o){if(o===null)return!1;let a=o.length;return a===4&&(o==="true"||o==="True"||o==="TRUE")||a===5&&(o==="false"||o==="False"||o==="FALSE")}t(e,"resolveYamlBoolean");function i(o){return o==="true"||o==="True"||o==="TRUE"}t(i,"constructYamlBoolean");function s(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return t(s,"isBoolean"),_l=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:i,predicate:s,represent:{lowercase:t(function(o){return o?"true":"false"},"lowercase"),uppercase:t(function(o){return o?"TRUE":"FALSE"},"uppercase"),camelcase:t(function(o){return o?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),_l}t(jl,"requireBool");var vl,Sd;function Ul(){if(Sd)return vl;Sd=1;let r=hi(),e=_e();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}t(i,"isHexCode");function s(f){return f>=48&&f<=55}t(s,"isOctCode");function o(f){return f>=48&&f<=57}t(o,"isDecCode");function a(f){if(f===null)return!1;let u=f.length,p=0,x=!1;if(!u)return!1;let b=f[p];if(b==="-"||b==="+")b=f[++p];if(b==="0"){if(p+1===u)return!0;if(b=f[++p],b==="b"){p++;for(;p<u;p++){if(b=f[p],b!=="0"&&b!=="1")return!1;x=!0}return x&&isFinite(c(f))}if(b==="x"){p++;for(;p<u;p++){if(!i(f.charCodeAt(p)))return!1;x=!0}return x&&isFinite(c(f))}if(b==="o"){p++;for(;p<u;p++){if(!s(f.charCodeAt(p)))return!1;x=!0}return x&&isFinite(c(f))}}for(;p<u;p++){if(!o(f.charCodeAt(p)))return!1;x=!0}if(!x)return!1;return isFinite(c(f))}t(a,"resolveYamlInteger");function c(f){let u=f,p=1,x=u[0];if(x==="-"||x==="+"){if(x==="-")p=-1;u=u.slice(1),x=u[0]}if(u==="0")return 0;if(x==="0"){if(u[1]==="b")return p*parseInt(u.slice(2),2);if(u[1]==="x")return p*parseInt(u.slice(2),16);if(u[1]==="o")return p*parseInt(u.slice(2),8)}return p*parseInt(u,10)}t(c,"parseYamlInteger");function n(f){return c(f)}t(n,"constructYamlInteger");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!r.isNegativeZero(f))}return t(d,"isInteger"),vl=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:d,represent:{binary:t(function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},"binary"),octal:t(function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},"octal"),decimal:t(function(f){return f.toString(10)},"decimal"),hexadecimal:t(function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl}t(Ul,"requireInt");var Ll,Td;function Xl(){if(Td)return Ll;Td=1;let r=hi(),e=_e(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(f){if(f===null)return!1;if(!i.test(f))return!1;if(isFinite(parseFloat(f,10)))return!0;return s.test(f)}t(o,"resolveYamlFloat");function a(f){let u=f.toLowerCase(),p=u[0]==="-"?-1:1;if("+-".indexOf(u[0])>=0)u=u.slice(1);if(u===".inf")return p===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(u===".nan")return NaN;return p*parseFloat(u,10)}t(a,"constructYamlFloat");let c=/^[-+]?[0-9]+e/;function n(f,u){if(isNaN(f))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let p=f.toString(10);return c.test(p)?p.replace("e",".e"):p}t(n,"representYamlFloat");function d(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}return t(d,"isFloat"),Ll=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),Ll}t(Xl,"requireFloat");var Fl,Bd;function Gl(){if(Bd)return Fl;return Bd=1,Fl=Hl().extend({implicit:[Yl(),jl(),Ul(),Xl()]}),Fl}t(Gl,"requireJson");var Ml,_d;function Vl(){if(_d)return Ml;return _d=1,Ml=Gl(),Ml}t(Vl,"requireCore");var Al,vd;function Kl(){if(vd)return Al;vd=1;let r=_e(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=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 s(c){if(c===null)return!1;if(e.exec(c)!==null)return!0;if(i.exec(c)!==null)return!0;return!1}t(s,"resolveYamlTimestamp");function o(c){let n=0,d=null,f=e.exec(c);if(f===null)f=i.exec(c);if(f===null)throw Error("Date resolve error");let u=+f[1],p=+f[2]-1,x=+f[3];if(!f[4])return new Date(Date.UTC(u,p,x));let b=+f[4],S=+f[5],T=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let _=+f[10],v=+(f[11]||0);if(d=(_*60+v)*60000,f[9]==="-")d=-d}let B=new Date(Date.UTC(u,p,x,b,S,T,n));if(d)B.setTime(B.getTime()-d);return B}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),Al=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Al}t(Kl,"requireTimestamp");var El,Ld;function Zl(){if(Ld)return El;Ld=1;let r=_e();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),El=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),El}t(Zl,"requireMerge");var $l,Fd;function Ql(){if(Fd)return $l;Fd=1;let r=_e(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
133
|
-
\r`;function i(c){if(c===null)return!1;let n=0,d=c.length,f=e;for(let u=0;u<d;u++){let p=f.indexOf(c.charAt(u));if(p>64)continue;if(p<0)return!1;n+=6}return n%8===0}t(i,"resolveYamlBinary");function s(c){let n=c.replace(/[\r\n=]/g,""),d=n.length,f=e,u=0,p=[];for(let b=0;b<d;b++){if(b%4===0&&b)p.push(u>>16&255),p.push(u>>8&255),p.push(u&255);u=u<<6|f.indexOf(n.charAt(b))}let x=d%4*6;if(x===0)p.push(u>>16&255),p.push(u>>8&255),p.push(u&255);else if(x===18)p.push(u>>10&255),p.push(u>>2&255);else if(x===12)p.push(u>>4&255);return new Uint8Array(p)}t(s,"constructYamlBinary");function o(c){let n="",d=0,f=c.length,u=e;for(let x=0;x<f;x++){if(x%3===0&&x)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];d=(d<<8)+c[x]}let p=f%3;if(p===0)n+=u[d>>18&63],n+=u[d>>12&63],n+=u[d>>6&63],n+=u[d&63];else if(p===2)n+=u[d>>10&63],n+=u[d>>4&63],n+=u[d<<2&63],n+=u[64];else if(p===1)n+=u[d>>2&63],n+=u[d<<4&63],n+=u[64],n+=u[64];return n}t(o,"representYamlBinary");function a(c){return Object.prototype.toString.call(c)==="[object Uint8Array]"}return t(a,"isBinary"),$l=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),$l}t(Ql,"requireBinary");var Il,Md;function Jl(){if(Md)return Il;Md=1;let r=_e(),e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(a){if(a===null)return!0;let c=[],n=a;for(let d=0,f=n.length;d<f;d+=1){let u=n[d],p=!1;if(i.call(u)!=="[object Object]")return!1;let x;for(x in u)if(e.call(u,x))if(!p)p=!0;else return!1;if(!p)return!1;if(c.indexOf(x)===-1)c.push(x);else return!1}return!0}t(s,"resolveYamlOmap");function o(a){return a!==null?a:[]}return t(o,"constructYamlOmap"),Il=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),Il}t(Jl,"requireOmap");var Ol,Ad;function ih(){if(Ad)return Ol;Ad=1;let r=_e(),e=Object.prototype.toString;function i(o){if(o===null)return!0;let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n];if(e.call(f)!=="[object Object]")return!1;let u=Object.keys(f);if(u.length!==1)return!1;c[n]=[u[0],f[u[0]]]}return!0}t(i,"resolveYamlPairs");function s(o){if(o===null)return[];let a=o,c=Array(a.length);for(let n=0,d=a.length;n<d;n+=1){let f=a[n],u=Object.keys(f);c[n]=[u[0],f[u[0]]]}return c}return t(s,"constructYamlPairs"),Ol=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s}),Ol}t(ih,"requirePairs");var Dl,Ed;function oh(){if(Ed)return Dl;Ed=1;let r=_e(),e=Object.prototype.hasOwnProperty;function i(o){if(o===null)return!0;let a=o;for(let c in a)if(e.call(a,c)){if(a[c]!==null)return!1}return!0}t(i,"resolveYamlSet");function s(o){return o!==null?o:{}}return t(s,"constructYamlSet"),Dl=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s}),Dl}t(oh,"requireSet");var Pl,$d;function vs(){if($d)return Pl;return $d=1,Pl=Vl().extend({implicit:[Kl(),Zl()],explicit:[Ql(),Jl(),ih(),oh()]}),Pl}t(vs,"require_default");var Id;function qd(){if(Id)return _s;Id=1;let r=hi(),e=ci(),i=Rd(),s=vs(),o=Object.prototype.hasOwnProperty,a=1,c=2,n=3,d=4,f=1,u=2,p=3,x=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/[\x85\u2028\u2029]/,S=/[,\[\]{}]/,T=/^(?:!|!!|![0-9A-Za-z-]+!)$/,B=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function _(k){return Object.prototype.toString.call(k)}t(_,"_class");function v(k){return k===10||k===13}t(v,"isEol");function E(k){return k===9||k===32}t(E,"isWhiteSpace");function D(k){return k===9||k===32||k===10||k===13}t(D,"isWsOrEol");function P(k){return k===44||k===91||k===93||k===123||k===125}t(P,"isFlowIndicator");function Z(k){if(k>=48&&k<=57)return k-48;let rt=k|32;if(rt>=97&&rt<=102)return rt-97+10;return-1}t(Z,"fromHexCode");function Q(k){if(k===120)return 2;if(k===117)return 4;if(k===85)return 8;return 0}t(Q,"escapedHexLen");function tt(k){if(k>=48&&k<=57)return k-48;return-1}t(tt,"fromDecimalCode");function ot(k){switch(k){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
|
|
134
|
-
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}t(ot,"simpleEscapeSequence");function ft(k){if(k<=65535)return String.fromCharCode(k);return String.fromCharCode((k-65536>>10)+55296,(k-65536&1023)+56320)}t(ft,"charFromCodepoint");function dt(k,rt,gt){if(rt==="__proto__")Object.defineProperty(k,rt,{configurable:!0,enumerable:!0,writable:!0,value:gt});else k[rt]=gt}t(dt,"setProperty");let lt=Array(256),N=Array(256);for(let k=0;k<256;k++)lt[k]=ot(k)?1:0,N[k]=ot(k);function K(k,rt){this.input=k,this.filename=rt.filename||null,this.schema=rt.schema||s,this.onWarning=rt.onWarning||null,this.legacy=rt.legacy||!1,this.json=rt.json||!1,this.listener=rt.listener||null,this.maxDepth=typeof rt.maxDepth==="number"?rt.maxDepth:100,this.maxTotalMergeKeys=typeof rt.maxTotalMergeKeys==="number"?rt.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=k.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}t(K,"State");function et(k,rt){let gt={name:k.filename,buffer:k.input.slice(0,-1),position:k.position,line:k.line,column:k.position-k.lineStart};return gt.snippet=i(gt),new e(rt,gt)}t(et,"generateError");function U(k,rt){throw et(k,rt)}t(U,"throwError");function ut(k,rt){if(k.onWarning)k.onWarning.call(null,et(k,rt))}t(ut,"throwWarning");function ct(k,rt,gt){let xt=k.anchorMapTransactions;if(xt.length!==0){let pt=xt[xt.length-1];if(!o.call(pt,rt))pt[rt]={existed:o.call(k.anchorMap,rt),value:k.anchorMap[rt]}}k.anchorMap[rt]=gt}t(ct,"storeAnchor");function _t(k){k.anchorMapTransactions.push(Object.create(null))}t(_t,"beginAnchorTransaction");function Lt(k){let rt=k.anchorMapTransactions.pop(),gt=k.anchorMapTransactions;if(gt.length===0)return;let xt=gt[gt.length-1],pt=Object.keys(rt);for(let Bt=0,I=pt.length;Bt<I;Bt+=1){let at=pt[Bt];if(!o.call(xt,at))xt[at]=rt[at]}}t(Lt,"commitAnchorTransaction");function jt(k){let rt=k.anchorMapTransactions.pop(),gt=Object.keys(rt);for(let xt=gt.length-1;xt>=0;xt-=1){let pt=rt[gt[xt]];if(pt.existed)k.anchorMap[gt[xt]]=pt.value;else delete k.anchorMap[gt[xt]]}}t(jt,"rollbackAnchorTransaction");function Ut(k){return{position:k.position,line:k.line,lineStart:k.lineStart,lineIndent:k.lineIndent,firstTabInLine:k.firstTabInLine,tag:k.tag,anchor:k.anchor,kind:k.kind,result:k.result}}t(Ut,"snapshotState");function Qt(k,rt){k.position=rt.position,k.line=rt.line,k.lineStart=rt.lineStart,k.lineIndent=rt.lineIndent,k.firstTabInLine=rt.firstTabInLine,k.tag=rt.tag,k.anchor=rt.anchor,k.kind=rt.kind,k.result=rt.result}t(Qt,"restoreState");let re={YAML:t(function(rt,gt,xt){if(rt.version!==null)U(rt,"duplication of %YAML directive");if(xt.length!==1)U(rt,"YAML directive accepts exactly one argument");let pt=/^([0-9]+)\.([0-9]+)$/.exec(xt[0]);if(pt===null)U(rt,"ill-formed argument of the YAML directive");let Bt=parseInt(pt[1],10),I=parseInt(pt[2],10);if(Bt!==1)U(rt,"unacceptable YAML version of the document");if(rt.version=xt[0],rt.checkLineBreaks=I<2,I!==1&&I!==2)ut(rt,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(rt,gt,xt){let pt;if(xt.length!==2)U(rt,"TAG directive accepts exactly two arguments");let Bt=xt[0];if(pt=xt[1],!T.test(Bt))U(rt,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(rt.tagMap,Bt))U(rt,'there is a previously declared suffix for "'+Bt+'" tag handle');if(!B.test(pt))U(rt,"ill-formed tag prefix (second argument) of the TAG directive");try{pt=decodeURIComponent(pt)}catch(I){U(rt,"tag prefix is malformed: "+pt)}rt.tagMap[Bt]=pt},"handleTagDirective")};function Dt(k,rt,gt,xt){if(rt<gt){let pt=k.input.slice(rt,gt);if(xt)for(let Bt=0,I=pt.length;Bt<I;Bt+=1){let at=pt.charCodeAt(Bt);if(!(at===9||at>=32&&at<=1114111))U(k,"expected valid JSON character")}else if(x.test(pt))U(k,"the stream contains non-printable characters");k.result+=pt}}t(Dt,"captureSegment");function Et(k,rt,gt,xt){if(!r.isObject(gt))U(k,"cannot merge mappings; the provided source object is unacceptable");let pt=Object.keys(gt);for(let Bt=0,I=pt.length;Bt<I;Bt+=1){let at=pt[Bt];if(k.maxTotalMergeKeys!==-1&&++k.totalMergeKeys>k.maxTotalMergeKeys)U(k,"merge keys exceeded maxTotalMergeKeys ("+k.maxTotalMergeKeys+")");if(!o.call(rt,at))dt(rt,at,gt[at]),xt[at]=!0}}t(Et,"mergeMappings");function Wt(k,rt,gt,xt,pt,Bt,I,at,kt){if(Array.isArray(pt)){pt=Array.prototype.slice.call(pt);for(let mt=0,yt=pt.length;mt<yt;mt+=1){if(Array.isArray(pt[mt]))U(k,"nested arrays are not supported inside keys");if(typeof pt==="object"&&_(pt[mt])==="[object Object]")pt[mt]="[object Object]"}}if(typeof pt==="object"&&_(pt)==="[object Object]")pt="[object Object]";if(pt=String(pt),rt===null)rt={};if(xt==="tag:yaml.org,2002:merge")if(Array.isArray(Bt))for(let mt=0,yt=Bt.length;mt<yt;mt+=1)Et(k,rt,Bt[mt],gt);else Et(k,rt,Bt,gt);else{if(!k.json&&!o.call(gt,pt)&&o.call(rt,pt))k.line=I||k.line,k.lineStart=at||k.lineStart,k.position=kt||k.position,U(k,"duplicated mapping key");dt(rt,pt,Bt),delete gt[pt]}return rt}t(Wt,"storeMappingPair");function Xt(k){let rt=k.input.charCodeAt(k.position);if(rt===10)k.position++;else if(rt===13){if(k.position++,k.input.charCodeAt(k.position)===10)k.position++}else U(k,"a line break is expected");k.line+=1,k.lineStart=k.position,k.firstTabInLine=-1}t(Xt,"readLineBreak");function zt(k,rt,gt){let xt=0,pt=k.input.charCodeAt(k.position);while(pt!==0){while(E(pt)){if(pt===9&&k.firstTabInLine===-1)k.firstTabInLine=k.position;pt=k.input.charCodeAt(++k.position)}if(rt&&pt===35)do pt=k.input.charCodeAt(++k.position);while(pt!==10&&pt!==13&&pt!==0);if(v(pt)){Xt(k),pt=k.input.charCodeAt(k.position),xt++,k.lineIndent=0;while(pt===32)k.lineIndent++,pt=k.input.charCodeAt(++k.position)}else break}if(gt!==-1&&xt!==0&&k.lineIndent<gt)ut(k,"deficient indentation");return xt}t(zt,"skipSeparationSpace");function he(k){let rt=k.position,gt=k.input.charCodeAt(rt);if((gt===45||gt===46)&>===k.input.charCodeAt(rt+1)&>===k.input.charCodeAt(rt+2)){if(rt+=3,gt=k.input.charCodeAt(rt),gt===0||D(gt))return!0}return!1}t(he,"testDocumentSeparator");function le(k,rt){if(rt===1)k.result+=" ";else if(rt>1)k.result+=r.repeat(`
|
|
135
|
-
`,rt-1)}t(le,"writeFoldedLines");function rr(k,rt,gt){let xt,pt,Bt,I,at,kt,{kind:mt,result:yt}=k,St=k.input.charCodeAt(k.position);if(D(St)||P(St)||St===35||St===38||St===42||St===33||St===124||St===62||St===39||St===34||St===37||St===64||St===96)return!1;if(St===63||St===45){let Ct=k.input.charCodeAt(k.position+1);if(D(Ct)||gt&&P(Ct))return!1}k.kind="scalar",k.result="",xt=pt=k.position,Bt=!1;while(St!==0){if(St===58){let Ct=k.input.charCodeAt(k.position+1);if(D(Ct)||gt&&P(Ct))break}else if(St===35){let Ct=k.input.charCodeAt(k.position-1);if(D(Ct))break}else if(k.position===k.lineStart&&he(k)||gt&&P(St))break;else if(v(St))if(I=k.line,at=k.lineStart,kt=k.lineIndent,zt(k,!1,-1),k.lineIndent>=rt){Bt=!0,St=k.input.charCodeAt(k.position);continue}else{k.position=pt,k.line=I,k.lineStart=at,k.lineIndent=kt;break}if(Bt)Dt(k,xt,pt,!1),le(k,k.line-I),xt=pt=k.position,Bt=!1;if(!E(St))pt=k.position+1;St=k.input.charCodeAt(++k.position)}if(Dt(k,xt,pt,!1),k.result)return!0;return k.kind=mt,k.result=yt,!1}t(rr,"readPlainScalar");function Or(k,rt){let gt,xt,pt=k.input.charCodeAt(k.position);if(pt!==39)return!1;k.kind="scalar",k.result="",k.position++,gt=xt=k.position;while((pt=k.input.charCodeAt(k.position))!==0)if(pt===39)if(Dt(k,gt,k.position,!0),pt=k.input.charCodeAt(++k.position),pt===39)gt=k.position,k.position++,xt=k.position;else return!0;else if(v(pt))Dt(k,gt,xt,!0),le(k,zt(k,!1,rt)),gt=xt=k.position;else if(k.position===k.lineStart&&he(k))U(k,"unexpected end of the document within a single quoted scalar");else if(k.position++,!E(pt))xt=k.position;U(k,"unexpected end of the stream within a single quoted scalar")}t(Or,"readSingleQuotedScalar");function He(k,rt){let gt,xt,pt,Bt=k.input.charCodeAt(k.position);if(Bt!==34)return!1;k.kind="scalar",k.result="",k.position++,gt=xt=k.position;while((Bt=k.input.charCodeAt(k.position))!==0)if(Bt===34)return Dt(k,gt,k.position,!0),k.position++,!0;else if(Bt===92){if(Dt(k,gt,k.position,!0),Bt=k.input.charCodeAt(++k.position),v(Bt))zt(k,!1,rt);else if(Bt<256&<[Bt])k.result+=N[Bt],k.position++;else if((pt=Q(Bt))>0){let I=pt,at=0;for(;I>0;I--)if(Bt=k.input.charCodeAt(++k.position),(pt=Z(Bt))>=0)at=(at<<4)+pt;else U(k,"expected hexadecimal character");k.result+=ft(at),k.position++}else U(k,"unknown escape sequence");gt=xt=k.position}else if(v(Bt))Dt(k,gt,xt,!0),le(k,zt(k,!1,rt)),gt=xt=k.position;else if(k.position===k.lineStart&&he(k))U(k,"unexpected end of the document within a double quoted scalar");else if(k.position++,!E(Bt))xt=k.position;U(k,"unexpected end of the stream within a double quoted scalar")}t(He,"readDoubleQuotedScalar");function ki(k,rt){let gt=!0,xt,pt,Bt,I=k.tag,at,kt=k.anchor,mt,yt,St,Ct,$t=Object.create(null),Mt,Rt,Nt,oe=k.input.charCodeAt(k.position);if(oe===91)mt=93,Ct=!1,at=[];else if(oe===123)mt=125,Ct=!0,at={};else return!1;if(k.anchor!==null)ct(k,k.anchor,at);oe=k.input.charCodeAt(++k.position);while(oe!==0){if(zt(k,!0,rt),oe=k.input.charCodeAt(k.position),oe===mt)return k.position++,k.tag=I,k.anchor=kt,k.kind=Ct?"mapping":"sequence",k.result=at,!0;else if(!gt)U(k,"missed comma between flow collection entries");else if(oe===44)U(k,"expected the node content, but found ','");if(Rt=Mt=Nt=null,yt=St=!1,oe===63){let ce=k.input.charCodeAt(k.position+1);if(D(ce))yt=St=!0,k.position++,zt(k,!0,rt)}if(xt=k.line,pt=k.lineStart,Bt=k.position,Pe(k,rt,a,!1,!0),Rt=k.tag,Mt=k.result,zt(k,!0,rt),oe=k.input.charCodeAt(k.position),(St||k.line===xt)&&oe===58)yt=!0,oe=k.input.charCodeAt(++k.position),zt(k,!0,rt),Pe(k,rt,a,!1,!0),Nt=k.result;if(Ct)Wt(k,at,$t,Rt,Mt,Nt,xt,pt,Bt);else if(yt)at.push(Wt(k,null,$t,Rt,Mt,Nt,xt,pt,Bt));else at.push(Mt);if(zt(k,!0,rt),oe=k.input.charCodeAt(k.position),oe===44)gt=!0,oe=k.input.charCodeAt(++k.position);else gt=!1}U(k,"unexpected end of the stream within a flow collection")}t(ki,"readFlowCollection");function wi(k,rt){let gt,xt=f,pt=!1,Bt=!1,I=rt,at=0,kt=!1,mt,yt=k.input.charCodeAt(k.position);if(yt===124)gt=!1;else if(yt===62)gt=!0;else return!1;k.kind="scalar",k.result="";while(yt!==0)if(yt=k.input.charCodeAt(++k.position),yt===43||yt===45)if(f===xt)xt=yt===43?p:u;else U(k,"repeat of a chomping mode identifier");else if((mt=tt(yt))>=0)if(mt===0)U(k,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Bt)I=rt+mt-1,Bt=!0;else U(k,"repeat of an indentation width identifier");else break;if(E(yt)){do yt=k.input.charCodeAt(++k.position);while(E(yt));if(yt===35)do yt=k.input.charCodeAt(++k.position);while(!v(yt)&&yt!==0)}while(yt!==0){Xt(k),k.lineIndent=0,yt=k.input.charCodeAt(k.position);while((!Bt||k.lineIndent<I)&&yt===32)k.lineIndent++,yt=k.input.charCodeAt(++k.position);if(!Bt&&k.lineIndent>I)I=k.lineIndent;if(v(yt)){at++;continue}if(!Bt&&I===0)U(k,"missing indentation for block scalar");if(k.lineIndent<I){if(xt===p)k.result+=r.repeat(`
|
|
136
|
-
`,pt?1+at:at);else if(xt===f){if(pt)k.result+=`
|
|
137
|
-
`}break}if(gt)if(E(yt))kt=!0,k.result+=r.repeat(`
|
|
138
|
-
`,pt?1+at:at);else if(kt)kt=!1,k.result+=r.repeat(`
|
|
139
|
-
`,at+1);else if(at===0){if(pt)k.result+=" "}else k.result+=r.repeat(`
|
|
140
|
-
`,at);else k.result+=r.repeat(`
|
|
141
|
-
`,pt?1+at:at);pt=!0,Bt=!0,at=0;let St=k.position;while(!v(yt)&&yt!==0)yt=k.input.charCodeAt(++k.position);Dt(k,St,k.position,!1)}return!0}t(wi,"readBlockScalar");function Ye(k,rt){let{tag:gt,anchor:xt}=k,pt=[],Bt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)ct(k,k.anchor,pt);let I=k.input.charCodeAt(k.position);while(I!==0){if(k.firstTabInLine!==-1)k.position=k.firstTabInLine,U(k,"tab characters must not be used in indentation");if(I!==45)break;let at=k.input.charCodeAt(k.position+1);if(!D(at))break;if(Bt=!0,k.position++,zt(k,!0,-1)){if(k.lineIndent<=rt){pt.push(null),I=k.input.charCodeAt(k.position);continue}}let kt=k.line;if(Pe(k,rt,n,!1,!0),pt.push(k.result),zt(k,!0,-1),I=k.input.charCodeAt(k.position),(k.line===kt||k.lineIndent>rt)&&I!==0)U(k,"bad indentation of a sequence entry");else if(k.lineIndent<rt)break}if(Bt)return k.tag=gt,k.anchor=xt,k.kind="sequence",k.result=pt,!0;return!1}t(Ye,"readBlockSequence");function Dr(k,rt,gt){let xt,pt,Bt,I,{tag:at,anchor:kt}=k,mt={},yt=Object.create(null),St=null,Ct=null,$t=null,Mt=!1,Rt=!1;if(k.firstTabInLine!==-1)return!1;if(k.anchor!==null)ct(k,k.anchor,mt);let Nt=k.input.charCodeAt(k.position);while(Nt!==0){if(!Mt&&k.firstTabInLine!==-1)k.position=k.firstTabInLine,U(k,"tab characters must not be used in indentation");let oe=k.input.charCodeAt(k.position+1),ce=k.line;if((Nt===63||Nt===58)&&D(oe)){if(Nt===63){if(Mt)Wt(k,mt,yt,St,Ct,null,pt,Bt,I),St=Ct=$t=null;Rt=!0,Mt=!0,xt=!0}else if(Mt)Mt=!1,xt=!0;else U(k,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");k.position+=1,Nt=oe}else{if(pt=k.line,Bt=k.lineStart,I=k.position,!Pe(k,gt,c,!1,!0))break;if(k.line===ce){Nt=k.input.charCodeAt(k.position);while(E(Nt))Nt=k.input.charCodeAt(++k.position);if(Nt===58){if(Nt=k.input.charCodeAt(++k.position),!D(Nt))U(k,"a whitespace character is expected after the key-value separator within a block mapping");if(Mt)Wt(k,mt,yt,St,Ct,null,pt,Bt,I),St=Ct=$t=null;Rt=!0,Mt=!1,xt=!1,St=k.tag,Ct=k.result}else if(Rt)U(k,"can not read an implicit mapping pair; a colon is missed");else return k.tag=at,k.anchor=kt,!0}else if(Rt)U(k,"can not read a block mapping entry; a multiline key may not be an implicit key");else return k.tag=at,k.anchor=kt,!0}if(k.line===ce||k.lineIndent>rt){if(Mt)pt=k.line,Bt=k.lineStart,I=k.position;if(Pe(k,rt,d,!0,xt))if(Mt)Ct=k.result;else $t=k.result;if(!Mt)Wt(k,mt,yt,St,Ct,$t,pt,Bt,I),St=Ct=$t=null;zt(k,!0,-1),Nt=k.input.charCodeAt(k.position)}if((k.line===ce||k.lineIndent>rt)&&Nt!==0)U(k,"bad indentation of a mapping entry");else if(k.lineIndent<rt)break}if(Mt)Wt(k,mt,yt,St,Ct,null,pt,Bt,I);if(Rt)k.tag=at,k.anchor=kt,k.kind="mapping",k.result=mt;return Rt}t(Dr,"readBlockMapping");function Si(k){let rt=!1,gt=!1,xt,pt,Bt=k.input.charCodeAt(k.position);if(Bt!==33)return!1;if(k.tag!==null)U(k,"duplication of a tag property");if(Bt=k.input.charCodeAt(++k.position),Bt===60)rt=!0,Bt=k.input.charCodeAt(++k.position);else if(Bt===33)gt=!0,xt="!!",Bt=k.input.charCodeAt(++k.position);else xt="!";let I=k.position;if(rt){do Bt=k.input.charCodeAt(++k.position);while(Bt!==0&&Bt!==62);if(k.position<k.length)pt=k.input.slice(I,k.position),Bt=k.input.charCodeAt(++k.position);else U(k,"unexpected end of the stream within a verbatim tag")}else{while(Bt!==0&&!D(Bt)){if(Bt===33)if(!gt){if(xt=k.input.slice(I-1,k.position+1),!T.test(xt))U(k,"named tag handle cannot contain such characters");gt=!0,I=k.position+1}else U(k,"tag suffix cannot contain exclamation marks");Bt=k.input.charCodeAt(++k.position)}if(pt=k.input.slice(I,k.position),S.test(pt))U(k,"tag suffix cannot contain flow indicator characters")}if(pt&&!B.test(pt))U(k,"tag name cannot contain such characters: "+pt);try{pt=decodeURIComponent(pt)}catch(at){U(k,"tag name is malformed: "+pt)}if(rt)k.tag=pt;else if(o.call(k.tagMap,xt))k.tag=k.tagMap[xt]+pt;else if(xt==="!")k.tag="!"+pt;else if(xt==="!!")k.tag="tag:yaml.org,2002:"+pt;else U(k,'undeclared tag handle "'+xt+'"');return!0}t(Si,"readTagProperty");function Pr(k){let rt=k.input.charCodeAt(k.position);if(rt!==38)return!1;if(k.anchor!==null)U(k,"duplication of an anchor property");rt=k.input.charCodeAt(++k.position);let gt=k.position;while(rt!==0&&!D(rt)&&!P(rt))rt=k.input.charCodeAt(++k.position);if(k.position===gt)U(k,"name of an anchor node must contain at least one character");return k.anchor=k.input.slice(gt,k.position),!0}t(Pr,"readAnchorProperty");function Rr(k){let rt=k.input.charCodeAt(k.position);if(rt!==42)return!1;rt=k.input.charCodeAt(++k.position);let gt=k.position;while(rt!==0&&!D(rt)&&!P(rt))rt=k.input.charCodeAt(++k.position);if(k.position===gt)U(k,"name of an alias node must contain at least one character");let xt=k.input.slice(gt,k.position);if(!o.call(k.anchorMap,xt))U(k,'unidentified alias "'+xt+'"');return k.result=k.anchorMap[xt],zt(k,!0,-1),!0}t(Rr,"readAlias");function Ti(k,rt,gt,xt){let pt=Ut(k);if(_t(k),Qt(k,rt),k.tag=null,k.anchor=null,k.kind=null,k.result=null,Dr(k,gt,xt)&&k.kind==="mapping")return Lt(k),!0;return jt(k),Qt(k,pt),!1}t(Ti,"tryReadBlockMappingFromProperty");function Pe(k,rt,gt,xt,pt){let Bt,I,at=1,kt=!1,mt=!1,yt=null,St,Ct,$t;if(k.depth>=k.maxDepth)U(k,"nesting exceeded maxDepth ("+k.maxDepth+")");if(k.depth+=1,k.listener!==null)k.listener("open",k);k.tag=null,k.anchor=null,k.kind=null,k.result=null;let Mt=Bt=I=d===gt||n===gt;if(xt){if(zt(k,!0,-1)){if(kt=!0,k.lineIndent>rt)at=1;else if(k.lineIndent===rt)at=0;else if(k.lineIndent<rt)at=-1}}if(at===1)while(!0){let Rt=k.input.charCodeAt(k.position),Nt=Ut(k);if(kt&&(Rt===33&&k.tag!==null||Rt===38&&k.anchor!==null))break;if(!Si(k)&&!Pr(k))break;if(yt===null)yt=Nt;if(zt(k,!0,-1)){if(kt=!0,I=Mt,k.lineIndent>rt)at=1;else if(k.lineIndent===rt)at=0;else if(k.lineIndent<rt)at=-1}else I=!1}if(I)I=kt||pt;if(at===1||d===gt){if(a===gt||c===gt)Ct=rt;else Ct=rt+1;if($t=k.position-k.lineStart,at===1)if(I&&(Ye(k,$t)||Dr(k,$t,Ct))||ki(k,Ct))mt=!0;else{let Rt=k.input.charCodeAt(k.position);if(yt!==null&&Mt&&!I&&Rt!==124&&Rt!==62&&Ti(k,yt,yt.position-yt.lineStart,Ct))mt=!0;else if(Bt&&wi(k,Ct)||Or(k,Ct)||He(k,Ct))mt=!0;else if(Rr(k)){if(mt=!0,k.tag!==null||k.anchor!==null)U(k,"alias node should not have any properties")}else if(rr(k,Ct,a===gt)){if(mt=!0,k.tag===null)k.tag="?"}if(k.anchor!==null)ct(k,k.anchor,k.result)}else if(at===0)mt=I&&Ye(k,$t)}if(k.tag===null){if(k.anchor!==null)ct(k,k.anchor,k.result)}else if(k.tag==="?"){if(k.result!==null&&k.kind!=="scalar")U(k,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+k.kind+'"');for(let Rt=0,Nt=k.implicitTypes.length;Rt<Nt;Rt+=1)if(St=k.implicitTypes[Rt],St.resolve(k.result)){if(k.result=St.construct(k.result),k.tag=St.tag,k.anchor!==null)ct(k,k.anchor,k.result);break}}else if(k.tag!=="!"){if(o.call(k.typeMap[k.kind||"fallback"],k.tag))St=k.typeMap[k.kind||"fallback"][k.tag];else{St=null;let Rt=k.typeMap.multi[k.kind||"fallback"];for(let Nt=0,oe=Rt.length;Nt<oe;Nt+=1)if(k.tag.slice(0,Rt[Nt].tag.length)===Rt[Nt].tag){St=Rt[Nt];break}}if(!St)U(k,"unknown tag !<"+k.tag+">");if(k.result!==null&&St.kind!==k.kind)U(k,"unacceptable node kind for !<"+k.tag+'> tag; it should be "'+St.kind+'", not "'+k.kind+'"');if(!St.resolve(k.result,k.tag))U(k,"cannot resolve a node with !<"+k.tag+"> explicit tag");else if(k.result=St.construct(k.result,k.tag),k.anchor!==null)ct(k,k.anchor,k.result)}if(k.listener!==null)k.listener("close",k);return k.depth-=1,k.tag!==null||k.anchor!==null||mt}t(Pe,"composeNode");function Bi(k){let rt=k.position,gt=!1,xt;k.version=null,k.checkLineBreaks=k.legacy,k.tagMap=Object.create(null),k.anchorMap=Object.create(null);while((xt=k.input.charCodeAt(k.position))!==0){if(zt(k,!0,-1),xt=k.input.charCodeAt(k.position),k.lineIndent>0||xt!==37)break;gt=!0,xt=k.input.charCodeAt(++k.position);let pt=k.position;while(xt!==0&&!D(xt))xt=k.input.charCodeAt(++k.position);let Bt=k.input.slice(pt,k.position),I=[];if(Bt.length<1)U(k,"directive name must not be less than one character in length");while(xt!==0){while(E(xt))xt=k.input.charCodeAt(++k.position);if(xt===35){do xt=k.input.charCodeAt(++k.position);while(xt!==0&&!v(xt));break}if(v(xt))break;pt=k.position;while(xt!==0&&!D(xt))xt=k.input.charCodeAt(++k.position);I.push(k.input.slice(pt,k.position))}if(xt!==0)Xt(k);if(o.call(re,Bt))re[Bt](k,Bt,I);else ut(k,'unknown document directive "'+Bt+'"')}if(zt(k,!0,-1),k.lineIndent===0&&k.input.charCodeAt(k.position)===45&&k.input.charCodeAt(k.position+1)===45&&k.input.charCodeAt(k.position+2)===45)k.position+=3,zt(k,!0,-1);else if(gt)U(k,"directives end mark is expected");if(Pe(k,k.lineIndent-1,d,!1,!0),zt(k,!0,-1),k.checkLineBreaks&&b.test(k.input.slice(rt,k.position)))ut(k,"non-ASCII line breaks are interpreted as content");if(k.documents.push(k.result),k.position===k.lineStart&&he(k)){if(k.input.charCodeAt(k.position)===46)k.position+=3,zt(k,!0,-1);return}if(k.position<k.length-1)U(k,"end of the stream or a document separator is expected")}t(Bi,"readDocument");function qr(k,rt){if(k=String(k),rt=rt||{},k.length!==0){if(k.charCodeAt(k.length-1)!==10&&k.charCodeAt(k.length-1)!==13)k+=`
|
|
142
|
-
`;if(k.charCodeAt(0)===65279)k=k.slice(1)}let gt=new K(k,rt),xt=k.indexOf("\x00");if(xt!==-1)gt.position=xt,U(gt,"null byte is not allowed in input");gt.input+="\x00";while(gt.input.charCodeAt(gt.position)===32)gt.lineIndent+=1,gt.position+=1;while(gt.position<gt.length-1)Bi(gt);return gt.documents}t(qr,"loadDocuments");function Wr(k,rt,gt){if(rt!==null&&typeof rt==="object"&&typeof gt>"u")gt=rt,rt=null;let xt=qr(k,gt);if(typeof rt!=="function")return xt;for(let pt=0,Bt=xt.length;pt<Bt;pt+=1)rt(xt[pt])}t(Wr,"loadAll2");function _i(k,rt){let gt=qr(k,rt);if(gt.length===0)return;else if(gt.length===1)return gt[0];throw new e("expected a single document in the stream, but found more")}return t(_i,"load2"),_s.loadAll=Wr,_s.load=_i,_s}t(qd,"requireLoader");var Rl={},Od;function Wd(){if(Od)return Rl;Od=1;let r=hi(),e=ci(),i=vs(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,p=34,x=35,b=37,S=38,T=39,B=42,_=44,v=45,E=58,D=61,P=62,Z=63,Q=64,tt=91,ot=93,ft=96,dt=123,lt=124,N=125,K={};K[0]="\\0",K[7]="\\a",K[8]="\\b",K[9]="\\t",K[10]="\\n",K[11]="\\v",K[12]="\\f",K[13]="\\r",K[27]="\\e",K[34]="\\\"",K[92]="\\\\",K[133]="\\N",K[160]="\\_",K[8232]="\\L",K[8233]="\\P";let et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],U=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ut(I,at){if(at===null)return{};let kt={},mt=Object.keys(at);for(let yt=0,St=mt.length;yt<St;yt+=1){let Ct=mt[yt],$t=String(at[Ct]);if(Ct.slice(0,2)==="!!")Ct="tag:yaml.org,2002:"+Ct.slice(2);let Mt=I.compiledTypeMap.fallback[Ct];if(Mt&&o.call(Mt.styleAliases,$t))$t=Mt.styleAliases[$t];kt[Ct]=$t}return kt}t(ut,"compileStyleMap");function ct(I){let at,kt,mt=I.toString(16).toUpperCase();if(I<=255)at="x",kt=2;else if(I<=65535)at="u",kt=4;else if(I<=4294967295)at="U",kt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+at+r.repeat("0",kt-mt.length)+mt}t(ct,"encodeHex");let _t=1,Lt=2;function jt(I){this.schema=I.schema||i,this.indent=Math.max(1,I.indent||2),this.noArrayIndent=I.noArrayIndent||!1,this.skipInvalid=I.skipInvalid||!1,this.flowLevel=r.isNothing(I.flowLevel)?-1:I.flowLevel,this.styleMap=ut(this.schema,I.styles||null),this.sortKeys=I.sortKeys||!1,this.lineWidth=I.lineWidth||80,this.noRefs=I.noRefs||!1,this.noCompatMode=I.noCompatMode||!1,this.condenseFlow=I.condenseFlow||!1,this.quotingType=I.quotingType==='"'?Lt:_t,this.forceQuotes=I.forceQuotes||!1,this.replacer=typeof I.replacer==="function"?I.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(jt,"State");function Ut(I,at){let kt=r.repeat(" ",at),mt=0,yt="",St=I.length;while(mt<St){let Ct,$t=I.indexOf(`
|
|
143
|
-
`,mt);if($t===-1)Ct=I.slice(mt),mt=St;else Ct=I.slice(mt,$t+1),mt=$t+1;if(Ct.length&&Ct!==`
|
|
144
|
-
`)yt+=kt;yt+=Ct}return yt}t(Ut,"indentString");function Qt(I,at){return`
|
|
145
|
-
`+r.repeat(" ",I.indent*at)}t(Qt,"generateNextLine");function re(I,at){for(let kt=0,mt=I.implicitTypes.length;kt<mt;kt+=1)if(I.implicitTypes[kt].resolve(at))return!0;return!1}t(re,"testImplicitResolving");function Dt(I){return I===f||I===c}t(Dt,"isWhitespace");function Et(I){return I>=32&&I<=126||I>=161&&I<=55295&&I!==8232&&I!==8233||I>=57344&&I<=65533&&I!==a||I>=65536&&I<=1114111}t(Et,"isPrintable");function Wt(I){return Et(I)&&I!==a&&I!==d&&I!==n}t(Wt,"isNsCharOrWhitespace");function Xt(I,at,kt){let mt=Wt(I),yt=mt&&!Dt(I);return(kt?mt:mt&&I!==_&&I!==tt&&I!==ot&&I!==dt&&I!==N)&&I!==x&&!(at===E&&!yt)||Wt(at)&&!Dt(at)&&I===x||at===E&&yt}t(Xt,"isPlainSafe");function zt(I){return Et(I)&&I!==a&&!Dt(I)&&I!==v&&I!==Z&&I!==E&&I!==_&&I!==tt&&I!==ot&&I!==dt&&I!==N&&I!==x&&I!==S&&I!==B&&I!==u&&I!==lt&&I!==D&&I!==P&&I!==T&&I!==p&&I!==b&&I!==Q&&I!==ft}t(zt,"isPlainSafeFirst");function he(I){return!Dt(I)&&I!==E}t(he,"isPlainSafeLast");function le(I,at){let kt=I.charCodeAt(at),mt;if(kt>=55296&&kt<=56319&&at+1<I.length){if(mt=I.charCodeAt(at+1),mt>=56320&&mt<=57343)return(kt-55296)*1024+mt-56320+65536}return kt}t(le,"codePointAt");function rr(I){return/^\n* /.test(I)}t(rr,"needIndentIndicator");let Or=1,He=2,ki=3,wi=4,Ye=5;function Dr(I,at,kt,mt,yt,St,Ct,$t){let Mt,Rt=0,Nt=null,oe=!1,ce=!1,Tc=mt!==-1,vi=-1,Li=zt(le(I,0))&&he(le(I,I.length-1));if(at||Ct)for(Mt=0;Mt<I.length;Rt>=65536?Mt+=2:Mt++){if(Rt=le(I,Mt),!Et(Rt))return Ye;Li=Li&&Xt(Rt,Nt,$t),Nt=Rt}else{for(Mt=0;Mt<I.length;Rt>=65536?Mt+=2:Mt++){if(Rt=le(I,Mt),Rt===n){if(oe=!0,Tc)ce=ce||Mt-vi-1>mt&&I[vi+1]!==" ",vi=Mt}else if(!Et(Rt))return Ye;Li=Li&&Xt(Rt,Nt,$t),Nt=Rt}ce=ce||Tc&&(Mt-vi-1>mt&&I[vi+1]!==" ")}if(!oe&&!ce){if(Li&&!Ct&&!yt(I))return Or;return St===Lt?Ye:He}if(kt>9&&rr(I))return Ye;if(!Ct)return ce?wi:ki;return St===Lt?Ye:He}t(Dr,"chooseScalarStyle");function Si(I,at,kt,mt,yt){I.dump=function(){if(at.length===0)return I.quotingType===Lt?'""':"''";if(!I.noCompatMode){if(et.indexOf(at)!==-1||U.test(at))return I.quotingType===Lt?'"'+at+'"':"'"+at+"'"}let St=I.indent*Math.max(1,kt),Ct=I.lineWidth===-1?-1:Math.max(Math.min(I.lineWidth,40),I.lineWidth-St),$t=mt||I.flowLevel>-1&&kt>=I.flowLevel;function Mt(Rt){return re(I,Rt)}switch(t(Mt,"testAmbiguity"),Dr(at,$t,I.indent,Ct,Mt,I.quotingType,I.forceQuotes&&!mt,yt)){case Or:return at;case He:return"'"+at.replace(/'/g,"''")+"'";case ki:return"|"+Pr(at,I.indent)+Rr(Ut(at,St));case wi:return">"+Pr(at,I.indent)+Rr(Ut(Ti(at,Ct),St));case Ye:return'"'+Bi(at)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(Si,"writeScalar");function Pr(I,at){let kt=rr(I)?String(at):"",mt=I[I.length-1]===`
|
|
146
|
-
`,St=mt&&(I[I.length-2]===`
|
|
147
|
-
`||I===`
|
|
148
|
-
`)?"+":mt?"":"-";return kt+St+`
|
|
149
|
-
`}t(Pr,"blockHeader");function Rr(I){return I[I.length-1]===`
|
|
150
|
-
`?I.slice(0,-1):I}t(Rr,"dropEndingNewline");function Ti(I,at){let kt=/(\n+)([^\n]*)/g,mt=function(){let $t=I.indexOf(`
|
|
151
|
-
`);return $t=$t!==-1?$t:I.length,kt.lastIndex=$t,Pe(I.slice(0,$t),at)}(),yt=I[0]===`
|
|
152
|
-
`||I[0]===" ",St,Ct;while(Ct=kt.exec(I)){let $t=Ct[1],Mt=Ct[2];St=Mt[0]===" ",mt+=$t+(!yt&&!St&&Mt!==""?`
|
|
153
|
-
`:"")+Pe(Mt,at),yt=St}return mt}t(Ti,"foldString");function Pe(I,at){if(I===""||I[0]===" ")return I;let kt=/ [^ ]/g,mt,yt=0,St,Ct=0,$t=0,Mt="";while(mt=kt.exec(I)){if($t=mt.index,$t-yt>at)St=Ct>yt?Ct:$t,Mt+=`
|
|
154
|
-
`+I.slice(yt,St),yt=St+1;Ct=$t}if(Mt+=`
|
|
155
|
-
`,I.length-yt>at&&Ct>yt)Mt+=I.slice(yt,Ct)+`
|
|
156
|
-
`+I.slice(Ct+1);else Mt+=I.slice(yt);return Mt.slice(1)}t(Pe,"foldLine");function Bi(I){let at="",kt=0;for(let mt=0;mt<I.length;kt>=65536?mt+=2:mt++){kt=le(I,mt);let yt=K[kt];if(!yt&&Et(kt)){if(at+=I[mt],kt>=65536)at+=I[mt+1]}else at+=yt||ct(kt)}return at}t(Bi,"escapeString");function qr(I,at,kt){let mt="",yt=I.tag;for(let St=0,Ct=kt.length;St<Ct;St+=1){let $t=kt[St];if(I.replacer)$t=I.replacer.call(kt,String(St),$t);if(gt(I,at,$t,!1,!1)||typeof $t>"u"&>(I,at,null,!1,!1)){if(mt!=="")mt+=","+(!I.condenseFlow?" ":"");mt+=I.dump}}I.tag=yt,I.dump="["+mt+"]"}t(qr,"writeFlowSequence");function Wr(I,at,kt,mt){let yt="",St=I.tag;for(let Ct=0,$t=kt.length;Ct<$t;Ct+=1){let Mt=kt[Ct];if(I.replacer)Mt=I.replacer.call(kt,String(Ct),Mt);if(gt(I,at+1,Mt,!0,!0,!1,!0)||typeof Mt>"u"&>(I,at+1,null,!0,!0,!1,!0)){if(!mt||yt!=="")yt+=Qt(I,at);if(I.dump&&n===I.dump.charCodeAt(0))yt+="-";else yt+="- ";yt+=I.dump}}I.tag=St,I.dump=yt||"[]"}t(Wr,"writeBlockSequence");function _i(I,at,kt){let mt="",yt=I.tag,St=Object.keys(kt);for(let Ct=0,$t=St.length;Ct<$t;Ct+=1){let Mt="";if(mt!=="")Mt+=", ";if(I.condenseFlow)Mt+='"';let Rt=St[Ct],Nt=kt[Rt];if(I.replacer)Nt=I.replacer.call(kt,Rt,Nt);if(!gt(I,at,Rt,!1,!1))continue;if(I.dump.length>1024)Mt+="? ";if(Mt+=I.dump+(I.condenseFlow?'"':"")+":"+(I.condenseFlow?"":" "),!gt(I,at,Nt,!1,!1))continue;Mt+=I.dump,mt+=Mt}I.tag=yt,I.dump="{"+mt+"}"}t(_i,"writeFlowMapping");function k(I,at,kt,mt){let yt="",St=I.tag,Ct=Object.keys(kt);if(I.sortKeys===!0)Ct.sort();else if(typeof I.sortKeys==="function")Ct.sort(I.sortKeys);else if(I.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let $t=0,Mt=Ct.length;$t<Mt;$t+=1){let Rt="";if(!mt||yt!=="")Rt+=Qt(I,at);let Nt=Ct[$t],oe=kt[Nt];if(I.replacer)oe=I.replacer.call(kt,Nt,oe);if(!gt(I,at+1,Nt,!0,!0,!0))continue;let ce=I.tag!==null&&I.tag!=="?"||I.dump&&I.dump.length>1024;if(ce)if(I.dump&&n===I.dump.charCodeAt(0))Rt+="?";else Rt+="? ";if(Rt+=I.dump,ce)Rt+=Qt(I,at);if(!gt(I,at+1,oe,!0,ce))continue;if(I.dump&&n===I.dump.charCodeAt(0))Rt+=":";else Rt+=": ";Rt+=I.dump,yt+=Rt}I.tag=St,I.dump=yt||"{}"}t(k,"writeBlockMapping");function rt(I,at,kt){let mt=kt?I.explicitTypes:I.implicitTypes;for(let yt=0,St=mt.length;yt<St;yt+=1){let Ct=mt[yt];if((Ct.instanceOf||Ct.predicate)&&(!Ct.instanceOf||typeof at==="object"&&at instanceof Ct.instanceOf)&&(!Ct.predicate||Ct.predicate(at))){if(kt)if(Ct.multi&&Ct.representName)I.tag=Ct.representName(at);else I.tag=Ct.tag;else I.tag="?";if(Ct.represent){let $t=I.styleMap[Ct.tag]||Ct.defaultStyle,Mt;if(s.call(Ct.represent)==="[object Function]")Mt=Ct.represent(at,$t);else if(o.call(Ct.represent,$t))Mt=Ct.represent[$t](at,$t);else throw new e("!<"+Ct.tag+'> tag resolver accepts not "'+$t+'" style');I.dump=Mt}return!0}}return!1}t(rt,"detectType");function gt(I,at,kt,mt,yt,St,Ct){if(I.tag=null,I.dump=kt,!rt(I,kt,!1))rt(I,kt,!0);let $t=s.call(I.dump),Mt=mt;if(mt)mt=I.flowLevel<0||I.flowLevel>at;let Rt=$t==="[object Object]"||$t==="[object Array]",Nt,oe;if(Rt)Nt=I.duplicates.indexOf(kt),oe=Nt!==-1;if(I.tag!==null&&I.tag!=="?"||oe||I.indent!==2&&at>0)yt=!1;if(oe&&I.usedDuplicates[Nt])I.dump="*ref_"+Nt;else{if(Rt&&oe&&!I.usedDuplicates[Nt])I.usedDuplicates[Nt]=!0;if($t==="[object Object]"){if(mt&&Object.keys(I.dump).length!==0){if(k(I,at,I.dump,yt),oe)I.dump="&ref_"+Nt+I.dump}else if(_i(I,at,I.dump),oe)I.dump="&ref_"+Nt+" "+I.dump}else if($t==="[object Array]"){if(mt&&I.dump.length!==0){if(I.noArrayIndent&&!Ct&&at>0)Wr(I,at-1,I.dump,yt);else Wr(I,at,I.dump,yt);if(oe)I.dump="&ref_"+Nt+I.dump}else if(qr(I,at,I.dump),oe)I.dump="&ref_"+Nt+" "+I.dump}else if($t==="[object String]"){if(I.tag!=="?")Si(I,I.dump,at,St,Mt)}else if($t==="[object Undefined]")return!1;else{if(I.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+$t)}if(I.tag!==null&&I.tag!=="?"){let ce=encodeURI(I.tag[0]==="!"?I.tag.slice(1):I.tag).replace(/!/g,"%21");if(I.tag[0]==="!")ce="!"+ce;else if(ce.slice(0,18)==="tag:yaml.org,2002:")ce="!!"+ce.slice(18);else ce="!<"+ce+">";I.dump=ce+" "+I.dump}}return!0}t(gt,"writeNode");function xt(I,at){let kt=[],mt=[];pt(I,kt,mt);let yt=mt.length;for(let St=0;St<yt;St+=1)at.duplicates.push(kt[mt[St]]);at.usedDuplicates=Array(yt)}t(xt,"getDuplicateReferences");function pt(I,at,kt){if(I!==null&&typeof I==="object"){let mt=at.indexOf(I);if(mt!==-1){if(kt.indexOf(mt)===-1)kt.push(mt)}else if(at.push(I),Array.isArray(I))for(let yt=0,St=I.length;yt<St;yt+=1)pt(I[yt],at,kt);else{let yt=Object.keys(I);for(let St=0,Ct=yt.length;St<Ct;St+=1)pt(I[yt[St]],at,kt)}}}t(pt,"inspectNode");function Bt(I,at){at=at||{};let kt=new jt(at);if(!kt.noRefs)xt(I,kt);let mt=I;if(kt.replacer)mt=kt.replacer.call({"":mt},"",mt);if(gt(kt,0,mt,!0,!0))return kt.dump+`
|
|
157
|
-
`;return""}return t(Bt,"dump2"),Rl.dump=Bt,Rl}t(Wd,"requireDumper");var Dd;function Nd(){if(Dd)return Be;Dd=1;let r=qd(),e=Wd();function i(s,o){return function(){throw Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return t(i,"renamed"),Be.Type=_e(),Be.Schema=ql(),Be.FAILSAFE_SCHEMA=Hl(),Be.JSON_SCHEMA=Gl(),Be.CORE_SCHEMA=Vl(),Be.DEFAULT_SCHEMA=vs(),Be.load=r.load,Be.loadAll=r.loadAll,Be.dump=e.dump,Be.YAMLException=ci(),Be.types={binary:Ql(),float:Xl(),map:zl(),null:Yl(),pairs:ih(),set:oh(),timestamp:Kl(),bool:jl(),int:Ul(),merge:Zl(),omap:Jl(),seq:Nl(),str:Wl()},Be.safeLoad=i("safeLoad","load"),Be.safeLoadAll=i("safeLoadAll","loadAll"),Be.safeDump=i("safeDump","dump"),Be}t(Nd,"requireJsYaml");var JC=Nd(),tb=Pd(JC),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:dr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:pr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=tb;var Wp=t((r,e)=>{let{theme:i,themeVariables:s}=e,{useGradient:o,gradientStart:a,gradientStop:c}=s??{},n=r.attr("id"),d=i?.includes("dark")?"#FFFFFF":"#000000",f=t((p,x,b)=>r.append("defs").append("filter").attr("id",p).attr("height",x).attr("width",x).append("feDropShadow").attr("dx",b).attr("dy",b).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",d),"dropShadow");if(f(`${n}-drop-shadow`,"130%","4"),f(`${n}-drop-shadow-small`,"150%","2"),!o)return;let u=r.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)},"insertLookDefs");var zd=t((r)=>{let{handDrawnSeed:e}=m();return{fill:r,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:0.7,stroke:r,seed:e}},"solidStateFill"),eb=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),Ve=t((r)=>{let e=rb([...r.cssCompiledStyles||[],...r.cssStyles||[],...eb(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),rb=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),ud=t((r)=>r==="color"||r==="font-size"||r==="font-family"||r==="font-weight"||r==="font-style"||r==="text-decoration"||r==="text-align"||r==="text-transform"||r==="line-height"||r==="letter-spacing"||r==="word-spacing"||r==="text-shadow"||r==="text-overflow"||r==="white-space"||r==="word-wrap"||r==="word-break"||r==="overflow-wrap"||r==="hyphens","isLabelStyle"),L=t((r)=>{let{stylesArray:e}=Ve(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(ud(n))i.push(c.join(":")+" !important");else{if(s.push(c.join(":")+" !important"),n.includes("stroke"))o.push(c.join(":")+" !important");if(n==="fill")a.push(c.join(":")+" !important")}}),{labelStyles:i.join(";"),nodeStyles:s.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),vt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=m(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=Ve(r);return Object.assign({roughness:0.7,fill:c.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:c.get("stroke")||o,seed:s,strokeWidth:c.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:ib(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),ib=t((r)=>{if(!r)return[0,0];let e=r.trim().split(/\s+/).map(Number);if(e.length===1){let o=isNaN(e[0])?0:e[0];return[o,o]}let i=isNaN(e[0])?0:e[0],s=isNaN(e[1])?0:e[1];return[i,s]},"getStrokeDashArray");var sh=(r,e,i,s="")=>{let o=r.split(":");if(r.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){let n=o.pop(),d=o.pop(),f={provider:o.length>0?o[0]:s,prefix:d,name:n};return e&&!Ls(f)?null:f}let a=o[0],c=a.split("-");if(c.length>1){let n={provider:s,prefix:c.shift(),name:c.join("-")};return e&&!Ls(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Ls(n,i)?null:n}return null},Ls=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var ob=Object.freeze({left:0,top:0,width:16,height:16}),ui=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),lh=Object.freeze({...ob,...ui}),Hd=Object.freeze({...lh,body:"",hidden:!1});function Yd(r,e){let i={};if(!r.hFlip!==!e.hFlip)i.hFlip=!0;if(!r.vFlip!==!e.vFlip)i.vFlip=!0;let s=((r.rotate||0)+(e.rotate||0))%4;if(s)i.rotate=s;return i}function hh(r,e){let i=Yd(r,e);for(let s in Hd)if(s in ui){if(s in r&&!(s in i))i[s]=ui[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function jd(r,e){let i=r.icons,s=r.aliases||Object.create(null),o=Object.create(null);function a(c){if(i[c])return o[c]=[];if(!(c in o)){o[c]=null;let n=s[c]&&s[c].parent,d=n&&a(n);if(d)o[c]=[n].concat(d)}return o[c]}return(e||Object.keys(i).concat(Object.keys(s))).forEach(a),o}function Ud(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=hh(s[n]||o[n],a)}return c(e),i.forEach(c),hh(r,a)}function ch(r,e){if(r.icons[e])return Ud(r,e,[]);let i=jd(r,[e])[e];return i?Ud(r,e,i):null}var sb=Object.freeze({width:null,height:null}),Xd=Object.freeze({...sb,...ui});var ab=/(-?[0-9.]*[0-9]+[0-9.]*)/g,nb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function uh(r,e,i){if(e===1)return r;if(i=i||100,typeof r==="number")return Math.ceil(r*e*i)/i;if(typeof r!=="string")return r;let s=r.split(ab);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=nb.test(a);while(!0){if(c){let n=parseFloat(a);if(isNaN(n))o.push(a);else o.push(Math.ceil(n*e*i)/i)}else o.push(a);if(a=s.shift(),a===void 0)return o.join("");c=!c}}function lb(r,e="defs"){let i="",s=r.indexOf("<"+e);while(s>=0){let o=r.indexOf(">",s),a=r.indexOf("</"+e);if(o===-1||a===-1)break;let c=r.indexOf(">",a);if(c===-1)break;i+=r.slice(o+1,a).trim(),r=r.slice(0,s).trim()+r.slice(c+1)}return{defs:i,content:r}}function hb(r,e){return r?"<defs>"+r+"</defs>"+e:e}function Gd(r,e,i){let s=lb(r);return hb(s.defs,e+s.content+i)}var cb=(r)=>r==="unset"||r==="undefined"||r==="none";function dh(r,e){let i={...lh,...r},s={...Xd,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((T)=>{let B=[],{hFlip:_,vFlip:v,rotate:E}=T;if(_)if(v)E+=2;else B.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),B.push("scale(-1 1)"),o.top=o.left=0;else if(v)B.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),B.push("scale(1 -1)"),o.top=o.left=0;let D;if(E<0)E-=Math.floor(E/4)*4;switch(E=E%4,E){case 1:D=o.height/2+o.top,B.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:B.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:D=o.width/2+o.left,B.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}if(E%2===1){if(o.left!==o.top)D=o.left,o.left=o.top,o.top=D;if(o.width!==o.height)D=o.width,o.width=o.height,o.height=D}if(B.length)a=Gd(a,'<g transform="'+B.join(" ")+'">',"</g>")});let{width:c,height:n}=s,{width:d,height:f}=o,u,p;if(c===null)p=n===null?"1em":n==="auto"?f:n,u=uh(p,d/f);else u=c==="auto"?d:c,p=n===null?uh(u,f/d):n==="auto"?f:n;let x={},b=(T,B)=>{if(!cb(B))x[T]=B.toString()};b("width",u),b("height",p);let S=[o.left,o.top,d,f];return x.viewBox=S.join(" "),{attributes:x,viewBox:S,body:a}}var ub=/\sid="(\S+)"/g,Vd=new Map;function db(r){r=r.replace(/[0-9]+$/,"")||"a";let e=Vd.get(r)||0;return Vd.set(r,e+1),e?`${r}${e}`:r}function fh(r){let e=[],i;while(i=ub.exec(r))e.push(i[1]);if(!e.length)return r;let s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach((o)=>{let a=db(o),c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),r=r.replace(new RegExp(s,"g"),""),r}function ph(r,e){let i=r.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+r+"</svg>"}var Ng={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},gh=new Map,Kd=new Map,Ji=t((r)=>{for(let e of r){if(!e.name)throw Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(l.debug("Registering icon pack:",e.name),"loader"in e)Kd.set(e.name,e.loader);else if("icons"in e)gh.set(e.name,e.icons);else throw l.error("Invalid icon loader:",e),Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Zd=t(async(r,e)=>{let i=sh(r,!0,e!==void 0);if(!i)throw Error(`Invalid icon name: ${r}`);let s=i.prefix||e;if(!s)throw Error(`Icon name must contain a prefix: ${r}`);let o=gh.get(s);if(!o){let c=Kd.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},gh.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=ch(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Fs=t(async(r)=>{try{return await Zd(r),!0}catch{return!1}},"isIconAvailable"),mr=t(async(r,e,i)=>{let s;try{s=await Zd(r,e?.fallbackPrefix)}catch(c){l.error(c),s=Ng}let o=dh(s,e),a=ph(fh(o.body),{...o.attributes,...i});return ee(a,C())},"getIconSVG");var pf=yn(ul(),1);function Fr(r,e){if(typeof r!=="function"||e!=null&&typeof e!=="function")throw TypeError("Expected a function");let i=function(...s){let o=e?e.apply(this,s):s[0],a=i.cache;if(a.has(o))return a.get(o);let c=r.apply(this,s);return i.cache=a.set(o,c)||a,c};return i.cache=new(Fr.Cache||Map),i}Fr.Cache=Map;function Zi(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function ii(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var Kp="[object RegExp]",hc="[object String]",bc="[object Number]",yc="[object Boolean]",vc="[object Arguments]",Vp="[object Symbol]",Yp="[object Date]",Jp="[object Map]",Zp="[object Set]",Xp="[object Array]";var em="[object ArrayBuffer]",tm="[object Object]";var nm="[object DataView]",rm="[object Uint8Array]",am="[object Uint8ClampedArray]",om="[object Uint16Array]",im="[object Uint32Array]";var sm="[object Int8Array]",lm="[object Int16Array]",cm="[object Int32Array]";var um="[object Float32Array]",dm="[object Float64Array]";function di(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function si(r){return di(r)}function of(){}function sf(r){if(Zi(r))return r;if(Array.isArray(r)||di(r)||r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);let e=Object.getPrototypeOf(r);if(e==null)return Object.assign(Object.create(e),r);let i=e.constructor;if(r instanceof Date||r instanceof Map||r instanceof Set)return new i(r);if(r instanceof RegExp){let s=new i(r);return s.lastIndex=r.lastIndex,s}if(r instanceof DataView)return new i(r.buffer.slice(0));if(r instanceof Error){let s;if(r instanceof AggregateError)s=new i(r.errors,r.message,{cause:r.cause});else s=new i(r.message,{cause:r.cause});return s.stack=r.stack,Object.assign(s,r),s}if(typeof File<"u"&&r instanceof File)return new i([r],r.name,{type:r.type,lastModified:r.lastModified});if(typeof r==="object")return Object.assign(Object.create(e),r);return r}function Ms(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var mh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function kc(r){return typeof mh.Buffer<"u"&&mh.Buffer.isBuffer(r)}function af(r){return r==="__proto__"}function As(r){if(typeof r!=="object")return!1;if(r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){let i=r[Symbol.toStringTag];if(i==null)return!1;if(!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable)return!1;return r.toString()===`[object ${i}]`}let e=r;while(Object.getPrototypeOf(e)!==null)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function nf(r,e){return fi(r,void 0,r,new Map,e)}function fi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(Zi(r))return r;if(s.has(r))return s.get(r);if(Array.isArray(r)){let c=Array(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=fi(r[n],n,i,s,o);if(Object.hasOwn(r,"index"))c.index=r.index;if(Object.hasOwn(r,"input"))c.input=r.input;return c}if(r instanceof Date)return new Date(r.getTime());if(r instanceof RegExp){let c=new RegExp(r.source,r.flags);return c.lastIndex=r.lastIndex,c}if(r instanceof Map){let c=new Map;s.set(r,c);for(let[n,d]of r)c.set(n,fi(d,n,i,s,o));return c}if(r instanceof Set){let c=new Set;s.set(r,c);for(let n of r)c.add(fi(n,void 0,i,s,o));return c}if(kc(r))return r.subarray();if(di(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=fi(r[n],n,i,s,o);return c}if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer)return r.slice(0);if(r instanceof DataView){let c=new DataView(r.buffer.slice(0),r.byteOffset,r.byteLength);return s.set(r,c),De(c,r,i,s,o),c}if(typeof File<"u"&&r instanceof File){let c=new File([r],r.name,{type:r.type});return s.set(r,c),De(c,r,i,s,o),c}if(typeof Blob<"u"&&r instanceof Blob){let c=new Blob([r],{type:r.type});return s.set(r,c),De(c,r,i,s,o),c}if(r instanceof Error){let c=structuredClone(r);return s.set(r,c),c.message=r.message,c.name=r.name,c.stack=r.stack,c.cause=r.cause,c.constructor=r.constructor,De(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),De(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),De(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),De(c,r,i,s,o),c}if(typeof r==="object"&&Bb(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),De(c,r,i,s,o),c}return r}function De(r,e,i=r,s,o){let a=[...Object.keys(e),...Ms(e)];for(let c=0;c<a.length;c++){let n=a[c],d=Object.getOwnPropertyDescriptor(r,n);if(d==null||d.writable)r[n]=fi(e[n],n,i,s,o)}}function Bb(r){switch(ii(r)){case vc:case Xp:case em:case nm:case yc:case Yp:case um:case dm:case sm:case lm:case cm:case Jp:case bc:case tm:case Kp:case Zp:case hc:case Vp:case rm:case am:case om:case im:return!0;default:return!1}}function lf(r,e){return nf(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(ii(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),De(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case bc:case hc:case yc:{let n=new r.constructor(r?.valueOf());return De(n,r),n}case vc:{let n={};return De(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function yh(r){return lf(r)}function dd(r){return r!==null&&typeof r==="object"&&ii(r)==="[object Arguments]"}function yo(r){return typeof r==="object"&&r!==null}function hf(r){return Number.isSafeInteger(r)&&r>=0}function pm(r){return r!=null&&typeof r!=="function"&&hf(r.length)}function cf(r){return yo(r)&&pm(r)}function uf(r,...e){let i=e.slice(0,-1),s=e[e.length-1],o=r;for(let a=0;a<i.length;a++){let c=i[a];o=Es(o,c,s,new Map)}return o}function Es(r,e,i,s){if(Zi(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return sf(s.get(e));if(s.set(e,r),Array.isArray(e)){e=e.slice();for(let a=0;a<e.length;a++)if(!(a in e))e[a]=void 0}let o=[...Object.keys(e),...Ms(e)];for(let a=0;a<o.length;a++){let c=o[a];if(af(c))continue;let n=e[c],d=r[c];if(dd(n))n={...n};if(dd(d))d={...d};if(kc(n))n=yh(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],p=Reflect.ownKeys(d);for(let x=0;x<p.length;x++){let b=p[x];u[b]=d[b]}d=u}else if(cf(d)){let u=[];for(let p=0;p<d.length;p++)u[p]=d[p];d=u}else d=[];let f=i(d,n,c,r,e,s);if(f!==void 0)r[c]=f;else if(Array.isArray(n))r[c]=Es(d,n,i,s);else if(yo(d)&&yo(n)&&(As(d)||As(n)||si(d)||si(n)))r[c]=Es(d,n,i,s);else if(d==null&&As(n))r[c]=Es({},n,i,s);else if(d==null&&si(n))r[c]=yh(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function xh(r,...e){return uf(r,...e,of)}var Qg="",_b={curveBasis:Lr,curveBasisClosed:xs,curveBasisOpen:Cs,curveBumpX:ao,curveBumpY:no,curveBundle:rl,curveCardinalClosed:il,curveCardinalOpen:ol,curveCardinal:ho,curveCatmullRomClosed:al,curveCatmullRomOpen:nl,curveCatmullRom:uo,curveLinear:ya,curveLinearClosed:Ss,curveMonotoneX:fo,curveMonotoneY:po,curveNatural:ni,curveStep:li,curveStepAfter:mo,curveStepBefore:go},vb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Lb=t(function(r,e){let i=gf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);$i(c),s=nt(s,[...c])}else s=i.args;if(!s)return;let o=cc(r,e),a="config";if(s[a]!==void 0){if(o==="flowchart-v2")o="flowchart";s[o]=s[a],delete s[a]}return s},"detectInit"),gf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${vb.source})(?=[}][%]{2}).*
|
|
158
|
-
`,"ig");r=r.trim().replace(i,"").replace(/'/gm,'"'),l.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${r}`);let s,o=[];while((s=Nr.exec(r))!==null){if(s.index===Nr.lastIndex)Nr.lastIndex++;if(s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let a=s[1]?s[1]:s[2],c=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:a,args:c})}}if(o.length===0)return{type:r,args:null};return o.length===1?o[0]:o}catch(i){return l.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${r}'`),{type:void 0,args:null}}},"detectDirective"),XA=t(function(r){return r.replace(Nr,"")},"removeDirectives"),Fb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Is(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return _b[i]??e}t(Is,"interpolateToCurve");function mf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return pf.sanitizeUrl(i);return i}t(mf,"formatUrl");var Mb=t((r,...e)=>{let i=r.split("."),s=i.length-1,o=i[s],a=window;for(let c=0;c<s;c++)if(a=a[i[c]],!a){l.error(`Function name: ${r} not found in window`);return}a[o](...e)},"runFunc");function Ch(r,e){if(!r||!e)return 0;return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}t(Ch,"distance");function yf(r){let e,i=0;r.forEach((o)=>{i+=Ch(o,e),e=o});let s=i/2;return bh(r,s)}t(yf,"traverseEdge");function xf(r){if(r.length===1)return r[0];return yf(r)}t(xf,"calcLabelPosition");var df=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),bh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=Ch(o,i);if(a===0)return i;if(a<s)s-=a;else{let c=s/a;if(c<=0)return i;if(c>=1)return{x:o.x,y:o.y};if(c>0&&c<1)return{x:df((1-c)*i.x+c*o.x,5),y:df((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ab=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=bh(e,25),a=r?10:5,c=Math.atan2(e[0].y-o.y,e[0].x-o.x),n={x:0,y:0};return n.x=Math.sin(c)*a+(e[0].x+o.x)/2,n.y=-Math.cos(c)*a+(e[0].y+o.y)/2,n},"calcCardinalityPosition");function Cf(r,e,i){let s=structuredClone(i);if(l.info("our points",s),e!=="start_left"&&e!=="start_right")s.reverse();let o=25+r,a=bh(s,o),c=10+r*0.5,n=Math.atan2(s[0].y-a.y,s[0].x-a.x),d={x:0,y:0};if(e==="start_left")d.x=Math.sin(n+Math.PI)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n+Math.PI)*c+(s[0].y+a.y)/2;else if(e==="end_right")d.x=Math.sin(n-Math.PI)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n-Math.PI)*c+(s[0].y+a.y)/2-5;else if(e==="end_left")d.x=Math.sin(n)*c+(s[0].x+a.x)/2-5,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2-5;else d.x=Math.sin(n)*c+(s[0].x+a.x)/2,d.y=-Math.cos(n)*c+(s[0].y+a.y)/2;return d}t(Cf,"calcTerminalLabelPosition");function mm(r){let e="",i="";for(let s of r)if(s!==void 0)if(s.startsWith("color:")||s.startsWith("text-align:"))i=i+s+";";else e=e+s+";";return{style:e,labelStyle:i}}t(mm,"getStylesFromArray");var ff=0,Rg=t(()=>(ff++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ff),"generateId");function bf(r){let e="",i="0123456789abcdef",s=i.length;for(let o=0;o<r;o++)e+=i.charAt(Math.floor(Math.random()*s));return e}t(bf,"makeRandomHex");var Lg=t((r)=>bf(r.length),"random"),Eb=t(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),$b=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=$n(e.fontSize),o=r.append("text");if(o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),e.class!==void 0)o.attr("class",e.class);let a=o.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(i),o},"drawSimpleText"),Xi=Fr((r,e,i)=>{if(!r)return r;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),w.hasBreaks(r))return r;let s=r.split(" ").filter(Boolean),o=[],a="";return s.forEach((c,n)=>{let d=Zn(`${c} `,i),f=Zn(a,i);if(d>e){let{hyphenatedStrings:x,remainingWord:b}=Ib(c,e,"-",i);o.push(a,...x),a=b}else if(f+d>=e)o.push(a),a=c;else a=[a,c].filter(Boolean).join(" ");if(n+1===s.length)o.push(a)}),o.filter((c)=>c!=="").join(i.joinWith)},(r,e,i)=>`${r}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),Ib=Fr((r,e,i="-",s)=>{s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},s);let o=[...r],a=[],c="";return o.forEach((n,d)=>{let f=`${c}${n}`;if(Zn(f,s)>=e){let p=d+1,x=o.length===p,b=`${f}${i}`;a.push(x?f:b),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function pd(r,e){return md(r,e).height}t(pd,"calculateTextHeight");function Zn(r,e){return md(r,e).width}t(Zn,"calculateTextWidth");var md=Fr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=$n(i),c=["sans-serif",s],n=r.split(w.lineBreakRegex),d=[],f=h("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let x of c){let b=0,S={width:0,height:0,lineHeight:0};for(let T of n){let B=Eb();B.text=T||Qg;let _=$b(u,B).style("font-size",a).style("font-weight",o).style("font-family",x),v=(_._groups||_)[0][0].getBBox();if(v.width===0&&v.height===0)throw Error("svg element not in render tree");S.width=Math.round(Math.max(S.width,v.width)),b=Math.round(v.height),S.height+=b,S.lineHeight=Math.round(Math.max(S.lineHeight,b))}d.push(S)}u.remove();let p=isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1;return d[p]},(r,e)=>`${r}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Ob=class{constructor(r=!1,e){this.count=0,this.count=e?e.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{t(this,"InitIDGenerator")}},$s,Db=t(function(r){return $s=$s||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$s.innerHTML=r,unescape($s.textContent)},"entityDecode");function fm(r){return"str"in r}t(fm,"isDetailedError");var Pb=t((r,e,i,s)=>{if(!s)return;let o=r.node()?.getBBox();if(!o)return;r.append("text").text(s).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},"insertTitle"),$n=t((r)=>{if(typeof r==="number")return[r,r+"px"];let e=parseInt(r??"",10);if(Number.isNaN(e))return[void 0,void 0];else if(r===String(e))return[e,r+"px"];else return[e,r]},"parseFontSize");function ie(r,e){return xh({},r,e)}t(ie,"cleanAndMerge");var V={assignWithDepth:nt,wrapLabel:Xi,calculateTextHeight:pd,calculateTextWidth:Zn,calculateTextDimensions:md,cleanAndMerge:ie,detectInit:Lb,detectDirective:gf,isSubstringInArray:Fb,interpolateToCurve:Is,calcLabelPosition:xf,calcCardinalityPosition:Ab,calcTerminalLabelPosition:Cf,formatUrl:mf,getStylesFromArray:mm,generateId:Rg,random:Lg,runFunc:Mb,entityDecode:Db,insertTitle:Pb,isLabelCoordinateInPath:kf,parseFontSize:$n,InitIDGenerator:Ob},eh=t(function(r){let e=r;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){let s=i.substring(1,i.length-1);if(/^\+?\d+$/.test(s))return"fl°°"+s+"¶ß";else return"fl°"+s+"¶ß"}),e},"encodeEntities"),Ya=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Rn=t((r,e,{counter:i=0,prefix:s,suffix:o},a)=>{if(a)return a;return`${s?`${s}_`:""}${r}_${e}_${i}${o?`_${o}`:""}`},"getEdgeId");function de(r){return r??null}t(de,"handleUndefinedAttr");function kf(r,e){let i=Math.round(r.x),s=Math.round(r.y),o=e.replace(/(\d+\.\d+)/g,(a)=>Math.round(parseFloat(a)).toString());return o.includes(i.toString())||o.includes(s.toString())}t(kf,"isLabelCoordinateInPath");function wh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ar=wh();function Lf(r){Ar=r}var Bo={exec:()=>null};function ae(r,e=""){let i=typeof r=="string"?r:r.source,s={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Me.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Rb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Me={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:(r)=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:(r)=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},qb=/^(?:[ \t]*(?:\n|$))+/,Wb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_o=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,zb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Sh=/(?:[*+-]|\d{1,9}[.)])/,Ff=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Mf=ae(Ff).replace(/bull/g,Sh).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(),Hb=ae(Ff).replace(/bull/g,Sh).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(),Th=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yb=/^[^\n]+/,Bh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jb=ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ub=ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sh).getRegex(),qs="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",_h=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Xb=ae("^ {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",_h).replace("tag",qs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Af=ae(Th).replace("hr",_o).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",qs).getRegex(),Gb=ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Af).getRegex(),vh={blockquote:Gb,code:Wb,def:jb,fences:Nb,heading:zb,hr:_o,html:Xb,lheading:Mf,list:Ub,newline:qb,paragraph:Af,table:Bo,text:Yb},wf=ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_o).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",qs).getRegex(),Vb={...vh,lheading:Hb,table:wf,paragraph:ae(Th).replace("hr",_o).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wf).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",qs).getRegex()},Kb={...vh,html:ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_h).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:Bo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ae(Th).replace("hr",_o).replace("heading",` *#{1,6} *[^
|
|
159
|
-
]`).replace("lheading",Mf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ef=/^( {2,}|\\)\n(?!\s*$)/,Jb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ws=/[\p{P}\p{S}]/u,Lh=/[\s\p{P}\p{S}]/u,$f=/[^\s\p{P}\p{S}]/u,tk=ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Lh).getRegex(),If=/(?!~)[\p{P}\p{S}]/u,ek=/(?!~)[\s\p{P}\p{S}]/u,rk=/(?:[^\s\p{P}\p{S}]|~)/u,ik=ae(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Rb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Of=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ok=ae(Of,"u").replace(/punct/g,Ws).getRegex(),sk=ae(Of,"u").replace(/punct/g,If).getRegex(),Df="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ak=ae(Df,"gu").replace(/notPunctSpace/g,$f).replace(/punctSpace/g,Lh).replace(/punct/g,Ws).getRegex(),nk=ae(Df,"gu").replace(/notPunctSpace/g,rk).replace(/punctSpace/g,ek).replace(/punct/g,If).getRegex(),lk=ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$f).replace(/punctSpace/g,Lh).replace(/punct/g,Ws).getRegex(),hk=ae(/\\(punct)/,"gu").replace(/punct/g,Ws).getRegex(),ck=ae(/^<(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(),uk=ae(_h).replace("(?:-->|$)","-->").getRegex(),dk=ae("^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",uk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,fk=ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Pf=ae(/^!?\[(label)\]\[(ref)\]/).replace("label",Ds).replace("ref",Bh).getRegex(),Rf=ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bh).getRegex(),pk=ae("reflink|nolink(?!\\()","g").replace("reflink",Pf).replace("nolink",Rf).getRegex(),Sf=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Fh={_backpedal:Bo,anyPunctuation:hk,autolink:ck,blockSkip:ik,br:Ef,code:Qb,del:Bo,emStrongLDelim:ok,emStrongRDelimAst:ak,emStrongRDelimUnd:lk,escape:Zb,link:fk,nolink:Rf,punctuation:tk,reflink:Pf,reflinkSearch:pk,tag:dk,text:Jb,url:Bo},gk={...Fh,link:ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Ds).getRegex(),reflink:ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ds).getRegex()},kh={...Fh,emStrongRDelimAst:nk,emStrongLDelim:sk,url:ae(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Sf).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:ae(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Sf).getRegex()},mk={...kh,br:ae(Ef).replace("{2,}","*").getRegex(),text:ae(kh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Os={normal:vh,gfm:Vb,pedantic:Kb},bo={normal:Fh,gfm:kh,breaks:mk,pedantic:gk},yk={"&":"&","<":"<",">":">",'"':""","'":"'"},Tf=(r)=>yk[r];function Ke(r,e){if(e){if(Me.escapeTest.test(r))return r.replace(Me.escapeReplace,Tf)}else if(Me.escapeTestNoEncode.test(r))return r.replace(Me.escapeReplaceNoEncode,Tf);return r}function Bf(r){try{r=encodeURI(r).replace(Me.percentDecode,"%")}catch{return null}return r}function _f(r,e){let i=r.replace(Me.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(Me.splitPipe),o=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;o<s.length;o++)s[o]=s[o].trim().replace(Me.slashPipe,"|");return s}function So(r,e,i){let s=r.length;if(s===0)return"";let o=0;for(;o<s;){let a=r.charAt(s-o-1);if(a===e&&!i)o++;else if(a!==e&&i)o++;else break}return r.slice(0,s-o)}function xk(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])i++;else if(r[s]===e[1]&&(i--,i<0))return s;return i>0?-2:-1}function vf(r,e,i,s,o){let a=e.href,c=e.title||null,n=r[1].replace(o.other.outputLinkReplace,"$1");s.state.inLink=!0;let d={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:a,title:c,text:n,tokens:s.inlineTokens(n)};return s.state.inLink=!1,d}function Ck(r,e,i){let s=r.match(i.other.indentCodeCompensation);if(s===null)return e;let o=s[1];return e.split(`
|
|
160
|
-
`).map((a)=>{let c=a.match(i.other.beginningSpace);if(c===null)return a;let[n]=c;return n.length>=o.length?a.slice(o.length):a}).join(`
|
|
161
|
-
`)}var Ps=class{options;rules;lexer;constructor(r){this.options=r||Ar}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:So(i,`
|
|
162
|
-
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=Ck(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let s=So(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:So(e[0],`
|
|
163
|
-
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=So(e[0],`
|
|
164
|
-
`).split(`
|
|
165
|
-
`),s="",o="",a=[];for(;i.length>0;){let c=!1,n=[],d;for(d=0;d<i.length;d++)if(this.rules.other.blockquoteStart.test(i[d]))n.push(i[d]),c=!0;else if(!c)n.push(i[d]);else break;i=i.slice(d);let f=n.join(`
|
|
166
|
-
`),u=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
167
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
168
|
-
${f}`:f,o=o?`${o}
|
|
169
|
-
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=p,i.length===0)break;let x=a.at(-1);if(x?.type==="code")break;if(x?.type==="blockquote"){let b=x,S=b.raw+`
|
|
170
|
-
`+i.join(`
|
|
171
|
-
`),T=this.blockquote(S);a[a.length-1]=T,s=s.substring(0,s.length-b.raw.length)+T.raw,o=o.substring(0,o.length-b.text.length)+T.text;break}else if(x?.type==="list"){let b=x,S=b.raw+`
|
|
172
|
-
`+i.join(`
|
|
173
|
-
`),T=this.list(S);a[a.length-1]=T,s=s.substring(0,s.length-x.raw.length)+T.raw,o=o.substring(0,o.length-b.raw.length)+T.raw,i=S.substring(a.at(-1).raw.length).split(`
|
|
174
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),c=!1;for(;r;){let d=!1,f="",u="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;f=e[0],r=r.substring(f.length);let p=e[2].split(`
|
|
175
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,(_)=>" ".repeat(3*_.length)),x=r.split(`
|
|
176
|
-
`,1)[0],b=!p.trim(),S=0;if(this.options.pedantic?(S=2,u=p.trimStart()):b?S=e[1].length+1:(S=e[2].search(this.rules.other.nonSpaceChar),S=S>4?1:S,u=p.slice(S),S+=e[1].length),b&&this.rules.other.blankLine.test(x)&&(f+=x+`
|
|
177
|
-
`,r=r.substring(x.length+1),d=!0),!d){let _=this.rules.other.nextBulletRegex(S),v=this.rules.other.hrRegex(S),E=this.rules.other.fencesBeginRegex(S),D=this.rules.other.headingBeginRegex(S),P=this.rules.other.htmlBeginRegex(S);for(;r;){let Z=r.split(`
|
|
178
|
-
`,1)[0],Q;if(x=Z,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),Q=x):Q=x.replace(this.rules.other.tabCharGlobal," "),E.test(x)||D.test(x)||P.test(x)||_.test(x)||v.test(x))break;if(Q.search(this.rules.other.nonSpaceChar)>=S||!x.trim())u+=`
|
|
179
|
-
`+Q.slice(S);else{if(b||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(p)||D.test(p)||v.test(p))break;u+=`
|
|
180
|
-
`+x}!b&&!x.trim()&&(b=!0),f+=Z+`
|
|
181
|
-
`,r=r.substring(Z.length+1),p=Q.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let T=null,B;this.options.gfm&&(T=this.rules.other.listIsTask.exec(u),T&&(B=T[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!T,checked:B,loose:!1,text:u,tokens:[]}),o.raw+=f}let n=o.items.at(-1);if(n)n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let f=o.items[d].tokens.filter((p)=>p.type==="space"),u=f.length>0&&f.some((p)=>this.rules.other.anyLine.test(p.raw));o.loose=u}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:s,title:o}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=_f(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
182
|
-
`):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?a.align.push("right"):this.rules.other.tableAlignCenter.test(c)?a.align.push("center"):this.rules.other.tableAlignLeft.test(c)?a.align.push("left"):a.align.push(null);for(let c=0;c<i.length;c++)a.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:a.align[c]});for(let c of o)a.rows.push(_f(c,a.header.length).map((n,d)=>({text:n,tokens:this.lexer.inline(n),header:!1,align:a.align[d]})));return a}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
|
|
183
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=So(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=xk(e[2],"()");if(a===-2)return;if(a>-1){let c=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let s=e[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),vf(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return vf(i,o,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i)){let o=[...s[0]].length-1,a,c,n=o,d=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*r.length+o);(s=f.exec(e))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(c=[...a].length,s[3]||s[4]){n+=c;continue}else if((s[5]||s[6])&&o%3&&!((o+c)%3)){d+=c;continue}if(n-=c,n>0)continue;c=Math.min(c,c+n+d);let u=[...s[0]][0].length,p=r.slice(0,o+s.index+u+c);if(Math.min(o,c)%2){let b=p.slice(1,-1);return{type:"em",raw:p,text:b,tokens:this.lexer.inlineTokens(b)}}let x=p.slice(2,-2);return{type:"strong",raw:p,text:x,tokens:this.lexer.inlineTokens(x)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,s;return e[2]==="@"?(i=e[1],s="mailto:"+i):(i=e[1],s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,s;if(e[2]==="@")i=e[0],s="mailto:"+i;else{let o;do o=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(o!==e[0]);i=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},We=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ar,this.options.tokenizer=this.options.tokenizer||new Ps,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 i={other:Me,block:Os.normal,inline:bo.normal};this.options.pedantic?(i.block=Os.pedantic,i.inline=bo.pedantic):this.options.gfm&&(i.block=Os.gfm,this.options.breaks?i.inline=bo.breaks:i.inline=bo.gfm),this.tokenizer.rules=i}static get rules(){return{block:Os,inline:bo}}static lex(e,i){return new r(i).lex(e)}static lexInline(e,i){return new r(i).inlineTokens(e)}lex(e){e=e.replace(Me.carriageReturn,`
|
|
184
|
-
`),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],s=!1){for(this.options.pedantic&&(e=e.replace(Me.tabCharGlobal," ").replace(Me.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some((c)=>(o=c.call({lexer:this},e,i))?(e=e.substring(o.raw.length),i.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=i.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
|
|
185
|
-
`:i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
|
|
186
|
-
`)?"":`
|
|
187
|
-
`)+o.raw,c.text+=`
|
|
188
|
-
`+o.text,this.inlineQueue.at(-1).src=c.text):i.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="paragraph"||c?.type==="text"?(c.raw+=(c.raw.endsWith(`
|
|
189
|
-
`)?"":`
|
|
190
|
-
`)+o.raw,c.text+=`
|
|
191
|
-
`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},i.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),i.push(o);continue}let a=e;if(this.options.extensions?.startBlock){let c=1/0,n=e.slice(1),d;this.options.extensions.startBlock.forEach((f)=>{d=f.call({lexer:this},n),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(a=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let c=i.at(-1);s&&c?.type==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
192
|
-
`)?"":`
|
|
193
|
-
`)+o.raw,c.text+=`
|
|
194
|
-
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o),s=a.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=i.at(-1);c?.type==="text"?(c.raw+=(c.raw.endsWith(`
|
|
195
|
-
`)?"":`
|
|
196
|
-
`)+o.raw,c.text+=`
|
|
197
|
-
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):i.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw Error(c)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let s=e,o=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)a=o[2]?o[2].length:0,s=s.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let c=!1,n="";for(;e;){c||(n=""),c=!1;let d;if(this.options.extensions?.inline?.some((u)=>(d=u.call({lexer:this},e,i))?(e=e.substring(d.raw.length),i.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let u=i.at(-1);d.type==="text"&&u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(d=this.tokenizer.emStrong(e,s,n)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),i.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),i.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),i.push(d);continue}let f=e;if(this.options.extensions?.startInline){let u=1/0,p=e.slice(1),x;this.options.extensions.startInline.forEach((b)=>{x=b.call({lexer:this},p),typeof x=="number"&&x>=0&&(u=Math.min(u,x))}),u<1/0&&u>=0&&(f=e.substring(0,u+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),c=!0;let u=i.at(-1);u?.type==="text"?(u.raw+=d.raw,u.text+=d.text):i.push(d);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw Error(u)}}return i}},Rs=class{options;parser;constructor(r){this.options=r||Ar}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Me.notSpaceStart)?.[0],o=r.replace(Me.endingNewline,"")+`
|
|
198
|
-
`;return s?'<pre><code class="language-'+Ke(s)+'">'+(i?o:Ke(o,!0))+`</code></pre>
|
|
199
|
-
`:"<pre><code>"+(i?o:Ke(o,!0))+`</code></pre>
|
|
200
|
-
`}blockquote({tokens:r}){return`<blockquote>
|
|
201
|
-
${this.parser.parse(r)}</blockquote>
|
|
202
|
-
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
|
|
203
|
-
`}hr(r){return`<hr>
|
|
204
|
-
`}list(r){let{ordered:e,start:i}=r,s="";for(let c=0;c<r.items.length;c++){let n=r.items[c];s+=this.listitem(n)}let o=e?"ol":"ul",a=e&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
|
|
205
|
-
`+s+"</"+o+`>
|
|
206
|
-
`}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+Ke(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
|
|
207
|
-
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
208
|
-
`}table(r){let e="",i="";for(let o=0;o<r.header.length;o++)i+=this.tablecell(r.header[o]);e+=this.tablerow({text:i});let s="";for(let o=0;o<r.rows.length;o++){let a=r.rows[o];i="";for(let c=0;c<a.length;c++)i+=this.tablecell(a[c]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
209
|
-
<thead>
|
|
210
|
-
`+e+`</thead>
|
|
211
|
-
`+s+`</table>
|
|
212
|
-
`}tablerow({text:r}){return`<tr>
|
|
213
|
-
${r}</tr>
|
|
214
|
-
`}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
|
|
215
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Ke(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let s=this.parser.parseInline(i),o=Bf(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ke(e)+'"'),a+=">"+s+"</a>",a}image({href:r,title:e,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=Bf(r);if(o===null)return Ke(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ke(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ke(r.text)}},Mh=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},Ne=class r{options;renderer;textRenderer;constructor(e){this.options=e||Ar,this.options.renderer=this.options.renderer||new Rs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mh}static parse(e,i){return new r(i).parse(e)}static parseInline(e,i){return new r(i).parseInline(e)}parse(e,i=!0){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=a,d=this.options.extensions.renderers[n.type].call({parser:this},n);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){s+=d||"";continue}}let c=a;switch(c.type){case"space":{s+=this.renderer.space(c);continue}case"hr":{s+=this.renderer.hr(c);continue}case"heading":{s+=this.renderer.heading(c);continue}case"code":{s+=this.renderer.code(c);continue}case"table":{s+=this.renderer.table(c);continue}case"blockquote":{s+=this.renderer.blockquote(c);continue}case"list":{s+=this.renderer.list(c);continue}case"html":{s+=this.renderer.html(c);continue}case"def":{s+=this.renderer.def(c);continue}case"paragraph":{s+=this.renderer.paragraph(c);continue}case"text":{let n=c,d=this.renderer.text(n);for(;o+1<e.length&&e[o+1].type==="text";)n=e[++o],d+=`
|
|
216
|
-
`+this.renderer.text(n);i?s+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):s+=d;continue}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}parseInline(e,i=this.renderer){let s="";for(let o=0;o<e.length;o++){let a=e[o];if(this.options.extensions?.renderers?.[a.type]){let n=this.options.extensions.renderers[a.type].call({parser:this},a);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=n||"";continue}}let c=a;switch(c.type){case"escape":{s+=i.text(c);break}case"html":{s+=i.html(c);break}case"link":{s+=i.link(c);break}case"image":{s+=i.image(c);break}case"strong":{s+=i.strong(c);break}case"em":{s+=i.em(c);break}case"codespan":{s+=i.codespan(c);break}case"br":{s+=i.br(c);break}case"del":{s+=i.del(c);break}case"text":{s+=i.text(c);break}default:{let n='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw Error(n)}}}return s}},To=class{options;block;constructor(r){this.options=r||Ar}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?We.lex:We.lexInline}provideParser(){return this.block?Ne.parse:Ne.parseInline}},bk=class{defaults=wh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ne;Renderer=Rs;TextRenderer=Mh;Lexer=We;Tokenizer=Ps;Hooks=To;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let s of r)switch(i=i.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let c of a)i=i.concat(this.walkTokens(c.tokens,e));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,e));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach((a)=>{let c=o[a].flat(1/0);i=i.concat(this.walkTokens(c,e))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach((i)=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach((o)=>{if(!o.name)throw Error("extension name required");if("renderer"in o){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...c){let n=o.renderer.apply(this,c);return n===!1&&(n=a.apply(this,c)),n}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let a=e[o.level];a?a.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),s.extensions=e),i.renderer){let o=this.defaults.renderer||new Rs(this.defaults);for(let a in i.renderer){if(!(a in o))throw Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,n=i.renderer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ps(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,n=i.tokenizer[c],d=o[c];o[c]=(...f)=>{let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new To;for(let a in i.hooks){if(!(a in o))throw Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,n=i.hooks[c],d=o[c];To.passThroughHooks.has(a)?o[c]=(f)=>{if(this.defaults.async&&To.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await n.call(o,f);return d.call(o,p)})();let u=n.call(o,f);return d.call(o,u)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let p=await n.apply(o,f);return p===!1&&(p=await d.apply(o,f)),p})();let u=n.apply(o,f);return u===!1&&(u=d.apply(o,f)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(c){let n=[];return n.push(a.call(this,c)),o&&(n=n.concat(o.call(this,c))),n}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return We.lex(r,e??this.defaults)}parser(r,e){return Ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(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 e>"u"||e===null)return a(Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=r),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(e):e,n=await(o.hooks?await o.hooks.provideLexer():r?We.lex:We.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(n):n;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():r?Ne.parse:Ne.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let c=(o.hooks?o.hooks.provideLexer():r?We.lex:We.lexInline)(e,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let n=(o.hooks?o.hooks.provideParser():r?Ne.parse:Ne.parseInline)(c,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(c){return a(c)}}}onError(r,e){return(i)=>{if(i.message+=`
|
|
217
|
-
Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+Ke(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Mr=new bk;function ne(r,e){return Mr.parse(r,e)}ne.options=ne.setOptions=function(r){return Mr.setOptions(r),ne.defaults=Mr.defaults,Lf(ne.defaults),ne};ne.getDefaults=wh;ne.defaults=Ar;ne.use=function(...r){return Mr.use(...r),ne.defaults=Mr.defaults,Lf(ne.defaults),ne};ne.walkTokens=function(r,e){return Mr.walkTokens(r,e)};ne.parseInline=Mr.parseInline;ne.Parser=Ne;ne.parser=Ne.parse;ne.Renderer=Rs;ne.TextRenderer=Mh;ne.Lexer=We;ne.lexer=We.lex;ne.Tokenizer=Ps;ne.Hooks=To;ne.parse=ne;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=ne;var Cz=Ne.parse,bz=We.lex;function gm(r){var e=[];for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];var s=Array.from(typeof r==="string"?[r]:r);s[s.length-1]=s[s.length-1].replace(/\r?\n([\t ]*)$/,"");var o=s.reduce(function(n,d){var f=d.match(/\n([\t ]+|(?!\s).)/g);if(f)return n.concat(f.map(function(u){var p,x;return(x=(p=u.match(/[\t ]/g))===null||p===void 0?void 0:p.length)!==null&&x!==void 0?x:0}));return n},[]);if(o.length){var a=new RegExp(`
|
|
218
|
-
[ ]{`.concat(Math.min.apply(Math,o),"}"),"g");s=s.map(function(n){return n.replace(a,`
|
|
219
|
-
`)})}s[0]=s[0].replace(/^\r?\n/,"");var c=s[0];return e.forEach(function(n,d){var f=c.match(/(?:^|\n)( *)$/),u=f?f[1]:"",p=n;if(typeof n==="string"&&n.includes(`
|
|
220
|
-
`))p=String(n).split(`
|
|
221
|
-
`).map(function(x,b){return b===0?x:"".concat(u).concat(x)}).join(`
|
|
222
|
-
`);c+=p+s[d+1]}),c}var Eh=typeof performance<"u"&&typeof performance.now==="function",pi=t(()=>Eh?performance.now():0,"now"),Ah="\uD83E\uDDDC ",kk="Mermaid render",wk="Mermaid",Sk={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},$z=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{t(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(r){if(!this.enabled)return;this.roots=[],this.stack=[],this.buckets={},this.begin(r)}tickSync(r,e){if(!this.enabled)return e();let i=pi();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(pi()-i)}}async tick(r,e){if(!this.enabled)return e();let i=pi();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(pi()-i)}}stop(){if(!this.enabled)return;while(this.stack.length>0)this.end();let r=this.roots.at(-1),e=this.runLabel??r?.name;if(r){if(this.records.push({label:e??r.name,tree:r,buckets:{...this.buckets}}),this.records.length>this.maxRecords)this.records.splice(0,this.records.length-this.maxRecords);if(this.autoPrint)this.printSummary(r,e)}return this.runLabel=void 0,r}begin(r){if(!this.enabled)return;let e={name:r,start:pi(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),Eh&&typeof performance.mark==="function")try{performance.mark(`${Ah}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=pi();if(r.duration=e-r.start,Eh&&typeof performance.measure==="function")try{performance.measure(`${Ah}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:kk,trackGroup:wk,color:Sk[r.name]??"primary",tooltipText:`${r.name} — ${r.duration.toFixed(1)} ms`}}})}catch{}}async span(r,e){if(!this.enabled)return e();this.begin(r);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(r=this.report(),e){if(!r)return;let i=r.duration,s=e&&e!==r.name?`${r.name} [${e}]`:r.name,o=["ms % phase"],a=t((n,d)=>{let f=" ".repeat(d),u=n.duration.toFixed(1).padStart(8),p=i>0?`${(n.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${u} ${p} ${f}${n.name}`);for(let x of n.children)a(x,d+1);if(n.children.length>0){let x=n.children.reduce((S,T)=>S+T.duration,0),b=n.duration-x;if(b>0.5){let S=b.toFixed(1).padStart(8);o.push(`${S} ${f} (self)`)}}},"walk");a(r,0);let c=Object.keys(this.buckets);if(c.length>0){o.push("—— buckets (summed) ——");for(let n of c)o.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${Ah}mermaid render profile · ${s}
|
|
223
|
-
${o.join(`
|
|
224
|
-
`)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Wf(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
|
|
225
|
-
`).replace(/\n{2,}/g,`
|
|
226
|
-
`);return gm(s)}t(Wf,"preprocessMarkdown");function Nf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Nf,"nonMarkdownToLines");function Am(r,e={}){let i=Wf(r,e),s=ne.lexer(i),o=[[]],a=0;function c(n,d="normal"){if(n.type==="text")n.text.split(`
|
|
227
|
-
`).forEach((u,p)=>{if(p!==0)a++,o.push([]);u.split(" ").forEach((x)=>{if(x=x.replace(/'/g,"'"),x)o[a].push({content:x,type:d})})});else if(n.type==="strong"||n.type==="em")n.tokens.forEach((f)=>{c(f,n.type)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"})}return t(c,"processNode"),s.forEach((n)=>{if(n.type==="paragraph")n.tokens?.forEach((d)=>{c(d)});else if(n.type==="html")o[a].push({content:n.text,type:"normal"});else o[a].push({content:n.raw,type:"normal"})}),o}t(Am,"markdownToLines");function zf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(zf,"nonMarkdownToHTML");function Hf(r,{markdownAutoWrap:e}={}){let i=ne.lexer(r);function s(o){if(o.type==="text"){if(e===!1)return o.text.replace(/\n */g,"<br/>").replace(/ /g," ");return o.text.replace(/\n */g,"<br/>")}else if(o.type==="strong")return`<strong>${o.tokens?.map(s).join("")}</strong>`;else if(o.type==="em")return`<em>${o.tokens?.map(s).join("")}</em>`;else if(o.type==="paragraph")return`<p>${o.tokens?.map(s).join("")}</p>`;else if(o.type==="space")return"";else if(o.type==="html")return`${o.text}`;else if(o.type==="escape")return o.text;return l.warn(`Unsupported markdown: ${o.type}`),o.raw}return t(s,"output"),i.map(s).join("")}t(Hf,"markdownToHTML");var Tk=function(r){var e=function(){},i=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(f){return setTimeout(f,16)};function s(){var f=this;f.reads=[],f.writes=[],f.raf=i.bind(r),e("initialized",f)}t(s,"FastDom"),s.prototype={constructor:s,runTasks:t(function(f){e("run tasks");var u;while(u=f.shift())u()},"runTasks"),measure:t(function(f,u){e("measure");var p=!u?f:f.bind(u);return this.reads.push(p),o(this),p},"measure"),mutate:t(function(f,u){e("mutate");var p=!u?f:f.bind(u);return this.writes.push(p),o(this),p},"mutate"),clear:t(function(f){return e("clear",f),c(this.reads,f)||c(this.writes,f)},"clear"),extend:t(function(f){if(e("extend",f),typeof f!="object")throw Error("expected object");var u=Object.create(this);if(n(u,f),u.fastdom=this,u.initialize)u.initialize();return u},"extend"),catch:null};function o(f){if(!f.scheduled)f.scheduled=!0,f.raf(a.bind(null,f)),e("flush scheduled")}t(o,"scheduleFlush");function a(f){e("flush");var{writes:u,reads:p}=f,x;try{e("flushing reads",p.length),f.runTasks(p),e("flushing writes",u.length),f.runTasks(u)}catch(b){x=b}if(f.scheduled=!1,p.length||u.length)o(f);if(x)if(e("task errored",x.message),f.catch)f.catch(x);else throw x}t(a,"flush");function c(f,u){var p=f.indexOf(u);return!!~p&&!!f.splice(p,1)}t(c,"remove");function n(f,u){for(var p in u)if(u.hasOwnProperty(p))f[p]=u[p]}t(n,"mixin");var d=r.fastdom=r.fastdom||new s;return d}(typeof window<"u"?window:globalThis),Yf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return $h(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return $h(this,"measure",r,e)},"measure"),clear:t(function(r){var e=this._tasks,i=e.get(r);this.fastdom.clear(i),e.delete(r)},"clear")};function $h(r,e,i,s){var{_tasks:o,fastdom:a}=r,c,n=new Promise(function(d,f){c=a[e](function(){o.delete(n);try{d(s?i.call(s):i())}catch(u){f(u)}},s)});return o.set(n,c),n}t($h,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Yf,Bk=Yf,_k=Tk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Bk),hr=_k;function jf(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(jf,"splitTextToChars");function Uf(r,e){let i=jf(e.content);return Dh(r,[],i,e.type)}t(Uf,"splitWordToFitWidth");function Dh(r,e,i,s){if(i.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[o,...a]=i,c=[...e,o];if(r([{content:c.join(""),type:s}]))return Dh(r,c,a,s);if(e.length===0&&o)e.push(o),i.shift();return[{content:e.join(""),type:s},{content:i.join(""),type:s}]}t(Dh,"splitWordToFitWidthRecursion");function Xf(r,e){if(r.some(({content:i})=>i.includes(`
|
|
228
|
-
`)))throw Error("splitLineToFitWidth does not support newlines in the line");return Ns(r,e)}t(Xf,"splitLineToFitWidth");function Ns(r,e,i=[],s=[]){if(r.length===0){if(s.length>0)i.push(s);return i.length>0?i:[]}let o="";if(r[0].content===" ")o=" ",r.shift();let a=r.shift()??{content:" ",type:"normal"},c=[...s];if(o!=="")c.push({content:o,type:"normal"});if(c.push(a),e(c))return Ns(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=Uf(e,a);if(i.push([n]),d.content)r.unshift(d)}return Ns(r,e,i)}t(Ns,"splitLineToFitWidthRecursion");function Ih(r,e){if(e)r.attr("style",e)}t(Ih,"applyStyle");var qf=16384;async function Gf(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,qf)}px`),n.attr("height",`${Math.min(10*i,qf)}px`);let d=n.append("xhtml:div"),f=Tt(e.label)?await dc(e.label.replace(w.lineBreakRegex,`
|
|
229
|
-
`),a):ee(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",p=d.append("span");if(p.html(f),Ih(p,e.labelStyle),p.attr("class",`${u} ${s}`),Ih(d,e.labelStyle),d.style("display","table-cell"),d.style("white-space","nowrap"),d.style("line-height","1.5"),i!==Number.POSITIVE_INFINITY)d.style("max-width",i+"px"),d.style("text-align","center");if(d.attr("xmlns","http://www.w3.org/1999/xhtml"),o)d.attr("class","labelBkg");let x=await hr.measure(()=>d.node().getBoundingClientRect());if(x.width===i)d.style("display","table"),d.style("white-space","break-spaces"),d.style("width",i+"px");else if(x.width<c)d.style("display","table"),d.style("width",c+"px"),d.style("text-align","center");return n.node()}t(Gf,"addHtmlSpan");function zs(r,e,i,s=!1){let o=r.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*i-0.1+"em").attr("dy",i+"em");if(s)o.attr("text-anchor","middle");return o}t(zs,"createTspan");function Vf(r,e,i){let s=r.append("text"),o=zs(s,1,e);Hs(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(Vf,"computeWidthOfText");function Mg(r,e,i){let s=r.append("text"),o=zs(s,1,e);Hs(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(Mg,"computeDimensionOfText");function Kf(r,e,i,s=!1,o=!1){let c=e.append("g"),n=c.insert("rect").attr("class","background").attr("style","stroke: none"),d=c.append("text").attr("y","-10.1");if(o)d.attr("text-anchor","middle");let f=0;for(let u of i){let p=t((b)=>Vf(c,1.1,b)<=r,"checkWidth"),x=p(u)?[u]:Xf(u,p);for(let b of x){let S=zs(d,f,1.1,o);Hs(S,b),f++}}if(s){let u=d.node().getBBox(),p=2;return n.attr("x",u.x-2).attr("y",u.y-2).attr("width",u.width+4).attr("height",u.height+4),c.node()}else return d.node()}t(Kf,"createFormattedText");function Oh(r){let e=/&(amp|lt|gt);/g;return r.replace(e,(i,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return i}})}t(Oh,"decodeHTMLEntities");function Hs(r,e){r.text(""),e.forEach((i,s)=>{let o=r.append("tspan").attr("font-style",i.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",i.type==="strong"?"bold":"normal");if(s===0)o.text(Oh(i.content));else o.text(" "+Oh(i.content))})}t(Hs,"updateTextContentAndStyles");async function Zf(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Fs(n))return await mr(n,void 0,{class:"label-icon"});else return`<i class='${ee(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(Zf,"replaceIconSubstring");var fn=t(async(r,e="",{style:i="",isTitle:s=!1,classes:o="",useHtmlLabels:a=!0,markdown:c=!0,isNode:n=!0,width:d=200,minWidth:f=0,addSvgBackground:u=!1}={},p)=>{if(l.debug("XYZ createText",e,i,s,o,a,n,"addSvgBackground: ",u),a){let x=c?Hf(e,p):zf(e),b=await Zf(Ya(x),p),S=e.replace(/\\\\/g,"\\"),T={isNode:n,label:Tt(e)?S:b,labelStyle:i.replace("fill:","color:")};return await Gf(r,T,d,o,u,p,f)}else{let x=Ya(e.replace(/<br\s*\/?>/g,"<br/>")),b=c?Am(x.replace("<br>","<br/>"),p):Nf(x),S=Kf(d,r,b,e?u:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).attr("style",T)}else{let T=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");h(S).select("rect").attr("style",T.replace(/background:/g,"fill:"));let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");h(S).select("text").attr("style",B)}if(s)h(S).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else h(S).selectAll("tspan.text-outer-tspan").classed("row",!0);return S}},"createText");var fd=new Set(["redux-color","redux-dark-color"]),vk=12,Lk=64,ht=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),it=t((r,e)=>r!=null&&fd.has(r)&&ht(e),"isColorTheme"),Fk=/^[\w-]+$/,st=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Fk.test(e)?e:"classic"},"safeLook"),Xr=t((r)=>ht(r)?r.length:0,"paletteSlotCount"),Xn=t((r,e)=>{if(ht(e))return Xr(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=Lk?r:vk},"colorSlotCount"),er=t((r,e,i,s)=>{if(e===void 0||!it(i,s))return;let o=e%Xr(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Ph(r,e,i){if(r&&r.length){let[s,o]=e,a=Math.PI/180*i,c=Math.cos(a),n=Math.sin(a);for(let d of r){let[f,u]=d;d[0]=(f-s)*c-(u-o)*n+s,d[1]=(f-s)*n+(u-o)*c+o}}}function Mk(r,e){return r[0]===e[0]&&r[1]===e[1]}function Ak(r,e,i,s=1){let o=i,a=Math.max(e,0.1),c=r[0]&&r[0][0]&&typeof r[0][0]=="number"?[r]:r,n=[0,0];if(o)for(let f of c)Ph(f,n,o);let d=function(f,u,p){let x=[];for(let v of f){let E=[...v];Mk(E[0],E[E.length-1])||E.push([E[0][0],E[0][1]]),E.length>2&&x.push(E)}let b=[];u=Math.max(u,0.1);let S=[];for(let v of x)for(let E=0;E<v.length-1;E++){let D=v[E],P=v[E+1];if(D[1]!==P[1]){let Z=Math.min(D[1],P[1]);S.push({ymin:Z,ymax:Math.max(D[1],P[1]),x:Z===D[1]?D[0]:P[0],islope:(P[0]-D[0])/(P[1]-D[1])})}}if(S.sort((v,E)=>v.ymin<E.ymin?-1:v.ymin>E.ymin?1:v.x<E.x?-1:v.x>E.x?1:v.ymax===E.ymax?0:(v.ymax-E.ymax)/Math.abs(v.ymax-E.ymax)),!S.length)return b;let T=[],B=S[0].ymin,_=0;for(;T.length||S.length;){if(S.length){let v=-1;for(let E=0;E<S.length&&!(S[E].ymin>B);E++)v=E;S.splice(0,v+1).forEach((E)=>{T.push({s:B,edge:E})})}if(T=T.filter((v)=>!(v.edge.ymax<=B)),T.sort((v,E)=>v.edge.x===E.edge.x?0:(v.edge.x-E.edge.x)/Math.abs(v.edge.x-E.edge.x)),(p!==1||_%u==0)&&T.length>1)for(let v=0;v<T.length;v+=2){let E=v+1;if(E>=T.length)break;let D=T[v].edge,P=T[E].edge;b.push([[Math.round(D.x),B],[Math.round(P.x),B]])}B+=p,T.forEach((v)=>{v.edge.x=v.edge.x+p*v.edge.islope}),_++}return b}(c,a,s);if(o){for(let f of c)Ph(f,n,-o);(function(f,u,p){let x=[];f.forEach((b)=>x.push(...b)),Ph(x,u,p)})(d,n,-o)}return d}function Ao(r,e){var i;let s=e.hachureAngle+90,o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,0.1));let a=1;return e.roughness>=1&&(((i=e.randomizer)===null||i===void 0?void 0:i.next())||Math.random())>0.7&&(a=o),Ak(r,o,s,a||1)}class Qs{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=Ao(r,e);return{type:"fillSketch",ops:this.renderLines(i,e)}}renderLines(r,e){let i=[];for(let s of r)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return i}}function Js(r){let e=r[0],i=r[1];return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}class ap extends Qs{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=Ao(r,Object.assign({},e,{hachureGap:i})),o=Math.PI/180*e.hachureAngle,a=[],c=0.5*i*Math.cos(o),n=0.5*i*Math.sin(o);for(let[d,f]of s)Js([d,f])&&a.push([[d[0]-c,d[1]+n],[...f]],[[d[0]+c,d[1]-n],[...f]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class np extends Qs{fillPolygons(r,e){let i=this._fillPolygons(r,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(r,s);return i.ops=i.ops.concat(o.ops),i}}class lp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Ao(r,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(i,e)}dotsOnLines(r,e){let i=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,0.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let a=s/4;for(let c of r){let n=Js(c),d=n/s,f=Math.ceil(d)-1,u=n-f*s,p=(c[0][0]+c[1][0])/2-s/4,x=Math.min(c[0][1],c[1][1]);for(let b=0;b<f;b++){let S=x+u+b*s,T=p-a+2*Math.random()*a,B=S-a+2*Math.random()*a,_=this.helper.ellipse(T,B,o,o,e);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}class hp{constructor(r){this.helper=r}fillPolygons(r,e){let i=Ao(r,e);return{type:"fillSketch",ops:this.dashedLine(i,e)}}dashedLine(r,e){let i=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return r.forEach((a)=>{let c=Js(a),n=Math.floor(c/(i+s)),d=(c+s-n*(i+s))/2,f=a[0],u=a[1];f[0]>u[0]&&(f=a[1],u=a[0]);let p=Math.atan((u[1]-f[1])/(u[0]-f[0]));for(let x=0;x<n;x++){let b=x*(i+s),S=b+i,T=[f[0]+b*Math.cos(p)+d*Math.cos(p),f[1]+b*Math.sin(p)+d*Math.sin(p)],B=[f[0]+S*Math.cos(p)+d*Math.cos(p),f[1]+S*Math.sin(p)+d*Math.sin(p)];o.push(...this.helper.doubleLineOps(T[0],T[1],B[0],B[1],e))}}),o}}class cp{constructor(r){this.helper=r}fillPolygons(r,e){let i=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?i:e.zigzagOffset,o=Ao(r,e=Object.assign({},e,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(r,e,i){let s=[];return r.forEach((o)=>{let a=Js(o),c=Math.round(a/(2*e)),n=o[0],d=o[1];n[0]>d[0]&&(n=o[1],d=o[0]);let f=Math.atan((d[1]-n[1])/(d[0]-n[0]));for(let u=0;u<c;u++){let p=2*u*e,x=2*(u+1)*e,b=Math.sqrt(2*Math.pow(e,2)),S=[n[0]+p*Math.cos(f),n[1]+p*Math.sin(f)],T=[n[0]+x*Math.cos(f),n[1]+x*Math.sin(f)],B=[S[0]+b*Math.cos(f+Math.PI/4),S[1]+b*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(S[0],S[1],B[0],B[1],i),...this.helper.doubleLineOps(B[0],B[1],T[0],T[1],i))}}),s}}var Ae={};class up{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var Ek=0,Rh=1,Qf=2,Ys={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 qh(r,e){return r.type===e}function jh(r){let e=[],i=function(c){let n=[];for(;c!=="";)if(c.match(/^([ \t\r\n,]+)/))c=c.substr(RegExp.$1.length);else if(c.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Ek,text:RegExp.$1},c=c.substr(RegExp.$1.length);else{if(!c.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Rh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:Qf,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!qh(a,Qf);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return jh("M0,0"+r);o++,c=Ys[a.text],s=a.text}else qh(a,Rh)?c=Ys[s]:(o++,c=Ys[a.text],s=a.text);if(!(o+c<i.length))throw Error("Path data ended short");for(let d=o;d<o+c;d++){let f=i[d];if(!qh(f,Rh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Ys[s]!="number")throw Error("Bad segment: "+s);{let d={key:s,data:n};e.push(d),o+=c,a=i[o],s==="M"&&(s="L"),s==="m"&&(s="l")}}return e}function dp(r){let e=0,i=0,s=0,o=0,a=[];for(let{key:c,data:n}of r)switch(c){case"M":a.push({key:"M",data:[...n]}),[e,i]=n,[s,o]=n;break;case"m":e+=n[0],i+=n[1],a.push({key:"M",data:[e,i]}),s=e,o=i;break;case"L":a.push({key:"L",data:[...n]}),[e,i]=n;break;case"l":e+=n[0],i+=n[1],a.push({key:"L",data:[e,i]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],i=n[5];break;case"c":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"C",data:d}),e=d[4],i=d[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],i=n[3];break;case"q":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"Q",data:d}),e=d[2],i=d[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],i=n[6];break;case"a":e+=n[5],i+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,i]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),i=n[0];break;case"v":i+=n[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],i=n[3];break;case"s":{let d=n.map((f,u)=>u%2?f+i:f+e);a.push({key:"S",data:d}),e=d[2],i=d[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],i=n[1];break;case"t":e+=n[0],i+=n[1],a.push({key:"T",data:[e,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=s,i=o}return a}function fp(r){let e=[],i="",s=0,o=0,a=0,c=0,n=0,d=0;for(let{key:f,data:u}of r){switch(f){case"M":e.push({key:"M",data:[...u]}),[s,o]=u,[a,c]=u;break;case"C":e.push({key:"C",data:[...u]}),s=u[4],o=u[5],n=u[2],d=u[3];break;case"L":e.push({key:"L",data:[...u]}),[s,o]=u;break;case"H":s=u[0],e.push({key:"L",data:[s,o]});break;case"V":o=u[0],e.push({key:"L",data:[s,o]});break;case"S":{let p=0,x=0;i==="C"||i==="S"?(p=s+(s-n),x=o+(o-d)):(p=s,x=o),e.push({key:"C",data:[p,x,...u]}),n=u[0],d=u[1],s=u[2],o=u[3];break}case"T":{let[p,x]=u,b=0,S=0;i==="Q"||i==="T"?(b=s+(s-n),S=o+(o-d)):(b=s,S=o);let T=s+2*(b-s)/3,B=o+2*(S-o)/3,_=p+2*(b-p)/3,v=x+2*(S-x)/3;e.push({key:"C",data:[T,B,_,v,p,x]}),n=b,d=S,s=p,o=x;break}case"Q":{let[p,x,b,S]=u,T=s+2*(p-s)/3,B=o+2*(x-o)/3,_=b+2*(p-b)/3,v=S+2*(x-S)/3;e.push({key:"C",data:[T,B,_,v,b,S]}),n=p,d=x,s=b,o=S;break}case"A":{let p=Math.abs(u[0]),x=Math.abs(u[1]),b=u[2],S=u[3],T=u[4],B=u[5],_=u[6];if(p===0||x===0)e.push({key:"C",data:[s,o,B,_,B,_]}),s=B,o=_;else if(s!==B||o!==_)pp(s,o,B,_,p,x,b,S,T).forEach(function(v){e.push({key:"C",data:v})}),s=B,o=_;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=c}i=f}return e}function Lo(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function pp(r,e,i,s,o,a,c,n,d,f){let u=(p=c,Math.PI*p/180);var p;let x=[],b=0,S=0,T=0,B=0;if(f)[b,S,T,B]=f;else{[r,e]=Lo(r,e,-u),[i,s]=Lo(i,s,-u);let N=(r-i)/2,K=(e-s)/2,et=N*N/(o*o)+K*K/(a*a);et>1&&(et=Math.sqrt(et),o*=et,a*=et);let U=o*o,ut=a*a,ct=U*ut-U*K*K-ut*N*N,_t=U*K*K+ut*N*N,Lt=(n===d?-1:1)*Math.sqrt(Math.abs(ct/_t));T=Lt*o*K/a+(r+i)/2,B=Lt*-a*N/o+(e+s)/2,b=Math.asin(parseFloat(((e-B)/a).toFixed(9))),S=Math.asin(parseFloat(((s-B)/a).toFixed(9))),r<T&&(b=Math.PI-b),i<T&&(S=Math.PI-S),b<0&&(b=2*Math.PI+b),S<0&&(S=2*Math.PI+S),d&&b>S&&(b-=2*Math.PI),!d&&S>b&&(S-=2*Math.PI)}let _=S-b;if(Math.abs(_)>120*Math.PI/180){let N=S,K=i,et=s;S=d&&S>b?b+120*Math.PI/180*1:b+120*Math.PI/180*-1,x=pp(i=T+o*Math.cos(S),s=B+a*Math.sin(S),K,et,o,a,c,0,d,[S,N,T,B])}_=S-b;let v=Math.cos(b),E=Math.sin(b),D=Math.cos(S),P=Math.sin(S),Z=Math.tan(_/4),Q=1.3333333333333333*o*Z,tt=1.3333333333333333*a*Z,ot=[r,e],ft=[r+Q*E,e-tt*v],dt=[i+Q*P,s-tt*D],lt=[i,s];if(ft[0]=2*ot[0]-ft[0],ft[1]=2*ot[1]-ft[1],f)return[ft,dt,lt].concat(x);{x=[ft,dt,lt].concat(x);let N=[];for(let K=0;K<x.length;K+=3){let et=Lo(x[K][0],x[K][1],u),U=Lo(x[K+1][0],x[K+1][1],u),ut=Lo(x[K+2][0],x[K+2][1],u);N.push([et[0],et[1],U[0],U[1],ut[0],ut[1]])}return N}}var $k={randOffset:function(r,e){return Ht(r,e)},randOffsetWithRange:function(r,e,i){return Vs(r,e,i)},ellipse:function(r,e,i,s,o){let a=mp(i,s,o);return zh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return kr(r,e,i,s,o,!0)}};function gp(r,e,i,s,o){return{type:"path",ops:kr(r,e,i,s,o)}}function Xs(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...kr(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...kr(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?gp(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Ik(r,e,i,s,o){return function(a,c){return Xs(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function Jf(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=js(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:js(i[0],1.5*(1+0.22*e.roughness),rp(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=js(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:js(c,1.5*(1+0.22*e.roughness),rp(e));for(let f of n)f.op!=="move"&&s.push(f);for(let f of d)f.op!=="move"&&o.push(f)}}return{type:"path",ops:s.concat(o)}}return{type:"path",ops:[]}}function mp(r,e,i){let s=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(r/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(i.curveStepCount,i.curveStepCount/Math.sqrt(200)*s)),a=2*Math.PI/o,c=Math.abs(r/2),n=Math.abs(e/2),d=1-i.curveFitting;return c+=Ht(c*d,i),n+=Ht(n*d,i),{increment:a,rx:c,ry:n}}function zh(r,e,i,s){let[o,a]=ip(s.increment,r,e,s.rx,s.ry,1,s.increment*Vs(0.1,Vs(0.4,1,i),i),i),c=Ks(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=ip(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=Ks(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function tp(r,e,i,s,o,a,c,n,d){let f=r,u=e,p=Math.abs(i/2),x=Math.abs(s/2);p+=Ht(0.01*p,d),x+=Ht(0.01*x,d);let b=o,S=a;for(;b<0;)b+=2*Math.PI,S+=2*Math.PI;S-b>2*Math.PI&&(b=0,S=2*Math.PI);let T=2*Math.PI/d.curveStepCount,B=Math.min(T/2,(S-b)/2),_=op(B,f,u,p,x,b,S,1,d);if(!d.disableMultiStroke){let v=op(B,f,u,p,x,b,S,1.5,d);_.push(...v)}return c&&(n?_.push(...kr(f,u,f+p*Math.cos(b),u+x*Math.sin(b),d),...kr(f,u,f+p*Math.cos(S),u+x*Math.sin(S),d)):_.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+p*Math.cos(b),u+x*Math.sin(b)]})),{type:"path",ops:_}}function ep(r,e){let i=fp(dp(jh(r))),s=[],o=[0,0],a=[0,0];for(let{key:c,data:n}of i)switch(c){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":s.push(...kr(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,p,x,b]=n;s.push(...Ok(d,f,u,p,x,b,a,e)),a=[x,b];break}case"Z":s.push(...kr(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Wh(r,e){let i=[];for(let s of r)if(s.length){let o=e.maxRandomnessOffset||0,a=s.length;if(a>2){i.push({op:"move",data:[s[0][0]+Ht(o,e),s[0][1]+Ht(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+Ht(o,e),s[c][1]+Ht(o,e)]})}}return{type:"fillPath",ops:i}}function gi(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!Ae[o])switch(o){case"zigzag":Ae[o]||(Ae[o]=new ap(s));break;case"cross-hatch":Ae[o]||(Ae[o]=new np(s));break;case"dots":Ae[o]||(Ae[o]=new lp(s));break;case"dashed":Ae[o]||(Ae[o]=new hp(s));break;case"zigzag-line":Ae[o]||(Ae[o]=new cp(s));break;default:o="hachure",Ae[o]||(Ae[o]=new Qs(s))}return Ae[o]}(e,$k).fillPolygons(r,e)}function rp(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function yp(r){return r.randomizer||(r.randomizer=new up(r.seed||0)),r.randomizer.next()}function Vs(r,e,i,s=1){return i.roughness*s*(yp(i)*(e-r)+r)}function Ht(r,e,i=1){return Vs(-r,r,e,i)}function kr(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Hh(r,e,i,s,o,!0,!1);if(c)return n;let d=Hh(r,e,i,s,o,!0,!0);return n.concat(d)}function Hh(r,e,i,s,o,a,c){let n=Math.pow(r-i,2)+Math.pow(e-s,2),d=Math.sqrt(n),f=1;f=d<200?1:d>500?0.4:-0.0016668*d+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>n&&(u=d/10);let p=u/2,x=0.2+0.2*yp(o),b=o.bowing*o.maxRandomnessOffset*(s-e)/200,S=o.bowing*o.maxRandomnessOffset*(r-i)/200;b=Ht(b,o,f),S=Ht(S,o,f);let T=[],B=()=>Ht(p,o,f),_=()=>Ht(u,o,f),v=o.preserveVertices;return a&&(c?T.push({op:"move",data:[r+(v?0:B()),e+(v?0:B())]}):T.push({op:"move",data:[r+(v?0:Ht(u,o,f)),e+(v?0:Ht(u,o,f))]})),c?T.push({op:"bcurveTo",data:[b+r+(i-r)*x+B(),S+e+(s-e)*x+B(),b+r+2*(i-r)*x+B(),S+e+2*(s-e)*x+B(),i+(v?0:B()),s+(v?0:B())]}):T.push({op:"bcurveTo",data:[b+r+(i-r)*x+_(),S+e+(s-e)*x+_(),b+r+2*(i-r)*x+_(),S+e+2*(s-e)*x+_(),i+(v?0:_()),s+(v?0:_())]}),T}function js(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+Ht(e,i),r[0][1]+Ht(e,i)]),s.push([r[0][0]+Ht(e,i),r[0][1]+Ht(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+Ht(e,i),r[o][1]+Ht(e,i)]),o===r.length-1&&s.push([r[o][0]+Ht(e,i),r[o][1]+Ht(e,i)]);return Ks(s,null,i)}function Ks(r,e,i){let s=r.length,o=[];if(s>3){let a=[],c=1-i.curveTightness;o.push({op:"move",data:[r[1][0],r[1][1]]});for(let n=1;n+2<s;n++){let d=r[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*r[n+1][0]-c*r[n-1][0])/6,d[1]+(c*r[n+1][1]-c*r[n-1][1])/6],a[2]=[r[n+1][0]+(c*r[n][0]-c*r[n+2][0])/6,r[n+1][1]+(c*r[n][1]-c*r[n+2][1])/6],a[3]=[r[n+1][0],r[n+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&e.length===2){let n=i.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Ht(n,i),e[1]+Ht(n,i)]})}}else s===3?(o.push({op:"move",data:[r[1][0],r[1][1]]}),o.push({op:"bcurveTo",data:[r[1][0],r[1][1],r[2][0],r[2][1],r[2][0],r[2][1]]})):s===2&&o.push(...Hh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function ip(r,e,i,s,o,a,c,n){let d=[],f=[];if(n.roughness===0){r/=4,f.push([e+s*Math.cos(-r),i+o*Math.sin(-r)]);for(let u=0;u<=2*Math.PI;u+=r){let p=[e+s*Math.cos(u),i+o*Math.sin(u)];d.push(p),f.push(p)}f.push([e+s*Math.cos(0),i+o*Math.sin(0)]),f.push([e+s*Math.cos(r),i+o*Math.sin(r)])}else{let u=Ht(0.5,n)-Math.PI/2;f.push([Ht(a,n)+e+0.9*s*Math.cos(u-r),Ht(a,n)+i+0.9*o*Math.sin(u-r)]);let p=2*Math.PI+u-0.01;for(let x=u;x<p;x+=r){let b=[Ht(a,n)+e+s*Math.cos(x),Ht(a,n)+i+o*Math.sin(x)];d.push(b),f.push(b)}f.push([Ht(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),Ht(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([Ht(a,n)+e+0.98*s*Math.cos(u+c),Ht(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([Ht(a,n)+e+0.9*s*Math.cos(u+0.5*c),Ht(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function op(r,e,i,s,o,a,c,n,d){let f=a+Ht(0.1,d),u=[];u.push([Ht(n,d)+e+0.9*s*Math.cos(f-r),Ht(n,d)+i+0.9*o*Math.sin(f-r)]);for(let p=f;p<=c;p+=r)u.push([Ht(n,d)+e+s*Math.cos(p),Ht(n,d)+i+o*Math.sin(p)]);return u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),u.push([e+s*Math.cos(c),i+o*Math.sin(c)]),Ks(u,null,d)}function Ok(r,e,i,s,o,a,c,n){let d=[],f=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+0.3],u=[0,0],p=n.disableMultiStroke?1:2,x=n.preserveVertices;for(let b=0;b<p;b++)b===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:Ht(f[0],n)),c[1]+(x?0:Ht(f[0],n))]}),u=x?[o,a]:[o+Ht(f[b],n),a+Ht(f[b],n)],d.push({op:"bcurveTo",data:[r+Ht(f[b],n),e+Ht(f[b],n),i+Ht(f[b],n),s+Ht(f[b],n),u[0],u[1]]});return d}function Fo(r){return[...r]}function sp(r,e=0){let i=r.length;if(i<3)throw Error("A curve must have at least three points.");let s=[];if(i===3)s.push(Fo(r[0]),Fo(r[1]),Fo(r[2]),Fo(r[2]));else{let o=[];o.push(r[0],r[0]);for(let n=1;n<r.length;n++)o.push(r[n]),n===r.length-1&&o.push(r[n]);let a=[],c=1-e;s.push(Fo(o[0]));for(let n=1;n+2<o.length;n++){let d=o[n];a[0]=[d[0],d[1]],a[1]=[d[0]+(c*o[n+1][0]-c*o[n-1][0])/6,d[1]+(c*o[n+1][1]-c*o[n-1][1])/6],a[2]=[o[n+1][0]+(c*o[n][0]-c*o[n+2][0])/6,o[n+1][1]+(c*o[n][1]-c*o[n+2][1])/6],a[3]=[o[n+1][0],o[n+1][1]],s.push(a[1],a[2],a[3])}}return s}function Gs(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Dk(r,e,i){let s=Gs(e,i);if(s===0)return Gs(r,e);let o=((r[0]-e[0])*(i[0]-e[0])+(r[1]-e[1])*(i[1]-e[1]))/s;return o=Math.max(0,Math.min(1,o)),Gs(r,Er(e,i,o))}function Er(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Yh(r,e,i,s){let o=s||[];if(function(n,d){let f=n[d+0],u=n[d+1],p=n[d+2],x=n[d+3],b=3*u[0]-2*f[0]-x[0];b*=b;let S=3*u[1]-2*f[1]-x[1];S*=S;let T=3*p[0]-2*x[0]-f[0];T*=T;let B=3*p[1]-2*x[1]-f[1];return B*=B,b<T&&(b=T),S<B&&(S=B),b+S}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(Gs(a,c)))>1&&o.push(n);else o.push(n);o.push(r[e+3])}else{let d=r[e+0],f=r[e+1],u=r[e+2],p=r[e+3],x=Er(d,f,0.5),b=Er(f,u,0.5),S=Er(u,p,0.5),T=Er(x,b,0.5),B=Er(b,S,0.5),_=Er(T,B,0.5);Yh([d,x,T,_],0,i,o),Yh([_,B,S,p],0,i,o)}var a,c;return o}function Pk(r,e){return Zs(r,0,r.length,e)}function Zs(r,e,i,s,o){let a=o||[],c=r[e],n=r[i-1],d=0,f=1;for(let u=e+1;u<i-1;++u){let p=Dk(r[u],c,n);p>d&&(d=p,f=u)}return Math.sqrt(d)>s?(Zs(r,e,f+1,s,a),Zs(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Nh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Yh(r,3*a,e,s);return i&&i>0?Zs(s,0,s.length,i):s}var Ie="none";class Mo{constructor(r){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=r||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(r){return r?Object.assign({},this.defaultOptions,r):this.defaultOptions}_d(r,e,i){return{shape:r,sets:e||[],options:i||this.defaultOptions}}line(r,e,i,s,o){let a=this._o(o);return this._d("line",[gp(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Ik(r,e,i,s,a);if(a.fill){let d=[[r,e],[r+i,e],[r+i,e+s],[r,e+s]];a.fillStyle==="solid"?c.push(Wh([d],a)):c.push(gi([d],a))}return a.stroke!==Ie&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=mp(i,s,a),d=zh(r,e,a,n);if(a.fill)if(a.fillStyle==="solid"){let f=zh(r,e,a,n).opset;f.type="fillPath",c.push(f)}else c.push(gi([d.estimatedPoints],a));return a.stroke!==Ie&&c.push(d.opset),this._d("ellipse",c,a)}circle(r,e,i,s){let o=this.ellipse(r,e,i,i,s);return o.shape="circle",o}linearPath(r,e){let i=this._o(e);return this._d("linearPath",[Xs(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=tp(r,e,i,s,o,a,c,!0,d);if(c&&d.fill)if(d.fillStyle==="solid"){let p=Object.assign({},d);p.disableMultiStroke=!0;let x=tp(r,e,i,s,o,a,!0,!1,p);x.type="fillPath",f.push(x)}else f.push(function(p,x,b,S,T,B,_){let v=p,E=x,D=Math.abs(b/2),P=Math.abs(S/2);D+=Ht(0.01*D,_),P+=Ht(0.01*P,_);let Z=T,Q=B;for(;Z<0;)Z+=2*Math.PI,Q+=2*Math.PI;Q-Z>2*Math.PI&&(Z=0,Q=2*Math.PI);let tt=(Q-Z)/_.curveStepCount,ot=[];for(let ft=Z;ft<=Q;ft+=tt)ot.push([v+D*Math.cos(ft),E+P*Math.sin(ft)]);return ot.push([v+D*Math.cos(Q),E+P*Math.sin(Q)]),ot.push([v,E]),gi([ot],_)}(r,e,i,s,o,a,d));return d.stroke!==Ie&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=Jf(r,i);if(i.fill&&i.fill!==Ie)if(i.fillStyle==="solid"){let a=Jf(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],c=r;if(c.length){let n=typeof c[0][0]=="number"?[c]:c;for(let d of n)d.length<3?a.push(...d):d.length===3?a.push(...Nh(sp([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Nh(sp(d),10,(1+i.roughness)/2))}a.length&&s.push(gi([a],i))}return i.stroke!==Ie&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=Xs(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Wh([r],i)):s.push(gi([r],i))),i.stroke!==Ie&&s.push(o),this._d("polygon",s,i)}path(r,e){let i=this._o(e),s=[];if(!r)return this._d("path",s,i);r=(r||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=i.fill&&i.fill!=="transparent"&&i.fill!==Ie,a=i.stroke!==Ie,c=!!(i.simplification&&i.simplification<1),n=function(f,u,p){let x=fp(dp(jh(f))),b=[],S=[],T=[0,0],B=[],_=()=>{B.length>=4&&S.push(...Nh(B,u)),B=[]},v=()=>{_(),S.length&&(b.push(S),S=[])};for(let{key:D,data:P}of x)switch(D){case"M":v(),T=[P[0],P[1]],S.push(T);break;case"L":_(),S.push([P[0],P[1]]);break;case"C":if(!B.length){let Z=S.length?S[S.length-1]:T;B.push([Z[0],Z[1]])}B.push([P[0],P[1]]),B.push([P[2],P[3]]),B.push([P[4],P[5]]);break;case"Z":_(),S.push([T[0],T[1]])}if(v(),!p)return b;let E=[];for(let D of b){let P=Pk(D,p);P.length&&E.push(P)}return E}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=ep(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=ep(r,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else s.push(Wh(n,i));else s.push(gi(n,i));return a&&(c?n.forEach((f)=>{s.push(Xs(f,!1,i))}):s.push(d)),this._d("path",s,i)}opsToPath(r,e){let i="";for(let s of r.ops){let o=typeof e=="number"&&e>=0?s.data.map((a)=>+a.toFixed(e)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(r){let e=r.sets||[],i=r.options||this.defaultOptions,s=[];for(let o of e){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ie};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ie,strokeWidth:0,fill:i.fill||Ie};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(r,e){let i=e.fillWeight;return i<0&&(i=e.strokeWidth/2),{d:this.opsToPath(r),stroke:e.fill||Ie,strokeWidth:i,fill:Ie}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class xp{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new Mo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.ctx,o=r.options.fixedDecimalPlaceDigits;for(let a of e)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";let c=r.shape==="curve"||r.shape==="polygon"||r.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,c),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),r.save(),i.fillLineDash&&r.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(r.lineDashOffset=i.fillLineDashOffset),r.strokeStyle=i.fill||"",r.lineWidth=s,this._drawToContext(r,e,i.fixedDecimalPlaceDigits),r.restore()}_drawToContext(r,e,i,s="nonzero"){r.beginPath();for(let o of e.ops){let a=typeof i=="number"&&i>=0?o.data.map((c)=>+c.toFixed(i)):o.data;switch(o.op){case"move":r.moveTo(a[0],a[1]);break;case"bcurveTo":r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":r.lineTo(a[0],a[1])}}e.type==="fillPath"?r.fill(s):r.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a),a}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a),a}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a),a}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o),o}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i),i}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i),i}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d),d}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i),i}path(r,e){let i=this.gen.path(r,e);return this.draw(i),i}}var Us="http://www.w3.org/2000/svg";class Cp{constructor(r,e){this.svg=r,this.gen=new Mo(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Us,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Us,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke",i.stroke),n.setAttribute("stroke-width",i.strokeWidth+""),n.setAttribute("fill","none"),i.strokeLineDash&&n.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&n.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":n=s.createElementNS(Us,"path"),n.setAttribute("d",this.opsToPath(c,a)),n.setAttribute("stroke","none"),n.setAttribute("stroke-width","0"),n.setAttribute("fill",i.fill||""),r.shape!=="curve"&&r.shape!=="polygon"||n.setAttribute("fill-rule","evenodd");break;case"fillSketch":n=this.fillSketch(s,c,i)}n&&o.appendChild(n)}return o}fillSketch(r,e,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);let o=r.createElementNS(Us,"path");return o.setAttribute("d",this.opsToPath(e,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(r,e){return this.gen.opsToPath(r,e)}line(r,e,i,s,o){let a=this.gen.line(r,e,i,s,o);return this.draw(a)}rectangle(r,e,i,s,o){let a=this.gen.rectangle(r,e,i,s,o);return this.draw(a)}ellipse(r,e,i,s,o){let a=this.gen.ellipse(r,e,i,s,o);return this.draw(a)}circle(r,e,i,s){let o=this.gen.circle(r,e,i,s);return this.draw(o)}linearPath(r,e){let i=this.gen.linearPath(r,e);return this.draw(i)}polygon(r,e){let i=this.gen.polygon(r,e);return this.draw(i)}arc(r,e,i,s,o,a,c=!1,n){let d=this.gen.arc(r,e,i,s,o,a,c,n);return this.draw(d)}curve(r,e){let i=this.gen.curve(r,e);return this.draw(i)}path(r,e){let i=this.gen.path(r,e);return this.draw(i)}}var y={canvas:(r,e)=>new xp(r,e),svg:(r,e)=>new Cp(r,e),generator:(r)=>new Mo(r),newSeed:()=>Mo.newSeed()};var Rk=1,qk=3;async function ic(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!oc(r);await Promise.all([...e].map((s)=>new Promise((o)=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){let c=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[d=Y.fontSize]=$n(c),f=d*5+"px";s.style.minWidth=f,s.style.maxWidth=f}else s.style.width="100%";o(s)}t(a,"setupImage"),setTimeout(()=>{if(s.complete)a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}t(ic,"configureLabelImages");function oc(r){if(r.nodeType===qk)return r.textContent?.trim()!=="";if(r.nodeType!==Rk)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(oc)}t(oc,"hasTextBesidesImages");var bp=3,Wk=32,Nk=t(async(r,e,i)=>{let s=m(),o=r.insert("g").attr("class",i??"node default").attr("id",e.domId||e.id),a=o.insert("g").attr("class","label").attr("style",de(e.labelStyle)),n=[{text:typeof e.label==="string"?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map((_)=>({text:_,cssClass:"c4-descr"}))].filter((_)=>_.text),d=e.width?Math.max(e.width-2*(e.padding??0),Wk):m().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,p=await Promise.all(n.map(async(_)=>{let v=a.append("g").attr("class",_.cssClass),E=await fn(v,ee(Ya(_.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return h(E).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),h(E).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),x=Math.max(...p.map(({box:_})=>_.width),0),b=0;for(let{el:_,box:v}of p)_.attr("transform",`translate(${x/2-v.x-v.width/2}, ${b-v.y})`),b+=v.height+bp;let S=p.length>0?b-bp:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-x/2}, ${-S/2})`);let T=a.node().getBBox(),B=(e.padding??0)/2;return{shapeSvg:o,bbox:T,halfPadding:B,label:a}},"c4LabelHelper"),kp=t((r,e)=>{let{x:i,y:s,width:o,height:a}=r;if(o>=e)return r;if(!("left"in r))return{x:i-(e-o)/2,y:s,width:e,height:a};return{x:i,y:s,width:e,height:a,top:s,left:i,bottom:s+a,right:i+e,toJSON:t(()=>({}),"toJSON")}},"withMinWidth"),X=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Nk(r,e,i);let s,o=e.useHtmlLabels||Yr(m()?.htmlLabels);if(!i)s="node default";else s=i;let a=r.insert("g").attr("class",s).attr("id",e.domId||e.id),c=a.insert("g").attr("class","label").attr("style",de(e.labelStyle)),n;if(e.label===void 0)n="";else n=typeof e.label==="string"?e.label:e.label[0];let d=!!e.icon||!!e.img,f=e.labelType==="markdown",u=n&&!e.width?e.minWidth??0:0,p=await fn(c,ee(Ya(n),m()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||m().flowchart?.wrappingWidth,minWidth:u,classes:f?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:d,markdown:f},m()),x=(e?.padding??0)/2,b;if(o){let S=p.children[0],T=h(p);await ic(S),b=await hr.measure(()=>S.getBoundingClientRect()),b=kp(b,u),T.attr("width",b.width),T.attr("height",b.height)}else b=await hr.measure(()=>p.getBBox()),b=kp(b,u);if(o)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");else c.attr("transform","translate(0, "+-b.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-b.width/2+", "+-b.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:b,halfPadding:x,label:c}},"labelHelper"),Ir=t(async(r,e,i)=>{let s=i.useHtmlLabels??Vt(m()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await fn(o,ee(Ya(e),m()),{useHtmlLabels:s,width:i.width||m()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(Vt(m())){let d=a.children[0],f=h(a);n=await hr.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await hr.measure(()=>a.getBBox());if(s)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");else o.attr("transform","translate(0, "+-n.height/2+")");if(i.centerLabel)o.attr("transform","translate("+-n.width/2+", "+-n.height/2+")");return o.insert("rect",":first-child"),{shapeSvg:r,bbox:n,halfPadding:c,label:o}},"insertLabel"),W=t((r,e,i)=>{if(i){r.width=i.width,r.height=i.height;return}let s=e.node().getBBox();r.width=s.width,r.height=s.height},"updateNodeBounds"),It=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function se(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(se,"createPathFromPoints");function wr(r,e,i,s,o,a){let c=[],n=50,d=i-r,f=s-e,u=d/a,p=2*Math.PI/u,x=e+f/2;for(let b=0;b<=50;b++){let S=b/50,T=r+S*d,B=x+o*Math.sin(p*(T-r));c.push({x:T,y:B})}return c}t(wr,"generateFullSineWavePoints");function Qe(r,e,i,s,o,a){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let p=0;p<s;p++){let x=n+p*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(Qe,"generateCirclePoints");function Jh(r){let e=Array.from(r.childNodes).filter((d)=>d.tagName==="path"),i=document.createElementNS("http://www.w3.org/2000/svg","path"),s=e.map((d)=>d.getAttribute("d")).filter((d)=>d!==null).join(" ");i.setAttribute("d",s);let o=e.find((d)=>d.getAttribute("fill")!=="none"),a=e.find((d)=>d.getAttribute("stroke")!=="none"),c=t((d,f)=>d?.getAttribute(f)??void 0,"getAttr");if(o){let d={fill:c(o,"fill"),"fill-opacity":c(o,"fill-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}if(a){let d={stroke:c(a,"stroke"),"stroke-width":c(a,"stroke-width")??"1","stroke-opacity":c(a,"stroke-opacity")??"1"};Object.entries(d).forEach(([f,u])=>{if(u)i.setAttribute(f,u)})}let n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(i),n}t(Jh,"mergePaths");var zk=t((r,e)=>{var{x:i,y:s}=r,o=e.x-i,a=e.y-s,c=r.width/2,n=r.height/2,d,f;if(Math.abs(a)*c>Math.abs(o)*n){if(a<0)n=-n;d=a===0?0:n*o/a,f=n}else{if(o<0)c=-c;d=c,f=o===0?0:c*a/o}return{x:i+d,y:s+f}},"intersectRect"),Je=zk;function rg(r,e){return r.intersect(e)}t(rg,"intersectNode");var Hk=rg;function ig(r,e,i,s){var{x:o,y:a}=r,c=o-s.x,n=a-s.y,d=Math.sqrt(e*e*n*n+i*i*c*c),f=Math.abs(e*i*c/d);if(s.x<o)f=-f;var u=Math.abs(e*i*n/d);if(s.y<a)u=-u;return{x:o+f,y:a+u}}t(ig,"intersectEllipse");var og=ig;function sg(r,e,i){return og(r,e,e,i)}t(sg,"intersectCircle");var Yk=sg;function ag(r,e,i,s){{let o=e.y-r.y,a=r.x-e.x,c=e.x*r.y-r.x*e.y,n=o*i.x+a*i.y+c,d=o*s.x+a*s.y+c,f=0.000001;if(n!==0&&d!==0&&tc(n,d))return;let u=s.y-i.y,p=i.x-s.x,x=s.x*i.y-i.x*s.y,b=u*r.x+p*r.y+x,S=u*e.x+p*e.y+x;if(Math.abs(b)<0.000001&&Math.abs(S)<0.000001&&tc(b,S))return;let T=o*p-u*a;if(T===0)return;let B=(a*x-p*c)/T,_=(u*c-o*x)/T;return{x:B,y:_}}}t(ag,"intersectLine");function tc(r,e){return r*e>0}t(tc,"sameSign");var jk=ag;function ng(r,e,i){let{x:s,y:o}=r,a=[],{POSITIVE_INFINITY:c,POSITIVE_INFINITY:n}=Number;if(typeof e.forEach==="function")e.forEach(function(u){c=Math.min(c,u.x),n=Math.min(n,u.y)});else c=Math.min(c,e.x),n=Math.min(n,e.y);let d=s-r.width/2-c,f=o-r.height/2-n;for(let u=0;u<e.length;u++){let p=e[u],x=e[u<e.length-1?u+1:0],b=jk(r,i,{x:d+p.x,y:f+p.y},{x:d+x.x,y:f+x.y});if(b)a.push(b)}if(!a.length)return r;if(a.length>1)a.sort(function(u,p){let x=u.x-i.x,b=u.y-i.y,S=Math.sqrt(x*x+b*b),T=p.x-i.x,B=p.y-i.y,_=Math.sqrt(T*T+B*B);return S<_?-1:S===_?0:1});return a[0]}t(ng,"intersectPolygon");var Uk=ng,R={node:Hk,circle:Yk,ellipse:og,polygon:Uk,rect:Je},Ee=t((r,e,i,s,o)=>["M",r+o,e,"H",r+i-o,"A",o,o,0,0,1,r+i,e+o,"V",e+s-o,"A",o,o,0,0,1,r+i-o,e+s,"H",r+o,"A",o,o,0,0,1,r,e+s-o,"V",e+o,"A",o,o,0,0,1,r+o,e,"Z"].join(" "),"createRoundedRectPathD"),Xk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=m(),n=Vt(c);return await fn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),ze=Xk;function lg(r,e){let{labelStyles:i}=L(e);e.labelStyle=i;let s=It(e),o=s;if(!s)o="anchor";let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=1,{cssStyles:n}=e,d=y.svg(a),f=vt(e,{fill:"black",stroke:"none",fillStyle:"solid"});if(e.look!=="handDrawn")f.roughness=0;let u=d.circle(0,0,c*2,f),p=a.insert(()=>u,":first-child");return p.attr("class","anchor").attr("style",de(n)),W(e,p),e.intersect=function(x){return l.info("Circle intersect",e,c,x),R.circle(e,c,x)},a}t(lg,"anchor");function ec(r,e,i,s,o,a,c){let d=(r+i)/2,f=(e+s)/2,u=Math.atan2(s-e,i-r),p=(i-r)/2,x=(s-e)/2,b=p/o,S=x/a,T=Math.sqrt(b**2+S**2);if(T>1)throw Error("The given radii are too small to create an arc between the points.");let B=Math.sqrt(1-T**2),_=d+B*a*Math.sin(u)*(c?-1:1),v=f-B*o*Math.cos(u)*(c?-1:1),E=Math.atan2((e-v)/a,(r-_)/o),P=Math.atan2((s-v)/a,(i-_)/o)-E;if(c&&P<0)P+=2*Math.PI;if(!c&&P>0)P-=2*Math.PI;let Z=[];for(let Q=0;Q<20;Q++){let tt=Q/19,ot=E+tt*P,ft=_+o*Math.cos(ot),dt=v+a*Math.sin(ot);Z.push({x:ft,y:dt})}return Z}t(ec,"generateArcPoints");function hg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(hg,"calculateArcSagitta");async function cg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((ot)=>ot+c,"calcTotalHeight"),d=t((ot)=>{let ft=ot/2;return[ft/(2.5+ot/50),ft]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await X(r,e,It(e)),p=n(e?.height?e?.height:u.height),[x,b]=d(p),S=hg(p,x,b),B=(e?.width?e?.width:u.width)+a*2+S-S,_=p,{cssStyles:v}=e,E=[{x:B/2,y:-_/2},{x:-B/2,y:-_/2},...ec(-B/2,-_/2,-B/2,_/2,x,b,!1),{x:B/2,y:_/2},...ec(B/2,_/2,B/2,-_/2,x,b,!0)],D=y.svg(f),P=vt(e,{});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let Z=se(E),Q=D.path(Z,P),tt=f.insert(()=>Q,":first-child");if(tt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")tt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(${x/2}, 0)`),W(e,tt),e.intersect=function(ot){return R.polygon(e,E,ot)},f}t(cg,"bowTieRect");async function ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,It(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=Math.max(c.width+f*2,e.width??0,80),p=Math.max(Math.min(u*0.08,12),5),x=Math.max(c.height+f*2+p,e.height??0),b=-x/2+p,S=x/2,T=u*0.72,B=[`M${-u/2},${b}`,`L${-T/2},${S}`,`A${T/2},${p} 0 0 0 ${T/2},${S}`,`L${u/2},${b}`,`A${u/2},${p} 0 0 0 ${-u/2},${b}`,"Z"].join(" "),{cssStyles:_}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let tt=y.svg(a).path(B,vt(e,{}));if(v.node()?.appendChild(tt),_)v.attr("style",_)}else v.append("path").attr("d",B).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",b).attr("rx",u/2).attr("ry",p).attr("style",`fill:none;stroke:${d};stroke-width:1px`),W(e,v);let E=b+(S-b)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${E-c.height/2-(c.y-(c.top??0))})`);let D=12,P=t((Q,tt,ot)=>Array.from({length:D+1},(ft,dt)=>{let lt=Math.PI-dt*Math.PI/D;return{x:Q*Math.cos(lt),y:tt+ot*p*Math.sin(lt)}}),"arc"),Z=[...P(u/2,b,-1),...P(T/2,S,1).reverse()];return e.intersect=function(Q){return R.polygon(e,Z,Q)},a}t(ug,"bucket");var Uh=20,Xh=8,Gk=80,Vk=8;function dg(r){let{themeVariables:e}=m(),{clusterBkg:i,clusterBorder:s}=e;switch(r){case"flow":return{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:0.75,cssClass:"flow-collapsed"};default:return{rx:Vk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(dg,"getCollapsedStyle");async function fg(r,e){let i=dg(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=L(e),{shapeSvg:c,bbox:n}=await X(r,e,It(e)),{theme:d,themeVariables:f}=m();er(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,p=n.height,x=Math.max(n.width+u*2,Gk,e?.width??0),b=Math.max(p+Xh+Uh+u*2,e?.height??0),S=-x/2,T=-b/2,B=-(Xh+Uh)/2,_=c.select(".label");if(_)if(e.useHtmlLabels??Vt(m()))_.attr("transform",`translate(${-n.width/2}, ${-n.height/2+B})`);else _.attr("transform",`translate(0, ${-n.height/2+B})`);let v;if(e.look==="handDrawn"){let Q=y.svg(c),tt=vt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),ot=Q.path(Ee(S,T,x,b,i.rx),tt);v=c.insert(()=>ot,":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",de(e.cssStyles))}else if(v=c.insert("rect",":first-child"),v.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)v.attr("stroke-width",i.strokeWidth+"px");let E=T+u+p+Xh;c.append("line").attr("class","collapsed-separator").attr("x1",S+8).attr("y1",E).attr("x2",S+x-8).attr("y2",E).attr("stroke",o).attr("stroke-dasharray","3, 3");let D=E+Uh/2,P=2.5,Z=10;for(let Q=-1;Q<=1;Q++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Q*Z).attr("cy",D).attr("r",P).attr("fill",o);return W(e,v),e.calcIntersect=function(Q,tt){return R.rect(Q,tt)},e.intersect=function(Q){return R.rect(e,Q)},c}t(fg,"collapsedGroup");function tr(r,e,i,s){return r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}t(tr,"insertPolygonShape");var Kk=["right","left","up","down"],sc="point",Zk=t((r)=>{let e=new Set;for(let i of r)switch(i){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(i);break}return e},"expandAndDeduplicateDirections"),Qk=t((r)=>Kk.filter((e)=>r.has(e)).join("|")||sc,"getDirectionKey"),wp={"right|left|up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:0,y:0},{x:e,y:0},{x:s/2,y:2*i},{x:s-e,y:0},{x:s,y:0},{x:s,y:-r/3},{x:s+2*i,y:-r/2},{x:s,y:-2*r/3},{x:s,y:-r},{x:s-e,y:-r},{x:s/2,y:-r-2*i},{x:e,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*i,y:-r/2},{x:0,y:-r/3}],"right|left|up|down"),"right|left|up":t(({height:r,midpoint:e,width:i})=>[{x:e,y:0},{x:i-e,y:0},{x:i,y:-r/2},{x:i-e,y:-r},{x:e,y:-r},{x:0,y:-r/2}],"right|left|up"),"right|left|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i,y:0}],"right|left|down"),"right|up|down":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:i,y:-r+e},{x:0,y:-r}],"right|up|down"),"left|up|down":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:0,y:-r+e},{x:i,y:-r}],"left|up|down"),"right|left":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"right|left"),"up|down":t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"up|down"),"right|up":t(({height:r,midpoint:e,width:i})=>[{x:0,y:0},{x:i,y:-e},{x:0,y:-r}],"right|up"),"right|down":t(({height:r,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-r}],"right|down"),"left|up":t(({height:r,midpoint:e,width:i})=>[{x:i,y:0},{x:0,y:-e},{x:i,y:-r}],"left|up"),"left|down":t(({height:r,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-r}],"left|down"),right:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:0},{x:s,y:-r/2},{x:s-e,y:-r},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r+i}],"right"),left:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:0},{x:e,y:-i},{x:s-e,y:-i},{x:s-e,y:-r+i},{x:e,y:-r+i},{x:e,y:-r},{x:0,y:-r/2}],"left"),up:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:e,y:-i},{x:e,y:-r+i},{x:0,y:-r+i},{x:s/2,y:-r},{x:s,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i}],"up"),down:t(({height:r,midpoint:e,padding:i,width:s})=>[{x:s/2,y:0},{x:0,y:-i},{x:e,y:-i},{x:e,y:-r+i},{x:s-e,y:-r+i},{x:s-e,y:-i},{x:s,y:-i}],"down"),[sc]:()=>[{x:0,y:0}]},Jk=t((r,e,i,s)=>{let o=Zk(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=Qk(o);return(wp[f]??wp[sc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function pg(r,e){let i=e,{shapeSvg:s,bbox:o}=await X(r,i,It(i)),a=i.padding??0,c=o.height+2*a,n=c/2,d=o.width+2*n+a,f=i.width??0,p=i.positioned&&(i.widthInColumns??1)>1&&f>d?f:d,x=Jk(i.directions??[],o,i,p),b=tr(s,p,c,x);return b.attr("style",i.style??null),W(i,b),i.intersect=function(S){return R.polygon(i,x,S)},s}t(pg,"block_arrow");async function gg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,It(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=18,p=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(Ee(-x/2,S,x,b,p),vt(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",p).attr("ry",p).attr("style",o);B.append("line").attr("x1",-x/2).attr("y1",S+u).attr("x2",x/2).attr("y2",S+u).attr("style",`stroke:${d};stroke-width:1px`);for(let v=0;v<3;v++)B.append("circle").attr("cx",-x/2+12+v*9).attr("cy",S+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);B.append("rect").attr("class","browser-address-bar").attr("x",-x/2+44).attr("y",S+4).attr("width",Math.max(x-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${d};stroke-width:1px;opacity:0.6`),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return R.rect(e,v)},a}t(gg,"browser");var ta=12;async function mg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?28:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+ta),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),p=0,x=f,b=-u,S=0,T=[{x:p+ta,y:b},{x,y:b},{x,y:S},{x:p,y:S},{x:p,y:b+ta},{x:p+ta,y:b}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),E=vt(e,{}),D=se(T),P=v.path(D,E);if(B=n.insert(()=>P,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),_)B.attr("style",_)}else B=tr(n,f,u,T);if(s)B.attr("style",s);return W(e,B),e.intersect=function(v){return R.polygon(e,T,v)},n}t(mg,"card");function yg(r,e){let{nodeStyles:i}=L(e);e.label="";let s=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),c=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=y.svg(s),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=se(c),u=n.path(f,d),p=s.insert(()=>u,":first-child");if(o&&e.look!=="handDrawn")p.selectAll("path").attr("style",o);if(i&&e.look!=="handDrawn")p.selectAll("path").attr("style",i);return e.width=28,e.height=28,e.intersect=function(x){return R.polygon(e,c,x)},s}t(yg,"choice");async function ac(r,e,i){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await X(r,e,It(e)),d=16,f=i?.padding??n,u=Math.sqrt(c.width**2+c.height**2)/2,p=e.look==="neo"?u+d*2:u+f,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(a),T=vt(e,{}),B=S.circle(0,0,p*2,T);x=a.insert(()=>B,":first-child"),x.attr("class","basic label-container").attr("style",de(b))}else x=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",p).attr("cx",0).attr("cy",0);return W(e,x),e.calcIntersect=function(S,T){let B=S.width/2;return R.circle(S,B,T)},e.intersect=function(S){return l.info("Circle intersect",e,p,S),R.circle(e,p,S)},a}t(ac,"circle");async function xg(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,i,s),n=o.insert("rect",":first-child"),d=i.padding??0,f=i.positioned?i.width??0:a.width+d,u=i.positioned?i.height??0:a.height+d,p=i.positioned?-f/2:-a.width/2-c,x=i.positioned?-u/2:-a.height/2-c;return n.attr("class","basic cluster composite label-container").attr("style",i.style??null).attr("rx",i.rx??null).attr("ry",i.ry??null).attr("x",p).attr("y",x).attr("width",f).attr("height",u),W(i,n),i.intersect=function(b){return R.rect(i,b)},o}t(xg,"composite");async function Cg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await X(r,e,It(e)),d=i?.nodeBorder??i?.lineColor??"currentColor",f=e.padding??12,u=20,p=12,x=Math.max(c.width+f*2,e.width??0,90),b=Math.max(c.height+f*2+u,e.height??0),S=-b/2,{cssStyles:T}=e,B=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let E=y.svg(a).path(Ee(-x/2,S,x,b,p),vt(e,{}));if(B.node()?.appendChild(E),T)B.attr("style",T)}else B.append("rect").attr("x",-x/2).attr("y",S).attr("width",x).attr("height",b).attr("rx",p).attr("ry",p).attr("style",o);B.append("text").attr("x",-x/2+12).attr("y",S+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),W(e,B);let _=S+u+(b-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${_-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(v){return R.rect(e,v)},a}t(Cg,"consoleWindow");function bg(r){let e=Math.cos(Math.PI/4),i=Math.sin(Math.PI/4),s=r*2,o={x:s/2*e,y:s/2*i},a={x:-(s/2)*e,y:s/2*i},c={x:-(s/2)*e,y:-(s/2)*i},n={x:s/2*e,y:-(s/2)*i};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
230
|
-
M ${o.x},${o.y} L ${c.x},${c.y}`}t(bg,"createLine");function kg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=vt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=bg(a),p=n.path(u,d),x=o.insert(()=>f,":first-child");if(x.insert(()=>p),x.attr("class","outer-path"),c&&e.look!=="handDrawn")x.selectAll("path").attr("style",c);if(s&&e.look!=="handDrawn")x.selectAll("path").attr("style",s);return W(e,x),e.intersect=function(b){return l.info("crossedCircle intersect",e,{radius:a,point:b}),R.circle(e,a,b)},o}t(kg,"crossedCircle");function cr(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let p=0;p<s;p++){let x=n+p*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(cr,"generateCirclePoints");async function wg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+n,u=a.height+d,p=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...cr(f/2,-u/2,p,30,-90,0),{x:-f/2-p,y:p},...cr(f/2+p*2,-p,p,20,-180,-270),...cr(f/2+p*2,p,p,20,-90,-180),{x:-f/2-p,y:-u/2},...cr(f/2,u/2,p,20,0,90)],S=[{x:f/2,y:-u/2-p},{x:-f/2,y:-u/2-p},...cr(f/2,-u/2,p,20,-90,0),{x:-f/2-p,y:-p},...cr(f/2+f*0.1,-p,p,20,-180,-270),...cr(f/2+f*0.1,p,p,20,-90,-180),{x:-f/2-p,y:u/2},...cr(f/2,u/2,p,20,0,90),{x:-f/2,y:u/2+p},{x:f/2,y:u/2+p}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=se(b).replace("Z",""),E=T.path(v,B),D=se(S),P=T.path(D,{...B}),Z=o.insert("g",":first-child");if(Z.insert(()=>P,":first-child").attr("stroke-opacity",0),Z.insert(()=>E,":first-child"),Z.attr("class","text"),x&&e.look!=="handDrawn")Z.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${p}, 0)`),c.attr("transform",`translate(${-f/2+p-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,Z),e.intersect=function(Q){return R.polygon(e,S,Q)},o}t(wg,"curlyBraceLeft");function ur(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let p=0;p<s;p++){let x=n+p*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:b,y:S})}return c}t(ur,"generateCirclePoints");async function vg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),p=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...ur(f/2,-u/2,p,20,-90,0),{x:f/2+p,y:-p},...ur(f/2+p*2,-p,p,20,-180,-270),...ur(f/2+p*2,p,p,20,-90,-180),{x:f/2+p,y:u/2},...ur(f/2,u/2,p,20,0,90)],S=[{x:-f/2,y:-u/2-p},{x:f/2,y:-u/2-p},...ur(f/2,-u/2,p,20,-90,0),{x:f/2+p,y:-p},...ur(f/2+p*2,-p,p,20,-180,-270),...ur(f/2+p*2,p,p,20,-90,-180),{x:f/2+p,y:u/2},...ur(f/2,u/2,p,20,0,90),{x:f/2,y:u/2+p},{x:-f/2,y:u/2+p}],T=y.svg(o),B=vt(e,{fill:"none"});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let v=se(b).replace("Z",""),E=T.path(v,B),D=se(S),P=T.path(D,{...B}),Z=o.insert("g",":first-child");if(Z.insert(()=>P,":first-child").attr("stroke-opacity",0),Z.insert(()=>E,":first-child"),Z.attr("class","text"),x&&e.look!=="handDrawn")Z.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-p}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,Z),e.intersect=function(Q){return R.polygon(e,S,Q)},o}t(vg,"curlyBraceRight");function Te(r,e,i,s=100,o=0,a=180){let c=[],n=o*Math.PI/180,u=(a*Math.PI/180-n)/(s-1);for(let p=0;p<s;p++){let x=n+p*u,b=r+i*Math.cos(x),S=e+i*Math.sin(x);c.push({x:-b,y:-S})}return c}t(Te,"generateCirclePoints");async function Ag(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.look==="neo"?18:e.padding??0,d=e.look==="neo"?12:e.padding??0,f=a.width+(e.look==="neo"?n*2:n),u=a.height+(e.look==="neo"?d*2:d),p=Math.max(5,u*0.1),{cssStyles:x}=e,b=[...Te(f/2,-u/2,p,30,-90,0),{x:-f/2-p,y:p},...Te(f/2+p*2,-p,p,20,-180,-270),...Te(f/2+p*2,p,p,20,-90,-180),{x:-f/2-p,y:-u/2},...Te(f/2,u/2,p,20,0,90)],S=[...Te(-f/2+p+p/2,-u/2,p,20,-90,-180),{x:f/2-p/2,y:p},...Te(-f/2-p/2,-p,p,20,0,90),...Te(-f/2-p/2,p,p,20,-90,0),{x:f/2-p/2,y:-p},...Te(-f/2+p+p/2,u/2,p,30,-180,-270)],T=[{x:f/2,y:-u/2-p},{x:-f/2,y:-u/2-p},...Te(f/2,-u/2,p,20,-90,0),{x:-f/2-p,y:-p},...Te(f/2+p*2,-p,p,20,-180,-270),...Te(f/2+p*2,p,p,20,-90,-180),{x:-f/2-p,y:u/2},...Te(f/2,u/2,p,20,0,90),{x:-f/2,y:u/2+p},{x:f/2-p-p/2,y:u/2+p},...Te(-f/2+p+p/2,-u/2,p,20,-90,-180),{x:f/2-p/2,y:p},...Te(-f/2-p/2,-p,p,20,0,90),...Te(-f/2-p/2,p,p,20,-90,0),{x:f/2-p/2,y:-p},...Te(-f/2+p+p/2,u/2,p,30,-180,-270)],B=y.svg(o),_=vt(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let E=se(b).replace("Z",""),D=B.path(E,_),Z=se(S).replace("Z",""),Q=B.path(Z,_),tt=se(T),ot=B.path(tt,{..._}),ft=o.insert("g",":first-child");if(ft.insert(()=>ot,":first-child").attr("stroke-opacity",0),ft.insert(()=>D,":first-child"),ft.insert(()=>Q,":first-child"),ft.attr("class","text"),x&&e.look!=="handDrawn")ft.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return ft.attr("transform",`translate(${p-p/4}, 0)`),c.attr("transform",`translate(${-f/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),W(e,ft),e.intersect=function(dt){return R.polygon(e,T,dt)},o}t(Ag,"curlyBraces");async function $g(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=20,d=5,{shapeSvg:f,bbox:u}=await X(r,e,It(e)),p=Math.max(d,u.height+c*2,e?.height??0),x=p/2,b=x-Math.sqrt(Math.max(0,x**2-(u.height/2)**2)),S=Math.max(p/4,b),T=Math.max(n,u.width+a*2+S*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:B}=e,_=y.svg(f),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=T,D=p,P=E-x,Z=D/4,Q=[{x:P,y:0},{x:Z,y:0},{x:0,y:D/2},{x:Z,y:D},{x:P,y:D},...Qe(-P,-D/2,x,50,270,90)],tt=se(Q),ot=_.path(tt,v),ft=f.insert(()=>ot,":first-child");if(ft.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")ft.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")ft.selectChildren("path").attr("style",s);return ft.attr("transform",`translate(${-T/2}, ${-p/2})`),W(e,ft),e.intersect=function(dt){return R.polygon(e,Q,dt)},f}t($g,"curvedTrapezoid");async function qg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.padding??20,d=Math.max(a.width+n*2,e.width??0,100),f=Math.min(Math.max(d*0.23,16),56),u=f*0.27,p=Math.max(a.height+n*2,e.height?e.height-(2*f-u):0),x=Math.min(d*0.177,p*0.45),b=p+2*f-u,S=-b/2,T=S+2*f-u,B=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:_}=e;if(e.look==="handDrawn"){let tt=y.svg(o),ot=vt(e,{}),ft=tt.path(Ee(-d/2,T,d,p,x),ot),dt=tt.circle(0,S+f,f*2,ot);if(B.insert(()=>dt,":first-child"),B.insert(()=>ft,":first-child"),_)B.attr("style",_)}else B.append("rect").attr("x",-d/2).attr("y",T).attr("width",d).attr("height",p).attr("rx",x).attr("ry",x).attr("style",s),B.append("circle").attr("cx",0).attr("cy",S+f).attr("r",f).attr("style",s);W(e,B);let v=T+p/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let E=S+f,D=Math.asin(Math.min(1,(T-E)/f))*180/Math.PI,P=24,Q=[...Qe(0,-E,f,P,180+D,-D),...Qe(-(-d/2+x),-(T+x),x,12,90,0),...Qe(-(-d/2+x),-(b/2-x),x,12,360,270),...Qe(-(d/2-x),-(b/2-x),x,12,270,180),...Qe(-(d/2-x),-(T+x),x,12,180,90)];return e.intersect=function(tt){return R.polygon(e,Q,tt)},o}t(qg,"person");var t1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createCylinderPathD"),e1=t((r,e,i,s,o,a)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`].join(" "),"createOuterCylinderPathD"),r1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Sp=8,Tp=8;async function Wg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?24:o,c=e.look==="neo"?24:o,n=e.width??0;if(e.width){if(e.width=e.width-c,e.width<Tp)e.width=Tp}if(e.height){let v=n/2/(2.5+n/50);if(e.height=e.height-a-v*3,e.height<Sp)e.height=Sp}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,It(e)),p=Math.max(e.width??0,f.width)+c,x=p/2,b=x/(2.5+p/50),S=Math.max(e.height??0,f.height)+a+b,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(d),v=e1(0,0,p,S,x,b),E=r1(0,b,p,S,x,b),D=vt(e,{}),P=_.path(v,D),Z=_.path(E,vt(e,{fill:"none"}));if(T=d.insert(()=>Z,":first-child"),T=d.insert(()=>P,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=t1(0,0,p,S,x,b);T=d.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",de(B)).attr("style",s)}return T.attr("label-offset-y",b),T.attr("transform",`translate(${-p/2}, ${-(S/2+b)})`),W(e,T),u.attr("transform",`translate(${-(f.width/2)-(f.x-(f.left??0))}, ${-(f.height/2)+(e.padding??0)/1.5-(f.y-(f.top??0))})`),e.intersect=function(_){let v=R.rect(e,_),E=v.x-(e.x??0);if(x!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-b)){let D=b*b*(1-E*E/(x*x));if(D>0)D=Math.sqrt(D);if(D=b-D,_.y-(e.y??0)>0)D=-D;v.y+=D}return v},d}t(Wg,"cylinder");async function bi(r,e,i){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await X(r,e,It(e)),n=Math.max(c.width+i.labelPaddingX*2,e?.width||0),d=Math.max(c.height+i.labelPaddingY*2,e?.height||0),f=-n/2,u=-d/2,p,{rx:x,ry:b}=e,{cssStyles:S}=e;if(i?.rx&&i.ry)x=i.rx,b=i.ry;if(e.look==="handDrawn"){let T=y.svg(a),B=vt(e,{}),_=x||b?T.path(Ee(f,u,n,d,x||0),B):T.rectangle(f,u,n,d,B);p=a.insert(()=>_,":first-child"),p.attr("class","basic label-container").attr("style",de(S))}else p=a.insert("rect",":first-child"),p.attr("class","basic label-container").attr("style",o).attr("rx",de(x)).attr("ry",de(b)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return W(e,p,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(T,B){return R.rect(T,B)},e.intersect=function(T){return R.rect(e,T)},a}t(bi,"drawRect");async function zg(r,e){let{cssClasses:i,labelPaddingX:s,labelPaddingY:o,padding:a,width:c,height:n}=e,d={rx:0,ry:0,classes:i??"",labelPaddingX:s??(a??0)*2,labelPaddingY:o??a??0},f=await bi(r,e,d);if(e.look==="handDrawn"){let b=y.svg(f),S=vt(e,{}),T=f.select(".basic.label-container > path:nth-child(2)"),B=T.node();if(!B)return f;let _=null;if(B instanceof SVGGraphicsElement)_=B.getBBox();else return f;return f.insert(()=>b.line(_.x,_.y,_.x+_.width,_.y,S),".basic.label-container g.label"),f.insert(()=>b.line(_.x,_.y+_.height,_.x+_.width,_.y+_.height,S),".basic.label-container g.label"),T.remove(),f}let u=f.select(".basic.label-container"),p=(Number(u.attr("width"))||c)??0,x=(Number(u.attr("height"))||n)??0;if(p>0&&x>0)u.attr("stroke-dasharray",`${p} ${x}`);return f}t(zg,"datastore");async function Hg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?16:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=n.width+o,u=n.height+a,p=u*0.2,x=-f/2,b=-u/2-p/2,{cssStyles:S}=e,T=y.svg(c),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x,y:b+p},{x:-x,y:b+p},{x:-x,y:-b},{x,y:-b},{x,y:b},{x:-x,y:b},{x:-x,y:b+p}],v=T.polygon(_.map((D)=>[D.x,D.y]),B),E=c.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return d.attr("transform",`translate(${x+(e.padding??0)/2-(n.x-(n.left??0))}, ${b+p+(e.padding??0)/2-(n.y-(n.top??0))})`),W(e,E),e.intersect=function(D){return R.rect(e,D)},c}t(Hg,"dividedRectangle");async function Yg(r,e){let{labelStyles:i,nodeStyles:s}=L(e),o=e.look==="neo"?12:5;e.labelStyle=i;let a=e.padding??0,c=e.look==="neo"?16:a,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:f)+(c??0),p=u+o,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{roughness:0.2,strokeWidth:2.5}),B=vt(e,{roughness:0.2,strokeWidth:1.5}),_=S.circle(0,0,p*2,T),v=S.circle(0,0,u*2,B);x=n.insert("g",":first-child"),x.attr("class",de(e.cssClasses)).attr("style",de(b)),x.node()?.appendChild(_),x.node()?.appendChild(v)}else{x=n.insert("g",":first-child");let S=x.insert("circle",":first-child"),T=x.insert("circle");x.attr("class","basic label-container").attr("style",s),S.attr("class","outer-circle").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0),T.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return W(e,x),e.intersect=function(S){return l.info("DoubleCircle intersect",e,p,S),R.circle(e,p,S)},n}t(Yg,"doublecircle");async function jg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await X(r,e,It(e)),{theme:n,themeVariables:d}=m();er(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,p=a.height/2+f*2,x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(o),T=vt(e,{}),B=S.ellipse(0,0,u*2,p*2,T);if(x=o.insert(()=>B,":first-child"),x.attr("class","basic label-container"),b)x.attr("style",b)}else x=o.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",s).attr("rx",u).attr("ry",p).attr("cx",0).attr("cy",0);return e.width=u*2,e.height=p*2,W(e,x),e.calcIntersect=function(S,T){let B=S.width/2,_=S.height/2;return R.ellipse(S,B,_,T)},e.intersect=function(S){return R.ellipse(e,u,p,S)},o}t(jg,"usecaseEllipse");function Ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=vt(e,{fillStyle:"solid"});if(e.look!=="handDrawn")u.roughness=0;let p=d.circle(0,0,c*2,u),x=a.insert(()=>p,":first-child");if(x.selectAll("path").attr("style",`fill: ${f} !important;`),n&&n.length>0&&e.look!=="handDrawn")x.selectAll("path").attr("style",n);if(o&&e.look!=="handDrawn")x.selectAll("path").attr("style",o);return W(e,x),e.intersect=function(b){return l.info("filledCircle intersect",e,{radius:c,point:b}),R.circle(e,c,b)},a}t(Ug,"filledCircle");var Bp=10,_p=10;async function Xg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.height=e?.height??0,e.height<Bp)e.height=Bp;if(e.width=(e?.width??0)-a-a/2,e.width<_p)e.width=_p}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=(e?.width?e?.width:n.width)+(a??0),u=e?.height?e?.height:f+n.height,p=u,x=[{x:0,y:-u},{x:p,y:-u},{x:p/2,y:0}],{cssStyles:b}=e,S=y.svg(c),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=se(x),_=S.path(B,T),v=c.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(b&&e.look!=="handDrawn")v.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return e.width=f,e.height=u,W(e,v),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-u/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(E){return l.info("Triangle intersect",e,x,E),R.polygon(e,x,E)},c}t(Xg,"flippedTriangle");async function Gg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.padding??12,d=Math.max(a.width+n*2,e.width??0,90),f=a.height+n*2,u=Math.max(Math.min(f*0.16,14),8),p=Math.max(f+u,e.height??0),x=p-u,b=Math.max(d*0.38,28),S=-p/2,T=[{x:-d/2,y:S},{x:-d/2+b,y:S},{x:-d/2+b,y:S+u},{x:d/2,y:S+u},{x:d/2,y:p/2},{x:-d/2,y:p/2}],B=[`M${T[0].x},${T[0].y}`,...T.slice(1).map((D)=>`L${D.x},${D.y}`),"Z"].join(" "),{cssStyles:_}=e,v;if(e.look==="handDrawn"){let P=y.svg(o).path(B,vt(e,{}));if(v=o.insert(()=>P,":first-child").attr("class","basic label-container"),_)v.attr("style",_)}else v=o.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")W(e,v);else W(e,v,{width:d,height:p});let E=S+u+x/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${E-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(D){return R.polygon(e,T,D)},o}t(Gg,"folder");function Vg(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=L(e);e.label="";let c=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,d=Math.max(70,e?.width??0),f=Math.max(10,e?.height??0);if(i==="LR"||i==="RL")d=Math.max(10,e?.width??0),f=Math.max(70,e?.height??0);let u=-1*d/2,p=-1*f/2,x=y.svg(c),b=vt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")b.roughness=0,b.fillStyle="solid";let S=x.rectangle(u,p,d,f,b),T=c.insert(()=>S,":first-child");if(n&&e.look!=="handDrawn")T.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);W(e,T);let B=s?.padding??0;if(e.width&&e.height)e.width+=B/2||0,e.height+=B/2||0;return e.intersect=function(_){return R.rect(e,_)},c}t(Vg,"forkJoin");async function Kg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=15,a=10,c=e.look==="neo"?16:e.padding??0,n=e.look==="neo"?12:e.padding??0;if(e.width||e.height){if(e.height=(e?.height??0)-n*2,e.height<a)e.height=a;if(e.width=(e?.width??0)-c*2,e.width<o)e.width=o}let{shapeSvg:d,bbox:f}=await X(r,e,It(e)),u=(e?.height?e?.height:Math.max(a,f.height))+n*2,p=u/2,x=p-Math.sqrt(Math.max(0,p**2-(f.height/2)**2)),b=(e?.width?e?.width:Math.max(o,f.width)+x*2)+c*2,{cssStyles:S}=e,T=y.svg(d),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-b/2,y:-u/2},{x:b/2-p,y:-u/2},...Qe(-b/2+p,0,p,50,90,270),{x:b/2-p,y:u/2},{x:-b/2,y:u/2}],v=se(_),E=T.path(v,B),D=d.insert(()=>E,":first-child");if(D.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")D.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")D.selectChildren("path").attr("style",s);return W(e,D),e.intersect=function(P){return l.info("Pill intersect",e,{radius:p,point:P}),R.polygon(e,_,P)},d}t(Kg,"halfRoundedRectangle");var i1=t((r,e,i,s,o)=>[`M${r+o},${e}`,`L${r+i-o},${e}`,`L${r+i},${e-s/2}`,`L${r+i-o},${e-s}`,`L${r+o},${e-s}`,`L${r},${e-s/2}`,"Z"].join(" "),"createHexagonPathD");async function Zg(r,e){let{labelStyles:i,nodeStyles:s}=L(e),o=e.look==="neo"?3.5:4;e.labelStyle=i;let a=e.padding??0,c=70,n=32,d=e.look==="neo"?c:a,f=e.look==="neo"?n:a;if(e.width||e.height){let E=(e.height??0)/o;e.width=(e?.width??0)-2*E-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:p}=await X(r,e,It(e)),x=(e?.height?e?.height:p.height)+d,b=x/o,S=(e?.width?e?.width:p.width)+2*b+f,T=[{x:b,y:0},{x:S-b,y:0},{x:S,y:-x/2},{x:S-b,y:-x},{x:b,y:-x},{x:0,y:-x/2}],B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(u),E=vt(e,{}),D=i1(0,0,S,x,b),P=v.path(D,E);if(B=u.insert(()=>P,":first-child").attr("transform",`translate(${-S/2}, ${x/2})`),_)B.attr("style",_)}else B=tr(u,S,x,T);if(s)B.attr("style",s);return e.width=S,e.height=x,W(e,B),e.intersect=function(v){return R.polygon(e,T,v)},u}t(Zg,"hexagon");async function Jg(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await X(r,e,It(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=vt(e,{});if(e.look!=="handDrawn")f.roughness=0,f.fillStyle="solid";let u=[{x:0,y:0},{x:a,y:0},{x:0,y:c},{x:a,y:c}],p=se(u),x=d.path(p,f),b=o.insert(()=>x,":first-child");if(b.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")b.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")b.selectChildren("path").attr("style",s);return b.attr("transform",`translate(${-a/2}, ${-c/2})`),W(e,b),e.intersect=function(S){return l.info("Pill intersect",e,{points:u}),R.polygon(e,u,S)},o}t(Jg,"hourglass");async function ym(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:p}=await X(r,e,"icon-shape default"),x=e.pos==="t",b=n,S=n,{nodeBorder:T}=i,{stylesMap:B}=Ve(e),_=-S/2,v=-b/2,E=e.label?8:0,D=y.svg(f),P=vt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let Z=D.rectangle(_,v,S,b,P),Q=Math.max(S,u.width),tt=b+u.height+E,ot=D.rectangle(-Q/2,-tt/2,Q,tt,{...P,fill:"transparent",stroke:"none"}),ft=f.insert(()=>Z,":first-child"),dt=f.insert(()=>ot);if(e.icon){let lt=f.append("g");lt.html(`<g>${await mr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=lt.node().getBBox(),{width:K,height:et,x:U,y:ut}=N;lt.attr("transform",`translate(${-K/2-U},${x?u.height/2+E/2-et/2-ut:-u.height/2-E/2-et/2-ut})`),lt.attr("style",`color: ${B.get("stroke")??T};`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${x?-tt/2:tt/2-u.height})`),ft.attr("transform",`translate(0,${x?u.height/2+E/2:-u.height/2-E/2})`),W(e,dt),e.intersect=function(lt){if(l.info("iconSquare intersect",e,lt),!e.label)return R.rect(e,lt);let N=e.x??0,K=e.y??0,et=e.height??0,U=[];if(x)U=[{x:N-u.width/2,y:K-et/2},{x:N+u.width/2,y:K-et/2},{x:N+u.width/2,y:K-et/2+u.height+E},{x:N+S/2,y:K-et/2+u.height+E},{x:N+S/2,y:K+et/2},{x:N-S/2,y:K+et/2},{x:N-S/2,y:K-et/2+u.height+E},{x:N-u.width/2,y:K-et/2+u.height+E}];else U=[{x:N-S/2,y:K-et/2},{x:N+S/2,y:K-et/2},{x:N+S/2,y:K-et/2+b},{x:N+u.width/2,y:K-et/2+b},{x:N+u.width/2/2,y:K+et/2},{x:N-u.width/2,y:K+et/2},{x:N-u.width/2,y:K-et/2+b},{x:N-S/2,y:K-et/2+b}];return R.polygon(e,U,lt)},f}t(ym,"icon");async function xm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,label:p}=await X(r,e,"icon-shape default"),x=20,b=e.label?8:0,S=e.pos==="t",{nodeBorder:T,mainBkg:B}=i,{stylesMap:_}=Ve(e),v=y.svg(f),E=vt(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let D=_.get("fill");E.stroke=D??B;let P=f.append("g");if(e.icon)P.html(`<g>${await mr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let Z=P.node().getBBox(),{width:Q,height:tt,x:ot,y:ft}=Z,dt=Math.max(Q,tt)*Math.SQRT2+x*2,lt=v.circle(0,0,dt,E),N=Math.max(dt,u.width),K=dt+u.height+b,et=v.rectangle(-N/2,-K/2,N,K,{...E,fill:"transparent",stroke:"none"}),U=f.insert(()=>lt,":first-child"),ut=f.insert(()=>et);return P.attr("transform",`translate(${-Q/2-ot},${S?u.height/2+b/2-tt/2-ft:-u.height/2-b/2-tt/2-ft})`),P.attr("style",`color: ${_.get("stroke")??T};`),p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${S?-K/2:K/2-u.height})`),U.attr("transform",`translate(0,${S?u.height/2+b/2:-u.height/2-b/2})`),W(e,ut),e.intersect=function(ct){return l.info("iconSquare intersect",e,ct),R.rect(e,ct)},f}t(xm,"iconCircle");async function Cm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:p,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+p*2,T=n+p*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ve(e),E=-T/2,D=-S/2,P=e.label?8:0,Z=y.svg(f),Q=vt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let tt=v.get("fill");Q.stroke=tt??_;let ot=Z.path(Ee(E,D,T,S,5),Q),ft=Math.max(T,u.width),dt=S+u.height+P,lt=Z.rectangle(-ft/2,-dt/2,ft,dt,{...Q,fill:"transparent",stroke:"none"}),N=f.insert(()=>ot,":first-child").attr("class","icon-shape2"),K=f.insert(()=>lt);if(e.icon){let et=f.append("g");et.html(`<g>${await mr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let U=et.node().getBBox(),{width:ut,height:ct,x:_t,y:Lt}=U;et.attr("transform",`translate(${-ut/2-_t},${b?u.height/2+P/2-ct/2-Lt:-u.height/2-P/2-ct/2-Lt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-dt/2:dt/2-u.height})`),N.attr("transform",`translate(0,${b?u.height/2+P/2:-u.height/2-P/2})`),W(e,K),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return R.rect(e,et);let U=e.x??0,ut=e.y??0,ct=e.height??0,_t=[];if(b)_t=[{x:U-u.width/2,y:ut-ct/2},{x:U+u.width/2,y:ut-ct/2},{x:U+u.width/2,y:ut-ct/2+u.height+P},{x:U+T/2,y:ut-ct/2+u.height+P},{x:U+T/2,y:ut+ct/2},{x:U-T/2,y:ut+ct/2},{x:U-T/2,y:ut-ct/2+u.height+P},{x:U-u.width/2,y:ut-ct/2+u.height+P}];else _t=[{x:U-T/2,y:ut-ct/2},{x:U+T/2,y:ut-ct/2},{x:U+T/2,y:ut-ct/2+S},{x:U+u.width/2,y:ut-ct/2+S},{x:U+u.width/2/2,y:ut+ct/2},{x:U-u.width/2,y:ut+ct/2},{x:U-u.width/2,y:ut-ct/2+S},{x:U-T/2,y:ut-ct/2+S}];return R.polygon(e,_t,et)},f}t(Cm,"iconRounded");async function bm(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=L(e);e.labelStyle=o;let a=e.assetHeight??48,c=e.assetWidth??48,n=Math.max(a,c),d=s?.wrappingWidth;e.width=Math.max(n,d??0);let{shapeSvg:f,bbox:u,halfPadding:p,label:x}=await X(r,e,"icon-shape default"),b=e.pos==="t",S=n+p*2,T=n+p*2,{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=Ve(e),E=-T/2,D=-S/2,P=e.label?8:0,Z=y.svg(f),Q=vt(e,{});if(e.look!=="handDrawn")Q.roughness=0,Q.fillStyle="solid";let tt=v.get("fill");Q.stroke=tt??_;let ot=Z.path(Ee(E,D,T,S,0.1),Q),ft=Math.max(T,u.width),dt=S+u.height+P,lt=Z.rectangle(-ft/2,-dt/2,ft,dt,{...Q,fill:"transparent",stroke:"none"}),N=f.insert(()=>ot,":first-child"),K=f.insert(()=>lt);if(e.icon){let et=f.append("g");et.html(`<g>${await mr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let U=et.node().getBBox(),{width:ut,height:ct,x:_t,y:Lt}=U;et.attr("transform",`translate(${-ut/2-_t},${b?u.height/2+P/2-ct/2-Lt:-u.height/2-P/2-ct/2-Lt})`),et.attr("style",`color: ${v.get("stroke")??B};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${b?-dt/2:dt/2-u.height})`),N.attr("transform",`translate(0,${b?u.height/2+P/2:-u.height/2-P/2})`),W(e,K),e.intersect=function(et){if(l.info("iconSquare intersect",e,et),!e.label)return R.rect(e,et);let U=e.x??0,ut=e.y??0,ct=e.height??0,_t=[];if(b)_t=[{x:U-u.width/2,y:ut-ct/2},{x:U+u.width/2,y:ut-ct/2},{x:U+u.width/2,y:ut-ct/2+u.height+P},{x:U+T/2,y:ut-ct/2+u.height+P},{x:U+T/2,y:ut+ct/2},{x:U-T/2,y:ut+ct/2},{x:U-T/2,y:ut-ct/2+u.height+P},{x:U-u.width/2,y:ut-ct/2+u.height+P}];else _t=[{x:U-T/2,y:ut-ct/2},{x:U+T/2,y:ut-ct/2},{x:U+T/2,y:ut-ct/2+S},{x:U+u.width/2,y:ut-ct/2+S},{x:U+u.width/2/2,y:ut+ct/2},{x:U-u.width/2,y:ut+ct/2},{x:U-u.width/2,y:ut-ct/2+S},{x:U-T/2,y:ut-ct/2+S}];return R.polygon(e,_t,et)},f}t(bm,"iconSquare");async function km(r,e,{config:{flowchart:i}}){let s=new Image;s.src=e?.img??"",await s.decode();let o=Number(s.naturalWidth.toString().replace("px","")),a=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;let{labelStyles:c}=L(e);e.labelStyle=c;let n=i?.wrappingWidth;e.defaultWidth=i?.wrappingWidth;let d=Math.max(e.label?n??0:0,e?.assetWidth??o),f=e.constraint==="on"?e?.assetHeight?e.assetHeight*e.imageAspectRatio:d:d,u=e.constraint==="on"?f/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(f,n??0);let{shapeSvg:p,bbox:x,label:b}=await X(r,e,"image-shape default"),S=e.pos==="t",T=-f/2,B=-u/2,_=e.label?8:0,v=y.svg(p),E=vt(e,{});if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let D=v.rectangle(T,B,f,u,E),P=Math.max(f,x.width),Z=u+x.height+_,Q=v.rectangle(-P/2,-Z/2,P,Z,{...E,fill:"none",stroke:"none"}),tt=p.insert(()=>D,":first-child"),ot=p.insert(()=>Q);if(e.img){let ft=p.append("image");ft.attr("href",e.img),ft.attr("width",f),ft.attr("height",u),ft.attr("preserveAspectRatio","none"),ft.attr("transform",`translate(${-f/2},${S?Z/2-u:-Z/2})`)}return b.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${S?-u/2-x.height/2-_/2:u/2-x.height/2+_/2})`),tt.attr("transform",`translate(0,${S?x.height/2+_/2:-x.height/2-_/2})`),W(e,ot),e.intersect=function(ft){if(l.info("iconSquare intersect",e,ft),!e.label)return R.rect(e,ft);let dt=e.x??0,lt=e.y??0,N=e.height??0,K=[];if(S)K=[{x:dt-x.width/2,y:lt-N/2},{x:dt+x.width/2,y:lt-N/2},{x:dt+x.width/2,y:lt-N/2+x.height+_},{x:dt+f/2,y:lt-N/2+x.height+_},{x:dt+f/2,y:lt+N/2},{x:dt-f/2,y:lt+N/2},{x:dt-f/2,y:lt-N/2+x.height+_},{x:dt-x.width/2,y:lt-N/2+x.height+_}];else K=[{x:dt-f/2,y:lt-N/2},{x:dt+f/2,y:lt-N/2},{x:dt+f/2,y:lt-N/2+u},{x:dt+x.width/2,y:lt-N/2+u},{x:dt+x.width/2/2,y:lt+N/2},{x:dt-x.width/2,y:lt+N/2},{x:dt-x.width/2,y:lt-N/2+u},{x:dt-f/2,y:lt-N/2+u}];return R.polygon(e,K,ft)},p}t(km,"imageSquare");async function wm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a*2,e.height??0),u=Math.max(d.width+c*2,(e.width??0)-f),p=[{x:0,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:-3*f/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(p),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return R.polygon(e,p,S)},n}t(wm,"inv_trapezoid");async function Sm(r,e){let{shapeSvg:i,bbox:s,label:o}=await X(r,e,"label"),a=i.insert("rect",":first-child"),c=0.1,n=0.1;return a.attr("width",0.1).attr("height",0.1),i.attr("class","label edgeLabel"),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),W(e,a),e.intersect=function(d){return R.rect(e,d)},i}t(Sm,"labelRect");async function Tm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),p=[{x:0,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:-(3*f)/6,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(p),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return R.polygon(e,p,S)},n}t(Tm,"lean_left");async function Bm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),p=[{x:-3*f/6,y:0},{x:u,y:0},{x:u+3*f/6,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(p),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return R.polygon(e,p,S)},n}t(Bm,"lean_right");function _m(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",It(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,c=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),d=7,f=[{x:c,y:0},{x:0,y:n+d/2},{x:c-2*d,y:n+d/2},{x:0,y:2*n},{x:c,y:n-d/2},{x:2*d,y:n-d/2}],u=y.svg(o),p=vt(e,{});if(e.look!=="handDrawn")p.roughness=0,p.fillStyle="solid";let x=se(f),b=u.path(x,p),S=o.insert(()=>b,":first-child");if(S.attr("class","outer-path"),a&&e.look!=="handDrawn")S.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")S.selectAll("path").attr("style",s);return S.attr("transform",`translate(-${c/2},${-n})`),W(e,S),e.intersect=function(T){return l.info("lightningBolt intersect",e,T),R.polygon(e,f,T)},o}t(_m,"lightningBolt");var o1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`a${o},${a} 0,0,0 ${i},0`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createCylinderPathD"),s1=t((r,e,i,s,o,a,c)=>[`M${r},${e+a}`,`M${r+i},${e+a}`,`a${o},${a} 0,0,0 ${-i},0`,`l0,${s}`,`a${o},${a} 0,0,0 ${i},0`,`l0,${-s}`,`M${r},${e+a+c}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createOuterCylinderPathD"),a1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),vp=10,Lp=10;async function vm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?24:o;if(e.width||e.height){let _=e.width??0;if(e.width=(e.width??0)-a,e.width<Lp)e.width=Lp;let E=_/2/(2.5+_/50);if(e.height=(e.height??0)-c-E*3,e.height<vp)e.height=vp}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=(e?.width?e?.width:d.width)+a*2,p=u/2,x=p/(2.5+u/50),b=(e?.height?e?.height:d.height)+x+c*2,S=b*0.1,T,{cssStyles:B}=e;if(e.look==="handDrawn"){let _=y.svg(n),v=s1(0,0,u,b,p,x,S),E=a1(0,x,u,b,p,x),D=vt(e,{}),P=_.path(v,D),Z=_.path(E,D);if(n.insert(()=>Z,":first-child").attr("class","line"),T=n.insert(()=>P,":first-child"),T.attr("class","basic label-container"),B)T.attr("style",B)}else{let _=o1(0,0,u,b,p,x,S);T=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container outer-path").attr("style",de(B)).attr("style",s)}return T.attr("label-offset-y",x),T.attr("transform",`translate(${-u/2}, ${-(b/2+x)})`),W(e,T),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),e.intersect=function(_){let v=R.rect(e,_),E=v.x-(e.x??0);if(p!=0&&(Math.abs(E)<(e.width??0)/2||Math.abs(E)==(e.width??0)/2&&Math.abs(v.y-(e.y??0))>(e.height??0)/2-x)){let D=x*x*(1-E*E/(p*p));if(D>0)D=Math.sqrt(D);if(D=x-D,_.y-(e.y??0)>0)D=-D;v.y+=D}return v},n}t(vm,"linedCylinder");async function Lm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height){let D=e.width;if(e.width=(D??0)*10/11-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=(e?.width?e?.width:d.width)+(a??0)*2,p=(e?.height?e?.height:d.height)+(c??0)*2,x=e.look==="neo"?p/4:p/8,b=p+x,{cssStyles:S}=e,T=y.svg(n),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:b/2},...wr(-u/2-u/2*0.1,b/2,u/2+u/2*0.1,b/2,x,0.8),{x:u/2+u/2*0.1,y:-b/2},{x:-u/2-u/2*0.1,y:-b/2},{x:-u/2,y:-b/2},{x:-u/2,y:b/2*1.1},{x:-u/2,y:-b/2}],v=T.polygon(_.map((D)=>[D.x,D.y]),B),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),S&&e.look!=="handDrawn")E.selectAll("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return E.attr("transform",`translate(0,${-x/2})`),f.attr("transform",`translate(${-u/2+(e.padding??0)+u/2*0.1/2-(d.x-(d.left??0))},${-p/2+(e.padding??0)-x-(d.y-(d.top??0))})`),W(e,E),e.intersect=function(D){return R.polygon(e,_,D)},n}t(Lm,"linedWaveEdgedRect");var n1=56,Gh=72,Fp=8,Mp=2,l1=8,h1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Ap=Math.PI/3,Ep=0.6,Vh=t((r,e)=>{let i=e*Ep,s=e*Math.sqrt(1-Ep**2),o=Math.cos(Ap),a=-Math.sin(Ap),c=i*-a,n=r+i*o,d=s*o,f=s*a;return`M ${c-d} ${n-f} L ${c+d} ${n+f}`},"businessMarkerPathForCircle"),c1={normal:Vh(-24,12),hollow:Vh(-23,9),awesome:Vh(-21,13),icon:"M 12 -8 L 26 -26"},$p=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel"),nc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,vt(e,o?{fill:"none"}:{}));return r.insert(()=>n,":first-child").attr("class",s)}let a=r.append("path").attr("class",s).attr("d",i);if(o)a.attr("fill","none");return a},"appendActorPath"),u1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,vt(e,c?{fill:"none"}:{}));return r.insert(()=>f,":first-child").attr("class",a)}let n=r.append("circle").attr("class",a).attr("cx",i).attr("cy",s).attr("r",o);if(c)n.attr("fill","none");return n},"appendActorCircle");var d1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",c1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Io(r,e,i,s){let{labelStyles:o,nodeStyles:a}=L(e);e.labelStyle=o;let c=i==="icon"||e.stereotype!==void 0?{...e,icon:i==="icon"?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:n,bbox:d,label:f}=await X(r,c,It(e,`usecase-actor-variant usecase-actor-${i}`)),u=e.accessibleName??e.label;if(u)n.attr("role","img").attr("aria-label",u);f.attr("class","label actor-label usecase-actor-label");let{theme:p,themeVariables:x}=m();er(n,e.colorIndex,p,x.borderColorArray);let b,S;if(e.stereotype){let tt=await Ir(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});b=tt.label.attr("class","label usecase-stereotype"),S=tt.bbox}let T=n.append("g").attr("class",`usecase-actor-glyph ${h1[i]}`).attr("style",a||null);await s(T,e),d1(T,e,i);let B=e.padding??l1,_=S?.height??0,v=Gh+Fp+d.height+(S?_+Mp:0),E=Math.max(n1,d.width,S?.width??0)+B*2,D=v+B*2,P=-v/2;T.attr("transform",`translate(0,${P+Gh/2})`);let Z=P+Gh+Fp;if(b&&S)Z+=_/2,$p(b,S,Z),Z+=_/2+Mp;$p(f,d,Z+d.height/2);let Q=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-E/2).attr("y",-D/2).attr("width",E).attr("height",D).attr("opacity",0).attr("aria-hidden","true");return W(e,Q),e.intersect=(tt)=>R.rect(e,tt),n}t(Io,"renderUsecaseActor");var f1=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Fm(r,e){return Io(r,e,"normal",(i,s)=>{nc(i,s,f1,"usecase-actor-stick")})}t(Fm,"usecaseActor");var p1=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Mm(r,e){return Io(r,e,"awesome",(i,s)=>{nc(i,s,p1,"usecase-actor-awesome-silhouette")})}t(Mm,"usecaseActorAwesome");var g1=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Em(r,e){return Io(r,e,"hollow",(i,s)=>{u1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),nc(i,s,g1,"usecase-actor-hollow-body",!0)})}t(Em,"usecaseActorHollow");var mi=52,Ip=42,Op=-2,m1=t(async(r,e)=>{let i=-mi/2,s=Op-mi/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,mi,mi,vt(e,{}));r.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else r.append("rect").attr("class","usecase-actor-icon-frame").attr("x",i).attr("y",s).attr("width",mi).attr("height",mi).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Fs(o.includes(":")?o:`fa:${o}`),c=await mr(o,{height:Ip,width:Ip,fallbackPrefix:"fa"}),n=r.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${c}</g>`),d=n.node()?.getBBox();if(d)n.attr("transform",`translate(${-d.width/2-d.x},${Op-d.height/2-d.y})`)},"drawIconActor");async function $m(r,e){return Io(r,e,"icon",m1)}t($m,"usecaseActorIcon");var Dp=t((r,e,i)=>{let s=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);r.attr("transform",`translate(${-e.width/2-s},${i-e.height/2-o})`)},"positionLabel");async function Im(r,e){let i=e,{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await X(r,a,It(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:p}=m();er(c,e.colorIndex,u,p.borderColorArray);let x,b;if(i.stereotype){let N=await Ir(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=N.label.attr("class","label usecase-stereotype"),b=N.bbox}let S=b?2:0,T=n.height+(b?.height??0)+S,B=Math.max(n.width,b?.width??0),_=d??10,v=B/2+_*2,E=T/2+_*2,D=Math.min(Math.max(_/5,1),_/2),P=B/2+D,Z=v-D,Q=P/v,tt=Z/v,ot=E*Math.sqrt(Math.max(0,1-Q*Q)),ft=-E*Math.sqrt(Math.max(0,1-tt*tt));if(x&&b)Dp(x,b,-T/2+b.height/2);Dp(f,n,T/2-n.height/2);let dt;if(e.look==="handDrawn"){let K=y.svg(c).ellipse(0,0,v*2,E*2,vt(e,{}));dt=c.insert(()=>K,":first-child").attr("class","basic label-container usecase-business-ellipse")}else dt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",v).attr("ry",E).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${P} ${ot} L ${Z} ${ft}`).attr("fill","none").attr("style",o||null);let lt=i.accessibleName??i.label;if(lt)c.attr("role","img").attr("aria-label",lt);return W(e,dt),e.calcIntersect=(N,K)=>R.ellipse(N,N.width/2,N.height/2,K),e.intersect=(N)=>R.ellipse(e,v,E,N),c}t(Im,"usecaseBusiness");var Kh=8,Pp=4,y1=1,Zh=t((r,e,i,s)=>{let o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);r.attr("transform",`translate(${i-e.width/2-o},${s-e.height/2-a})`)},"positionLabel"),x1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:y1},"numericStrokeWidth");async function Om(r,e){let i=e,{labelStyles:s,nodeStyles:o}=L(e),{stylesMap:a}=Ve(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e,"usecase-json-table"));if(c.attr("role","img"),i.accessibleName)c.attr("aria-label",i.accessibleName);d.attr("class","label usecase-json-title");let f=c.append("g").attr("class","usecase-json-table-grid"),u=[];for(let N of i.jsonRows??[]){let K=await Ir(f,N.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),et=await Ir(f,N.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:K.label.attr("class","label usecase-json-key"),bbox:K.bbox},value:{label:et.label.attr("class","label usecase-json-value"),bbox:et.bbox}})}let p=Math.max(0,...u.map(({key:N})=>N.bbox.width))+Kh*2,x=Math.max(0,...u.map(({value:N})=>N.bbox.width))+Kh*2,b=n.width+Kh*2,S=Math.max(b,p+x),T=x+Math.max(0,S-p-x),B=n.height+Pp*2,_=u.map(({key:N,value:K})=>Math.max(N.bbox.height,K.bbox.height)+Pp*2),v=B+_.reduce((N,K)=>N+K,0),E=x1(a.get("stroke-width")),D=S+E*2,P=v+E*2,Z=-S/2,Q=-v/2,tt=e.look==="handDrawn"?y.svg(c):void 0,ot=tt?vt(e,{}):void 0,ft=t((N,K,et,U,ut,ct)=>{if(tt&&ot){let _t=tt.rectangle(et,U,ut,ct,ot);return N.insert(()=>_t,":first-child").attr("class",K)}return N.insert("rect",":first-child").attr("class",K).attr("x",et).attr("y",U).attr("width",ut).attr("height",ct).attr("style",o)},"insertCell"),dt=ft(c,"label-container usecase-json-border",-D/2,-P/2,D,P);ft(f,"usecase-json-cell usecase-json-title-cell",Z,Q,S,B),f.node()?.append(d.node()),Zh(d,n,0,Q+B/2);let lt=Q+B;return u.forEach(({key:N,value:K},et)=>{let U=_[et],ut=f.append("g").attr("class","usecase-json-row").attr("data-row-index",et).attr("transform",`translate(0,${lt})`);ft(ut,"usecase-json-cell usecase-json-key-cell",Z,0,p,U),ft(ut,"usecase-json-cell usecase-json-value-cell",Z+p,0,T,U),ut.node()?.append(N.label.node(),K.label.node()),Zh(N.label,N.bbox,Z+p/2,U/2),Zh(K.label,K.bbox,Z+p+T/2,U/2),lt+=U}),W(e,dt),e.intersect=(N)=>R.rect(e,N),c}t(Om,"usecaseJsonTable");async function Dm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=e.look==="neo"?10:5;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2-2*n,10),e.height=Math.max((e?.height??0)-c*2-2*n,10);let{shapeSvg:d,bbox:f,label:u}=await X(r,e,It(e)),p=(e?.width?e?.width:f.width)+a*2+2*n,x=(e?.height?e?.height:f.height)+c*2+2*n,b=p-2*n,S=x-2*n,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(d),E=vt(e,{}),D=[{x:T-n,y:B+n},{x:T-n,y:B+S+n},{x:T+b-n,y:B+S+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B+S-n},{x:T+b+n,y:B+S-n},{x:T+b+n,y:B-n},{x:T+n,y:B-n},{x:T+n,y:B},{x:T,y:B},{x:T,y:B+n}],P=[{x:T,y:B+n},{x:T+b-n,y:B+n},{x:T+b-n,y:B+S},{x:T+b,y:B+S},{x:T+b,y:B},{x:T,y:B}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let Z=se(D),Q=v.path(Z,E),tt=se(P),ot=v.path(tt,E);if(e.look!=="handDrawn")Q=Jh(Q),ot=Jh(ot);let ft=d.insert("g",":first-child");if(ft.insert(()=>Q),ft.insert(()=>ot),ft.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ft.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return u.attr("transform",`translate(${-(f.width/2)-n-(f.x-(f.left??0))}, ${-(f.height/2)+n-(f.y-(f.top??0))})`),W(e,ft),e.intersect=function(dt){return R.polygon(e,D,dt)},d}t(Dm,"multiRect");async function Pm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=e.padding??0,d=e.look==="neo"?16:n,f=e.look==="neo"?12:n,u=!0;if(e.width||e.height)u=!1,e.width=(e?.width??0)-d*2,e.height=(e?.height??0)-f*3;let p=Math.max(a.width,e?.width??0)+d*2,x=Math.max(a.height,e?.height??0)+f*3,b=e.look==="neo"?x/4:x/8,S=x+(u?b/2:-b/2),T=-p/2,B=-S/2,_=10,{cssStyles:v}=e,E=wr(T-_,B+S+_,T+p-_,B+S+_,b,0.8),D=E?.[E.length-1],P=[{x:T-_,y:B+_},{x:T-_,y:B+S+_},...E,{x:T+p-_,y:D.y-_},{x:T+p,y:D.y-_},{x:T+p,y:D.y-2*_},{x:T+p+_,y:D.y-2*_},{x:T+p+_,y:B-_},{x:T+_,y:B-_},{x:T+_,y:B},{x:T,y:B},{x:T,y:B+_}],Z=[{x:T,y:B+_},{x:T+p-_,y:B+_},{x:T+p-_,y:D.y-_},{x:T+p,y:D.y-_},{x:T+p,y:B},{x:T,y:B}],Q=y.svg(o),tt=vt(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let ot=se(P),ft=Q.path(ot,tt),dt=se(Z),lt=Q.path(dt,tt),N=o.insert(()=>ft,":first-child");if(N.insert(()=>lt),N.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")N.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")N.selectAll("path").attr("style",s);return N.attr("transform",`translate(0,${-b/2})`),c.attr("transform",`translate(${-(a.width/2)-_-(a.x-(a.left??0))}, ${-(a.height/2)+_-b-(a.y-(a.top??0))})`),W(e,N),e.intersect=function(K){return R.polygon(e,P,K)},o}t(Pm,"multiWaveEdgedRectangle");async function Rm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);if(e.labelStyle=s,!(e.useHtmlLabels||Vt(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=Math.max(n.width+(e.padding??0)*2,e?.width??0),u=Math.max(n.height+(e.padding??0)*2,e?.height??0),p=-f/2,x=-u/2,{cssStyles:b}=e,S=y.svg(c),T=vt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=S.rectangle(p,x,f,u,T),_=c.insert(()=>B,":first-child");if(_.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),b&&e.look!=="handDrawn")_.selectAll("path").attr("style",b);if(o&&e.look!=="handDrawn")_.selectAll("path").attr("style",o);return d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,_),e.intersect=function(v){return R.rect(e,v)},c}t(Rm,"note");var C1=t((r,e,i)=>[`M${r+i/2},${e}`,`L${r+i},${e-i/2}`,`L${r+i/2},${e-i}`,`L${r},${e-i/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function qm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,It(e)),c=a.width+(e.padding??0),n=a.height+(e.padding??0),d=c+n,f=0.5,u=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],p,{cssStyles:x}=e;if(e.look==="handDrawn"){let b=y.svg(o),S=vt(e,{}),T=C1(0,0,d),B=b.path(T,S);if(p=o.insert(()=>B,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x)p.attr("style",x)}else p=tr(o,d,d,u),p.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)p.attr("style",s);return W(e,p),e.calcIntersect=function(b,S){let T=b.width,B=[{x:T/2,y:0},{x:T,y:-T/2},{x:T/2,y:-T},{x:0,y:-T/2}];return R.polygon(b,B,S)},e.intersect=function(b){return this.calcIntersect(e,b)},o}t(qm,"question");async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?21:o??0,c=e.look==="neo"?12:o??0,{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=d.width+(e.look==="neo"?a*2:a),p=Math.max(d.height+(e.look==="neo"?c*2:c),e.height??0),x=p/4,S=-Math.max(u,(e.width??0)-x)/2,T=-p/2,B=T/2,_=[{x:S+B,y:T},{x:S,y:0},{x:S+B,y:-T},{x:-S,y:-T},{x:-S,y:T}],{cssStyles:v}=e,E=y.svg(n),D=vt(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=se(_),Z=E.path(P,D),Q=n.insert(()=>Z,":first-child");if(Q.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")Q.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")Q.selectAll("path").attr("style",s);return Q.attr("transform",`translate(${-B/2},0)`),f.attr("transform",`translate(${-B/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,Q),e.intersect=function(tt){return R.polygon(e,_,tt)},n}t(Wm,"rect_left_inv_arrow");async function Nm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o;if(!e.cssClasses)o="node default";else o="node "+e.cssClasses;let a=r.insert("g").attr("class",o).attr("id",e.domId||e.id),c=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",s),{description:d,label:f}=e,u=await ze(n,f,e.labelStyle,!0,!0),p={width:0,height:0};if(Vt(m())){let tt=u.children[0],ot=h(u);p=tt.getBoundingClientRect(),ot.attr("width",p.width),ot.attr("height",p.height)}l.info("Text 2",d);let x=d||[],b=u.getBBox(),S=await ze(n,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),T=S.children[0],B=h(S);p=T.getBoundingClientRect(),B.attr("width",p.width),B.attr("height",p.height);let _=(e.padding||0)/2;h(S).attr("transform","translate( "+(p.width>b.width?0:(b.width-p.width)/2)+", "+(b.height+_+5)+")"),h(u).attr("transform","translate( "+(p.width<b.width?0:-(b.width-p.width)/2)+", 0)"),p=n.node().getBBox(),n.attr("transform","translate("+-p.width/2+", "+(-p.height/2-_+3)+")");let v=p.width+(e.padding||0),E=p.height+(e.padding||0),D=-p.width/2-_,P=-p.height/2-_,Z,Q;if(e.look==="handDrawn"){let tt=y.svg(a),ot=vt(e,{}),ft=tt.path(Ee(D,P,v,E,e.rx||0),ot),dt=tt.line(-p.width/2-_,-p.height/2-_+b.height+_,p.width/2+_,-p.height/2-_+b.height+_,ot);Q=a.insert(()=>(l.debug("Rough node insert CXC",ft),dt),":first-child"),Z=a.insert(()=>(l.debug("Rough node insert CXC",ft),ft),":first-child")}else Z=c.insert("rect",":first-child"),Q=c.insert("line"),Z.attr("class","outer title-state").attr("style",s).attr("x",-p.width/2-_).attr("y",-p.height/2-_).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),Q.attr("class","divider").attr("x1",-p.width/2-_).attr("x2",p.width/2+_).attr("y1",-p.height/2-_+b.height+_).attr("y2",-p.height/2-_+b.height+_);return W(e,Z),e.intersect=function(tt){return R.rect(e,tt)},a}t(Nm,"rectWithTitle");async function zm(r,e,{config:{themeVariables:i}}){let s=i?.radius??5,o={rx:s,ry:s,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return bi(r,e,o)}t(zm,"roundedRect");var $r=8;async function Hm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0,{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?$r:$r*2),u=(e?.height??n.height)+a*2,p=f-$r,x=u,b=$r-f/2,S=-u/2,{cssStyles:T}=e,B=y.svg(c),_=vt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:b,y:S},{x:b+p,y:S},{x:b+p,y:S+x},{x:b-$r,y:S+x},{x:b-$r,y:S},{x:b,y:S},{x:b,y:S+x}],E=B.polygon(v.map((P)=>[P.x,P.y]),_),D=c.insert(()=>E,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",de(T)),s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);if(T&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return d.attr("transform",`translate(${$r/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),W(e,D),e.intersect=function(P){return R.rect(e,P)},c}t(Hm,"shadedProcess");async function Ym(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.width=Math.max((e?.width??0)-a*2,10),e.height=Math.max((e?.height??0)/1.5-c*2,10);let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=(e?.width?e?.width:d.width)+a*2,p=((e?.height?e?.height:d.height)+c*2)*1.5,x=u,b=p/1.5,S=-x/2,T=-b/2,{cssStyles:B}=e,_=y.svg(n),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=[{x:S,y:T},{x:S,y:T+b},{x:S+x,y:T+b},{x:S+x,y:T-b/2}],D=se(E),P=_.path(D,v),Z=n.insert(()=>P,":first-child");if(Z.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")Z.selectChildren("path").attr("style",B);if(s&&e.look!=="handDrawn")Z.selectChildren("path").attr("style",s);return Z.attr("transform",`translate(0, ${b/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(d.x-(d.left??0))}, ${-b/4+(e.padding??0)-(d.y-(d.top??0))})`),W(e,Z),e.intersect=function(Q){return R.polygon(e,E,Q)},n}t(Ym,"slopedRect");async function jm(r,e){let i=e.padding??0,s=e.look==="neo"?16:i*2,o=e.look==="neo"?12:i,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??s,labelPaddingY:o},c=await bi(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=m();er(c,e.colorIndex,n,d.borderColorArray)}return c}t(jm,"squareRect");var rc=50,b1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(rc-1))),a=Math.sqrt(Math.max(0,o**2-r.height**2));return{w:Math.max(r.width+s/4+e,1.5*s+(s-o),r.width+e+s-a),h:s}},"stadiumDimensions");async function Um(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?40:o,c=e.look==="neo"?24:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),{w:f,h:u}=b1(d,a,c),p=u/2,{cssStyles:x}=e,b=y.svg(n),S=vt(e,{});if(e.look!=="handDrawn")S.roughness=0,S.fillStyle="solid";let T=[{x:-f/2+p,y:-u/2},{x:f/2-p,y:-u/2},...Qe(-f/2+p,0,p,rc,90,270),{x:f/2-p,y:u/2},...Qe(f/2-p,0,p,rc,270,450)],B=se(T),_=b.path(B,S),v=n.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")v.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")v.selectChildren("path").attr("style",s);return W(e,v),e.intersect=function(E){return R.polygon(e,T,E)},n}t(Um,"stadium");async function Xm(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return bi(r,e,i)}t(Xm,"state");function Gm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s;let{cssStyles:a}=e,{lineColor:c,stateBorder:n,nodeBorder:d,nodeShadow:f}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let u=r.insert("g").attr("class","node default").attr("id",e.domId??e.id),p=y.svg(u),x=vt(e,{});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let b=p.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),S=n??d,T=(e.width??0)*5/14,B=p.circle(0,0,T,{...x,fill:S,stroke:S,strokeWidth:2,fillStyle:"solid"}),_=u.insert(()=>b,":first-child");if(_.insert(()=>B),e.look!=="handDrawn")_.attr("class","outer-path");if(a)_.selectAll("path").attr("style",a);if(o)_.selectAll("path").attr("style",o);if(e.width<25&&f&&e.look!=="handDrawn"){let v=r.node()?.ownerSVGElement?.id??"",E=v?`${v}-drop-shadow-small`:"drop-shadow-small";_.attr("style",`filter:url(#${E})`)}return W(e,_),e.intersect=function(v){return R.circle(e,(e.width??0)/2,v)},u}t(Gm,"stateEnd");function Vm(r,e,{config:{themeVariables:i}}){let{lineColor:s,nodeShadow:o}=i;if(e.width||e.height){if((e.width??0)<14)e.width=14;if((e.height??0)<14)e.height=14}if(!e.width)e.width=14;if(!e.height)e.height=14;let a=r.insert("g").attr("class","node default").attr("id",e.domId||e.id),c;if(e.look==="handDrawn"){let d=y.svg(a).circle(0,0,e.width,zd(s));c=a.insert(()=>d),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else c=a.insert("circle",":first-child"),c.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&e.look!=="handDrawn"){let n=r.node()?.ownerSVGElement?.id??"",d=n?`${n}-drop-shadow-small`:"drop-shadow-small";c.attr("style",`filter:url(#${d})`)}return W(e,c),e.intersect=function(n){return R.circle(e,(e.width??7)/2,n)},a}t(Vm,"stateStart");var yi=8;async function Km(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e?.padding??8,a=e.look==="neo"?28:o,c=e.look==="neo"?12:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.width+2*yi+a,e.width??0),u=Math.max(d.height+c,e.height??0),p=f-2*yi,x=u,b=-f/2,S=-u/2,T=[{x:0,y:0},{x:p,y:0},{x:p,y:-x},{x:0,y:-x},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-x},{x:-8,y:-x},{x:-8,y:0}];if(e.look==="handDrawn"){let B=y.svg(n),_=vt(e,{}),v=B.rectangle(b,S,p+16,x,_),E=B.line(b+yi,S,b+yi,S+x,_),D=B.line(b+yi+p,S,b+yi+p,S+x,_);n.insert(()=>E,":first-child"),n.insert(()=>D,":first-child");let P=n.insert(()=>v,":first-child"),{cssStyles:Z}=e;P.attr("class","basic label-container").attr("style",de(Z)),W(e,P)}else{let B=tr(n,p,x,T);if(s)B.attr("style",s);W(e,B)}return e.intersect=function(B){return R.polygon(e,T,B)},n}t(Km,"subroutine");var Qh=0.2;async function Zm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o;if(e.width||e.height)e.height=Math.max((e?.height??0)-c*2,10),e.width=Math.max((e?.width??0)-a*2-Qh*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=(e?.height?e?.height:d.height)+c*2,u=Qh*f,p=Qh*f,b=(e?.width?e?.width:d.width)+a*2+u-u,S=f,T=-b/2,B=-S/2,{cssStyles:_}=e,v=y.svg(n),E=vt(e,{}),D=[{x:T-u/2,y:B},{x:T+b+u/2,y:B},{x:T+b+u/2,y:B+S},{x:T-u/2,y:B+S}],P=[{x:T+b-u/2,y:B+S},{x:T+b+u/2,y:B+S},{x:T+b+u/2,y:B+S-p}];if(e.look!=="handDrawn")E.roughness=0,E.fillStyle="solid";let Z=se(D),Q=v.path(Z,E),tt=se(P),ot=v.path(tt,{...E,fillStyle:"solid"}),ft=n.insert(()=>ot,":first-child");if(ft.insert(()=>Q,":first-child"),ft.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")ft.selectAll("path").attr("style",_);if(s&&e.look!=="handDrawn")ft.selectAll("path").attr("style",s);return W(e,ft),e.intersect=function(dt){return R.polygon(e,D,dt)},n}t(Zm,"taggedRect");async function Qm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await X(r,e,It(e)),n=Math.max(a.width+(e.padding??0)*2,e?.width??0),d=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=d/8,u=0.2*n,p=0.2*d,x=d+f,{cssStyles:b}=e,S=y.svg(o),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-n/2-n/2*0.1,y:x/2},...wr(-n/2-n/2*0.1,x/2,n/2+n/2*0.1,x/2,f,0.8),{x:n/2+n/2*0.1,y:-x/2},{x:-n/2-n/2*0.1,y:-x/2}],_=-n/2+n/2*0.1,v=-x/2-p*0.4,E=[{x:_+n-u,y:(v+d)*1.3},{x:_+n,y:v+d-p},{x:_+n,y:(v+d)*0.9},...wr(_+n,(v+d)*1.25,_+n-u,(v+d)*1.3,-d*0.02,0.5)],D=se(B),P=S.path(D,T),Z=se(E),Q=S.path(Z,{...T,fillStyle:"solid"}),tt=o.insert(()=>Q,":first-child");if(tt.insert(()=>P,":first-child"),tt.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")tt.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-d/2+(e.padding??0)-f/2-(a.y-(a.top??0))})`),W(e,tt),e.intersect=function(ot){return R.polygon(e,B,ot)},o}t(Qm,"taggedWaveEdgedRectangle");async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await X(r,e,It(e)),c=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),d=-c/2,f=-n/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",s).attr("rx",0).attr("ry",0).attr("x",d).attr("y",f).attr("width",c).attr("height",n),W(e,u),e.intersect=function(p){return R.rect(e,p)},o}t(Jm,"text");var k1=t((r,e,i,s,o,a)=>`M${r},${e}
|
|
231
|
-
a${o},${a} 0,0,1 0,${-s}
|
|
232
|
-
l${i},0
|
|
233
|
-
a${o},${a} 0,0,1 0,${s}
|
|
234
|
-
M${i},${-s}
|
|
235
|
-
a${o},${a} 0,0,0 0,${s}
|
|
236
|
-
l${-i},0`,"createCylinderPathD"),w1=t((r,e,i,s,o,a)=>[`M${r},${e}`,`M${r+i},${e}`,`a${o},${a} 0,0,0 0,${-s}`,`l${-i},0`,`a${o},${a} 0,0,0 0,${s}`,`l${i},0`].join(" "),"createOuterCylinderPathD"),S1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Rp=5,Np=10;async function ty(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?12:o/2,c=e.height??0;if(e.height){if(e.height=e.height-a,e.height<Rp)e.height=Rp}if(e.width){let _=c/2/(2.5+c/50);if(e.width=e.width-a-_*3,e.width<Np)e.width=Np}let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=Math.max(e.height??0,d.height)+a,p=u/2,x=p/(2.5+u/50),b=Math.max(e.width??0,d.width)+x+a,{cssStyles:S}=e,T;if(e.look==="handDrawn"){let B=y.svg(n),_=w1(0,0,b,u,x,p),v=S1(0,0,b,u,x,p),E=B.path(_,vt(e,{})),D=B.path(v,vt(e,{fill:"none"}));if(T=n.insert(()=>D,":first-child"),T=n.insert(()=>E,":first-child"),T.attr("class","basic label-container"),S)T.attr("style",S)}else{let B=k1(0,0,b,u,x,p);if(T=n.insert("path",":first-child").attr("d",B).attr("class","basic label-container").attr("style",de(S)).attr("style",s),T.attr("class","basic label-container outer-path"),S)T.selectAll("path").attr("style",S);if(s)T.selectAll("path").attr("style",s)}return T.attr("label-offset-x",x),T.attr("transform",`translate(${-b/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-x-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),W(e,T),e.intersect=function(B){let _=R.rect(e,B),v=_.y-(e.y??0);if(p!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(_.x-(e.x??0))>(e.width??0)/2-x)){let E=x*x*(1-v*v/(p*p));if(E!=0)E=Math.sqrt(Math.abs(E));if(E=x-E,B.x-(e.x??0)>0)E=-E;_.x+=E}return _},n}t(ty,"tiltedCylinder");async function ey(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o:o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=Math.max(d.height+a,e.height??0),u=Math.max(d.width+c,(e.width??0)-f),p=[{x:-3*f/6,y:0},{x:u+3*f/6,y:0},{x:u,y:-f},{x:0,y:-f}],x,{cssStyles:b}=e;if(e.look==="handDrawn"){let S=y.svg(n),T=vt(e,{}),B=se(p),_=S.path(B,T);if(x=n.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),b)x.attr("style",b)}else x=tr(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,W(e,x),e.intersect=function(S){return R.polygon(e,p,S)},n}t(ey,"trapezoid");async function ry(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=15,d=5;if(e.width||e.height){if(e.height=(e.height??0)-c*2,e.height<d)e.height=d;if(e.width=(e.width??0)-a*2,e.width<n)e.width=n}let{shapeSvg:f,bbox:u}=await X(r,e,It(e)),p=(e?.width?e?.width:u.width)+a*2,x=(e?.height?e?.height:u.height)+c*2,{cssStyles:b}=e,S=y.svg(f),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-p/2*0.8,y:-x/2},{x:p/2*0.8,y:-x/2},{x:p/2,y:-x/2*0.6},{x:p/2,y:x/2},{x:-p/2,y:x/2},{x:-p/2,y:-x/2*0.6}],_=se(B),v=S.path(_,T),E=f.insert(()=>v,":first-child");if(E.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn")E.selectChildren("path").attr("style",b);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return W(e,E),e.intersect=function(D){return R.polygon(e,B,D)},f}t(ry,"trapezoidalPentagon");var Qp=10,tg=10;async function iy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?o*2:o;if(e.width||e.height){if(e.width=((e?.width??0)-a)/2,e.width<tg)e.width=tg;if(e.height=e?.height??0,e.height<Qp)e.height=Qp}let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=Yr(m().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,p=e?.height?e?.height:u+n.height,x=p,b=[{x:0,y:0},{x,y:0},{x:x/2,y:-p}],{cssStyles:S}=e,T=y.svg(c),B=vt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=se(b),v=T.path(_,B),E=c.insert(()=>v,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");if(S&&e.look!=="handDrawn")E.selectChildren("path").attr("style",S);if(s&&e.look!=="handDrawn")E.selectChildren("path").attr("style",s);return e.width=u,e.height=p,W(e,E),d.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${p/2-(n.height+(e.padding??0)/(f?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(D){return l.info("Triangle intersect",e,b,D),R.polygon(e,b,D)},c}t(iy,"triangle");async function oy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=!0;if(e.width||e.height){if(n=!1,e.width=(e?.width??0)-a*2,e.width<10)e.width=10;if(e.height=(e?.height??0)-c*2,e.height<10)e.height=10}let{shapeSvg:d,bbox:f,label:u}=await X(r,e,It(e)),p=(e?.width?e?.width:f.width)+(a??0)*2,x=(e?.height?e?.height:f.height)+(c??0)*2,b=e.look==="neo"?x/4:x/8,S=x+(n?b:-b),{cssStyles:T}=e,_=14-p,v=_>0?_/2:0,E=y.svg(d),D=vt(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=[{x:-p/2-v,y:S/2},...wr(-p/2-v,S/2,p/2+v,S/2,b,0.8),{x:p/2+v,y:-S/2},{x:-p/2-v,y:-S/2}],Z=se(P),Q=E.path(Z,D),tt=d.insert(()=>Q,":first-child");if(tt.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")tt.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")tt.selectAll("path").attr("style",s);return tt.attr("transform",`translate(0,${-b/2})`),u.attr("transform",`translate(${-p/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-b-(f.y-(f.top??0))})`),W(e,tt),e.intersect=function(ot){return R.polygon(e,P,ot)},d}t(oy,"waveEdgedRectangle");async function sy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?20:o;if(e.width||e.height){if(e.width=e?.width??0,e.width<20)e.width=20;if(e.height=e?.height??0,e.height<10)e.height=10;let D=Math.min(e.height*0.2,e.height/4);e.height=Math.ceil(e.height-c-D*2.2222222222222223),e.width=e.width-a*2}let{shapeSvg:n,bbox:d}=await X(r,e,It(e)),f=(e?.width?e?.width:d.width)+a*2,u=(e?.height?e?.height:d.height)+c,p=u/8,x=u+p*2,{cssStyles:b}=e,S=y.svg(n),T=vt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2,y:x/2},...wr(-f/2,x/2,f/2,x/2,p,1),{x:f/2,y:-x/2},...wr(f/2,-x/2,-f/2,-x/2,p,-1)],_=se(B),v=S.path(_,T),E=n.insert(()=>v,":first-child");if(E.attr("class","basic label-container"),b&&e.look!=="handDrawn")E.selectAll("path").attr("style",b);if(s&&e.look!=="handDrawn")E.selectAll("path").attr("style",s);return W(e,E),e.intersect=function(D){return R.polygon(e,B,D)},n}t(sy,"waveRectangle");var pe=10;async function ay(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e.look==="neo"?16:e.padding??0,a=e.look==="neo"?12:e.padding??0;if(e.width||e.height)e.width=Math.max((e?.width??0)-o*2-pe,10),e.height=Math.max((e?.height??0)-a*2-pe,10);let{shapeSvg:c,bbox:n,label:d}=await X(r,e,It(e)),f=(e?.width?e?.width:n.width)+o*2+pe,u=(e?.height?e?.height:n.height)+a*2+pe,p=f-pe,x=u-pe,b=-p/2,S=-x/2,{cssStyles:T}=e,B=y.svg(c),_=vt(e,{}),v=[{x:b-pe,y:S-pe},{x:b-pe,y:S+x},{x:b+p,y:S+x},{x:b+p,y:S-pe}],E=`M${b-pe},${S-pe} L${b+p},${S-pe} L${b+p},${S+x} L${b-pe},${S+x} L${b-pe},${S-pe}
|
|
237
|
-
M${b-pe},${S} L${b+p},${S}
|
|
238
|
-
M${b},${S-pe} L${b},${S+x}`;if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let D=B.path(E,_),P=c.insert(()=>D,":first-child");if(P.attr("transform",`translate(${pe/2}, ${pe/2})`),P.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")P.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")P.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+pe/2-(n.x-(n.left??0))}, ${-(n.height/2)+pe/2-(n.y-(n.top??0))})`),W(e,P),e.intersect=function(Z){return R.polygon(e,v,Z)},c}t(ay,"windowPane");var eg=new Set(["redux-color","redux-dark-color"]),T1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Cc(r,e){let i=e;if(i.alias)e.label=i.alias;let{theme:s,themeVariables:o}=C(),{rowEven:a,rowOdd:c,nodeBorder:n,borderColorArray:d}=o;if(e.look==="handDrawn"){let{themeVariables:Et}=C(),{background:Wt}=Et,Xt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Wt}`]};await Cc(r,Xt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,p=f.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:b,nodeStyles:S}=L(e);if(i.attributes.length===0&&e.label){let Et={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(Zn(e.label,f)+Et.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let Wt=await bi(r,e,Et);if(s!=null&&eg.has(s)){let Xt=i.colorIndex??0;Wt.attr("data-color-id",`color-${Xt%d.length}`)}if(!Yr(f.htmlLabels)){let Xt=Wt.select("text"),zt=Xt.node()?.getBBox();Xt.attr("transform",`translate(${-zt.width/2}, 0)`)}return Wt}if(!f.htmlLabels)u*=1.25,p*=1.25;let T=It(e);if(!T)T="node default";let B=r.insert("g").attr("class",T).attr("id",e.domId||e.id),_=await xi(B,e.label??"",f,0,0,["name"],b);_.height+=p;let v=0,E=[],D=[],P=0,Z=0,Q=0,tt=0,ot=!0,ft=!0;for(let Et of i.attributes){let Wt=await xi(B,Et.type,f,0,v,["attribute-type"],b);P=Math.max(P,Wt.width+u);let Xt=await xi(B,Et.name,f,0,v,["attribute-name"],b);Z=Math.max(Z,Xt.width+u);let zt=await xi(B,Et.keys.join(),f,0,v,["attribute-keys"],b);Q=Math.max(Q,zt.width+u);let he=await xi(B,Et.comment,f,0,v,["attribute-comment"],b);tt=Math.max(tt,he.width+u);let le=Math.max(Wt.height,Xt.height,zt.height,he.height)+p;D.push({yOffset:v,rowHeight:le}),v+=le}let dt=4;if(Q<=u)ot=!1,Q=0,dt--;if(tt<=u)ft=!1,tt=0,dt--;let lt=B.node().getBBox();if(_.width+u*2-(P+Z+Q+tt)>0){let Et=_.width+u*2-(P+Z+Q+tt);if(P+=Et/dt,Z+=Et/dt,Q>0)Q+=Et/dt;if(tt>0)tt+=Et/dt}let N=P+Z+Q+tt,K=y.svg(B),et=vt(e,{});if(e.look!=="handDrawn")et.roughness=0,et.fillStyle="solid";let U=0;if(D.length>0)U=D.reduce((Et,Wt)=>Et+(Wt?.rowHeight??0),0);let ut=Math.max(lt.width+u*2,e?.width||0,N),ct=Math.max((U??0)+_.height,e?.height||0),_t=-ut/2,Lt=-ct/2;if(B.selectAll("g:not(:first-child)").each((Et,Wt,Xt)=>{let zt=h(Xt[Wt]),he=zt.attr("transform"),le=0,rr=0;if(he){let He=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(he);if(He){if(le=parseFloat(He[1]),rr=parseFloat(He[2]),zt.attr("class").includes("attribute-name"))le+=P;else if(zt.attr("class").includes("attribute-keys"))le+=P+Z;else if(zt.attr("class").includes("attribute-comment"))le+=P+Z+Q}}zt.attr("transform",`translate(${_t+u/2+le}, ${rr+Lt+_.height+p/2})`)}),B.select(".name").attr("transform","translate("+-_.width/2+", "+(Lt+p/2)+")"),s!=null&&eg.has(s)){let Et=i.colorIndex??0;B.attr("data-color-id",`color-${Et%d.length}`)}let jt=K.rectangle(_t,Lt,ut,ct,et),Ut=B.insert(()=>jt,":first-child").attr("class","outer-path").attr("style",x.join(""));E.push(0);for(let[Et,Wt]of D.entries()){let zt=(Et+1)%2===0&&Wt.yOffset!==0,he=K.rectangle(_t,_.height+Lt+Wt?.yOffset,ut,Wt?.rowHeight,{...et,fill:zt?a:c,stroke:n});B.insert(()=>he,"g.label").attr("style",x.join("")).attr("class",`row-rect-${zt?"even":"odd"}`)}let Qt=0.0001,re=Ci(_t,_.height+Lt,ut+_t,_.height+Lt,Qt),Dt=K.polygon(re.map((Et)=>[Et.x,Et.y]),et);if(B.insert(()=>Dt).attr("class","divider"),re=Ci(P+_t,_.height+Lt,P+_t,ct+Lt,Qt),Dt=K.polygon(re.map((Et)=>[Et.x,Et.y]),et),B.insert(()=>Dt).attr("class","divider"),ot){let Et=P+Z+_t;re=Ci(Et,_.height+Lt,Et,ct+Lt,Qt),Dt=K.polygon(re.map((Wt)=>[Wt.x,Wt.y]),et),B.insert(()=>Dt).attr("class","divider")}if(ft){let Et=P+Z+Q+_t;re=Ci(Et,_.height+Lt,Et,ct+Lt,Qt),Dt=K.polygon(re.map((Wt)=>[Wt.x,Wt.y]),et),B.insert(()=>Dt).attr("class","divider")}for(let Et of E){let Wt=_.height+Lt+Et;re=Ci(_t,Wt,ut+_t,Wt,Qt),Dt=K.polygon(re.map((Xt)=>[Xt.x,Xt.y]),et),B.insert(()=>Dt).attr("class","divider")}if(W(e,Ut),S&&e.look!=="handDrawn")if(s!=null&&T1.has(s))B.selectAll("path").attr("style",S);else{let Wt=S.split(";")?.filter((Xt)=>Xt.includes("stroke"))?.map((Xt)=>`${Xt}`).join("; ");B.selectAll("path").attr("style",Wt??""),B.selectAll(".row-rect-even path").attr("style",S)}return e.intersect=function(Et){return R.rect(e,Et)},B}t(Cc,"erBox");async function xi(r,e,i,s=0,o=0,a=[],c=""){let n=r.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${s}, ${o})`).attr("style",c);if(e!==xo(e))e=xo(e),e=e.replaceAll("<","<").replaceAll(">",">");let d=n.node().appendChild(await fn(n,e,{width:Zn(e,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(e.includes("<")||e.includes(">")){let u=d.children[0];u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">");while(u.childNodes[0])u=u.childNodes[0],u.textContent=u.textContent.replaceAll("<","<").replaceAll(">",">")}let f=d.getBBox();if(Yr(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let p=h(d);f=u.getBoundingClientRect(),p.attr("width",f.width),p.attr("height",f.height)}return f}t(xi,"addText");function Ci(r,e,i,s,o){if(r===i)return[{x:r-o/2,y:e},{x:r+o/2,y:e},{x:i+o/2,y:s},{x:i-o/2,y:s}];return[{x:r,y:e-o/2},{x:r,y:e+o/2},{x:i,y:s+o/2},{x:i,y:s-o/2}]}t(Ci,"lineToPolygon");async function ny(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",It(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,p=0,x=0,b=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let v=e.annotations[0];await $o(n,{text:`«${v}»`},0),p=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await $o(d,e,0,["font-weight: bolder"]);let S=d.node().getBBox();x=S.height,f=c.insert("g").attr("class","members-group text");let T=0;for(let v of e.members){let E=await $o(f,v,T,[v.parseClassifier()]);T+=E+a}if(b=f.node().getBBox().height,b<=0)b=o/2;u=c.insert("g").attr("class","methods-group text");let B=0;for(let v of e.methods){let E=await $o(u,v,B,[v.parseClassifier()]);B+=E+a}let _=c.node().getBBox();if(n!==null){let v=n.node().getBBox();n.attr("transform",`translate(${-v.width/2})`)}return d.attr("transform",`translate(${-S.width/2}, ${p})`),_=c.node().getBBox(),f.attr("transform",`translate(0, ${p+x+o*2})`),_=c.node().getBBox(),u.attr("transform",`translate(0, ${p+x+(b?b+o*4:o*2)})`),_=c.node().getBBox(),{shapeSvg:c,bbox:_}}t(ny,"textHelper");async function $o(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:Yr(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(Tt(n))c=!0;let d=await fn(o,Vo(Ya(n)),{width:Zn(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))h(d).selectAll("tspan").attr("font-weight","");u=d.children.length;let p=d.children[0];if(d.textContent===""||d.textContent.includes(">")){if(p.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" ")p.textContent=p.textContent[0]+" "+p.textContent.substring(1)}if(p.textContent==="undefined")p.textContent="";f=d.getBBox()}else{let p=d.children[0],x=h(d);if(u=p.innerHTML.split("<br>").length,p.innerHTML.includes("</math>"))u+=p.innerHTML.split("<mrow>").length-1;await ic(p),f=p.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height)}return o.attr("transform","translate(0,"+(-f.height/(2*u)+i)+")"),f.height}t($o,"addText");async function ly(r,e){let i=m(),{theme:s,themeVariables:o}=i,{useGradient:a,borderColorArray:c}=o,n=i.class.padding??12,d=n,f=e.useHtmlLabels??Yr(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:p,bbox:x}=await ny(r,e,i,f,d);er(p,e.colorIndex,s,c);let{labelStyles:b,nodeStyles:S}=L(e);e.labelStyle=b,e.cssStyles=u.styles||"";let T=u.styles?.join(";")||S||"";if(!e.cssStyles)e.cssStyles=T.replaceAll("!important","").split(";");let B=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,_=y.svg(p),v=vt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let E=Math.max(e.width??0,x.width),D=Math.max(e.height??0,x.height),P=(e.height??0)>x.height;if(u.members.length===0&&u.methods.length===0)D+=d;else if(u.members.length>0&&u.methods.length===0)D+=d*2;let Z=-E/2,Q=-D/2,tt=B?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(P)tt=n*2;let ot=_.rectangle(Z-n,Q-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0),E+2*n,D+2*n+tt,v),ft=p.insert(()=>ot,":first-child");ft.attr("class","basic label-container outer-path");let dt=ft.node().getBBox(),lt=p.select(".annotation-group").node().getBBox().height-(B?n/2:0)||0,N=p.select(".label-group").node().getBBox().height-(B?n/2:0)||0,K=p.select(".members-group").node().getBBox().height-(B?n/2:0)||0,et=(lt+N+Q+n-(Q-n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(p.selectAll(".text").each((U,ut,ct)=>{let _t=h(ct[ut]),Lt=_t.attr("transform"),jt=0;if(Lt){let Dt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Lt);if(Dt)jt=parseFloat(Dt[2])}let Ut=jt+Q+n-(B?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(_t.attr("class").includes("methods-group")){let re=Math.max(K,d/2);if(P)Ut=Math.max(et,lt+N+re+Q+d*2+n)+d*2;else Ut=lt+N+re+Q+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Ut=jt-d;else Ut=jt;if(!f)Ut-=4;let Qt=Z;if(_t.attr("class").includes("label-group")||_t.attr("class").includes("annotation-group"))Qt=-_t.node()?.getBBox().width/2||0,p.selectAll("text").each(function(re,Dt,Et){if(window.getComputedStyle(Et[Dt]).textAnchor==="middle")Qt=0});_t.attr("transform",`translate(${Qt}, ${Ut})`)}),u.members.length>0||u.methods.length>0||B){let U=lt+N+Q+n,ut=_.line(dt.x,U,dt.x+dt.width,U+0.001,v);p.insert(()=>ut).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(B||u.members.length>0||u.methods.length>0){let U=lt+N+K+Q+d*2+n,ut=_.line(dt.x,P?Math.max(et,U):U,dt.x+dt.width,(P?Math.max(et,U):U)+0.001,v);p.insert(()=>ut).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",T)}if(u.look!=="handDrawn")p.selectAll("path").attr("style",T);if(ft.select(":nth-child(2)").attr("style",T),p.selectAll(".divider").select("path").attr("style",T),e.labelStyle)p.selectAll("span").attr("style",e.labelStyle);else p.selectAll("span").attr("style",T);if(!f){let U=RegExp(/color\s*:\s*([^;]*)/),ut=U.exec(T);if(ut){let ct=ut[0].replace("color","fill");p.selectAll("tspan").attr("style",ct)}else if(b){let ct=U.exec(b);if(ct){let _t=ct[0].replace("color","fill");p.selectAll("tspan").attr("style",_t)}}}return W(e,ft),e.intersect=function(U){return R.rect(e,U)},p}t(ly,"classBox");async function hy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=It(e),u=m(),{themeVariables:p}=u,{borderColorArray:x,requirementEdgeLabelBackground:b}=p,S=u.layout==="elk"?"start":"center",T=r.insert("g").attr("class",f).attr("id",e.domId??e.id),B;if(d)B=await Ze(T,`<<${o.type}>>`,0,e.labelStyle);else B=await Ze(T,"<<Element>>",0,e.labelStyle);let _=B,v=await Ze(T,o.name,_,e.labelStyle+"; font-weight: bold;");if(_+=v+n,d){let dt=await Ze(T,`${o.requirementId?`ID: ${o.requirementId}`:""}`,_,e.labelStyle,S);_+=dt;let lt=await Ze(T,`${o.text?`Text: ${o.text}`:""}`,_,e.labelStyle,S);_+=lt;let N=await Ze(T,`${o.risk?`Risk: ${o.risk}`:""}`,_,e.labelStyle,S);_+=N,await Ze(T,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,_,e.labelStyle,S)}else{let dt=await Ze(T,`${a.type?`Type: ${a.type}`:""}`,_,e.labelStyle,S);_+=dt,await Ze(T,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,_,e.labelStyle,S)}let E=(T.node()?.getBBox().width??200)+c,D=(T.node()?.getBBox().height??200)+c,P=-E/2,Z=-D/2,Q=y.svg(T),tt=vt(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let ot=Q.rectangle(P,Z,E,D,tt),ft=T.insert(()=>ot,":first-child");if(ft.attr("class","basic label-container outer-path").attr("style",s),x?.length){let dt=e.colorIndex??0;T.attr("data-color-id",`color-${dt%x.length}`)}if(T.selectAll(".label").each((dt,lt,N)=>{let K=h(N[lt]),et=K.attr("transform"),U=0,ut=0;if(et){let jt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(et);if(jt)U=parseFloat(jt[1]),ut=parseFloat(jt[2])}let ct=ut-D/2,_t=P+c/2;if(lt===0||lt===1)_t=U;K.attr("transform",`translate(${_t}, ${ct+c})`)}),_>B+v+n){let dt=Z+B+v+n,lt;if(e.look==="neo"){let et=[[P,dt],[P+E,dt],[P+E,dt+0.001],[P,dt+0.001]];lt=Q.polygon(et,tt)}else lt=Q.line(P,dt,P+E,dt,tt);T.insert(()=>lt).attr("class","divider")}if(W(e,ft),e.intersect=function(dt){return R.rect(e,dt)},s&&e.look!=="handDrawn"&&(b||x?.length))T.selectAll("path").attr("style",s);return T}t(hy,"requirementBox");async function Ze(r,e,i,s="",o="center"){if(e==="")return 0;let a=r.insert("g").attr("class","label").attr("style",s),c=m(),n=c.htmlLabels??!0,d=await fn(a,Vo(Ya(e)),{width:Zn(e,c)+50,classes:"markdown-node-label",useHtmlLabels:n,style:s},c),f;if(!n){let u=d.children[0];for(let p of u.children)if(s)p.setAttribute("style",s);if(o==="start"){u.setAttribute("text-anchor","start");for(let p of u.children)p.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}else{let u=d.children[0],p=h(d);if(o==="start")h(u).style("text-align","left");f=u.getBoundingClientRect(),p.attr("width",f.width),p.attr("height",f.height)}return a.attr("transform",`translate(${-f.width/2},${-f.height/2+i})`),f.height}t(Ze,"addText");var B1=t((r)=>{switch(r){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 cy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=L(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await X(r,e,It(e)),u=e.padding||10,p="",x;if("ticket"in e&&e.ticket&&i?.kanban?.ticketBaseUrl)p=i?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),x=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank");let b={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},S,T;if(x)({label:S,bbox:T}=await Ir(x,"ticket"in e&&e.ticket||"",b));else({label:S,bbox:T}=await Ir(n,"ticket"in e&&e.ticket||"",b));let{label:B,bbox:_}=await Ir(n,"assigned"in e&&e.assigned||"",b);e.width=c;let v=10,E=e?.width||0,D=Math.max(T.height,_.height)/2,P=Math.max(d.height+v*2,e?.height||0)+D,Z=-E/2,Q=-P/2;f.attr("transform","translate("+(u-E/2)+", "+(-D-d.height/2)+")"),S.attr("transform","translate("+(u-E/2)+", "+(-D+d.height/2)+")"),B.attr("transform","translate("+(u+E/2-_.width-2*a)+", "+(-D+d.height/2)+")");let tt,{rx:ot,ry:ft}=e,{cssStyles:dt}=e;if(e.look==="handDrawn"){let lt=y.svg(n),N=vt(e,{}),K=ot||ft?lt.path(Ee(Z,Q,E,P,ot||0),N):lt.rectangle(Z,Q,E,P,N);tt=n.insert(()=>K,":first-child"),tt.attr("class","basic label-container").attr("style",dt?dt:null)}else{tt=n.insert("rect",":first-child"),tt.attr("class","basic label-container __APA__").attr("style",o).attr("rx",ot??5).attr("ry",ft??5).attr("x",Z).attr("y",Q).attr("width",E).attr("height",P);let lt="priority"in e&&e.priority;if(lt){let N=n.append("line"),K=Z+2,et=Q+Math.floor((ot??0)/2),U=Q+P-Math.floor((ot??0)/2);N.attr("x1",K).attr("y1",et).attr("x2",K).attr("y2",U).attr("stroke-width","4").attr("stroke",B1(lt))}}return W(e,tt),e.height=P,e.intersect=function(lt){return R.rect(e,lt)},n}t(cy,"kanbanItem");async function uy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,It(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:p}=e,x=a.width+20,b=a.height+20,S=Math.max(d,x),T=Math.max(f,b);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let B,_=`M0 0
|
|
239
|
-
a${u},${u} 1 0,0 ${S*0.25},${-1*T*0.1}
|
|
240
|
-
a${u},${u} 1 0,0 ${S*0.25},0
|
|
241
|
-
a${u},${u} 1 0,0 ${S*0.25},0
|
|
242
|
-
a${u},${u} 1 0,0 ${S*0.25},${T*0.1}
|
|
243
|
-
|
|
244
|
-
a${u},${u} 1 0,0 ${S*0.15},${T*0.33}
|
|
245
|
-
a${u*0.8},${u*0.8} 1 0,0 0,${T*0.34}
|
|
246
|
-
a${u},${u} 1 0,0 ${-1*S*0.15},${T*0.33}
|
|
247
|
-
|
|
248
|
-
a${u},${u} 1 0,0 ${-1*S*0.25},${T*0.15}
|
|
249
|
-
a${u},${u} 1 0,0 ${-1*S*0.25},0
|
|
250
|
-
a${u},${u} 1 0,0 ${-1*S*0.25},0
|
|
251
|
-
a${u},${u} 1 0,0 ${-1*S*0.25},${-1*T*0.15}
|
|
252
|
-
|
|
253
|
-
a${u},${u} 1 0,0 ${-1*S*0.1},${-1*T*0.33}
|
|
254
|
-
a${u*0.8},${u*0.8} 1 0,0 0,${-1*T*0.34}
|
|
255
|
-
a${u},${u} 1 0,0 ${S*0.1},${-1*T*0.33}
|
|
256
|
-
H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),E=vt(e,{}),D=v.path(_,E);B=o.insert(()=>D,":first-child"),B.attr("class","basic label-container").attr("style",de(p))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return B.attr("transform",`translate(${-S/2}, ${-T/2})`),W(e,B),e.calcIntersect=function(v,E){return R.rect(v,E)},e.intersect=function(v){return l.info("Bang intersect",e,v),R.rect(e,v)},o}t(uy,"bang");async function dy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,It(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,p=0.25*d,x=0.35*d,b=0.2*d,{cssStyles:S}=e,T,B=`M0 0
|
|
257
|
-
a${u},${u} 0 0,1 ${d*0.25},${-1*d*0.1}
|
|
258
|
-
a${x},${x} 1 0,1 ${d*0.4},${-1*d*0.1}
|
|
259
|
-
a${p},${p} 1 0,1 ${d*0.35},${d*0.2}
|
|
260
|
-
|
|
261
|
-
a${u},${u} 1 0,1 ${d*0.15},${f*0.35}
|
|
262
|
-
a${b},${b} 1 0,1 ${-1*d*0.15},${f*0.65}
|
|
263
|
-
|
|
264
|
-
a${p},${u} 1 0,1 ${-1*d*0.25},${d*0.15}
|
|
265
|
-
a${x},${x} 1 0,1 ${-1*d*0.5},0
|
|
266
|
-
a${u},${u} 1 0,1 ${-1*d*0.25},${-1*d*0.15}
|
|
267
|
-
|
|
268
|
-
a${u},${u} 1 0,1 ${-1*d*0.1},${-1*f*0.35}
|
|
269
|
-
a${b},${b} 1 0,1 ${d*0.1},${-1*f*0.65}
|
|
270
|
-
H0 V0 Z`;if(e.look==="handDrawn"){let _=y.svg(o),v=vt(e,{}),E=_.path(B,v);T=o.insert(()=>E,":first-child"),T.attr("class","basic label-container").attr("style",de(S))}else T=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",B);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),T.attr("transform",`translate(${-d/2}, ${-f/2})`),W(e,T),e.calcIntersect=function(_,v){return R.rect(_,v)},e.intersect=function(_){return l.info("Cloud intersect",e,_),R.rect(e,_)},o}t(dy,"cloud");async function fy(r,e){let{labelStyles:i,nodeStyles:s}=L(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await X(r,e,It(e)),d=a.width+8*c,f=a.height+2*c,u=5,p=e.look==="neo"?`
|
|
271
|
-
M${-d/2} ${f/2-u}
|
|
272
|
-
v${-f+2*u}
|
|
273
|
-
q0,-${u} ${u},-${u}
|
|
274
|
-
h${d-2*u}
|
|
275
|
-
q${u},0 ${u},${u}
|
|
276
|
-
v${f-u}
|
|
277
|
-
H${-d/2}
|
|
278
|
-
Z
|
|
279
|
-
`:`
|
|
280
|
-
M${-d/2} ${f/2-u}
|
|
281
|
-
v${-f+2*u}
|
|
282
|
-
q0,-${u} ${u},-${u}
|
|
283
|
-
h${d-2*u}
|
|
284
|
-
q${u},0 ${u},${u}
|
|
285
|
-
v${f-2*u}
|
|
286
|
-
q0,${u} ${-u},${u}
|
|
287
|
-
h${-(d-2*u)}
|
|
288
|
-
q${-u},0 ${-u},${-u}
|
|
289
|
-
Z
|
|
290
|
-
`;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);let x=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",s).attr("d",p);return o.append("line").attr("class","node-line-").attr("x1",-d/2).attr("y1",f/2).attr("x2",d/2).attr("y2",f/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),W(e,x),e.calcIntersect=function(b,S){return R.rect(b,S)},e.intersect=function(b){return R.rect(e,b)},o}t(fy,"defaultMindmapNode");async function py(r,e){let i={padding:e.padding??0};return ac(r,e,i)}t(py,"mindmapCircle");var _1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:jm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:zm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Um},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Km},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Wg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:zg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Gg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ug},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Cg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:gg},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:qg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:ac},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:uy},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:dy},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:qm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Zg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Bm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Tm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ey},{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:wm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Yg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Jm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:mg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Hm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Vm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Gm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Vg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Jg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:wg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:vg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ag},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:_m},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:oy},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Kg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ty},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:vm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:$g},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Hg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:iy},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ay},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Ug},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ry},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Xg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ym},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Pm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Dm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:cg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:kg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Qm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Zm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:sy},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Wm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Lm}],v1=t(()=>{let e=[...Object.entries({state:Xm,choice:yg,note:Rm,composite:xg,rectWithTitle:Nm,labelRect:Sm,block_arrow:pg,collapsedGroup:fg,iconSquare:bm,iconCircle:xm,icon:ym,iconRounded:Cm,imageSquare:km,anchor:lg,kanbanItem:cy,mindmapCircle:py,defaultMindmapNode:fy,classBox:ly,erBox:Cc,requirementBox:hy,usecaseActor:Fm,usecaseActorHollow:Em,usecaseActorAwesome:Mm,usecaseActorIcon:$m,usecaseBusiness:Im,usecaseEllipse:jg,usecaseJsonTable:Om}),..._1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),gd=v1();function xc(r){return r in gd}t(xc,"isValidShape");var va=t(({flowchart:r})=>{let e=r?.subGraphTitleMargin?.top??0,i=r?.subGraphTitleMargin?.bottom??0,s=e+i;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:s}},"getSubGraphTitleMargins"),ra=new Map;async function ka(r,e,i){let s,o;if(e.shape==="rect")if(e.rx&&e.ry)e.shape="roundedRect";else e.shape="squareRect";let a=e.shape?gd[e.shape]:void 0;if(!a)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let c;if(i.config.securityLevel==="sandbox")c="_top";else if(e.linkTarget)c=e.linkTarget||"_blank";s=r.insert("svg:a").attr("xlink:href",e.link).attr("target",c??null),o=await a(s,e,i)}else o=await a(r,e,i),s=o;if(s.attr("data-look",de(e.look)),e.tooltip)o.attr("title",e.tooltip);if(ra.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(ka,"insertNode");var th=t((r,e)=>{ra.set(e.id,r)},"setNodeElem"),nh=t(()=>{ra.clear()},"clear"),ea=t((r)=>{let e=ra.get(r.id);l.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");let i=8,s=r.diff||0;if(r.clusterNode)e.attr("transform","translate("+(r.x+s-r.width/2)+", "+(r.y-r.height/2-i)+")");else e.attr("transform","translate("+r.x+", "+r.y+")");return s},"positionNode");var L1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,f=n,{labelStyles:u,nodeStyles:p,borderStyles:x,backgroundStyles:b}=L(e),S=r.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);er(S,e.colorIndex,s,d);let T=Yr(i.flowchart.htmlLabels),B=e.direction==="LR",_=S.insert("g").attr("class","cluster-label swimlane-label"),v=await fn(_,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}),E=v.getBBox();if(T){let et=v.children[0],U=h(v);E=et.getBoundingClientRect(),U.attr("width",E.width),U.attr("height",E.height)}let D=e.padding??0,P=e.width<=E.width+D?E.width+D:e.width;if(e.width<=E.width+D)e.diff=(P-e.width)/2-D;else e.diff=-D;let Z=e.height,Q=e.y-Z/2,tt=e.y+Z/2,ot=e.x-P/2,ft=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Q+Z/3,dt=B?4:0,lt=E.height+2*dt,N,K;if(B){let et=Math.max(lt,E.height+2*dt),U=ot+et,ut=Math.max(0,P-et);if(e.look==="handDrawn"){let Lt=y.svg(S),jt=vt(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Ut=vt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Qt=Lt.rectangle(ot,Q,et,Z,jt);N=S.insert(()=>Qt,":first-child").attr("class","swimlane-title");let re=Lt.rectangle(U,Q,ut,Z,Ut);K=S.insert(()=>re,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",x.join(";")),N.select("path").attr("style",b.join(";").replace("fill","stroke"))}else N=S.insert("rect",":first-child"),K=S.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",p).attr("x",ot).attr("y",Q).attr("width",et).attr("height",Z).attr("fill",c).attr("stroke",f),K.attr("class","swimlane-body").attr("style",p).attr("x",U).attr("y",Q).attr("width",ut).attr("height",Z).attr("fill","none").attr("stroke",f);let ct=ot+et/2,_t=e.y;_.attr("transform",`translate(${ct}, ${_t}) rotate(-90) translate(${-E.width/2}, ${-E.height/2})`)}else{let et=Math.max(0,ft-Q),U=Math.min(lt,et),ut=Q+U,ct=Math.max(0,tt-ut),_t=e.x-P/2;if(e.look==="handDrawn"){let Ut=y.svg(S),Qt=vt(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),re=vt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),Dt=Ut.rectangle(_t,Q,P,U,Qt);N=S.insert(()=>Dt,":first-child").attr("class","swimlane-title");let Et=Ut.rectangle(_t,ut,P,ct,re);K=S.insert(()=>Et,":first-child").attr("class","swimlane-body"),N.select("path:nth-child(2)").attr("style",x.join(";")),N.select("path").attr("style",b.join(";").replace("fill","stroke"))}else N=S.insert("rect",":first-child"),K=S.insert("rect",":first-child"),N.attr("class","swimlane-title").attr("style",p).attr("x",_t).attr("y",Q).attr("width",P).attr("height",U).attr("fill",c).attr("stroke",f),K.attr("class","swimlane-body").attr("style",p).attr("x",_t).attr("y",ut).attr("width",P).attr("height",ct).attr("fill","none").attr("stroke",f);let Lt=e.x-E.width/2,jt=Q+(U-E.height)/2;_.attr("transform",`translate(${Lt}, ${jt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let et=_.select("span");if(et)et.attr("style",u)}return e.offsetX=0,e.width=P,e.height=Z,e.offsetY=E.height-D/2,e.intersect=function(et){return Je(e,et)},{cluster:S,labelBBox:E}},"swimlane"),gy=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u,borderStyles:p,backgroundStyles:x}=L(e),b=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);er(b,e.colorIndex,s,d);let S=Vt(i),T=b.insert("g").attr("class","cluster-label "),B;if(e.labelType==="markdown")B=await fn(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});else B=await ze(T,e.label,e.labelStyle||"",!1,!0);let _=B.getBBox();if(Vt(i)){let ot=B.children[0],ft=h(B);_=ot.getBoundingClientRect(),ft.attr("width",_.width),ft.attr("height",_.height)}let v=e.width<=_.width+e.padding?_.width+e.padding:e.width;if(e.width<=_.width+e.padding)e.diff=(v-e.width)/2-e.padding;else e.diff=-e.padding;let E=e.height,D=e.x-v/2,P=e.y-E/2;l.trace("Data ",e,JSON.stringify(e));let Z;if(e.look==="handDrawn"){let ot=y.svg(b),ft=vt(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),dt=ot.path(Ee(D,P,v,E,0),ft);Z=b.insert(()=>(l.debug("Rough node insert CXC",dt),dt),":first-child"),Z.select("path:nth-child(2)").attr("style",p.join(";")),Z.select("path").attr("style",x.join(";").replace("fill","stroke"))}else Z=b.insert("rect",":first-child"),Z.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",D).attr("y",P).attr("width",v).attr("height",E);let{subGraphTitleTopMargin:Q}=va(i);if(T.attr("transform",`translate(${e.x-_.width/2}, ${e.y-e.height/2+Q})`),f){let ot=T.select("span");if(ot)ot.attr("style",f)}let tt=Z.node().getBBox();return e.offsetX=0,e.width=tt.width,e.height=tt.height,e.offsetY=_.height-e.padding/2,e.intersect=function(ot){return Je(e,ot)},{cluster:b,labelBBox:_}},"rect"),F1=t((r,e)=>{let i=r.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),o=0*e.padding,a=o/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");let c=s.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(n){return Je(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),M1=t(async(r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,borderColorArray:n,compositeBackground:d,compositeTitleBackground:f,nodeBorder:u}=o,p=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);er(p,e.colorIndex,s,n);let x=p.insert("g",":first-child"),b=p.insert("g").attr("class","cluster-label"),S=p.append("rect"),T=await ze(b,e.label,e.labelStyle,void 0,!0),B=T.getBBox();if(Vt(i)){let dt=T.children[0],lt=h(T);B=dt.getBoundingClientRect(),lt.attr("width",B.width),lt.attr("height",B.height)}let _=0*e.padding,v=_/2,E=(e.width<=B.width+e.padding?B.width+e.padding:e.width)+_;if(e.width<=B.width+e.padding)e.diff=(E-e.width)/2-e.padding;else e.diff=-e.padding;let D=e.height+_,P=e.height+_-B.height-6,Z=e.x-E/2,Q=e.y-D/2;e.width=E;let tt=e.y-e.height/2-v+B.height+2,ot;if(e.look==="handDrawn"){let dt=e.cssClasses.includes("statediagram-cluster-alt"),lt=y.svg(p),N=e.rx||e.ry?lt.path(Ee(Z,Q,E,D,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):lt.rectangle(Z,Q,E,D,{seed:a});ot=p.insert(()=>N,":first-child");let K=lt.rectangle(Z,tt,E,P,{fill:dt?c:d,fillStyle:dt?"hachure":"solid",stroke:u,seed:a});ot=p.insert(()=>N,":first-child"),S=p.insert(()=>K),ot.attr("class","outer"),S.attr("class","inner")}else{ot=x.insert("rect",":first-child");let dt="outer";ot.attr("class",dt).attr("x",Z).attr("y",Q).attr("width",E).attr("height",D).attr("data-look",e.look),S.attr("class","inner").attr("x",Z).attr("y",tt).attr("width",E).attr("height",P)}b.attr("transform",`translate(${e.x-B.width/2}, ${Q+1-(Vt(i)?0:3)})`);let ft=ot.node().getBBox();return e.height=ft.height,e.offsetX=0,e.offsetY=B.height-e.padding/2,e.labelBBox=B,e.intersect=function(dt){return Je(e,dt)},{cluster:p,labelBBox:B}},"roundedWithTitle"),A1=t(async(r,e)=>{l.info("Creating subgraph rect for ",e.id,e);let i=m(),{themeVariables:s,handDrawnSeed:o}=i,{clusterBkg:a,clusterBorder:c}=s,{labelStyles:n,nodeStyles:d,borderStyles:f,backgroundStyles:u}=L(e),p=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=Vt(i),b=p.insert("g").attr("class","cluster-label "),S=await fn(b,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}),T=S.getBBox();if(Vt(i)){let Q=S.children[0],tt=h(S);T=Q.getBoundingClientRect(),tt.attr("width",T.width),tt.attr("height",T.height)}let B=e.width<=T.width+e.padding?T.width+e.padding:e.width;if(e.width<=T.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,E=e.y-_/2;l.trace("Data ",e,JSON.stringify(e));let D;if(e.look==="handDrawn"){let Q=y.svg(p),tt=vt(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),ot=Q.path(Ee(v,E,B,_,e.rx),tt);D=p.insert(()=>(l.debug("Rough node insert CXC",ot),ot),":first-child"),D.select("path:nth-child(2)").attr("style",f.join(";")),D.select("path").attr("style",u.join(";").replace("fill","stroke"))}else D=p.insert("rect",":first-child"),D.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",E).attr("width",B).attr("height",_);let{subGraphTitleTopMargin:P}=va(i);if(b.attr("transform",`translate(${e.x-T.width/2}, ${e.y-e.height/2+P})`),n){let Q=b.select("span");if(Q)Q.attr("style",n)}let Z=D.node().getBBox();return e.offsetX=0,e.width=Z.width,e.height=Z.height,e.offsetY=T.height-e.padding/2,e.intersect=function(Q){return Je(e,Q)},{cluster:p,labelBBox:T}},"kanbanSection"),E1=t((r,e)=>{let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{altBackground:c,nodeBorder:n,borderColorArray:d}=o,f=r.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);er(f,e.colorIndex,s,d);let u=f.insert("g",":first-child"),p=0*e.padding,x=e.width+p;e.diff=-e.padding;let b=e.height+p,S=e.x-x/2,T=e.y-b/2;e.width=x;let B;if(e.look==="handDrawn"){let E=y.svg(f).rectangle(S,T,x,b,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});B=f.insert(()=>E,":first-child").attr("class","divider")}else{B=u.insert("rect",":first-child");let v="outer";if(e.look==="neo")v="divider";else v="divider";B.attr("class",v).attr("x",S).attr("y",T).attr("width",x).attr("height",b).attr("data-look",e.look)}let _=B.node().getBBox();return e.height=_.height,e.offsetX=0,e.offsetY=0,e.intersect=function(v){return Je(e,v)},{cluster:f,labelBBox:{}}},"divider"),$1=t(async(r,e,i)=>{l.info(`Creating ${i.cssClass} for `,e.id,e);let s=m(),{theme:o,themeVariables:a,handDrawnSeed:c}=s,{borderColorArray:n}=a,{labelStyles:d,borderStyles:f}=L(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);er(u,e.colorIndex,o,n);let p=Vt(s),x=u.insert("g").attr("class","cluster-label"),b={width:0,height:0},S=e.label?.trim();if(S){let P;if(e.labelType==="markdown")P=await fn(x,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width});else P=await ze(x,e.label,e.labelStyle||"",!1,!0);if(b=P.getBBox(),p){let Z=P.children[0],Q=h(P);b=Z.getBoundingClientRect(),Q.attr("width",b.width),Q.attr("height",b.height)}}let T=e.width<=b.width+e.padding?b.width+e.padding:e.width;if(e.width<=b.width+e.padding)e.diff=(T-e.width)/2-e.padding;else e.diff=-e.padding;let B=e.height,_=e.x-T/2,v=e.y-B/2,E;if(e.look==="handDrawn"){let P=y.svg(u),Z=vt(e,{roughness:i.roughness,fill:i.fill,stroke:i.stroke,strokeWidth:i.strokeWidth,seed:c,...i.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...i.strokeDash?{strokeLineDash:i.strokeDash}:{}}),Q=P.path(Ee(_,v,T,B,i.rx),Z);E=u.insert(()=>Q,":first-child"),E.select("path:nth-child(2)").attr("style",f.join(";"))}else if(E=u.insert("rect",":first-child"),E.attr("rx",i.rx).attr("ry",i.rx).attr("x",_).attr("y",v).attr("width",T).attr("height",B).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)E.attr("stroke-dasharray",i.strokeDash.join(", "));if(S){let{subGraphTitleTopMargin:P}=va(s);if(x.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+P})`),d){let Z=x.select("span");if(Z)Z.attr("style",d)}}let D=E.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=b.height-e.padding/2,e.intersect=function(P){return Je(e,P)},{cluster:u,labelBBox:b}},"createContainerGroup"),I1=t(async(r,e)=>{let{themeVariables:i}=m(),s=i.flowContainerStroke||i.secondaryBorderColor;return $1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),O1=t((r,e)=>{let i=r.boundaryType||"rect",s=i==="package"?20:r.padding,o=i==="package"?e.height+10:0,a=Math.max(r.width,e.width+s),c=i==="package"?Math.max(r.height,o+r.padding*2):r.height,n=r.x-a/2,d=r.y-c/2;return{boundaryType:i,width:a,height:c,x:n,y:d,bodyY:d+o,bodyHeight:c-o,tabHeight:o,tabWidth:i==="package"?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),D1=t(async(r,e)=>{l.info("Creating usecase system boundary for ",e.id,e);let i=m(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{clusterBkg:c,clusterBorder:n,borderColorArray:d}=o,{labelStyles:f,nodeStyles:u}=L(e),{stylesMap:p}=Ve(e),x=e.boundaryType||"rect",b=r.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${x} ${e.cssClasses}`).attr("id",typeof e.domId==="string"?e.domId:e.id).attr("data-boundary-type",x).attr("data-look",e.look);er(b,e.colorIndex,s,d);let S=Vt(i),T=b.insert("g").attr("class","cluster-label system-boundary-title"),B=await fn(T,e.label,{style:f,useHtmlLabels:S,isNode:!0}),_=B.getBBox();if(S){let N=B.children[0],K=h(B);_=N.getBoundingClientRect(),K.attr("width",_.width),K.attr("height",_.height)}let v=O1(e,_),{width:E,height:D,x:P,y:Z,bodyY:Q,bodyHeight:tt,tabHeight:ot,tabWidth:ft}=v;e.diff=e.width<=_.width+e.padding?(E-e.width)/2-e.padding:-e.padding;let dt=vt(e,{fill:p.get("fill")||c,stroke:p.get("stroke")||n,strokeWidth:p.get("stroke-width")?.replace("px","")||1,seed:a});if(e.look==="handDrawn"){let N=y.svg(b),K=N.rectangle(P,Q,E,tt,dt);if(b.insert(()=>K,":first-child").attr("class","boundary-body label-container"),x==="package"){let et=N.rectangle(P,Z,ft,ot,dt);b.insert(()=>et,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(b.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",P).attr("y",Q).attr("width",E).attr("height",tt),x==="package")b.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",P).attr("y",Z).attr("width",ft).attr("height",ot);let{subGraphTitleTopMargin:lt}=va(i);if(x==="package")T.attr("transform",`translate(${P+(ft-_.width)/2}, ${Z+(ot-_.height)/2})`);else T.attr("transform",`translate(${e.x-_.width/2}, ${Z+lt})`);if(f)T.attr("style",f),T.select("span").attr("style",f);return e.offsetX=0,e.width=E,e.height=D,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(N){return Je(e,N)},{cluster:b,labelBBox:_}},"usecaseSystemBoundary"),P1=gy,R1={rect:gy,squareRect:P1,roundedWithTitle:M1,noteGroup:F1,divider:E1,kanbanSection:A1,flowGroup:I1,usecaseSystemBoundary:D1,swimlane:L1},q1=new Set(["noteGroup","divider"]),Fg=t((r)=>!q1.has(r??"rect"),"clusterPaintsTitle"),my=new Map,Co=t(async(r,e)=>{let i=e.shape||"rect",s=await R1[i](r,e);return my.set(e.id,s),s},"insertCluster"),rh=t(()=>{my=new Map},"clear");var Oo=t((r,e)=>{if(e)return"translate("+-r.width/2+", "+-r.height/2+")";let i=r.x??0,s=r.y??0;return"translate("+-(i+r.width/2)+", "+-(s+r.height/2)+")"},"computeLabelTransform"),Yt={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},hm={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Po(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=ue(r),e=ue(e);let[i,s]=[r.x,r.y],[o,a]=[e.x,e.y],c=o-i,n=a-s;return{angle:Math.atan(n/c),deltaX:c,deltaY:n}}t(Po,"calculateDeltaAndAngle");var ue=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),W1=t((r)=>({x:t(function(e,i,s){let o=0,a=ue(s[0]).x<ue(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(Yt,r.arrowTypeStart)){let{angle:b,deltaX:S}=Po(s[0],s[1]);o=Yt[r.arrowTypeStart]*Math.cos(b)*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Yt,r.arrowTypeEnd)){let{angle:b,deltaX:S}=Po(s[s.length-1],s[s.length-2]);o=Yt[r.arrowTypeEnd]*Math.cos(b)*(S>=0?1:-1)}let c=Math.abs(ue(e).x-ue(s[s.length-1]).x),n=Math.abs(ue(e).y-ue(s[s.length-1]).y),d=Math.abs(ue(e).x-ue(s[0]).x),f=Math.abs(ue(e).y-ue(s[0]).y),u=Yt[r.arrowTypeStart],p=Yt[r.arrowTypeEnd],x=1;if(c<p&&c>0&&n<p){let b=p+x-c;b*=a==="right"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="right"?-1:1,o+=b}return ue(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=ue(s[0]).y<ue(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(Yt,r.arrowTypeStart)){let{angle:b,deltaY:S}=Po(s[0],s[1]);o=Yt[r.arrowTypeStart]*Math.abs(Math.sin(b))*(S>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(Yt,r.arrowTypeEnd)){let{angle:b,deltaY:S}=Po(s[s.length-1],s[s.length-2]);o=Yt[r.arrowTypeEnd]*Math.abs(Math.sin(b))*(S>=0?1:-1)}let c=Math.abs(ue(e).y-ue(s[s.length-1]).y),n=Math.abs(ue(e).x-ue(s[s.length-1]).x),d=Math.abs(ue(e).y-ue(s[0]).y),f=Math.abs(ue(e).x-ue(s[0]).x),u=Yt[r.arrowTypeStart],p=Yt[r.arrowTypeEnd],x=1;if(c<p&&c>0&&n<p){let b=p+x-c;b*=a==="up"?-1:1,o-=b}if(d<u&&d>0&&f<u){let b=u+x-d;b*=a==="up"?-1:1,o+=b}return ue(e).y+o},"y")}),"getLineFunctionsWithOffset"),N1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)yy(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)yy(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),z1={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},arrow_hierarchy:{type:"hierarchy",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}},H1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],yy=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=z1[i],f=d&&H1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,b=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let S=n.replace(/[^\dA-Za-z]/g,"_"),T=`${b}_${S}`;if(!document.getElementById(T)){let B=document.getElementById(b);if(B){let _=B.cloneNode(!0);_.id=T,_.querySelectorAll("path, circle, line").forEach((E)=>{if(E.setAttribute("stroke",n),d.fill)E.setAttribute("fill",n)}),B.parentNode?.appendChild(_)}}r.attr(`marker-${e}`,`url(${s}#${T})`)}else r.attr(`marker-${e}`,`url(${s}#${b})`)},"addEdgeMarker"),Y1=t((r)=>typeof r==="string"?r:m()?.flowchart?.curve,"resolveEdgeCurveType"),dl=new Map,Jt=new Map,ah=t(()=>{dl.clear(),Jt.clear()},"clear"),Pg=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),Do=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),xa=t(async(r,e)=>{let i=m(),s=Vt(i),{labelStyles:o}=L(e);e.labelStyle=o;let a=r.insert("g").attr("class","edgeLabel"),c=a.insert("g").attr("class","label").attr("data-id",e.id),n=e.labelType==="markdown",d=void 0,f=await fn(r,e.label,{style:Do(e.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:n,width:n?d:void 0},i);c.node().appendChild(f),l.info("abc82",e,e.labelType);let u,p;if(s){let b=f.children[0],S=h(f);u=await hr.measure(()=>b.getBoundingClientRect()),p=u,S.attr("width",u.width),S.attr("height",u.height)}else{let b=h(f).select("text").node();await hr.measure(()=>{if(u=f.getBBox(),b&&typeof b.getBBox==="function")p=b.getBBox();else p=u})}c.attr("transform",Oo(p,s)),dl.set(e.id,a),e.width=u.width,e.height=u.height;let x;if(e.startLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await ze(S,e.startLabelLeft,Do(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Oo(B,s)),!Jt.get(e.id))Jt.set(e.id,{});Jt.get(e.id).startLeft=b,Ro(x,e.startLabelLeft)}if(e.startLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await ze(S,e.startLabelRight,Do(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Oo(B,s)),!Jt.get(e.id))Jt.set(e.id,{});Jt.get(e.id).startRight=b,Ro(x,e.startLabelRight)}if(e.endLabelLeft){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await ze(b,e.endLabelLeft,Do(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Oo(B,s)),!Jt.get(e.id))Jt.set(e.id,{});Jt.get(e.id).endLeft=b,Ro(x,e.endLabelLeft)}if(e.endLabelRight){let b=r.insert("g").attr("class","edgeTerminals"),S=b.insert("g").attr("class","inner"),T=await ze(b,e.endLabelRight,Do(e.labelStyle)||"",!1,!1);x=T;let B=T.getBBox();if(s){let _=T.children[0],v=h(T);B=_.getBoundingClientRect(),v.attr("width",B.width),v.attr("height",B.height)}if(S.attr("transform",Oo(B,s)),!Jt.get(e.id))Jt.set(e.id,{});Jt.get(e.id).endRight=b,Ro(x,e.endLabelRight)}return f},"insertEdgeLabel");function Ro(r,e){if(Vt(m())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(Ro,"setTerminalWidth");var pl=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,dl.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=m(),{subGraphTitleTotalMargin:o}=va(s);if(r.label){let a=dl.get(r.id),{x:c,y:n}=r;if(i){let d=V.calcLabelPosition(i);if(l.debug("Moving label "+r.label+" from (",c,",",n,") to (",d.x,",",d.y,") abc88"),e.updatedPath)c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n+o/2})`)}if(r.startLabelLeft){let a=Jt.get(r.id).startLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.startLabelRight){let a=Jt.get(r.id).startRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelLeft){let a=Jt.get(r.id).endLeft,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}if(r.endLabelRight){let a=Jt.get(r.id).endRight,{x:c,y:n}=r;if(i){let d=V.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",i);c=d.x,n=d.y}a.attr("transform",`translate(${c}, ${n})`)}},"positionEdgeLabel"),j1=t((r,e)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(e.length!==2)return e;let[i,s]=e,o=Math.abs(s.x-i.x),a=Math.abs(s.y-i.y);if(o<0.001||a<0.001)return e;if(a>=o)return[i,{x:i.x,y:s.y},s];return[i,{x:s.x,y:i.y},s]},"orthogonalizeToLabelClippedPoints"),U1=t((r,e)=>{let{x:i,y:s}=r,o=Math.abs(e.x-i),a=Math.abs(e.y-s),c=r.width/2,n=r.height/2;return o>=c||a>=n},"outsideNode"),X1=t((r,e,i)=>{l.debug(`intersection calc abc89:
|
|
291
|
-
outsidePoint: ${JSON.stringify(e)}
|
|
292
|
-
insidePoint : ${JSON.stringify(i)}
|
|
293
|
-
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let{x:s,y:o}=r,a=Math.abs(s-i.x),c=r.width/2,n=i.x<e.x?c-a:c+a,d=r.height/2,f=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(o-e.y)*c>Math.abs(s-e.x)*d){let p=i.y<e.y?e.y-d-o:o-d-e.y;n=u*p/f;let x={x:i.x<e.x?i.x+n:i.x-u+n,y:i.y<e.y?i.y+f-p:i.y-f+p};if(n===0)x.x=e.x,x.y=e.y;if(u===0)x.x=e.x;if(f===0)x.y=e.y;return l.debug(`abc89 top/bottom calc, Q ${f}, q ${p}, R ${u}, r ${n}`,x),x}else{if(i.x<e.x)n=e.x-c-s;else n=s-c-e.x;let p=f*n/u,x=i.x<e.x?i.x+u-n:i.x-u+n,b=i.y<e.y?i.y+p:i.y-p;if(l.debug(`sides calc abc89, Q ${f}, q ${p}, R ${u}, r ${n}`,{_x:x,_y:b}),n===0)x=e.x,b=e.y;if(u===0)x=e.x;if(f===0)b=e.y;return{x,y:b}}},"intersection"),xy=t((r,e)=>{l.warn("abc88 cutPathAtIntersect",r,e);let i=[],s=r[0],o=!1;return r.forEach((a)=>{if(l.info("abc88 checking point",a,e),!U1(e,a)&&!o){let c=X1(e,s,a);l.debug("abc88 inside",a,s,c),l.debug("abc88 intersection",c,e);let n=!1;if(i.forEach((d)=>{n=n||d.x===c.x&&d.y===c.y}),!i.some((d)=>d.x===c.x&&d.y===c.y))i.push(c);else l.warn("abc88 no intersect",c,i);o=!0}else if(l.warn("abc88 outside",a,s),s=a,!o)i.push(a)}),l.debug("returning points",i),i},"cutPathAtIntersect");function by(r){let e=[],i=[];for(let s=1;s<r.length-1;s++){let o=r[s-1],a=r[s],c=r[s+1];if(o.x===a.x&&a.y===c.y&&Math.abs(a.x-c.x)>5&&Math.abs(a.y-o.y)>5)e.push(a),i.push(s);else if(o.y===a.y&&a.x===c.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-c.y)>5)e.push(a),i.push(s)}return{cornerPoints:e,cornerPointPositions:i}}t(by,"extractCornerPoints");var Cy=t(function(r,e,i){let s=e.x-r.x,o=e.y-r.y,a=Math.sqrt(s*s+o*o),c=i/a;return{x:e.x-c*s,y:e.y-c*o}},"findAdjacentPoint"),G1=t(function(r){let{cornerPointPositions:e}=by(r),i=[];for(let s=0;s<r.length;s++)if(e.includes(s)){let o=r[s-1],a=r[s+1],c=r[s],n=Cy(o,c,5),d=Cy(a,c,5),f=d.x-n.x,u=d.y-n.y;i.push(n);let p=Math.sqrt(2)*2,x={x:c.x,y:c.y};if(Math.abs(a.x-o.x)>10&&Math.abs(a.y-o.y)>=10){l.debug("Corner point fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));let b=5;if(c.x===n.x)x={x:f<0?n.x-b+p:n.x+b-p,y:u<0?n.y-p:n.y+p};else x={x:f<0?n.x-p:n.x+p,y:u<0?n.y-b+p:n.y+b-p}}else l.debug("Corner point skipping fixing",Math.abs(a.x-o.x),Math.abs(a.y-o.y));i.push(x,d)}else i.push(r[s]);return i},"fixCorners"),V1=t((r,e,i)=>{let s=r-e-i,o=2,a=2,c=4,n=Math.floor(s/4),d=Number.isFinite(n)?Math.max(0,n):0,f=Array(d).fill("2 2").join(" ");return`0 ${e} ${f} ${i}`},"generateDashArray"),Eo=t(function(r,e,i,s,o,a,c,n=!1){if(!c)throw Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:f}=m(),u=e.points,p=!1,x=o;var b=a;let S=[];for(let ct in e.cssCompiledStyles){if(ud(ct))continue;S.push(e.cssCompiledStyles[ct])}if(f==="swimlane"){if(b.intersect&&x.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[x.intersect(u[0]),b.intersect(u[1])];else{let ct=u.slice(1,-1),_t=ct[0],Lt=ct[ct.length-1],jt=0.5,Ut=Math.abs(u[u.length-1].x-Lt.x)<0.5&&Math.abs(u[u.length-1].y-Lt.y)<0.5,Qt=x.intersect(_t),re=Ut?Lt:b.intersect(Lt),Dt=Math.abs(re.x-Lt.x)<0.5&&Math.abs(re.y-Lt.y)<0.5,Wt=Math.abs(Qt.x-_t.x)<0.5&&Math.abs(Qt.y-_t.y)<0.5?[]:[Qt],Xt=Dt?[]:[re];u=[...Wt,...ct,...Xt]}u=j1(e,u)}else if(b.intersect&&x.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(x.intersect(u[0])),u.push(b.intersect(u[u.length-1]));let T=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=xy(e.points,i.get(e.toCluster).node),p=!0;if(e.fromCluster)l.debug("from cluster abc88",i.get(e.fromCluster),JSON.stringify(u,null,2)),u=xy(u.reverse(),i.get(e.fromCluster).node).reverse(),p=!0;let B=u.filter((ct)=>!Number.isNaN(ct.y)),_=Y1(e.curve);if(_!=="rounded")B=G1(B);let v=ya;switch(_){case"linear":v=ya;break;case"basis":v=Lr;break;case"cardinal":v=ho;break;case"bumpX":v=ao;break;case"bumpY":v=no;break;case"catmullRom":v=uo;break;case"monotoneX":v=fo;break;case"monotoneY":v=po;break;case"natural":v=ni;break;case"step":v=li;break;case"stepAfter":v=mo;break;case"stepBefore":v=go;break;case"rounded":v=ya;break;default:v=Lr}let{x:E,y:D}=W1(e),P=cl().x(E).y(D).curve(v),Z;switch(e.thickness){case"normal":Z="edge-thickness-normal";break;case"thick":Z="edge-thickness-thick";break;case"invisible":Z="edge-thickness-invisible";break;default:Z="edge-thickness-normal"}switch(e.pattern){case"solid":Z+=" edge-pattern-solid";break;case"dotted":Z+=" edge-pattern-dotted";break;case"dashed":Z+=" edge-pattern-dashed";break;default:Z+=" edge-pattern-solid"}let Q,tt=_==="rounded"?ky(wy(B,e),5):P(B),ot=Array.isArray(e.style)?e.style:[e.style],ft=ot.find((ct)=>ct?.startsWith("stroke:")),dt="";if(e.animate)dt="edge-animation-fast";if(e.animation)dt="edge-animation-"+e.animation;let lt=!1;if(e.look==="handDrawn"){let ct=y.svg(r);Object.assign([],B);let _t=ct.path(tt,{roughness:0.3,seed:d});Z+=" transition",Q=h(_t).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+Z+(e.classes?" "+e.classes:"")+(dt?" "+dt:"")).attr("style",ot?ot.reduce((jt,Ut)=>jt+";"+Ut,""):"");let Lt=Q.attr("d");Q.attr("d",Lt),r.node().appendChild(Q.node())}else{let ct=S.join(";"),_t=ot?ot.reduce((Dt,Et)=>Dt+Et+";",""):"",Lt=(ct?ct+";"+_t+";":_t)+";"+(ot?ot.reduce((Dt,Et)=>Dt+";"+Et,""):"");Q=r.append("path").attr("d",tt).attr("id",`${c}-${e.id}`).attr("class"," "+Z+(e.classes?" "+e.classes:"")+(dt?" "+dt:"")).attr("style",Lt),ft=Lt.match(/stroke:([^;]+)/)?.[1],lt=e.animate===!0||!!e.animation||ct.includes("animation");let jt=Q.node(),Ut=typeof jt.getTotalLength==="function"?jt.getTotalLength():0,Qt=hm[e.arrowTypeStart]||0,re=hm[e.arrowTypeEnd]||0;if(e.look==="neo"&&!lt){let Et=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?V1(Ut,Qt,re):`0 ${Qt} ${Ut-Qt-re} ${re}`}; stroke-dashoffset: 0;`;Q.attr("style",Et+Q.attr("style"))}}if(Q.attr("data-edge",!0),Q.attr("data-et","edge"),Q.attr("data-id",e.id),Q.attr("data-points",T),Q.attr("data-look",de(e.look)),e.showPoints)B.forEach((ct)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",ct.x).attr("cy",ct.y)});let N="";if(m().flowchart.arrowMarkerAbsolute||m().state.arrowMarkerAbsolute)N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let K=!lt&&e?.look==="neo";N1(Q,e,N,c,s,K,ft);let et=Math.floor(u.length/2),U=u[et];if(!V.isLabelCoordinateInPath(U,Q.attr("d")))p=!0;let ut={};if(p)ut.updatedPath=u;return ut.originalPath=e.points,ut},"insertEdge");function ky(r,e){if(r.length<2)return"";let i="",s=r.length,o=0.00001;for(let a=0;a<s;a++){let c=r[a],n=r[a-1],d=r[a+1];if(a===0)i+=`M${c.x},${c.y}`;else if(a===s-1)i+=`L${c.x},${c.y}`;else{let f=c.x-n.x,u=c.y-n.y,p=d.x-c.x,x=d.y-c.y,b=Math.hypot(f,u),S=Math.hypot(p,x);if(b<o||S<o){i+=`L${c.x},${c.y}`;continue}let T=f/b,B=u/b,_=p/S,v=x/S,E=T*_+B*v,D=Math.max(-1,Math.min(1,E)),P=Math.acos(D);if(P<o||Math.abs(Math.PI-P)<o){i+=`L${c.x},${c.y}`;continue}let Z=Math.min(e/Math.sin(P/2),b/2,S/2),Q=c.x-T*Z,tt=c.y-B*Z,ot=c.x+_*Z,ft=c.y+v*Z;i+=`L${Q},${tt}`,i+=`Q${c.x},${c.y} ${ot},${ft}`}}return i}t(ky,"generateRoundedPath");function wc(r,e){if(!r||!e)return{angle:0,deltaX:0,deltaY:0};let i=e.x-r.x,s=e.y-r.y;return{angle:Math.atan2(s,i),deltaX:i,deltaY:s}}t(wc,"calculateDeltaAndAngle");function wy(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&Yt[e.arrowTypeStart]){let o=Yt[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=wc(a,c),d=o*Math.cos(n),f=o*Math.sin(n);i[0].x=a.x+d,i[0].y=a.y+f}let s=r.length;if(s>=2&&Yt[e.arrowTypeEnd]){let o=Yt[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=wc(c,a),d=o*Math.cos(n),f=o*Math.sin(n);i[s-1].x=a.x-d,i[s-1].y=a.y-f}return i}t(wy,"applyMarkerOffsetsToPoints");var K1=t((r,e,i,s)=>{e.forEach((o)=>{b2[o](r,i,s)})},"insertMarkers"),Z1=t((r,e,i)=>{l.trace("Making markers for ",i),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",i+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),Q1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),J1=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),t2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),e2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),r.append("defs").append("marker").attr("id",i+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),r2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-pointEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),i2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-circleEnd").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),r.append("marker").attr("id",i+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),o2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),r.append("marker").attr("id",i+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),r.append("marker").attr("id",i+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),s2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),a2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{transitionColor:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-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",`${a}`)},"barbNeo"),n2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),l2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),h2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),c2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),u2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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",`${a}`)},"only_one_neo"),d2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",c??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",c??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),f2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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",`${a}`),r.append("defs").append("marker").attr("id",i+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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",`${a}`)},"one_or_more_neo"),p2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a,mainBkg:c}=o,n=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",c??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let d=r.append("defs").append("marker").attr("id",i+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",c??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),g2=t((r,e,i)=>{r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
294
|
-
L20,10
|
|
295
|
-
M20,10
|
|
296
|
-
L0,20`)},"requirement_arrow"),m2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o;r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
297
|
-
L20,10
|
|
298
|
-
M20,10
|
|
299
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),y2=t((r,e,i)=>{let s=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),x2=t((r,e,i)=>{let s=C(),{themeVariables:o}=s,{strokeWidth:a}=o,c=r.append("defs").append("marker").attr("id",i+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");c.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),c.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),c.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),c.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),C2=t((r,e,i)=>{r.append("marker").attr("id",i+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),r.append("marker").attr("id",i+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),b2={extension:Z1,composition:Q1,aggregation:J1,dependency:t2,lollipop:e2,point:r2,circle:i2,cross:o2,barb:s2,barbNeo:a2,hierarchy:C2,only_one:n2,zero_or_one:l2,one_or_more:h2,zero_or_more:c2,only_one_neo:u2,zero_or_one_neo:d2,one_or_more_neo:f2,zero_or_more_neo:p2,requirement_arrow:g2,requirement_contains:y2,requirement_arrow_neo:m2,requirement_contains_neo:x2},ml=K1;var k2={common:w,getConfig:C,insertCluster:Co,insertEdge:Eo,insertEdgeLabel:xa,insertMarkers:ml,insertNode:ka,interpolateToCurve:Is,labelHelper:X,log:l,positionEdgeLabel:pl},w2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],qo=Object.create(null),Og=t((r)=>{for(let e of r)qo[e.name]=e},"registerLayoutLoaders"),S2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-573f1vfs.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...w2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),T2=t(()=>{Og([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-b8gtt32x.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-s58xzqhw.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-ydq7mvy0.js"),"loader")},...S2()])},"registerDefaultLayoutLoaders");T2();var Ft=t(async(r,e)=>{if(!Object.hasOwn(qo,r.layoutAlgorithm))throw Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);if(r.diagramId)for(let o of r.nodes){let a=o.domId||o.id;o.domId=`${r.diagramId}-${a}`}let i=qo[r.layoutAlgorithm],s=await i.loader();return Wp(e,r.config),s.render(r,e,k2,{algorithm:i.algorithm})},"render"),Sc="dagre",Pt=t((r="",{fallback:e=Sc}={})=>{if(Object.hasOwn(qo,r))return r;for(let i of[e,Sc])if(Object.hasOwn(qo,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${Sc} is registered.`)},"getRegisteredLayoutAlgorithm");var zn=t(()=>`
|
|
300
|
-
/* Font Awesome icon styling - consolidated */
|
|
301
|
-
.label-icon {
|
|
302
|
-
display: inline-block;
|
|
303
|
-
height: 1em;
|
|
304
|
-
overflow: visible;
|
|
305
|
-
vertical-align: -0.125em;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.node .label-icon path {
|
|
309
|
-
fill: currentColor;
|
|
310
|
-
stroke: revert;
|
|
311
|
-
stroke-width: revert;
|
|
312
|
-
}
|
|
313
|
-
`,"getIconStyles");var Ot=t((r,e)=>{let i;if(e==="sandbox")i=h("#i"+r);return(e==="sandbox"?h(i.nodes()[0].contentDocument.body):h("body")).select(`[id="${r}"]`)},"getDiagramElement");var bt=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=B2(r,e);te(r,a,o,s);let d=_2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),B2=t((r,e)=>{let i=r.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),_2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
|
|
314
|
-
export{t,vo,zp,l,id,At,ha,Se,lc,g,A,Eg,Bg,Wi,cc,Up,qA,nt,Kt,ko,Y,Ig,ai,Yr,Gp,HA,WA,KA,_g,Sg,C,VA,sd,YA,Vt,sl,ee,Tg,xo,Tt,uc,dc,w,te,Jr,jp,JA,qp,M,O,G,z,j,H,q,m,ba,Ki,pc,ld,Hp,h,Vi,mc,Yi,Va,Dg,On,fc,ZA,oi,ll,Qn,gc,wo,Jn,wt,Ac,Zr,cd,ya,cl,ge,dr,pr,Wp,ud,L,Ng,Ji,mr,ul,Zi,ii,Kp,hc,bc,yc,vc,Vp,Yp,Jp,Zp,Xp,em,tm,nm,rm,am,om,im,sm,lm,cm,um,dm,si,kc,dd,pm,Qg,XA,mm,Rg,Lg,Xi,pd,Zn,md,fm,$n,ie,V,eh,Ya,Rn,gm,Am,Mg,fn,fd,ht,it,st,Xr,Xn,er,y,X,W,R,gd,xc,va,ka,th,nh,ea,Fg,Co,rh,Yt,hm,dl,Jt,ah,Pg,xa,pl,Eo,ml,Og,Ft,Pt,zn,Ot,bt};
|