@kabmo-labs/kabmo 0.60.0 → 0.62.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/README.md +53 -49
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +1157 -825
- package/dist/client/static/js/{Body-p82s28sj.js → Body-z6kstvk6.js} +3 -3
- package/dist/client/static/js/{CsvGrid-erc5mcvc.js → CsvGrid-f73c0s4e.js} +2 -2
- package/dist/client/static/js/{DocxView-x3faj0jv.js → DocxView-a1pb7nsb.js} +3 -3
- package/dist/client/static/js/{DrawioView-t7fh3ens.js → DrawioView-r61gcg24.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-zy7x7jmm.js → HtmlPreview-vt7j0b05.js} +1 -1
- package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
- package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
- package/dist/client/static/js/Modal-cadmjkak.js +60 -0
- package/dist/client/static/js/{PdfView-kqx472q7.js → PdfView-mppt2gkd.js} +1 -1
- package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
- package/dist/client/static/js/{SheetView-0n9fze50.js → SheetView-5s9zfx9g.js} +9 -9
- package/dist/client/static/js/{SvgPreview-6xc6ts46.js → SvgPreview-ff78xn3e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2xdkkqwg.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-ja8cx19z.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
- package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
- package/dist/client/static/js/bash-wcy12qjx.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-ytf7s99c.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
- package/dist/client/static/js/c-vvantfth.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-5a0kdx0z.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-hd98dvjw.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-man3fqcj.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
- package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
- package/dist/client/static/js/css-j2j6f03w.js +1 -0
- package/dist/client/static/js/css-qk59j6rj.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-2f0kbbv2.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-k7pyhgzn.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qx0afa2m.js → diagram-22UHCM2B-197hemfa.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-ydpe77sv.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-e63v984n.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-8c765h3a.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-3pq0n7v8.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-638atzxz.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
- package/dist/client/static/js/{dockerfile-yehc914q.js → dockerfile-4nked309.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3gv43zvm.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
- package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-6s5pggfc.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-x7cqyb89.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
- package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-g97te4v1.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sw4f94tc.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
- package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
- package/dist/client/static/js/html-x12gb1wk.js +1 -0
- package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
- package/dist/client/static/js/{index-vejz38qt.js → index-0w1jzang.js} +5 -5
- package/dist/client/static/js/{index-bpcg34jp.js → index-1svt0cdw.js} +2 -2
- package/dist/client/static/js/{index-hgfyx8dt.js → index-1tb4py5v.js} +2 -2
- package/dist/client/static/js/index-2gt9krtj.js +4 -0
- package/dist/client/static/js/index-2x9m7s1a.js +1 -0
- package/dist/client/static/js/index-3fvqmz3m.js +4 -0
- package/dist/client/static/js/{index-pdz6j2g2.js → index-42wvbkm5.js} +2 -2
- package/dist/client/static/js/index-477vtt51.js +2 -0
- package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
- package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
- package/dist/client/static/js/index-5nb9k2ph.js +1 -0
- package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
- package/dist/client/static/js/{index-111bq6rs.js → index-66qxrh5n.js} +1 -1
- package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
- package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
- package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
- package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
- package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
- package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
- package/dist/client/static/js/index-c9f0hejv.js +3 -0
- package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
- package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
- package/dist/client/static/js/index-dxc14kmm.js +1 -0
- package/dist/client/static/js/{index-hwdkxe4n.js → index-dxyjxhm1.js} +2 -2
- package/dist/client/static/js/{index-43gmn7yb.js → index-edpyqz9f.js} +1 -1
- package/dist/client/static/js/{index-pdgc9ccr.js → index-eesepb70.js} +2 -2
- package/dist/client/static/js/{index-vec7m1yd.js → index-evh437bz.js} +2 -2
- package/dist/client/static/js/index-ey6v4t5b.js +1 -0
- package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
- package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
- package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
- package/dist/client/static/js/index-j734ev6q.js +482 -0
- package/dist/client/static/js/{index-vcq6zfxx.js → index-jcbp1d9d.js} +6 -6
- package/dist/client/static/js/index-jg5h18sm.js +2 -0
- package/dist/client/static/js/{index-6qn9kygb.js → index-jtdve6xw.js} +7 -7
- package/dist/client/static/js/{index-4xbc0j7t.js → index-k0bqrb1y.js} +1 -1
- package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
- package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
- package/dist/client/static/js/{index-2n2evsg0.js → index-kv1xnem9.js} +2 -2
- package/dist/client/static/js/{index-8zct30zd.js → index-m54ctmxr.js} +1 -1
- package/dist/client/static/js/index-mgzbypt5.js +314 -0
- package/dist/client/static/js/{index-cf69bhjx.js → index-mh52531j.js} +2 -2
- package/dist/client/static/js/{index-0ze5bwvw.js → index-mhz5ywa4.js} +5 -5
- package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
- package/dist/client/static/js/{index-9rz6kzsv.js → index-nxd6z7f9.js} +2 -2
- package/dist/client/static/js/{index-jfqd838j.js → index-pjrbt77c.js} +2 -2
- package/dist/client/static/js/index-r7h4pm42.js +2 -0
- package/dist/client/static/js/index-ratrdgc9.js +2 -0
- package/dist/client/static/js/{index-cfvc1zpk.js → index-rhmvh9w5.js} +2 -2
- package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
- package/dist/client/static/js/{index-37apvxgj.js → index-tckzkw0f.js} +2 -2
- package/dist/client/static/js/index-tza9h3q6.css +1 -0
- package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
- package/dist/client/static/js/{index-z8k42dwz.js → index-w0j96eyy.js} +8 -8
- package/dist/client/static/js/{index-qkqkygrf.js → index-ws04kxy9.js} +1 -1
- package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
- package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
- package/dist/client/static/js/index-y8405hdg.js +10 -0
- package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
- package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
- package/dist/client/static/js/{index-dv01prse.js → index-zg7q3kcb.js} +2 -2
- package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
- package/dist/client/static/js/{index-ywp0sd1e.js → index-zy963qbh.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-pw2qaa27.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
- package/dist/client/static/js/ini-522adp5a.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-d13jhvxy.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
- package/dist/client/static/js/java-z0rgs7v6.js +1 -0
- package/dist/client/static/js/javascript-fv87f565.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-20gb8a04.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
- package/dist/client/static/js/json-1czq1ped.js +1 -0
- package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
- package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-s78e158c.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
- package/dist/client/static/js/lua-nn8bpjev.js +1 -0
- package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
- package/dist/client/static/js/{mermaid.core-xbm27k28.js → mermaid.core-3aae27b9.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-6y7xe2zm.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
- package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
- package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-dmvewetf.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
- package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
- package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-1q9e7rcm.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
- package/dist/client/static/js/properties-kncqeqhn.js +1 -0
- package/dist/client/static/js/python-gx8ggmyh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-mvrem3n6.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
- package/dist/client/static/js/r-x8rftkm3.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-axttcfhw.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-5qx7erta.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
- package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
- package/dist/client/static/js/{rust-b3ckax3e.js → rust-6sddyxnt.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-es87a3j6.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
- package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
- package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-dgpnjrtk.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-kyw0p86n.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
- package/dist/client/static/js/sql-99y0qnag.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vnsbw8y9.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
- package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-060q1rep.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
- package/dist/client/static/js/tsx-phngprp0.js +1 -0
- package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-18sp73v7.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
- package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
- package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-q0kwmbzh.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
- package/dist/client/static/js/xml-59n0cjn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-y0gpmg6m.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
- package/dist/client/static/js/yaml-9fw908s4.js +1 -0
- package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
- package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.tsx +2 -5
- package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
- package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
- package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/app.tsx +2 -0
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
- package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
- package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
- package/marketplace/plugins/github-actions/package.json +2 -2
- package/marketplace/plugins/github-actions/src/app.tsx +2 -0
- package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
- package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
- package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
- package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
- package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
- package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
- package/marketplace/plugins/kanban/package.json +2 -2
- package/marketplace/plugins/kanban/src/app.tsx +2 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
- package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
- package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
- package/marketplace/plugins/session-info/package.json +2 -2
- package/marketplace/plugins/session-info/src/app.tsx +6 -3
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
- package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
- package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
- package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
- package/marketplace/plugins/stats/src/app.tsx +11 -9
- package/package.json +10 -10
- package/src/cli/lib/commands/plugin.js +8 -5
- package/src/client/bootstrap.d.ts +5 -0
- package/src/client/chat-title-overlay.test.ts +53 -0
- package/src/client/components/auth/login-screen/index.tsx +31 -3
- package/src/client/components/common/SignOutButton.tsx +4 -5
- package/src/client/components/common/account-badge/index.tsx +31 -0
- package/src/client/components/common/footer-version/index.tsx +40 -0
- package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
- package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
- package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
- package/src/client/components/common/header-controls/index.test.tsx +2 -6
- package/src/client/components/common/header-controls/index.tsx +9 -25
- package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
- package/src/client/components/common/shell-update-button/index.tsx +2 -2
- package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
- package/src/client/components/layout/desktop-layout/index.tsx +2 -4
- package/src/client/components/layout/left-bar/index.tsx +25 -3
- package/src/client/components/layout/rail-toggle.test.tsx +112 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
- package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
- package/src/client/components/layout/session-title-bar/index.tsx +13 -5
- package/src/client/components/layout/top-bars.test.tsx +4 -2
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/RightSidebar.tsx +12 -3
- package/src/client/components/mobile/SessionSidebar.tsx +6 -2
- package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
- package/src/client/components/mobile/drawer-strip.tsx +9 -2
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
- package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
- package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
- package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
- package/src/client/components/settings/Band.tsx +5 -2
- package/src/client/components/settings/Modal.tsx +8 -5
- package/src/client/components/settings/Sidebar.tsx +5 -3
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
- package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
- package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
- package/src/client/components/workspace/editor/Tab.tsx +19 -26
- package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
- package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -37
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -49
- package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
- package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
- package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
- package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
- package/src/client/data/settings/omp-schema.json +40 -4
- package/src/client/floating-phone.test.ts +189 -0
- package/src/client/floating.css +205 -2
- package/src/client/floating.test.ts +43 -0
- package/src/client/glass.css +47 -0
- package/src/client/hooks/chat/omp/index.ts +6 -5
- package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
- package/src/client/hooks/chat/omp/session-list.tsx +20 -8
- package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
- package/src/client/hooks/chat/timeline/index.ts +2 -0
- package/src/client/hooks/chat/timeline/send-props.ts +14 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
- package/src/client/hooks/chat/timeline/send.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send.ts +62 -42
- package/src/client/hooks/editor/image-generation.ts +24 -0
- package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
- package/src/client/hooks/editor/resolve-viewer.ts +14 -5
- package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
- package/src/client/hooks/editor/use-file-editor.ts +6 -2
- package/src/client/hooks/settings/accounts.ts +162 -0
- package/src/client/hooks/ui/auth.ts +58 -3
- package/src/client/hooks/ui/border-style.test.ts +5 -4
- package/src/client/hooks/ui/border-style.ts +3 -2
- package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
- package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
- package/src/client/hooks/ui/navbar-controls.ts +0 -3
- package/src/client/hooks/ui/zoom-gesture.ts +104 -0
- package/src/client/lib/desktop/titlebar.test.ts +21 -0
- package/src/client/lib/desktop/titlebar.ts +34 -0
- package/src/client/lib/plugins/bootstrap.test.ts +20 -0
- package/src/client/lib/plugins/bootstrap.tsx +10 -15
- package/src/client/lib/plugins/kit-components.test.tsx +119 -0
- package/src/client/lib/plugins/kit-components.tsx +79 -0
- package/src/client/lib/plugins/kit.ts +8 -0
- package/src/client/lib/plugins/slots.test.ts +34 -0
- package/src/client/lib/plugins/slots.ts +31 -4
- package/src/client/lib/plugins/stylesheets.ts +10 -11
- package/src/client/lib/ui/pinch.test.ts +74 -0
- package/src/client/lib/ui/pinch.ts +104 -0
- package/src/client/lib/ui/safe-area.test.ts +25 -0
- package/src/client/lib/ui/safe-area.ts +23 -0
- package/src/client/main.tsx +8 -1
- package/src/client/tailwind.css +54 -1
- package/src/server/index.ts +2 -0
- package/src/server/lib/assets/shell-attributes.server.ts +12 -4
- package/src/server/lib/assets/shell-attributes.test.ts +19 -18
- package/src/server/lib/auth/client-address.test.ts +2 -2
- package/src/server/lib/auth/guard.test.ts +2 -2
- package/src/server/lib/auth/guard.ts +81 -97
- package/src/server/lib/auth/handover-guard.test.ts +1 -1
- package/src/server/lib/auth/rate-limit.test.ts +2 -2
- package/src/server/lib/auth/token.test.ts +1 -1
- package/src/server/lib/auth/workspace-gate.server.ts +34 -0
- package/src/server/lib/bundler/css.test.ts +16 -0
- package/src/server/lib/connect/devices.server.test.ts +12 -0
- package/src/server/lib/connect/devices.server.ts +63 -19
- package/src/server/lib/connect/pairing.server.ts +5 -3
- package/src/server/lib/connect/status.server.ts +2 -2
- package/src/server/lib/db/schema.test.ts +3 -3
- package/src/server/lib/db/schema.ts +6 -0
- package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
- package/src/server/lib/harness/update-spawn.server.ts +10 -0
- package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
- package/src/server/lib/models/provider-icon-override.server.ts +197 -0
- package/src/server/lib/models/provider-icon-store.server.ts +8 -0
- package/src/server/lib/models/provider-icon.server.ts +31 -6
- package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
- package/src/server/lib/omp/session/artifacts.server.ts +21 -17
- package/src/server/lib/panels/build.server.ts +19 -2
- package/src/server/lib/panels/css.server.test.ts +141 -0
- package/src/server/lib/panels/css.server.ts +255 -0
- package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
- package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
- package/src/server/lib/panels/scan.server.ts +13 -7
- package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
- package/src/server/lib/panels/source-warnings.server.ts +71 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
- package/src/server/lib/realtime/topics.server.ts +14 -0
- package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
- package/src/server/lib/workspace/access.server.ts +108 -0
- package/src/server/lib/workspace/project-patch.server.ts +4 -2
- package/src/server/lib/workspace/register-folder.server.ts +19 -5
- package/src/server/lib/workspace/session-access.server.ts +55 -0
- package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
- package/src/server/plugins/ssr.ts +19 -3
- package/src/server/routes/accounts/index.ts +8 -0
- package/src/server/routes/accounts/management.test.ts +174 -0
- package/src/server/routes/accounts/management.ts +166 -0
- package/src/server/routes/auth/login.ts +22 -8
- package/src/server/routes/auth/logout.ts +1 -1
- package/src/server/routes/auth/password.ts +40 -33
- package/src/server/routes/auth/revoke.test.ts +1 -1
- package/src/server/routes/auth/revoke.ts +26 -8
- package/src/server/routes/auth/routes.test.ts +3 -3
- package/src/server/routes/auth/state.ts +14 -7
- package/src/server/routes/connect/devices.ts +7 -4
- package/src/server/routes/connect/pair.ts +4 -3
- package/src/server/routes/connect/status.ts +4 -2
- package/src/server/routes/connect/tunnels.ts +2 -1
- package/src/server/routes/folders/batch-delete.ts +12 -0
- package/src/server/routes/folders/clone.ts +7 -2
- package/src/server/routes/folders/create.ts +3 -1
- package/src/server/routes/folders/folder.ts +44 -4
- package/src/server/routes/folders/index.ts +3 -0
- package/src/server/routes/folders/shares.ts +62 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/panels/build.ts +1 -1
- package/src/server/routes/panels/css.test.ts +22 -0
- package/src/server/routes/panels/css.ts +5 -7
- package/src/server/routes/realtime/ws.ts +16 -1
- package/src/server/routes/sessions/list.ts +3 -2
- package/src/server/routes/settings/projects.ts +46 -7
- package/src/server/routes/settings/provider-icon.ts +18 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
- package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
- package/src/shared/lib/realtime/protocol.ts +16 -0
- package/src/shared/lib/settings/defaults.ts +2 -1
- package/src/shared/lib/settings/sections.ts +1 -1
- package/src/shared/lib/theme/border-style.test.ts +11 -9
- package/src/shared/lib/theme/border-style.ts +7 -7
- package/src/shared/lib/theme/chrome-style.test.ts +15 -0
- package/src/shared/lib/theme/chrome-style.ts +16 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +6 -5
- package/src/test-support/file-editor.test-util.ts +25 -6
- package/tsconfig.json +21 -0
- package/dist/client/static/js/ImageView-xc90jc1c.js +0 -1
- package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +0 -2
- package/dist/client/static/js/MergeDiffView-bng34cpr.js +0 -1
- package/dist/client/static/js/Modal-89jk7wff.js +0 -60
- package/dist/client/static/js/SessionsView-6bpz1faj.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
- package/dist/client/static/js/bash-bcbct9gc.js +0 -1
- package/dist/client/static/js/c-fn9jz26e.js +0 -1
- package/dist/client/static/js/cpp-a1q64mke.js +0 -1
- package/dist/client/static/js/css-b92azee8.js +0 -1
- package/dist/client/static/js/css-sn00sq6v.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7sn6nwjv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
- package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
- package/dist/client/static/js/html-6hdrwtz2.js +0 -1
- package/dist/client/static/js/index-4h2zkrk1.js +0 -2
- package/dist/client/static/js/index-5nm8hm4k.js +0 -2
- package/dist/client/static/js/index-95jfphx5.js +0 -481
- package/dist/client/static/js/index-9pw441wc.js +0 -4
- package/dist/client/static/js/index-bjz54ht6.js +0 -1
- package/dist/client/static/js/index-bqapt2e8.js +0 -2
- package/dist/client/static/js/index-ddkjgv5h.js +0 -2
- package/dist/client/static/js/index-dekvtt2a.js +0 -314
- package/dist/client/static/js/index-fnwaxc6r.js +0 -1
- package/dist/client/static/js/index-h65zrhva.js +0 -1
- package/dist/client/static/js/index-hxsqw7sz.js +0 -4
- package/dist/client/static/js/index-hxy1sadd.js +0 -2
- package/dist/client/static/js/index-ja0ajnvq.js +0 -10
- package/dist/client/static/js/index-qkyy563e.js +0 -1
- package/dist/client/static/js/index-t6nqy2n5.css +0 -1
- package/dist/client/static/js/index-wrk99kks.js +0 -3
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
- package/dist/client/static/js/java-n596am4c.js +0 -1
- package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
- package/dist/client/static/js/json-7k70qbkj.js +0 -1
- package/dist/client/static/js/jsx-sndenqrc.js +0 -1
- package/dist/client/static/js/lua-djd3g9q5.js +0 -1
- package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
- package/dist/client/static/js/one-dark-pro-7bgqnyhm.js +0 -1
- package/dist/client/static/js/one-light-47y6etng.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
- package/dist/client/static/js/properties-brn72zdk.js +0 -1
- package/dist/client/static/js/python-g9mghwgm.js +0 -1
- package/dist/client/static/js/r-e247x4mw.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
- package/dist/client/static/js/sql-0kar81jy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y77g9dq0.js +0 -8
- package/dist/client/static/js/timeline-definition-EJHVYXUP-8a3yqmx0.js +0 -120
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
- package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
- package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
- package/dist/client/static/js/vennDiagram-UO4OBE2U-gf4y1r3s.js +0 -34
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
- package/dist/client/static/js/xml-b7824nx0.js +0 -1
- package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
- package/src/server/lib/auth/client-address.ts +0 -89
- package/src/server/lib/auth/config.ts +0 -133
- package/src/server/lib/auth/rate-limit.ts +0 -146
- package/src/server/lib/auth/token.ts +0 -220
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import{Vt}from"./index-j734ev6q.js";import{wn,$n}from"./index-0g82ph6h.js";var mm=$n(function(Js,ta){(function(r,e){typeof Js=="object"&&typeof ta<"u"?ta.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=e()})(Js,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",k="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|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,_={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(ot){var R=["th","st","nd","rd"],X=ot%100;return"["+ot+(R[(X-20)%10]||R[X]||R[0])+"]"}},v=function(ot,R,X){var tt=String(ot);return!tt||tt.length>=R?ot:""+Array(R+1-tt.length).join(X)+ot},A={s:v,z:function(ot){var R=-ot.utcOffset(),X=Math.abs(R),tt=Math.floor(X/60),N=X%60;return(R<=0?"+":"-")+v(tt,2,"0")+":"+v(N,2,"0")},m:function ot(R,X){if(R.date()<X.date())return-ot(X,R);var tt=12*(X.year()-R.year())+(X.month()-R.month()),N=R.clone().add(tt,f),at=X-N<0,st=R.clone().add(tt+(at?-1:1),f);return+(-(tt+(X-N)/(at?N-st:st-N))||0)},a:function(ot){return ot<0?Math.ceil(ot)||0:Math.floor(ot)},p:function(ot){return{M:f,y:p,w:d,d:n,D:x,h:c,m:a,s:o,ms:s,Q:u}[ot]||String(ot||"").toLowerCase().replace(/s$/,"")},u:function(ot){return ot===void 0}},I="en",D={};D[I]=_;var P="$isDayjsObject",G=function(ot){return ot instanceof lt||!(!ot||!ot[P])},Z=function ot(R,X,tt){var N;if(!R)return I;if(typeof R=="string"){var at=R.toLowerCase();D[at]&&(N=at),X&&(D[at]=X,N=at);var st=R.split("-");if(!N&&st.length>1)return ot(st[0])}else{var St=R.name;D[St]=R,N=St}return!tt&&N&&(I=N),N||!tt&&I},J=function(ot,R){if(G(ot))return ot.clone();var X=typeof R=="object"?R:{};return X.date=ot,X.args=arguments,new lt(X)},rt=A;rt.l=Z,rt.i=G,rt.w=function(ot,R){return J(ot,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var lt=function(){function ot(X){this.$L=Z(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[P]=!0}var R=ot.prototype;return R.parse=function(X){this.$d=function(tt){var{date:N,utc:at}=tt;if(N===null)return new Date(NaN);if(rt.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var st=N.match(T);if(st){var St=st[2]-1||0,_t=(st[7]||"0").substring(0,3);return at?new Date(Date.UTC(st[1],St,st[3]||1,st[4]||0,st[5]||0,st[6]||0,_t)):new Date(st[1],St,st[3]||1,st[4]||0,st[5]||0,st[6]||0,_t)}}return new Date(N)}(X),this.init()},R.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},R.$utils=function(){return rt},R.isValid=function(){return this.$d.toString()!==k},R.isSame=function(X,tt){var N=J(X);return this.startOf(tt)<=N&&N<=this.endOf(tt)},R.isAfter=function(X,tt){return J(X)<this.startOf(tt)},R.isBefore=function(X,tt){return this.endOf(tt)<J(X)},R.$g=function(X,tt,N){return rt.u(X)?this[tt]:this.set(N,X)},R.unix=function(){return Math.floor(this.valueOf()/1000)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(X,tt){var N=this,at=!!rt.u(tt)||tt,st=rt.p(X),St=function(Dt,zt){var Rt=rt.w(N.$u?Date.UTC(N.$y,zt,Dt):new Date(N.$y,zt,Dt),N);return at?Rt:Rt.endOf(n)},_t=function(Dt,zt){return rt.w(N.toDate()[Dt].apply(N.toDate("s"),(at?[0,0,0,0]:[23,59,59,999]).slice(zt)),N)},Wt=this.$W,Nt=this.$M,jt=this.$D,Xt="set"+(this.$u?"UTC":"");switch(st){case p:return at?St(1,0):St(31,11);case f:return at?St(1,Nt):St(0,Nt+1);case d:var $t=this.$locale().weekStart||0,Lt=(Wt<$t?Wt+7:Wt)-$t;return St(at?jt-Lt:jt+(6-Lt),Nt);case n:case x:return _t(Xt+"Hours",0);case c:return _t(Xt+"Minutes",1);case a:return _t(Xt+"Seconds",2);case o:return _t(Xt+"Milliseconds",3);default:return this.clone()}},R.endOf=function(X){return this.startOf(X,!1)},R.$set=function(X,tt){var N,at=rt.p(X),st="set"+(this.$u?"UTC":""),St=(N={},N[n]=st+"Date",N[x]=st+"Date",N[f]=st+"Month",N[p]=st+"FullYear",N[c]=st+"Hours",N[a]=st+"Minutes",N[o]=st+"Seconds",N[s]=st+"Milliseconds",N)[at],_t=at===n?this.$D+(tt-this.$W):tt;if(at===f||at===p){var Wt=this.clone().set(x,1);Wt.$d[St](_t),Wt.init(),this.$d=Wt.set(x,Math.min(this.$D,Wt.daysInMonth())).$d}else St&&this.$d[St](_t);return this.init(),this},R.set=function(X,tt){return this.clone().$set(X,tt)},R.get=function(X){return this[rt.p(X)]()},R.add=function(X,tt){var N,at=this;X=Number(X);var st=rt.p(tt),St=function(Nt){var jt=J(at);return rt.w(jt.date(jt.date()+Math.round(Nt*X)),at)};if(st===f)return this.set(f,this.$M+X);if(st===p)return this.set(p,this.$y+X);if(st===n)return St(1);if(st===d)return St(7);var _t=(N={},N[a]=e,N[c]=i,N[o]=r,N)[st]||1,Wt=this.$d.getTime()+X*_t;return rt.w(Wt,this)},R.subtract=function(X,tt){return this.add(-1*X,tt)},R.format=function(X){var tt=this,N=this.$locale();if(!this.isValid())return N.invalidDate||k;var at=X||"YYYY-MM-DDTHH:mm:ssZ",st=rt.z(this),St=this.$H,_t=this.$m,Wt=this.$M,{weekdays:Nt,months:jt,meridiem:Xt}=N,$t=function(zt,Rt,ie,re){return zt&&(zt[Rt]||zt(tt,at))||ie[Rt].slice(0,re)},Lt=function(zt){return rt.s(St%12||12,zt,"0")},Dt=Xt||function(zt,Rt,ie){var re=zt<12?"AM":"PM";return ie?re.toLowerCase():re};return at.replace(B,function(zt,Rt){return Rt||function(ie){switch(ie){case"YY":return String(tt.$y).slice(-2);case"YYYY":return rt.s(tt.$y,4,"0");case"M":return Wt+1;case"MM":return rt.s(Wt+1,2,"0");case"MMM":return $t(N.monthsShort,Wt,jt,3);case"MMMM":return $t(jt,Wt);case"D":return tt.$D;case"DD":return rt.s(tt.$D,2,"0");case"d":return String(tt.$W);case"dd":return $t(N.weekdaysMin,tt.$W,Nt,2);case"ddd":return $t(N.weekdaysShort,tt.$W,Nt,3);case"dddd":return Nt[tt.$W];case"H":return String(St);case"HH":return rt.s(St,2,"0");case"h":return Lt(1);case"hh":return Lt(2);case"a":return Dt(St,_t,!0);case"A":return Dt(St,_t,!1);case"m":return String(_t);case"mm":return rt.s(_t,2,"0");case"s":return String(tt.$s);case"ss":return rt.s(tt.$s,2,"0");case"SSS":return rt.s(tt.$ms,3,"0");case"Z":return st}return null}(zt)||st.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(X,tt,N){var at,st=this,St=rt.p(tt),_t=J(X),Wt=(_t.utcOffset()-this.utcOffset())*e,Nt=this-_t,jt=function(){return rt.m(st,_t)};switch(St){case p:at=jt()/12;break;case f:at=jt();break;case u:at=jt()/3;break;case d:at=(Nt-Wt)/604800000;break;case n:at=(Nt-Wt)/86400000;break;case c:at=Nt/i;break;case a:at=Nt/e;break;case o:at=Nt/r;break;default:at=Nt}return N?at:rt.a(at)},R.daysInMonth=function(){return this.endOf(f).$D},R.$locale=function(){return D[this.$L]},R.locale=function(X,tt){if(!X)return this.$L;var N=this.clone(),at=Z(X,tt,!0);return at&&(N.$L=at),N},R.clone=function(){return rt.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},ot}(),nt=lt.prototype;return J.prototype=nt,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",n],["$M",f],["$y",p],["$D",x]].forEach(function(ot){nt[ot[1]]=function(R){return this.$g(R,ot[0],ot[1])}}),J.extend=function(ot,R){return ot.$i||(ot(R,lt,J),ot.$i=!0),J},J.locale=Z,J.isDayjs=G,J.unix=function(ot){return J(1000*ot)},J.en=D[I],J.Ls=D,J.p={},J})});var cf=$n(function(lf){Object.defineProperty(lf,"__esModule",{value:!0});lf.BLANK_URL=lf.relativeFirstCharacters=lf.whitespaceEscapeCharsRegex=lf.urlSchemeRegex=lf.ctrlCharactersRegex=lf.htmlCtrlEntityRegex=lf.htmlEntitiesRegex=lf.invalidProtocolRegex=void 0;lf.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;lf.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;lf.htmlCtrlEntityRegex=/&(newline|tab);/gi;lf.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;lf.urlSchemeRegex=/^.+(:|:)/gim;lf.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;lf.relativeFirstCharacters=[".","/"];lf.BLANK_URL="about:blank"});var Cl=$n(function(df){Object.defineProperty(df,"__esModule",{value:!0});df.sanitizeUrl=yb;var we=cf();function pb(r){return we.relativeFirstCharacters.indexOf(r[0])>-1}function gb(r){var e=r.replace(we.ctrlCharactersRegex,"");return e.replace(we.htmlEntitiesRegex,function(i,s){return String.fromCharCode(s)})}function mb(r){return URL.canParse(r)}function uf(r){try{return decodeURIComponent(r)}catch(e){return r}}function yb(r){if(!r)return we.BLANK_URL;var e,i=uf(r.trim());do i=gb(i).replace(we.htmlCtrlEntityRegex,"").replace(we.ctrlCharactersRegex,"").replace(we.whitespaceEscapeCharsRegex,"").trim(),i=uf(i),e=i.match(we.ctrlCharactersRegex)||i.match(we.htmlEntitiesRegex)||i.match(we.htmlCtrlEntityRegex)||i.match(we.whitespaceEscapeCharsRegex);while(e&&e.length>0);var s=i;if(!s)return we.BLANK_URL;if(pb(s))return s;var o=s.trimStart(),a=o.match(we.urlSchemeRegex);if(!a)return s;var c=a[0].toLowerCase().trim();if(we.invalidProtocolRegex.test(c))return we.BLANK_URL;var n=o.replace(/\\/g,"/");if(c==="mailto:"||c.includes("://"))return n;if(c==="http:"||c==="https:"){if(!mb(n))return we.BLANK_URL;var d=new URL(n);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return n}});var wc=Object.defineProperty,t=(r,e)=>wc(r,"name",{value:e,configurable:!0}),Lo=(r,e)=>{for(var i in e)wc(r,i,{get:e[i],enumerable:!0})};var vc=wn(mm(),1),Qe={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")},_d=t(function(r="fatal"){let e=Qe.fatal;if(typeof r==="string"){if(r.toLowerCase()in Qe)e=Qe[r]}else if(typeof r==="number")e=r;if(l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=Qe.fatal)l.fatal=console.error?console.error.bind(console,Me("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Me("FATAL"));if(e<=Qe.error)l.error=console.error?console.error.bind(console,Me("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Me("ERROR"));if(e<=Qe.warn)l.warn=console.warn?console.warn.bind(console,Me("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Me("WARN"));if(e<=Qe.info)l.info=console.info?console.info.bind(console,Me("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Me("INFO"));if(e<=Qe.debug)l.debug=console.debug?console.debug.bind(console,Me("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Me("DEBUG"));if(e<=Qe.trace)l.trace=console.debug?console.debug.bind(console,Me("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Me("TRACE"))},"setLogLevel"),Me=t((r)=>`%c${vc.default().format("ss.SSS")} : ${r} : `,"format");var To={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 To.hue2rgb(a,o,r+0.3333333333333333)*255;case"g":return To.hue2rgb(a,o,r)*255;case"b":return To.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}}},Ac=To;var yy={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},$c=yy;var xy={dec2hex:(r)=>{let e=Math.round(r).toString(16);return e.length>1?e:`0${e}`}},Oc=xy;var Cy={channel:Ac,lang:$c,unit:Oc},Ot=Cy;var Je={};for(let r=0;r<=255;r++)Je[r]=Ot.unit.dec2hex(r);var fe={ALL:0,RGB:1,HSL:2};class qc{constructor(){this.type=fe.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=fe.ALL}is(r){return this.type===r}}var Wc=qc;class zc{constructor(r,e){this.color=e,this.changed=!1,this.data=r,this.type=new Wc}set(r,e){return this.color=e,this.changed=!1,this.data=r,this.type.type=fe.ALL,this}_ensureHSL(){let r=this.data,{h:e,s:i,l:s}=r;if(e===void 0)r.h=Ot.channel.rgb2hsl(r,"h");if(i===void 0)r.s=Ot.channel.rgb2hsl(r,"s");if(s===void 0)r.l=Ot.channel.rgb2hsl(r,"l")}_ensureRGB(){let r=this.data,{r:e,g:i,b:s}=r;if(e===void 0)r.r=Ot.channel.hsl2rgb(r,"r");if(i===void 0)r.g=Ot.channel.hsl2rgb(r,"g");if(s===void 0)r.b=Ot.channel.hsl2rgb(r,"b")}get r(){let r=this.data,e=r.r;if(!this.type.is(fe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Ot.channel.hsl2rgb(r,"r")}get g(){let r=this.data,e=r.g;if(!this.type.is(fe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Ot.channel.hsl2rgb(r,"g")}get b(){let r=this.data,e=r.b;if(!this.type.is(fe.HSL)&&e!==void 0)return e;return this._ensureHSL(),Ot.channel.hsl2rgb(r,"b")}get h(){let r=this.data,e=r.h;if(!this.type.is(fe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Ot.channel.rgb2hsl(r,"h")}get s(){let r=this.data,e=r.s;if(!this.type.is(fe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Ot.channel.rgb2hsl(r,"s")}get l(){let r=this.data,e=r.l;if(!this.type.is(fe.RGB)&&e!==void 0)return e;return this._ensureRGB(),Ot.channel.rgb2hsl(r,"l")}get a(){return this.data.a}set r(r){this.type.set(fe.RGB),this.changed=!0,this.data.r=r}set g(r){this.type.set(fe.RGB),this.changed=!0,this.data.g=r}set b(r){this.type.set(fe.RGB),this.changed=!0,this.data.b=r}set h(r){this.type.set(fe.HSL),this.changed=!0,this.data.h=r}set s(r){this.type.set(fe.HSL),this.changed=!0,this.data.s=r}set l(r){this.type.set(fe.HSL),this.changed=!0,this.data.l=r}set a(r){this.changed=!0,this.data.a=r}}var Hc=zc;var by=new Hc({r:0,g:0,b:0,a:0},"transparent"),ur=by;var Yc={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:(r)=>{if(r.charCodeAt(0)!==35)return;let e=r.match(Yc.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 ur.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`#${Je[Math.round(e)]}${Je[Math.round(i)]}${Je[Math.round(s)]}${Je[Math.round(o*255)]}`;else return`#${Je[Math.round(e)]}${Je[Math.round(i)]}${Je[Math.round(s)]}`}},kr=Yc;var Bo={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(Bo.hueRe);if(e){let[,i,s]=e;switch(s){case"grad":return Ot.channel.clamp.h(parseFloat(i)*0.9);case"rad":return Ot.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return Ot.channel.clamp.h(parseFloat(i)*360)}}return Ot.channel.clamp.h(parseFloat(r))},parse:(r)=>{let e=r.charCodeAt(0);if(e!==104&&e!==72)return;let i=r.match(Bo.re);if(!i)return;let[,s,o,a,c,n]=i;return ur.set({h:Bo._hue2deg(s),s:Ot.channel.clamp.s(parseFloat(o)),l:Ot.channel.clamp.l(parseFloat(a)),a:c?Ot.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(${Ot.lang.round(e)}, ${Ot.lang.round(i)}%, ${Ot.lang.round(s)}%, ${o})`;else return`hsl(${Ot.lang.round(e)}, ${Ot.lang.round(i)}%, ${Ot.lang.round(s)}%)`}},ki=Bo;var _o={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=_o.colors[r];if(!e)return;return kr.parse(e)},stringify:(r)=>{let e=kr.stringify(r);for(let i in _o.colors)if(_o.colors[i]===e)return i;return}},ea=_o;var jc={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(jc.re);if(!i)return;let[,s,o,a,c,n,d,f,u]=i;return ur.set({r:Ot.channel.clamp.r(o?parseFloat(s)*2.55:parseFloat(s)),g:Ot.channel.clamp.g(c?parseFloat(a)*2.55:parseFloat(a)),b:Ot.channel.clamp.b(d?parseFloat(n)*2.55:parseFloat(n)),a:f?Ot.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(${Ot.lang.round(e)}, ${Ot.lang.round(i)}, ${Ot.lang.round(s)}, ${Ot.lang.round(o)})`;else return`rgb(${Ot.lang.round(e)}, ${Ot.lang.round(i)}, ${Ot.lang.round(s)})`}},wi=jc;var ky={format:{keyword:ea,hex:kr,rgb:wi,rgba:wi,hsl:ki,hsla:ki},parse:(r)=>{if(typeof r!=="string")return r;let e=kr.parse(r)||wi.parse(r)||ki.parse(r)||ea.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(fe.HSL)||r.data.r===void 0)return ki.stringify(r);else if(r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b))return wi.stringify(r);else return kr.stringify(r)}},pe=ky;var wy=(r,e)=>{let i=pe.parse(r);for(let s in e)i[s]=Ot.channel.clamp[s](e[s]);return pe.stringify(i)},vo=wy;var Sy=(r,e,i=0,s=1)=>{if(typeof r!=="number")return vo(r,{a:e});let o=ur.set({r:Ot.channel.clamp.r(r),g:Ot.channel.clamp.g(e),b:Ot.channel.clamp.b(i),a:Ot.channel.clamp.a(s)});return pe.stringify(o)},wt=Sy;var Ty=(r,e)=>Ot.lang.round(pe.parse(r)[e]),Sa=Ty;var By=(r)=>{let{r:e,g:i,b:s}=pe.parse(r),o=0.2126*Ot.channel.toLinear(e)+0.7152*Ot.channel.toLinear(i)+0.0722*Ot.channel.toLinear(s);return Ot.lang.round(o)},Uc=By;var _y=(r)=>Uc(r)>=0.5,Xc=_y;var vy=(r)=>!Xc(r),De=vy;var Ly=(r,e,i)=>{let s=pe.parse(r),o=s[e],a=Ot.channel.clamp[e](o+i);if(o!==a)s[e]=a;return pe.stringify(s)},Cc=Ly;var Fy=(r,e)=>Cc(r,"l",e),g=Fy;var My=(r,e)=>Cc(r,"l",-e),h=My;var Ay=(r,e)=>{let i=pe.parse(r),s={};for(let o in e){if(!e[o])continue;s[o]=i[o]+e[o]}return vo(r,s)},E=Ay;var Ey=(r,e,i=50)=>{let{r:s,g:o,b:a,a:c}=pe.parse(r),{r:n,g:d,b:f,a:u}=pe.parse(e),p=i/100,x=p*2-1,k=c-u,B=((x*k===-1?x:(x+k)/(1+x*k))+1)/2,_=1-B,v=s*B+n*_,A=o*B+d*_,I=a*B+f*_,D=c*p+u*(1-p);return wt(v,A,I,D)},Gc=Ey;var $y=(r,e=100)=>{let i=pe.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Gc(i,r,e)},Q=$y;var lA=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Wr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Iy=/\s/,Oy=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&&Iy.test(r[c-1]))c--;e+=r.slice(i,c)+`
|
|
3
|
+
`,i=a+1,s=i}return e+r.slice(i)},"stripAnyComments"),cA=class extends Error{static{t(this,"UnknownDiagramError")}constructor(r){super(r);this.name="UnknownDiagramError"}},us={},Ec=t(function(r,e){r=Oy(r.replace(lA,"").replace(Wr,""));for(let[i,{detector:s}]of Object.entries(us))if(s(r,e))return i;throw new cA(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),fm=t((...r)=>{for(let{id:e,detector:i,loader:s}of r)tu(e,i,s)},"registerLazyLoadedDiagrams"),tu=t((r,e,i)=>{if(us[r])l.warn(`Detector with key ${r} already exists. Overwriting.`);us[r]={detector:e,loader:i},l.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),Lh=t((r)=>us[r].loader,"getDiagramLoader"),ra=t((r,e,{depth:i=2}={})=>{let s={depth:i};if(Array.isArray(e)&&!Array.isArray(r))return e.forEach((o)=>ra(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]=ra(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"),ct=ra,Ne="#ffffff",ze="#f2f2f2",Yt=t((r,e)=>e?E(r,{s:-40,l:10}):E(r,{s:-40,l:-10}),"mkBorder"),Dy=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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(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||h(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||h(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=h(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=h(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(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]||h(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]||E(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||E(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||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze,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}},Py=t((r)=>{let e=new Dy;return e.calculate(r),e},"getThemeVariables"),Ry=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=wt(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=h("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=h(this.sectionBkgColor,10),this.taskBorderColor=wt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=wt(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||h(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=Q(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||Q(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]||E(this.mainBkg,{h:30,s:-30,l:-(-10+r*4)}),this["surfacePeer"+r]=this["surfacePeer"+r]||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(this.primaryColor,{h:-30}),20),this.git4=g(this.pie5||E(this.primaryColor,{h:-60}),20),this.git5=g(this.pie6||E(this.primaryColor,{h:-90}),10),this.git6=g(this.pie7||E(this.primaryColor,{h:60}),10),this.git7=g(this.pie8||E(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(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]})}},qy=t((r)=>{let e=new Ry;return e.calculate(r),e},"getThemeVariables"),Wy=class{static{t(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=E(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Yt(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=wt(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||h(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||h(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=h(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||h(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||E(this["cScale"+r],{h:180});for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||E(this.mainBkg,{h:30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||E(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||Q(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Q(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||E(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-30}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||E(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||E(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??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||h(Q(this.git0),25),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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]})}},tn=t((r)=>{let e=new Wy;return e.calculate(r),e},"getThemeVariables"),Ny=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=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.primaryColor),this.lineColor=Q(this.background),this.textColor=Q(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=h(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||h(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||h(this.tertiaryColor,40);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=h(this["cScale"+r],10),this["cScalePeer"+r]=this["cScalePeer"+r]||h(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||E(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]||E(this.mainBkg,{h:30,s:-30,l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||E(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{l:-30}),this.pie5=this.pie5||E(this.secondaryColor,{l:-30}),this.pie6=this.pie6||E(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||E(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??E(this.primaryColor,{l:-30}),this.venn2=this.venn2??E(this.secondaryColor,{l:-30}),this.venn3=this.venn3??E(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??E(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??E(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??E(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??E(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Q(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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]})}},zy=t((r)=>{let e=new Ny;return e.calculate(r),e},"getThemeVariables"),Hy=class{static{t(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=g(this.contrast,55),this.background="#ffffff",this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.lineColor=Q(this.background),this.textColor=Q(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]||Q(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]||h(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]||E(this.mainBkg,{l:-(5+r*5)}),this["surfacePeer"+r]=this["surfacePeer"+r]||E(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=h(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=h(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=E(this.primaryColor,{h:64}),this.fillType3=E(this.secondaryColor,{h:64}),this.fillType4=E(this.primaryColor,{h:-64}),this.fillType5=E(this.secondaryColor,{h:-64}),this.fillType6=E(this.primaryColor,{h:128}),this.fillType7=E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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=h(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||E(this.primaryColor,{h:-30}),this.git4=this.pie5||E(this.primaryColor,{h:-60}),this.git5=this.pie6||E(this.primaryColor,{h:-90}),this.git6=this.pie7||E(this.primaryColor,{h:60}),this.git7=this.pie8||E(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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]})}},Yy=t((r)=>{let e=new Hy;return e.calculate(r),e},"getThemeVariables"),jy=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=Yt(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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(De(this.background)?g(this.background,4):h(this.background,4));let r="#ECECFE",e="#E9E9F1",i=E(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||E(r,{h:30}),this.cScale4=this.cScale4||E(r,{h:60}),this.cScale5=this.cScale5||E(r,{h:90}),this.cScale6=this.cScale6||E(r,{h:120}),this.cScale7=this.cScale7||E(r,{h:150}),this.cScale8=this.cScale8||E(r,{h:210,l:150}),this.cScale9=this.cScale9||E(r,{h:270}),this.cScale10=this.cScale10||E(r,{h:300}),this.cScale11=this.cScale11||E(r,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=h(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=h(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(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]||h(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]||E(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||E(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||E(r,{h:64}),this.fillType3=this.fillType3||E(e,{h:64}),this.fillType4=this.fillType4||E(r,{h:-64}),this.fillType5=this.fillType5||E(e,{h:-64}),this.fillType6=this.fillType6||E(r,{h:128}),this.fillType7=this.fillType7||E(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||E(r,{l:-10}),this.pie5=this.pie5||E(e,{l:-10}),this.pie6=this.pie6||E(i,{l:-10}),this.pie7=this.pie7||E(r,{h:60,l:-10}),this.pie8=this.pie8||E(r,{h:-60,l:-10}),this.pie9=this.pie9||E(r,{h:120,l:0}),this.pie10=this.pie10||E(r,{h:60,l:-20}),this.pie11=this.pie11||E(r,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(r,{h:-30}),this.git4=this.git4||E(r,{h:-60}),this.git5=this.git5||E(r,{h:-90}),this.git6=this.git6||E(r,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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]})}},Uy=t((r)=>{let e=new jy;return e.calculate(r),e},"getThemeVariables"),Xy=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=wt(255,255,255,0.25),this.arrowheadColor=Q(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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=h(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=h(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(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]||h(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]||E(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||E(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||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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 Gy=t((r)=>{let e=new Xy;return e.calculate(r),e},"getThemeVariables"),Vy=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=Yt("#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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(De(this.background)?g(this.background,4):h(this.background,4));let r="#ECECFE",e="#E9E9F1",i=E(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]=h(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=h(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||Q(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]||h(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]||E(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||E(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||E(r,{h:64}),this.fillType3=this.fillType3||E(e,{h:64}),this.fillType4=this.fillType4||E(r,{h:-64}),this.fillType5=this.fillType5||E(e,{h:-64}),this.fillType6=this.fillType6||E(r,{h:128}),this.fillType7=this.fillType7||E(e,{h:128}),this.pie1=this.pie1||r,this.pie2=this.pie2||e,this.pie3=this.pie3||i,this.pie4=this.pie4||E(r,{l:-10}),this.pie5=this.pie5||E(e,{l:-10}),this.pie6=this.pie6||E(i,{l:-10}),this.pie7=this.pie7||E(r,{h:60,l:-10}),this.pie8=this.pie8||E(r,{h:-60,l:-10}),this.pie9=this.pie9||E(r,{h:120,l:0}),this.pie10=this.pie10||E(r,{h:60,l:-20}),this.pie11=this.pie11||E(r,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(r,{h:-30}),this.git4=this.git4||E(r,{h:-60}),this.git5=this.git5||E(r,{h:-90}),this.git6=this.git6||E(r,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=wt(255,255,255,0.25),this.arrowheadColor=Q(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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(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||E(this.primaryColor,{h:30}),this.cScale4=this.cScale4||E(this.primaryColor,{h:60}),this.cScale5=this.cScale5||E(this.primaryColor,{h:90}),this.cScale6=this.cScale6||E(this.primaryColor,{h:120}),this.cScale7=this.cScale7||E(this.primaryColor,{h:150}),this.cScale8=this.cScale8||E(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||E(this.primaryColor,{h:270}),this.cScale10=this.cScale10||E(this.primaryColor,{h:300}),this.cScale11=this.cScale11||E(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=h(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=h(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Q(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]||h(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]||E(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this["surfacePeer"+e]=this["surfacePeer"+e]||E(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||E(this.primaryColor,{h:64}),this.fillType3=this.fillType3||E(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||E(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||E(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||E(this.primaryColor,{h:128}),this.fillType7=this.fillType7||E(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||E(this.primaryColor,{l:-10}),this.pie5=this.pie5||E(this.secondaryColor,{l:-10}),this.pie6=this.pie6||E(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||E(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||E(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||E(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||E(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||E(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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="#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=Yt("#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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(this.lineColor),this.rectBkgColor=this.rectBkgColor||(De(this.background)?g(this.background,4):h(this.background,4));let r="#ECECFE",e="#E9E9F1",i=E(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]||Q(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]||h(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]||E(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||E(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||E(r,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(r,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(r,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(r,{h:-30}),this.git4=this.git4||E(r,{h:-60}),this.git5=this.git5||E(r,{h:-90}),this.git6=this.git6||E(r,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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]})}},tx=t((r)=>{let e=new Jy;return e.calculate(r),e},"getThemeVariables"),ex=class{static{t(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=g(this.primaryColor,16),this.tertiaryColor=E(this.primaryColor,{h:-160}),this.primaryBorderColor=Q(this.background),this.secondaryBorderColor=Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yt(this.tertiaryColor,this.darkMode),this.primaryTextColor=Q(this.primaryColor),this.secondaryTextColor=Q(this.secondaryColor),this.tertiaryTextColor=Q(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=g(Q("#323D47"),10),this.border1="#ccc",this.border2=wt(255,255,255,0.25),this.arrowheadColor=Q(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||E(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||E(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Q(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Q(this.tertiaryColor),this.lineColor=this.lineColor||Q(this.background),this.arrowheadColor=this.arrowheadColor||Q(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?h(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||h(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Q(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]||Q(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]||h(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=h(this["cScale"+i],75);let r=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||E(this.mainBkg,{h:180,s:-15,l:r*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||E(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||E(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||E(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||E(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||E(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||E(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||E(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||De(this.quadrant1Fill)?g(this.quadrant1Fill):h(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?h(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||E(this.primaryColor,{h:-30}),this.git4=this.git4||E(this.primaryColor,{h:-60}),this.git5=this.git5||E(this.primaryColor,{h:-90}),this.git6=this.git6||E(this.primaryColor,{h:60}),this.git7=this.git7||E(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=h(this.git0,25),this.git1=h(this.git1,25),this.git2=h(this.git2,25),this.git3=h(this.git3,25),this.git4=h(this.git4,25),this.git5=h(this.git5,25),this.git6=h(this.git6,25),this.git7=h(this.git7,25);this.gitInv0=this.gitInv0||Q(this.git0),this.gitInv1=this.gitInv1||Q(this.git1),this.gitInv2=this.gitInv2||Q(this.git2),this.gitInv3=this.gitInv3||Q(this.git3),this.gitInv4=this.gitInv4||Q(this.git4),this.gitInv5=this.gitInv5||Q(this.git5),this.gitInv6=this.gitInv6||Q(this.git6),this.gitInv7=this.gitInv7||Q(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ze}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"),Mo={base:{getThemeVariables:Py},dark:{getThemeVariables:qy},default:{getThemeVariables:tn},forest:{getThemeVariables:zy},neutral:{getThemeVariables:Yy},neo:{getThemeVariables:Uy},"neo-dark":{getThemeVariables:Gy},redux:{getThemeVariables:Ky},"redux-dark":{getThemeVariables:Qy},"redux-color":{getThemeVariables:tx},"redux-dark-color":{getThemeVariables:rx}},de={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},eu={...de,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:Mo.default.getThemeVariables(),sequence:{...de.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:de.class?.theme,look:de.class?.look,layout:de.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.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:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},eventmodeling:{...de.eventmodeling},treeView:{...de.treeView,useWidth:void 0},radar:{...de.radar},usecase:{...de.usecase},railroad:{...de.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:{...de.ishikawa},sankey:{...de.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:{...de.venn},cynefin:{...de.cynefin}},ru=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,...ru(r[s],"")];return[...i,e+s]},[]),"keyify"),ix=new Set(ru(eu,"")),Y=eu,ox={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},sx=t((r)=>ox[r]??r,"getDiagramConfigKey"),ax={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},nx=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")||!ix.has(e)||r[e]==null){l.debug("sanitize deleting key: ",e),delete r[e];continue}if(typeof r[e]==="object"){let s=ax[e];if(s)nx(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]=uA(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"),uA=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"),Ci=Object.freeze(Y),lx=["theme","look","layout"],hx=new Set(["classic","handDrawn","neo"]),cx=t((r,e)=>{if(r==="theme")return e==="null"||Object.hasOwn(Mo,e);return r!=="look"||hx.has(e)},"isUsableAppearance"),ux=t((r,e,i)=>{if(!r)return;return[r[e]?.[i],r[i]].find((o)=>o!==void 0&&cx(i,o))},"readAppearance"),ia=t((r)=>r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())?!1:!0,"evaluate"),Se=ct({},Ci),Io,Do={},tr=[],Si=ct({},Ci),Ti,dx=t((r,e)=>{if(!Ti)return;let i=[e,...[...tr].reverse(),Do,Ci],s=r[Ti];for(let o of lx)for(let a of i){let c=ux(a,Ti,o);if(c===void 0)continue;if(r[o]=c,s?.[o]!==void 0)s[o]=c;break}},"resolveAppearance"),Nr=t((r,e)=>{let i=ct({},r),s={};for(let a of e)iu(a),s=ct(s,a);if(i=ct(i,s),dx(i,s),(Boolean(s.theme)||i.theme!==r.theme)&&i.theme&&Object.hasOwn(Mo,i.theme)){let a=ct({},Io),c=ct(a.themeVariables||{},s.themeVariables);i.themeVariables=Mo[i.theme].getThemeVariables(c)}return Si=i,px(Si),Si},"updateCurrentConfig"),gm=t((r)=>{Ti=r===void 0?void 0:sx(r),Nr(Se,tr)},"setDiagramConfigScope"),Mh=t((r)=>{if(Se=ct({},Ci),Se=ct(Se,r),Do=ct({},r),r.theme&&Object.hasOwn(Mo,r.theme))Se.themeVariables=Mo[r.theme].getThemeVariables(r.themeVariables);return Nr(Se,tr),Se},"setSiteConfig"),Fh=t((r)=>{Io=ct({},r)},"saveConfigFromInitialize"),Ph=t((r)=>(Se=ct(Se,r),Do=ct(Do,r),Nr(Se,tr),Se),"updateSiteConfig"),dA=t(()=>ct({},Se),"getSiteConfig"),pA=t((r)=>(Nr(Si,[r]),C()),"setConfig"),C=t(()=>ct({},Si),"getConfig"),iu=t((r)=>{if(!r)return;["secure",...Se.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")iu(r[e])})},"sanitize"),Oh=t((r)=>{if(_i(r),r.fontFamily&&!r.themeVariables?.fontFamily)r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily};tr.push(r),Nr(Se,tr)},"addDirective"),Sd=t((r=Se)=>{tr=[],Ti=void 0,Nr(r,tr)},"reset"),fx={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."},Vc={},ou=t((r)=>{if(Vc[r])return;l.warn(fx[r]),Vc[r]=!0},"issueWarning"),px=t((r)=>{if(!r)return;if(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)ou("LAZY_LOAD_DEPRECATED")},"checkConfig"),$h=t(()=>{let r={};if(Io)r=ct(r,Io);for(let e of tr)r=ct(r,e);return r},"getUserDefinedConfig"),nn=t((r)=>{if(r.flowchart?.htmlLabels!=null)ou("FLOWCHART_HTML_LABELS_DEPRECATED");return ia(r.htmlLabels??r.flowchart?.htmlLabels??!0)},"getEffectiveHtmlLabels"),xl=/<\/?br\s*\/?>/gi,gx=new RegExp(xl.source,"i"),mx=t((r)=>{if(!r)return[""];return nu(r).replace(/\\n/g,"#br#").split("#br#")},"getRows"),yx=(()=>{let r=!1;return()=>{if(!r)su(),r=!0}})();function su(){Vt.addHook("beforeSanitizeAttributes",(e)=>{if(e.tagName==="A"&&e.hasAttribute("target"))e.setAttribute("data-temp-href-target",e.getAttribute("target")??"")}),Vt.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(su,"setupDompurifyHooks");var au=t((r)=>(yx(),Vt.sanitize(r)),"removeScript"),Kc=t((r,e)=>{if(nn(e)){let i=e.securityLevel;if(i==="antiscript"||i==="strict"||i==="sandbox")r=au(r);else if(i!=="loose")r=nu(r),r=r.replace(/</g,"<").replace(/>/g,">"),r=r.replace(/=/g,"="),r=kx(r)}return r},"sanitizeMore"),te=t((r,e)=>{if(!r)return r;if(e.dompurifyConfig)r=Vt.sanitize(Kc(r,e),e.dompurifyConfig).toString();else r=Vt.sanitize(Kc(r,e),{FORBID_TAGS:["style"]}).toString();return r},"sanitizeText"),xx=t((r,e)=>{if(typeof r==="string")return te(r,e);return r.flat().map((i)=>te(i,e))},"sanitizeTextOrArray"),Cx=t((r)=>gx.test(r),"hasBreaks"),bx=t((r)=>r.split(xl),"splitBreaks"),kx=t((r)=>r.replace(/#br#/g,"<br/>"),"placeholderToBreak"),nu=t((r)=>r.replace(xl,"#br#"),"breakToPlaceholder"),mA=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"),wx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.max(...e)},"getMax"),Sx=t(function(...r){let e=r.filter((i)=>!isNaN(i));return Math.min(...e)},"getMin"),Fo=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(Tx(a,c))o=a+","+c,s++,i.pop()}i.push(Bx(o))}return i.join("")},"parseGenericTypes"),oa=t((r,e)=>Math.max(0,r.split(e).length-1),"countOccurrence"),Tx=t((r,e)=>{let i=oa(r,"~"),s=oa(e,"~");return i===1&&s===1},"shouldCombineSets"),Bx=t((r)=>{let e=oa(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"),Zc=t(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ao=/\$\$(.*?)\$\$/g,Ft=t((r)=>(r.match(Ao)?.length??0)>0,"hasKatex"),Bc=t(async(r,e)=>{let i=document.createElement("div");i.innerHTML=await Ic(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"),_x=t(async(r,e)=>{if(!Ft(r))return r;if(!(Zc()||e.legacyMathML||e.forceLegacyMathML))return r.replace(Ao,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-eh1m1m1d.js"),s=e.forceLegacyMathML||!Zc()&&e.legacyMathML?"htmlAndMathml":"mathml";return r.split(xl).map((o)=>Ft(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(Ao,(o,a)=>i.renderToString(a,{throwOnError:!0,displayMode:!0,output:s}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}return r.replace(Ao,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),Ic=t(async(r,e)=>te(await _x(r,e),e),"renderKatexSanitized"),w={getRows:mx,sanitizeText:te,sanitizeTextOrArray:xx,hasBreaks:Cx,splitBreaks:bx,lineBreakRegex:xl,removeScript:au,getUrl:mA,evaluate:ia,getMax:wx,getMin:Sx},vx=t(function(r,e){for(let i of e)r.attr(i[0],i[1])},"d3Attrs"),Lx=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"),ae=t(function(r,e,i,s){let o=Lx(e,i,s);vx(r,o)},"configureSvgSize"),sa=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}`),ae(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"),Eo={};function Am(r){return[...r.cssRules].map((e)=>e.cssText).join(`
|
|
4
|
+
`)}t(Am,"cssStyleSheetToString");var Fx=t((r,e,i,s)=>{let o="";if(r in Eo&&Eo[r])o=Eo[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"),Mx=t((r,e)=>{if(e!==void 0)Eo[r]=e},"addStylesForDiagram"),zh=Fx,hm={};Lo(hm,{clear:()=>F,getAccDescription:()=>j,getAccTitle:()=>H,getDiagramTitle:()=>q,setAccDescription:()=>U,setAccTitle:()=>z,setDiagramTitle:()=>W});var aa="",na="",ha="",da=t((r)=>te(r,C()),"sanitizeText"),F=t(()=>{aa="",ha="",na=""},"clear"),z=t((r)=>{aa=da(r).replace(/^\s+/g,"")},"setAccTitle"),H=t(()=>aa,"getAccTitle"),U=t((r)=>{ha=da(r).replace(/\n\s+/g,`
|
|
126
|
+
`)},"setAccDescription"),j=t(()=>ha,"getAccDescription"),W=t((r)=>{na=da(r)},"setDiagramTitle"),q=t(()=>na,"getDiagramTitle"),Jc=l,Ax=_d,m=C,Ta=pA,ds=Ci,qo=t((r)=>te(r,m()),"sanitizeText"),_c=sa,Ex=t(()=>hm,"getCommonDb"),Ro={},Td=t((r,e,i)=>{if(Ro[r])Jc.warn(`Diagram with id ${r} already registered. Overwriting.`);if(Ro[r]=e,i)tu(r,i);Mx(r,e.styles),e.injectUtils?.(Jc,Ax,m,qo,_c,Ex(),()=>{})},"registerDiagram"),bm=t((r)=>{if(r in Ro)return Ro[r];throw new $x(r)},"getDiagram"),$x=class extends Error{static{t(this,"DiagramNotFoundError")}constructor(r){super(`Diagram ${r} not found.`)}};class vi extends Map{constructor(r,e=Dx){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(lu(this,r))}has(r){return super.has(lu(this,r))}set(r,e){return super.set(Ix(this,r),e)}delete(r){return super.delete(Ox(this,r))}}function lu({_intern:r,_key:e},i){let s=e(i);return r.has(s)?r.get(s):i}function Ix({_intern:r,_key:e},i){let s=e(i);if(r.has(s))return r.get(s);return r.set(s,i),i}function Ox({_intern:r,_key:e},i){let s=e(i);if(r.has(s))i=r.get(s),r.delete(s);return i}function Dx(r){return r!==null&&typeof r==="object"?r.valueOf():r}var Px={value:()=>{}};function cu(){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 Wo(i)}function Wo(r){this._=r}function Rx(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}})}Wo.prototype=cu.prototype={constructor:Wo,on:function(r,e){var i=this._,s=Rx(r+"",i),o,a=-1,c=s.length;if(arguments.length<2){while(++a<c)if((o=(r=s[a]).type)&&(o=qx(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]=hu(i[o],r.name,e);else if(e==null)for(o in i)i[o]=hu(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 Wo(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 qx(r,e){for(var i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value}function hu(r,e,i){for(var s=0,o=r.length;s<o;++s)if(r[s].name===e){r[s]=Px,r=r.slice(0,s).concat(r.slice(s+1));break}if(i!=null)r.push({name:e,value:i});return r}var fa=cu;var No="http://www.w3.org/1999/xhtml",pa={svg:"http://www.w3.org/2000/svg",xhtml:No,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function He(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 Wx(r){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===No&&e.documentElement.namespaceURI===No?e.createElement(r):e.createElementNS(i,r)}}function Nx(r){return function(){return this.ownerDocument.createElementNS(r.space,r.local)}}function Li(r){var e=He(r);return(e.local?Nx:Wx)(e)}function zx(){}function dr(r){return r==null?zx:function(){return this.querySelector(r)}}function ga(r){if(typeof r!=="function")r=dr(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 le(s,this._parents)}function ma(r){return r==null?[]:Array.isArray(r)?r:Array.from(r)}function Hx(){return[]}function zr(r){return r==null?Hx:function(){return this.querySelectorAll(r)}}function Yx(r){return function(){return ma(r.apply(this,arguments))}}function ya(r){if(typeof r==="function")r=Yx(r);else r=zr(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 le(s,o)}function Hr(r){return function(){return this.matches(r)}}function zo(r){return function(e){return e.matches(r)}}var jx=Array.prototype.find;function Ux(r){return function(){return jx.call(this.children,r)}}function Xx(){return this.firstElementChild}function xa(r){return this.select(r==null?Xx:Ux(typeof r==="function"?r:zo(r)))}var Gx=Array.prototype.filter;function Vx(){return Array.from(this.children)}function Kx(r){return function(){return Gx.call(this.children,r)}}function Ca(r){return this.selectAll(r==null?Vx:Kx(typeof r==="function"?r:zo(r)))}function ba(r){if(typeof r!=="function")r=Hr(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 le(s,this._parents)}function Fi(r){return Array(r.length)}function ka(){return new le(this._enter||this._groups.map(Fi),this._parents)}function Mi(r,e){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=e}Mi.prototype={constructor:Mi,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 wa(r){return function(){return r}}function Zx(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 Mi(r,a[c]);for(;c<d;++c)if(n=e[c])o[c]=n}function Qx(r,e,i,s,o,a,c){var n,d,f=new Map,u=e.length,p=a.length,x=Array(u),k;for(n=0;n<u;++n)if(d=e[n])if(x[n]=k=c.call(d,d.__data__,n,e)+"",f.has(k))o[n]=d;else f.set(k,d);for(n=0;n<p;++n)if(k=c.call(r,a[n],n,a)+"",d=f.get(k))s[n]=d,d.__data__=a[n],f.delete(k);else i[n]=new Mi(r,a[n]);for(n=0;n<u;++n)if((d=e[n])&&f.get(x[n])===d)o[n]=d}function Jx(r){return r.__data__}function Ba(r,e){if(!arguments.length)return Array.from(this,Jx);var i=e?Qx:Zx,s=this._parents,o=this._groups;if(typeof r!=="function")r=wa(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,k=t0(r.call(u,u&&u.__data__,f,s)),T=k.length,B=n[f]=Array(T),_=c[f]=Array(T),v=d[f]=Array(x);i(u,p,B,_,v,k,e);for(var A=0,I=0,D,P;A<T;++A)if(D=B[A]){if(A>=I)I=A+1;while(!(P=_[I])&&++I<T);D._next=P||null}}return c=new le(c,s),c._enter=n,c._exit=d,c}function t0(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function _a(){return new le(this._exit||this._groups.map(Fi),this._parents)}function va(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 La(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),k,T=0;T<p;++T)if(k=f[T]||u[T])x[T]=k;for(;d<o;++d)n[d]=i[d];return new le(n,this._parents)}function Fa(){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 Ma(r){if(!r)r=e0;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 le(o,this._parents).order()}function e0(r,e){return r<e?-1:r>e?1:r>=e?0:NaN}function Aa(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this}function Ea(){return Array.from(this)}function $a(){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 Ia(){let r=0;for(let e of this)++r;return r}function Oa(){return!this.node()}function Pa(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 r0(r){return function(){this.removeAttribute(r)}}function i0(r){return function(){this.removeAttributeNS(r.space,r.local)}}function o0(r,e){return function(){this.setAttribute(r,e)}}function s0(r,e){return function(){this.setAttributeNS(r.space,r.local,e)}}function a0(r,e){return function(){var i=e.apply(this,arguments);if(i==null)this.removeAttribute(r);else this.setAttribute(r,i)}}function n0(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 qa(r,e){var i=He(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?i0:r0:typeof e==="function"?i.local?n0:a0:i.local?s0:o0)(i,e))}function Ai(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function l0(r){return function(){this.style.removeProperty(r)}}function h0(r,e,i){return function(){this.style.setProperty(r,e,i)}}function c0(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 Wa(r,e,i){return arguments.length>1?this.each((e==null?l0:typeof e==="function"?c0:h0)(r,e,i==null?"":i)):fr(this.node(),r)}function fr(r,e){return r.style.getPropertyValue(e)||Ai(r).getComputedStyle(r,null).getPropertyValue(e)}function u0(r){return function(){delete this[r]}}function d0(r,e){return function(){this[r]=e}}function f0(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?u0:typeof e==="function"?f0:d0)(r,e)):this.node()[r]}function uu(r){return r.trim().split(/^|\s+/)}function Ha(r){return r.classList||new du(r)}function du(r){this._node=r,this._names=uu(r.getAttribute("class")||"")}du.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 fu(r,e){var i=Ha(r),s=-1,o=e.length;while(++s<o)i.add(e[s])}function pu(r,e){var i=Ha(r),s=-1,o=e.length;while(++s<o)i.remove(e[s])}function p0(r){return function(){fu(this,r)}}function g0(r){return function(){pu(this,r)}}function m0(r,e){return function(){(e.apply(this,arguments)?fu:pu)(this,r)}}function Ya(r,e){var i=uu(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"?m0:e?p0:g0)(i,e))}function y0(){this.textContent=""}function x0(r){return function(){this.textContent=r}}function C0(r){return function(){var e=r.apply(this,arguments);this.textContent=e==null?"":e}}function ja(r){return arguments.length?this.each(r==null?y0:(typeof r==="function"?C0:x0)(r)):this.node().textContent}function b0(){this.innerHTML=""}function k0(r){return function(){this.innerHTML=r}}function w0(r){return function(){var e=r.apply(this,arguments);this.innerHTML=e==null?"":e}}function Ua(r){return arguments.length?this.each(r==null?b0:(typeof r==="function"?w0:k0)(r)):this.node().innerHTML}function S0(){if(this.nextSibling)this.parentNode.appendChild(this)}function Xa(){return this.each(S0)}function T0(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ga(){return this.each(T0)}function Va(r){var e=typeof r==="function"?r:Li(r);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function B0(){return null}function Ka(r,e){var i=typeof r==="function"?r:Li(r),s=e==null?B0:typeof e==="function"?e:dr(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function _0(){var r=this.parentNode;if(r)r.removeChild(this)}function Za(){return this.each(_0)}function v0(){var r=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function L0(){var r=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(r,this.nextSibling):r}function Ja(r){return this.select(r?L0:v0)}function en(r){return arguments.length?this.property("__data__",r):this.node().__data__}function F0(r){return function(e){r.call(this,e,this.__data__)}}function M0(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 A0(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 E0(r,e,i){return function(){var s=this.__on,o,a=F0(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 on(r,e,i){var s=M0(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?E0:A0;for(o=0;o<a;++o)this.each(n(s[o],e,i));return this}function gu(r,e,i){var s=Ai(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 $0(r,e){return function(){return gu(this,r,e)}}function I0(r,e){return function(){return gu(this,r,e.apply(this,arguments))}}function sn(r,e){return this.each((typeof e==="function"?I0:$0)(r,e))}function*ln(){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 hn=[null];function le(r,e){this._groups=r,this._parents=e}function mu(){return new le([[document.documentElement]],hn)}function O0(){return this}le.prototype=mu.prototype={constructor:le,select:ga,selectAll:ya,selectChild:xa,selectChildren:Ca,filter:ba,data:Ba,enter:ka,exit:_a,join:va,merge:La,selection:O0,order:Fa,sort:Ma,call:Aa,nodes:Ea,node:$a,size:Ia,empty:Oa,each:Pa,attr:qa,style:Wa,property:za,classed:Ya,text:ja,html:Ua,raise:Xa,lower:Ga,append:Va,insert:Ka,remove:Za,clone:Ja,datum:en,on,dispatch:sn,[Symbol.iterator]:ln};var er=mu;function b(r){return typeof r==="string"?new le([[document.querySelector(r)]],[document.documentElement]):new le([[r]],hn)}function ps(r,e,i){r.prototype=e.prototype=i,i.constructor=r}function Sc(r,e){var i=Object.create(r.prototype);for(var s in e)i[s]=e[s];return i}function ms(){}var $i=0.7,jo=1/$i,Yr="\\s*([+-]?\\d+)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",D0=/^#([0-9a-f]{3,8})$/,P0=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),R0=new RegExp(`^rgb\\(${Ye},${Ye},${Ye}\\)$`),q0=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Oi}\\)$`),W0=new RegExp(`^rgba\\(${Ye},${Ye},${Ye},${Oi}\\)$`),N0=new RegExp(`^hsl\\(${Oi},${Ye},${Ye}\\)$`),z0=new RegExp(`^hsla\\(${Oi},${Ye},${Ye},${Oi}\\)$`),yu={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};ps(ms,lo,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:xu,formatHex:xu,formatHex8:H0,formatHsl:Y0,formatRgb:Cu,toString:Cu});function xu(){return this.rgb().formatHex()}function H0(){return this.rgb().formatHex8()}function Y0(){return Bu(this).formatHsl()}function Cu(){return this.rgb().formatRgb()}function lo(r){var e,i;return r=(r+"").trim().toLowerCase(),(e=D0.exec(r))?(i=e[1].length,e=parseInt(e[1],16),i===6?bu(e):i===3?new Gn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):i===8?Ho(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):i===4?Ho(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=P0.exec(r))?new Gn(e[1],e[2],e[3],1):(e=R0.exec(r))?new Gn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=q0.exec(r))?Ho(e[1],e[2],e[3],e[4]):(e=W0.exec(r))?Ho(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=N0.exec(r))?Su(e[1],e[2]/100,e[3]/100,1):(e=z0.exec(r))?Su(e[1],e[2]/100,e[3]/100,e[4]):yu.hasOwnProperty(r)?bu(yu[r]):r==="transparent"?new Gn(NaN,NaN,NaN,0):null}function bu(r){return new Gn(r>>16&255,r>>8&255,r&255,1)}function Ho(r,e,i,s){if(s<=0)r=e=i=NaN;return new Gn(r,e,i,s)}function fA(r){if(!(r instanceof ms))r=lo(r);if(!r)return new Gn;return r=r.rgb(),new Gn(r.r,r.g,r.b,r.opacity)}function jr(r,e,i,s){return arguments.length===1?fA(r):new Gn(r,e,i,s==null?1:s)}function Gn(r,e,i,s){this.r=+r,this.g=+e,this.b=+i,this.opacity=+s}ps(Gn,jr,Sc(ms,{brighter(r){return r=r==null?jo:Math.pow(jo,r),new Gn(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?$i:Math.pow($i,r),new Gn(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Gn(Sr(this.r),Sr(this.g),Sr(this.b),Uo(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:ku,formatHex:ku,formatHex8:j0,formatRgb:wu,toString:wu}));function ku(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}`}function j0(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}${wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function wu(){let r=Uo(this.opacity);return`${r===1?"rgb(":"rgba("}${Sr(this.r)}, ${Sr(this.g)}, ${Sr(this.b)}${r===1?")":`, ${r})`}`}function Uo(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function Sr(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function wr(r){return r=Sr(r),(r<16?"0":"")+r.toString(16)}function Su(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 $e(r,e,i,s)}function Bu(r){if(r instanceof $e)return new $e(r.h,r.s,r.l,r.opacity);if(!(r instanceof ms))r=lo(r);if(!r)return new $e;if(r instanceof $e)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 $e(c,n,d,r.opacity)}function _u(r,e,i,s){return arguments.length===1?Bu(r):new $e(r,e,i,s==null?1:s)}function $e(r,e,i,s){this.h=+r,this.s=+e,this.l=+i,this.opacity=+s}ps($e,_u,Sc(ms,{brighter(r){return r=r==null?jo:Math.pow(jo,r),new $e(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?$i:Math.pow($i,r),new $e(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 Gn(cn(r>=240?r-240:r+120,o,s),cn(r,o,s),cn(r<120?r+240:r-120,o,s),this.opacity)},clamp(){return new $e(Tu(this.h),Yo(this.s),Yo(this.l),Uo(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=Uo(this.opacity);return`${r===1?"hsl(":"hsla("}${Tu(this.h)}, ${Yo(this.s)*100}%, ${Yo(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Tu(r){return r=(r||0)%360,r<0?r+360:r}function Yo(r){return Math.max(0,Math.min(1,r||0))}function cn(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 un(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 dn(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 un((i-s/e)*e,c,o,a,n)}}function fn(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 un((i-s/e)*e,o,a,c,n)}}var Tc=(r)=>()=>r;function vu(r,e){return function(i){return r+i*e}}function U0(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 Uh(r,e){var i=e-r;return i?vu(r,i>180||i<-180?i-360*Math.round(i/360):i):Tc(isNaN(r)?e:r)}function Lu(r){return(r=+r)===1?Ei:function(e,i){return i-e?U0(e,i,r):Tc(isNaN(e)?i:e)}}function Ei(r,e){var i=e-r;return i?vu(r,i):Tc(isNaN(r)?e:r)}var kl=function r(e){var i=Lu(e);function s(o,a){var c=i((o=jr(o)).r,(a=jr(a)).r),n=i(o.g,a.g),d=i(o.b,a.b),f=Ei(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 Fu(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=jr(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 X0=Fu(dn),G0=Fu(fn);function Mn(r,e){return r=+r,e=+e,function(i){return r*(1-i)+e*i}}var gn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pn=new RegExp(gn.source,"g");function V0(r){return function(){return r}}function K0(r){return function(e){return r(e)+""}}function Dc(r,e){var i=gn.lastIndex=pn.lastIndex=0,s,o,a,c=-1,n=[],d=[];r=r+"",e=e+"";while((s=gn.exec(r))&&(o=pn.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:Mn(s,o)});i=pn.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]?K0(d[0].x):V0(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 Mu=180/Math.PI,Xo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Go(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)*Mu,skewX:Math.atan(d)*Mu,scaleX:c,scaleY:n}}var Vo;function Au(r){let e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(r+"");return e.isIdentity?Xo:Go(e.a,e.b,e.c,e.d,e.e,e.f)}function Eu(r){if(r==null)return Xo;if(!Vo)Vo=document.createElementNS("http://www.w3.org/2000/svg","g");if(Vo.setAttribute("transform",r),!(r=Vo.transform.baseVal.consolidate()))return Xo;return r=r.matrix,Go(r.a,r.b,r.c,r.d,r.e,r.f)}function $u(r,e,i,s){function o(f){return f.length?f.pop()+" ":""}function a(f,u,p,x,k,T){if(f!==p||u!==x){var B=k.push("translate(",null,e,null,i);T.push({i:B-4,x:Mn(f,p)},{i:B-2,x:Mn(u,x)})}else if(p||x)k.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:Mn(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:Mn(f,u)});else if(u)p.push(o(p)+"skewX("+u+s)}function d(f,u,p,x,k,T){if(f!==p||u!==x){var B=k.push(o(k)+"scale(",null,",",null,")");T.push({i:B-4,x:Mn(f,p)},{i:B-2,x:Mn(u,x)})}else if(p!==1||x!==1)k.push(o(k)+"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(k){var T=-1,B=x.length,_;while(++T<B)p[(_=x[T]).i]=_.x(k);return p.join("")}}}var mn=$u(Au,"px, ","px)","deg)"),xn=$u(Eu,", ",")",")");var Ur=0,Pi=0,Di=0,Ou=1000,Ko,Ri,Zo=0,Tr=0,Qo=0,qi=typeof performance==="object"&&performance.now?performance:Date,Du=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function Ni(){return Tr||(Du(Z0),Tr=qi.now()+Qo)}function Z0(){Tr=0}function Wi(){this._call=this._time=this._next=null}Wi.prototype=Jo.prototype={constructor:Wi,restart:function(r,e,i){if(typeof r!=="function")throw TypeError("callback is not a function");if(i=(i==null?Ni():+i)+(e==null?0:+e),!this._next&&Ri!==this){if(Ri)Ri._next=this;else Ko=this;Ri=this}this._call=r,this._time=i,Cn()},stop:function(){if(this._call)this._call=null,this._time=1/0,Cn()}};function Jo(r,e,i){var s=new Wi;return s.restart(r,e,i),s}function Pu(){Ni(),++Ur;var r=Ko,e;while(r){if((e=Tr-r._time)>=0)r._call.call(void 0,e);r=r._next}--Ur}function Iu(){Tr=(Zo=qi.now())+Qo,Ur=Pi=0;try{Pu()}finally{Ur=0,J0(),Tr=0}}function Q0(){var r=qi.now(),e=r-Zo;if(e>Ou)Qo-=e,Zo=r}function J0(){var r,e=Ko,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:Ko=i;Ri=r,Cn(s)}function Cn(r){if(Ur)return;if(Pi)Pi=clearTimeout(Pi);var e=r-Tr;if(e>24){if(r<1/0)Pi=setTimeout(Iu,r-qi.now()-Qo);if(Di)Di=clearInterval(Di)}else{if(!Di)Zo=qi.now(),Di=setInterval(Q0,Ou);Ur=1,Du(Iu)}}function zi(r,e,i){var s=new Wi;return e=e==null?0:+e,s.restart((o)=>{s.stop(),r(o+e)},e,i),s}var tC=fa("start","end","cancel","interrupt"),eC=[],Wu=0,Ru=1,es=2,ts=3,qu=4,rs=5,Hi=6;function rr(r,e,i,s,o,a){var c=r.__transition;if(!c)r.__transition={};else if(i in c)return;rC(r,i,{name:e,index:s,group:o,on:tC,tween:eC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Wu})}function Yi(r,e){var i=ge(r,e);if(i.state>Wu)throw Error("too late; already scheduled");return i}function ye(r,e){var i=ge(r,e);if(i.state>ts)throw Error("too late; already running");return i}function ge(r,e){var i=r.__transition;if(!i||!(i=i[e]))throw Error("transition not found");return i}function rC(r,e,i){var s=r.__transition,o;s[e]=i,i.timer=Jo(a,0,i.time);function a(f){if(i.state=Ru,i.timer.restart(c,i.delay,i.time),i.delay<=f)c(f-i.delay)}function c(f){var u,p,x,k;if(i.state!==Ru)return d();for(u in s){if(k=s[u],k.name!==i.name)continue;if(k.state===ts)return zi(c);if(k.state===qu)k.state=Hi,k.timer.stop(),k.on.call("interrupt",r,r.__data__,k.index,k.group),delete s[u];else if(+u<e)k.state=Hi,k.timer.stop(),k.on.call("cancel",r,r.__data__,k.index,k.group),delete s[u]}if(zi(function(){if(i.state===ts)i.state=qu,i.timer.restart(n,i.delay,i.time),n(f)}),i.state=es,i.on.call("start",r,r.__data__,i.index,i.group),i.state!==es)return;i.state=ts,o=Array(x=i.tween.length);for(u=0,p=-1;u<x;++u)if(k=i.tween[u].value.call(r,r.__data__,i.index,i.group))o[++p]=k;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=rs,1),p=-1,x=o.length;while(++p<x)o[p].call(r,u);if(i.state===rs)i.on.call("end",r,r.__data__,i.index,i.group),d()}function d(){i.state=Hi,i.timer.stop(),delete s[e];for(var f in s)return;delete r.__transition}}function ji(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>es&&s.state<rs,s.state=Hi,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 bn(r){return this.each(function(){ji(this,r)})}function iC(r,e){var i,s;return function(){var o=ye(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 oC(r,e,i){var s,o;if(typeof i!=="function")throw Error();return function(){var a=ye(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 kn(r,e){var i=this._id;if(r+="",arguments.length<2){var s=ge(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?iC:oC)(i,r,e))}function Xr(r,e,i){var s=r._id;return r.each(function(){var o=ye(this,s);(o.value||(o.value={}))[e]=i.apply(this,arguments)}),function(o){return ge(o,s).value[e]}}function Ui(r,e){var i;return(typeof e==="number"?Mn:e instanceof lo?kl:(i=lo(e))?(e=i,kl):Dc)(r,e)}function sC(r){return function(){this.removeAttribute(r)}}function aC(r){return function(){this.removeAttributeNS(r.space,r.local)}}function nC(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 lC(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 hC(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 cC(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 Sn(r,e){var i=He(r),s=i==="transform"?xn:Ui;return this.attrTween(r,typeof e==="function"?(i.local?cC:hC)(i,s,Xr(this,"attr."+r,e)):e==null?(i.local?aC:sC)(i):(i.local?lC:nC)(i,s,e))}function uC(r,e){return function(i){this.setAttribute(r,e.call(this,i))}}function dC(r,e){return function(i){this.setAttributeNS(r.space,r.local,e.call(this,i))}}function fC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&dC(r,a);return i}return o._value=e,o}function pC(r,e){var i,s;function o(){var a=e.apply(this,arguments);if(a!==s)i=(s=a)&&uC(r,a);return i}return o._value=e,o}function Tn(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=He(r);return this.tween(i,(s.local?fC:pC)(s,e))}function gC(r,e){return function(){Yi(this,r).delay=+e.apply(this,arguments)}}function mC(r,e){return e=+e,function(){Yi(this,r).delay=e}}function Bn(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?gC:mC)(e,r)):ge(this.node(),e).delay}function yC(r,e){return function(){ye(this,r).duration=+e.apply(this,arguments)}}function xC(r,e){return e=+e,function(){ye(this,r).duration=e}}function _n(r){var e=this._id;return arguments.length?this.each((typeof r==="function"?yC:xC)(e,r)):ge(this.node(),e).duration}function CC(r,e){if(typeof e!=="function")throw Error();return function(){ye(this,r).ease=e}}function vn(r){var e=this._id;return arguments.length?this.each(CC(e,r)):ge(this.node(),e).ease}function bC(r,e){return function(){var i=e.apply(this,arguments);if(typeof i!=="function")throw Error();ye(this,r).ease=i}}function Ln(r){if(typeof r!=="function")throw Error();return this.each(bC(this._id,r))}function An(r){if(typeof r!=="function")r=Hr(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 Te(s,this._parents,this._name,this._id)}function En(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,k=0;k<u;++k)if(x=d[k]||f[k])p[k]=x;for(;n<s;++n)c[n]=e[n];return new Te(c,this._parents,this._name,this._id)}function kC(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 wC(r,e,i){var s,o,a=kC(e)?Yi:ye;return function(){var c=a(this,r),n=c.on;if(n!==s)(o=(s=n).copy()).on(e,i);c.on=o}}function In(r,e){var i=this._id;return arguments.length<2?ge(this.node(),i).on.on(r):this.each(wC(i,r,e))}function SC(r){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==r)return;if(e)e.removeChild(this)}}function On(){return this.on("end.remove",SC(this._id))}function Dn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=dr(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,rr(f[x],e,i,x,f,ge(u,i))}return new Te(a,this._parents,e,i)}function Pn(r){var e=this._name,i=this._id;if(typeof r!=="function")r=zr(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),k,T=ge(u,i),B=0,_=x.length;B<_;++B)if(k=x[B])rr(k,e,i,B,x,T);a.push(x),c.push(u)}return new Te(a,c,e,i)}var TC=er.prototype.constructor;function Rn(){return new TC(this._groups,this._parents)}function BC(r,e){var i,s,o;return function(){var a=fr(this,r),c=(this.style.removeProperty(r),fr(this,r));return a===c?null:a===i&&c===s?o:o=e(i=a,s=c)}}function Nu(r){return function(){this.style.removeProperty(r)}}function _C(r,e,i){var s,o=i+"",a;return function(){var c=fr(this,r);return c===o?null:c===s?a:a=e(s=c,i)}}function vC(r,e,i){var s,o,a;return function(){var c=fr(this,r),n=i(this),d=n+"";if(n==null)d=n=(this.style.removeProperty(r),fr(this,r));return c===d?null:c===s&&d===o?a:(o=d,a=e(s=c,n))}}function LC(r,e){var i,s,o,a="style."+e,c="end."+a,n;return function(){var d=ye(this,r),f=d.on,u=d.value[a]==null?n||(n=Nu(e)):void 0;if(f!==i||o!==u)(s=(i=f).copy()).on(c,o=u);d.on=s}}function qn(r,e,i){var s=(r+="")==="transform"?mn:Ui;return e==null?this.styleTween(r,BC(r,s)).on("end.style."+r,Nu(r)):typeof e==="function"?this.styleTween(r,vC(r,s,Xr(this,"style."+r,e))).each(LC(this._id,r)):this.styleTween(r,_C(r,s,e),i).on("end.style."+r,null)}function FC(r,e,i){return function(s){this.style.setProperty(r,e.call(this,s),i)}}function MC(r,e,i){var s,o;function a(){var c=e.apply(this,arguments);if(c!==o)s=(o=c)&&FC(r,c,i);return s}return a._value=e,a}function Wn(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,MC(r,e,i==null?"":i))}function AC(r){return function(){this.textContent=r}}function EC(r){return function(){var e=r(this);this.textContent=e==null?"":e}}function Nn(r){return this.tween("text",typeof r==="function"?EC(Xr(this,"text",r)):AC(r==null?"":r+""))}function $C(r){return function(e){this.textContent=r.call(this,e)}}function IC(r){var e,i;function s(){var o=r.apply(this,arguments);if(o!==i)e=(i=o)&&$C(o);return e}return s._value=r,s}function zn(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,IC(r))}function Yn(){var r=this._name,e=this._id,i=is();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=ge(d,e);rr(d,r,i,f,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Te(s,this._parents,r,i)}function Un(){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=ye(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 OC=0;function Te(r,e,i,s){this._groups=r,this._parents=e,this._name=i,this._id=s}function zu(r){return er().transition(r)}function is(){return++OC}var nr=er.prototype;Te.prototype=zu.prototype={constructor:Te,select:Dn,selectAll:Pn,selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:An,merge:En,selection:Rn,transition:Yn,call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:In,attr:Sn,attrTween:Tn,style:qn,styleTween:Wn,text:Nn,textTween:zn,remove:On,tween:kn,delay:Bn,duration:_n,ease:vn,easeVarying:Ln,end:Un,[Symbol.iterator]:nr[Symbol.iterator]};function os(r){return((r*=2)<=1?r*r*r:(r-=2)*r*r+2)/2}var DC={time:null,delay:0,duration:250,ease:os};function PC(r,e){var i;while(!(i=r.__transition)||!(i=i[e]))if(!(r=r.parentNode))throw Error(`transition ${e} not found`);return i}function Xn(r){var e,i;if(r instanceof Te)e=r._id,r=r._name;else e=is(),(i=DC).time=Ni(),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])rr(d,r,e,f,c,i||PC(d,e));return new Te(s,this._parents,r,e)}er.prototype.interrupt=bn;er.prototype.transition=Xn;var{abs:VL,max:KL,min:ZL}=Math;function Hu(r){return[+r[0],+r[1]]}function RC(r){return[Hu(r[0]),Hu(r[1])]}var QL={name:"x",handles:["w","e"].map(Vn),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]]}},JL={name:"y",handles:["n","s"].map(Vn),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]]}},tF={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vn),input:function(r){return r==null?null:RC(r)},output:function(r){return r}};function Vn(r){return{type:r}}var Kn=Math.PI,Zn=2*Kn;var qC=Zn-0.000001;function Yu(r){this._+=r[0];for(let e=1,i=r.length;e<i;++e)this._+=arguments[e]+r[e]}function WC(r){let e=Math.floor(r);if(!(e>=0))throw Error(`invalid digits: ${r}`);if(e>15)return Yu;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 Gr{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Yu:WC(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,k=s-c,T=n*n+d*d,B=x*x+k*k,_=Math.sqrt(T),v=Math.sqrt(p),A=o*Math.tan((Kn-Math.acos((T+p-B)/(2*_*v)))/2),I=A/v,D=A/_;if(Math.abs(I-1)>0.000001)this._append`L${r+I*f},${e+I*u}`;this._append`A${o},${o},0,0,${+(u*x>f*k)},${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%Zn+Zn;if(p>qC)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>=Kn)},${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 ju(){return new Gr}ju.prototype=Gr.prototype;function Po(r,e){switch(arguments.length){case 0:break;case 1:this.range(r);break;default:this.range(e).domain(r);break}return this}var Qn=Symbol("implicit");function ar(){var r=new vi,e=[],i=[],s=Qn;function o(a){let c=r.get(a);if(c===void 0){if(s!==Qn)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 vi;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 ar(e,i).unknown(s)},Po.apply(o,arguments),o}function Tt(r){return function(){return r}}var{abs:Jn,atan2:xe,cos:pr,max:Uu,min:ss,sin:Ie,sqrt:Br}=Math,me=0.000000000001,Vr=Math.PI,Xi=Vr/2,Nc=2*Vr;function Xu(r){return r>1?0:r<-1?Vr:Math.acos(r)}function tl(r){return r>=1?Xi:r<=-1?-Xi:Math.asin(r)}function as(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 Gr(e)}function NC(r){return r.innerRadius}function zC(r){return r.outerRadius}function HC(r){return r.startAngle}function YC(r){return r.endAngle}function jC(r){return r&&r.padAngle}function UC(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<me)return;return x=(u*(e-a)-p*(r-o))/x,[r+x*d,e+x*f]}function ns(r,e,i,s,o,a,c){var n=r-i,d=e-s,f=(c?a:-a)/Br(n*n+d*d),u=f*d,p=-f*n,x=r+u,k=e+p,T=i+u,B=s+p,_=(x+T)/2,v=(k+B)/2,A=T-x,I=B-k,D=A*A+I*I,P=o-a,G=x*B-T*k,Z=(I<0?-1:1)*Br(Uu(0,P*P*D-G*G)),J=(G*I-A*Z)/D,rt=(-G*A-I*Z)/D,lt=(G*I+A*Z)/D,nt=(-G*A+I*Z)/D,ot=J-_,R=rt-v,X=lt-_,tt=nt-v;if(ot*ot+R*R>X*X+tt*tt)J=lt,rt=nt;return{cx:J,cy:rt,x01:-u,y01:-p,x11:J*(o/P-1),y11:rt*(o/P-1)}}function la(){var r=NC,e=zC,i=Tt(0),s=null,o=HC,a=YC,c=jC,n=null,d=as(f);function f(){var u,p,x=+r.apply(this,arguments),k=+e.apply(this,arguments),T=o.apply(this,arguments)-Xi,B=a.apply(this,arguments)-Xi,_=Jn(B-T),v=B>T;if(!n)n=u=d();if(k<x)p=k,k=x,x=p;if(!(k>me))n.moveTo(0,0);else if(_>Nc-me){if(n.moveTo(k*pr(T),k*Ie(T)),n.arc(0,0,k,T,B,!v),x>me)n.moveTo(x*pr(B),x*Ie(B)),n.arc(0,0,x,B,T,v)}else{var A=T,I=B,D=T,P=B,G=_,Z=_,J=c.apply(this,arguments)/2,rt=J>me&&(s?+s.apply(this,arguments):Br(x*x+k*k)),lt=ss(Jn(k-x)/2,+i.apply(this,arguments)),nt=lt,ot=lt,R,X;if(rt>me){var tt=tl(rt/x*Ie(J)),N=tl(rt/k*Ie(J));if((G-=tt*2)>me)tt*=v?1:-1,D+=tt,P-=tt;else G=0,D=P=(T+B)/2;if((Z-=N*2)>me)N*=v?1:-1,A+=N,I-=N;else Z=0,A=I=(T+B)/2}var at=k*pr(A),st=k*Ie(A),St=x*pr(P),_t=x*Ie(P);if(lt>me){var Wt=k*pr(I),Nt=k*Ie(I),jt=x*pr(D),Xt=x*Ie(D),$t;if(_<Vr)if($t=UC(at,st,jt,Xt,Wt,Nt,St,_t)){var Lt=at-$t[0],Dt=st-$t[1],zt=Wt-$t[0],Rt=Nt-$t[1],ie=1/Ie(Xu((Lt*zt+Dt*Rt)/(Br(Lt*Lt+Dt*Dt)*Br(zt*zt+Rt*Rt)))/2),re=Br($t[0]*$t[0]+$t[1]*$t[1]);nt=ss(lt,(x-re)/(ie-1)),ot=ss(lt,(k-re)/(ie+1))}else nt=ot=0}if(!(Z>me))n.moveTo(at,st);else if(ot>me)if(R=ns(jt,Xt,at,st,k,ot,v),X=ns(Wt,Nt,St,_t,k,ot,v),n.moveTo(R.cx+R.x01,R.cy+R.y01),ot<lt)n.arc(R.cx,R.cy,ot,xe(R.y01,R.x01),xe(X.y01,X.x01),!v);else n.arc(R.cx,R.cy,ot,xe(R.y01,R.x01),xe(R.y11,R.x11),!v),n.arc(0,0,k,xe(R.cy+R.y11,R.cx+R.x11),xe(X.cy+X.y11,X.cx+X.x11),!v),n.arc(X.cx,X.cy,ot,xe(X.y11,X.x11),xe(X.y01,X.x01),!v);else n.moveTo(at,st),n.arc(0,0,k,A,I,!v);if(!(x>me)||!(G>me))n.lineTo(St,_t);else if(nt>me)if(R=ns(St,_t,Wt,Nt,x,-nt,v),X=ns(at,st,jt,Xt,x,-nt,v),n.lineTo(R.cx+R.x01,R.cy+R.y01),nt<lt)n.arc(R.cx,R.cy,nt,xe(R.y01,R.x01),xe(X.y01,X.x01),!v);else n.arc(R.cx,R.cy,nt,xe(R.y01,R.x01),xe(R.y11,R.x11),!v),n.arc(0,0,x,xe(R.cy+R.y11,R.cx+R.x11),xe(X.cy+X.y11,X.cx+X.x11),v),n.arc(X.cx,X.cy,nt,xe(X.y11,X.x11),xe(X.y01,X.x01),!v);else n.arc(0,0,x,P,D,v)}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-Vr/2;return[pr(p)*u,Ie(p)*u]},f.innerRadius=function(u){return arguments.length?(r=typeof u==="function"?u:Tt(+u),f):r},f.outerRadius=function(u){return arguments.length?(e=typeof u==="function"?u:Tt(+u),f):e},f.cornerRadius=function(u){return arguments.length?(i=typeof u==="function"?u:Tt(+u),f):i},f.padRadius=function(u){return arguments.length?(s=u==null?null:typeof u==="function"?u:Tt(+u),f):s},f.startAngle=function(u){return arguments.length?(o=typeof u==="function"?u:Tt(+u),f):o},f.endAngle=function(u){return arguments.length?(a=typeof u==="function"?u:Tt(+u),f):a},f.padAngle=function(u){return arguments.length?(c=typeof u==="function"?u:Tt(+u),f):c},f.context=function(u){return arguments.length?(n=u==null?null:u,f):n},f}var $F=Array.prototype.slice;function Dd(r){return typeof r==="object"&&"length"in r?r:Array.from(r)}function Gu(r){this._context=r}Gu.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 Da(r){return new Gu(r)}function Vu(r){return r[0]}function Ku(r){return r[1]}function wl(r,e){var i=Tt(!0),s=null,o=Da,a=null,c=as(n);r=typeof r==="function"?r:r===void 0?Vu:Tt(r),e=typeof e==="function"?e:e===void 0?Ku:Tt(e);function n(d){var f,u=(d=Dd(d)).length,p,x=!1,k;if(s==null)a=o(k=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(k)return a=null,k+""||null}return n.x=function(d){return arguments.length?(r=typeof d==="function"?d:Tt(+d),n):r},n.y=function(d){return arguments.length?(e=typeof d==="function"?d:Tt(+d),n):e},n.defined=function(d){return arguments.length?(i=typeof d==="function"?d:Tt(!!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 Gi(r){return new el(r,!0)}function Vi(r){return new el(r,!1)}function Le(){}function Kr(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 Ki(r){this._context=r}Ki.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:Kr(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:Kr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function _r(r){return new Ki(r)}function Zu(r){this._context=r}Zu.prototype={areaStart:Le,areaEnd:Le,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:Kr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function ls(r){return new Zu(r)}function Qu(r){this._context=r}Qu.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:Kr(this,r,e);break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e}};function hs(r){return new Qu(r)}function Ju(r,e){this._basis=new Ki(r),this._beta=e}Ju.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 Ki(s):new Ju(s,e)}return i.beta=function(s){return r(+s)},i}(0.85);function Zr(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 cs(r,e){this._context=r,this._k=(1-e)/6}cs.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:Zr(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:Zr(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 Zi=function r(e){function i(s){return new cs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function ys(r,e){this._context=r,this._k=(1-e)/6}ys.prototype={areaStart:Le,areaEnd:Le,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:Zr(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 ys(s,e)}return i.tension=function(s){return r(+s)},i}(0);function xs(r,e){this._context=r,this._k=(1-e)/6}xs.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:Zr(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 xs(s,e)}return i.tension=function(s){return r(+s)},i}(0);function Qi(r,e,i){var{_x1:s,_y1:o,_x2:a,_y2:c}=r;if(r._l01_a>me){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>me){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 td(r,e){this._context=r,this._alpha=e}td.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:Qi(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 Ji=function r(e){function i(s){return e?new td(s,e):new cs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function ed(r,e){this._context=r,this._alpha=e}ed.prototype={areaStart:Le,areaEnd:Le,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:Qi(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 sl=function r(e){function i(s){return e?new ed(s,e):new ys(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function rd(r,e){this._context=r,this._alpha=e}rd.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:Qi(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 rd(s,e):new xs(s,0)}return i.alpha=function(s){return r(+s)},i}(0.5);function id(r){this._context=r}id.prototype={areaStart:Le,areaEnd:Le,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 Cs(r){return new id(r)}function od(r){return r<0?-1:1}function sd(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(od(a)+od(c))*Math.min(Math.abs(a),Math.abs(c),0.5*Math.abs(n))||0}function ad(r,e){var i=r._x1-r._x0;return i?(3*(r._y1-r._y0)/i-e)/2:e}function nl(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 bs(r){this._context=r}bs.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:nl(this,this._t0,ad(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,nl(this,ad(this,i=sd(this,r,e)),i);break;default:nl(this,this._t0,i=sd(this,r,e));break}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=e,this._t0=i}};function nd(r){this._context=new ld(r)}(nd.prototype=Object.create(bs.prototype)).point=function(r,e){bs.prototype.point.call(this,e,r)};function ld(r){this._context=r}ld.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 to(r){return new bs(r)}function eo(r){return new nd(r)}function cd(r){this._context=r}cd.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=hd(r),o=hd(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 hd(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 Qr(r){return new cd(r)}function ks(r,e){this._context=r,this._t=e}ks.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 Jr(r){return new ks(r,0.5)}function ro(r){return new ks(r,0)}function io(r){return new ks(r,1)}function gr(r,e,i){this.k=r,this.x=e,this.y=i}gr.prototype={constructor:gr,scale:function(r){return r===1?this:new gr(this.k*r,this.x,this.y)},translate:function(r,e){return r===0&e===0?this:new gr(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 ll=new gr(1,0,0);hl.prototype=gr.prototype;function hl(r){while(!r.__zoom)if(!(r=r.parentNode))return ll;return r.__zoom}var he=t((r)=>{let{securityLevel:e}=m(),i=b("body");if(e==="sandbox"){let a=b(`#i${r}`).node()?.contentDocument??document;i=b(a.body)}return i.select(`#${r}`)},"selectSvgElement");function jd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}t(jd,"getDefaultExportFromCjs");var be={},ws={},mr={},ud;function ti(){if(ud)return mr;ud=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"),mr.isNothing=r,mr.isObject=e,mr.toArray=i,mr.repeat=o,mr.isNegativeZero=a,mr.extend=s,mr}t(ti,"requireCommon");var cl,dd;function ei(){if(dd)return cl;dd=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"),cl=e,cl}t(ei,"requireException");var ul,fd;function Ud(){if(fd)return ul;fd=1;let r=ti();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,k=a.maxLength-(a.indent+x+3);for(let B=1;B<=a.linesBefore;B++){if(u-B<0)break;let _=e(o.buffer,n[u-B],d[u-B],o.position-(n[u]-n[u-B]),k);p=r.repeat(" ",a.indent)+i((o.line-B+1).toString(),x)+" | "+_.str+`
|
|
129
|
+
`+p}let T=e(o.buffer,n[u],d[u],o.position,k);p+=r.repeat(" ",a.indent)+i((o.line+1).toString(),x)+" | "+T.str+`
|
|
130
|
+
`,p+=r.repeat("-",a.indent+x+3+T.pos)+`^
|
|
131
|
+
`;for(let B=1;B<=a.linesAfter;B++){if(u+B>=d.length)break;let _=e(o.buffer,n[u+B],d[u+B],o.position-(n[u]-n[u+B]),k);p+=r.repeat(" ",a.indent)+i((o.line+B+1).toString(),x)+" | "+_.str+`
|
|
132
|
+
`}return p.replace(/\n$/,"")}return t(s,"makeSnippet"),ul=s,ul}t(Ud,"requireSnippet");var dl,pd;function ke(){if(pd)return dl;pd=1;let r=ei(),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"),dl=o,dl}t(ke,"requireType");var fl,gd;function ql(){if(gd)return fl;gd=1;let r=ei(),e=ke();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"),fl=o,fl}t(ql,"requireSchema");var pl,md;function Wl(){if(md)return pl;return md=1,pl=new(ke())("tag:yaml.org,2002:str",{kind:"scalar",construct:t(function(e){return e!==null?e:""},"construct")}),pl}t(Wl,"requireStr");var gl,yd;function Nl(){if(yd)return gl;return yd=1,gl=new(ke())("tag:yaml.org,2002:seq",{kind:"sequence",construct:t(function(e){return e!==null?e:[]},"construct")}),gl}t(Nl,"requireSeq");var ml,xd;function zl(){if(xd)return ml;return xd=1,ml=new(ke())("tag:yaml.org,2002:map",{kind:"mapping",construct:t(function(e){return e!==null?e:{}},"construct")}),ml}t(zl,"requireMap");var yl,Cd;function Hl(){if(Cd)return yl;return Cd=1,yl=new(ql())({explicit:[Wl(),Nl(),zl()]}),yl}t(Hl,"requireFailsafe");var bl,bd;function Yl(){if(bd)return bl;bd=1;let r=ke();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 Sl,kd;function jl(){if(kd)return Sl;kd=1;let r=ke();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"),Sl=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"}),Sl}t(jl,"requireBool");var Tl,wd;function Ul(){if(wd)return Tl;wd=1;let r=ti(),e=ke();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 k=f[p];if(k==="-"||k==="+")k=f[++p];if(k==="0"){if(p+1===u)return!0;if(k=f[++p],k==="b"){p++;for(;p<u;p++){if(k=f[p],k!=="0"&&k!=="1")return!1;x=!0}return x&&isFinite(c(f))}if(k==="x"){p++;for(;p<u;p++){if(!i(f.charCodeAt(p)))return!1;x=!0}return x&&isFinite(c(f))}if(k==="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"),Tl=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"]}}),Tl}t(Ul,"requireInt");var _l,Bd;function Xl(){if(Bd)return _l;Bd=1;let r=ti(),e=ke(),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"),_l=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:d,represent:n,defaultStyle:"lowercase"}),_l}t(Xl,"requireFloat");var vl,vd;function Gl(){if(vd)return vl;return vd=1,vl=Hl().extend({implicit:[Yl(),jl(),Ul(),Xl()]}),vl}t(Gl,"requireJson");var Ll,Ad;function Vl(){if(Ad)return Ll;return Ad=1,Ll=Gl(),Ll}t(Vl,"requireCore");var Fl,Ed;function Kl(){if(Ed)return Fl;Ed=1;let r=ke(),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 k=+f[4],T=+f[5],B=+f[6];if(f[7]){n=f[7].slice(0,3);while(n.length<3)n+="0";n=+n}if(f[9]){let v=+f[10],A=+(f[11]||0);if(d=(v*60+A)*60000,f[9]==="-")d=-d}let _=new Date(Date.UTC(u,p,x,k,T,B,n));if(d)_.setTime(_.getTime()-d);return _}t(o,"constructYamlTimestamp");function a(c){return c.toISOString()}return t(a,"representYamlTimestamp"),Fl=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:o,instanceOf:Date,represent:a}),Fl}t(Kl,"requireTimestamp");var Ml,$d;function Zl(){if($d)return Ml;$d=1;let r=ke();function e(i){return i==="<<"||i===null}return t(e,"resolveYamlMerge"),Ml=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Ml}t(Zl,"requireMerge");var Al,Id;function Ql(){if(Id)return Al;Id=1;let r=ke(),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 k=0;k<d;k++){if(k%4===0&&k)p.push(u>>16&255),p.push(u>>8&255),p.push(u&255);u=u<<6|f.indexOf(n.charAt(k))}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"),Al=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:a,represent:o}),Al}t(Ql,"requireBinary");var $l,Od;function Jl(){if(Od)return $l;Od=1;let r=ke(),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"),$l=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:o}),$l}t(Jl,"requireOmap");var Ol,Pd;function th(){if(Pd)return Ol;Pd=1;let r=ke(),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(th,"requirePairs");var Dl,qd;function eh(){if(qd)return Dl;qd=1;let r=ke(),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(eh,"requireSet");var Pl,Wd;function Ss(){if(Wd)return Pl;return Wd=1,Pl=Vl().extend({implicit:[Kl(),Zl()],explicit:[Ql(),Jl(),th(),eh()]}),Pl}t(Ss,"require_default");var zd;function Xd(){if(zd)return ws;zd=1;let r=ti(),e=ei(),i=Ud(),s=Ss(),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]/,k=/[\x85\u2028\u2029]/,T=/[,\[\]{}]/,B=/^(?:!|!!|![0-9A-Za-z-]+!)$/,_=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function v(S){return Object.prototype.toString.call(S)}t(v,"_class");function A(S){return S===10||S===13}t(A,"isEol");function I(S){return S===9||S===32}t(I,"isWhiteSpace");function D(S){return S===9||S===32||S===10||S===13}t(D,"isWsOrEol");function P(S){return S===44||S===91||S===93||S===123||S===125}t(P,"isFlowIndicator");function G(S){if(S>=48&&S<=57)return S-48;let et=S|32;if(et>=97&&et<=102)return et-97+10;return-1}t(G,"fromHexCode");function Z(S){if(S===120)return 2;if(S===117)return 4;if(S===85)return 8;return 0}t(Z,"escapedHexLen");function J(S){if(S>=48&&S<=57)return S-48;return-1}t(J,"fromDecimalCode");function rt(S){switch(S){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(rt,"simpleEscapeSequence");function lt(S){if(S<=65535)return String.fromCharCode(S);return String.fromCharCode((S-65536>>10)+55296,(S-65536&1023)+56320)}t(lt,"charFromCodepoint");function nt(S,et,ut){if(et==="__proto__")Object.defineProperty(S,et,{configurable:!0,enumerable:!0,writable:!0,value:ut});else S[et]=ut}t(nt,"setProperty");let ot=Array(256),R=Array(256);for(let S=0;S<256;S++)ot[S]=rt(S)?1:0,R[S]=rt(S);function X(S,et){this.input=S,this.filename=et.filename||null,this.schema=et.schema||s,this.onWarning=et.onWarning||null,this.legacy=et.legacy||!1,this.json=et.json||!1,this.listener=et.listener||null,this.maxDepth=typeof et.maxDepth==="number"?et.maxDepth:100,this.maxTotalMergeKeys=typeof et.maxTotalMergeKeys==="number"?et.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=S.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(X,"State");function tt(S,et){let ut={name:S.filename,buffer:S.input.slice(0,-1),position:S.position,line:S.line,column:S.position-S.lineStart};return ut.snippet=i(ut),new e(et,ut)}t(tt,"generateError");function N(S,et){throw tt(S,et)}t(N,"throwError");function at(S,et){if(S.onWarning)S.onWarning.call(null,tt(S,et))}t(at,"throwWarning");function st(S,et,ut){let mt=S.anchorMapTransactions;if(mt.length!==0){let ht=mt[mt.length-1];if(!o.call(ht,et))ht[et]={existed:o.call(S.anchorMap,et),value:S.anchorMap[et]}}S.anchorMap[et]=ut}t(st,"storeAnchor");function St(S){S.anchorMapTransactions.push(Object.create(null))}t(St,"beginAnchorTransaction");function _t(S){let et=S.anchorMapTransactions.pop(),ut=S.anchorMapTransactions;if(ut.length===0)return;let mt=ut[ut.length-1],ht=Object.keys(et);for(let kt=0,O=ht.length;kt<O;kt+=1){let it=ht[kt];if(!o.call(mt,it))mt[it]=et[it]}}t(_t,"commitAnchorTransaction");function Wt(S){let et=S.anchorMapTransactions.pop(),ut=Object.keys(et);for(let mt=ut.length-1;mt>=0;mt-=1){let ht=et[ut[mt]];if(ht.existed)S.anchorMap[ut[mt]]=ht.value;else delete S.anchorMap[ut[mt]]}}t(Wt,"rollbackAnchorTransaction");function Nt(S){return{position:S.position,line:S.line,lineStart:S.lineStart,lineIndent:S.lineIndent,firstTabInLine:S.firstTabInLine,tag:S.tag,anchor:S.anchor,kind:S.kind,result:S.result}}t(Nt,"snapshotState");function jt(S,et){S.position=et.position,S.line=et.line,S.lineStart=et.lineStart,S.lineIndent=et.lineIndent,S.firstTabInLine=et.firstTabInLine,S.tag=et.tag,S.anchor=et.anchor,S.kind=et.kind,S.result=et.result}t(jt,"restoreState");let Xt={YAML:t(function(et,ut,mt){if(et.version!==null)N(et,"duplication of %YAML directive");if(mt.length!==1)N(et,"YAML directive accepts exactly one argument");let ht=/^([0-9]+)\.([0-9]+)$/.exec(mt[0]);if(ht===null)N(et,"ill-formed argument of the YAML directive");let kt=parseInt(ht[1],10),O=parseInt(ht[2],10);if(kt!==1)N(et,"unacceptable YAML version of the document");if(et.version=mt[0],et.checkLineBreaks=O<2,O!==1&&O!==2)at(et,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:t(function(et,ut,mt){let ht;if(mt.length!==2)N(et,"TAG directive accepts exactly two arguments");let kt=mt[0];if(ht=mt[1],!B.test(kt))N(et,"ill-formed tag handle (first argument) of the TAG directive");if(o.call(et.tagMap,kt))N(et,'there is a previously declared suffix for "'+kt+'" tag handle');if(!_.test(ht))N(et,"ill-formed tag prefix (second argument) of the TAG directive");try{ht=decodeURIComponent(ht)}catch(O){N(et,"tag prefix is malformed: "+ht)}et.tagMap[kt]=ht},"handleTagDirective")};function $t(S,et,ut,mt){if(et<ut){let ht=S.input.slice(et,ut);if(mt)for(let kt=0,O=ht.length;kt<O;kt+=1){let it=ht.charCodeAt(kt);if(!(it===9||it>=32&&it<=1114111))N(S,"expected valid JSON character")}else if(x.test(ht))N(S,"the stream contains non-printable characters");S.result+=ht}}t($t,"captureSegment");function Lt(S,et,ut,mt){if(!r.isObject(ut))N(S,"cannot merge mappings; the provided source object is unacceptable");let ht=Object.keys(ut);for(let kt=0,O=ht.length;kt<O;kt+=1){let it=ht[kt];if(S.maxTotalMergeKeys!==-1&&++S.totalMergeKeys>S.maxTotalMergeKeys)N(S,"merge keys exceeded maxTotalMergeKeys ("+S.maxTotalMergeKeys+")");if(!o.call(et,it))nt(et,it,ut[it]),mt[it]=!0}}t(Lt,"mergeMappings");function Dt(S,et,ut,mt,ht,kt,O,it,xt){if(Array.isArray(ht)){ht=Array.prototype.slice.call(ht);for(let dt=0,pt=ht.length;dt<pt;dt+=1){if(Array.isArray(ht[dt]))N(S,"nested arrays are not supported inside keys");if(typeof ht==="object"&&v(ht[dt])==="[object Object]")ht[dt]="[object Object]"}}if(typeof ht==="object"&&v(ht)==="[object Object]")ht="[object Object]";if(ht=String(ht),et===null)et={};if(mt==="tag:yaml.org,2002:merge")if(Array.isArray(kt))for(let dt=0,pt=kt.length;dt<pt;dt+=1)Lt(S,et,kt[dt],ut);else Lt(S,et,kt,ut);else{if(!S.json&&!o.call(ut,ht)&&o.call(et,ht))S.line=O||S.line,S.lineStart=it||S.lineStart,S.position=xt||S.position,N(S,"duplicated mapping key");nt(et,ht,kt),delete ut[ht]}return et}t(Dt,"storeMappingPair");function zt(S){let et=S.input.charCodeAt(S.position);if(et===10)S.position++;else if(et===13){if(S.position++,S.input.charCodeAt(S.position)===10)S.position++}else N(S,"a line break is expected");S.line+=1,S.lineStart=S.position,S.firstTabInLine=-1}t(zt,"readLineBreak");function Rt(S,et,ut){let mt=0,ht=S.input.charCodeAt(S.position);while(ht!==0){while(I(ht)){if(ht===9&&S.firstTabInLine===-1)S.firstTabInLine=S.position;ht=S.input.charCodeAt(++S.position)}if(et&&ht===35)do ht=S.input.charCodeAt(++S.position);while(ht!==10&&ht!==13&&ht!==0);if(A(ht)){zt(S),ht=S.input.charCodeAt(S.position),mt++,S.lineIndent=0;while(ht===32)S.lineIndent++,ht=S.input.charCodeAt(++S.position)}else break}if(ut!==-1&&mt!==0&&S.lineIndent<ut)at(S,"deficient indentation");return mt}t(Rt,"skipSeparationSpace");function ie(S){let et=S.position,ut=S.input.charCodeAt(et);if((ut===45||ut===46)&&ut===S.input.charCodeAt(et+1)&&ut===S.input.charCodeAt(et+2)){if(et+=3,ut=S.input.charCodeAt(et),ut===0||D(ut))return!0}return!1}t(ie,"testDocumentSeparator");function re(S,et){if(et===1)S.result+=" ";else if(et>1)S.result+=r.repeat(`
|
|
135
|
+
`,et-1)}t(re,"writeFoldedLines");function Ze(S,et,ut){let mt,ht,kt,O,it,xt,{kind:dt,result:pt}=S,bt=S.input.charCodeAt(S.position);if(D(bt)||P(bt)||bt===35||bt===38||bt===42||bt===33||bt===124||bt===62||bt===39||bt===34||bt===37||bt===64||bt===96)return!1;if(bt===63||bt===45){let yt=S.input.charCodeAt(S.position+1);if(D(yt)||ut&&P(yt))return!1}S.kind="scalar",S.result="",mt=ht=S.position,kt=!1;while(bt!==0){if(bt===58){let yt=S.input.charCodeAt(S.position+1);if(D(yt)||ut&&P(yt))break}else if(bt===35){let yt=S.input.charCodeAt(S.position-1);if(D(yt))break}else if(S.position===S.lineStart&&ie(S)||ut&&P(bt))break;else if(A(bt))if(O=S.line,it=S.lineStart,xt=S.lineIndent,Rt(S,!1,-1),S.lineIndent>=et){kt=!0,bt=S.input.charCodeAt(S.position);continue}else{S.position=ht,S.line=O,S.lineStart=it,S.lineIndent=xt;break}if(kt)$t(S,mt,ht,!1),re(S,S.line-O),mt=ht=S.position,kt=!1;if(!I(bt))ht=S.position+1;bt=S.input.charCodeAt(++S.position)}if($t(S,mt,ht,!1),S.result)return!0;return S.kind=dt,S.result=pt,!1}t(Ze,"readPlainScalar");function Ir(S,et){let ut,mt,ht=S.input.charCodeAt(S.position);if(ht!==39)return!1;S.kind="scalar",S.result="",S.position++,ut=mt=S.position;while((ht=S.input.charCodeAt(S.position))!==0)if(ht===39)if($t(S,ut,S.position,!0),ht=S.input.charCodeAt(++S.position),ht===39)ut=S.position,S.position++,mt=S.position;else return!0;else if(A(ht))$t(S,ut,mt,!0),re(S,Rt(S,!1,et)),ut=mt=S.position;else if(S.position===S.lineStart&&ie(S))N(S,"unexpected end of the document within a single quoted scalar");else if(S.position++,!I(ht))mt=S.position;N(S,"unexpected end of the stream within a single quoted scalar")}t(Ir,"readSingleQuotedScalar");function qe(S,et){let ut,mt,ht,kt=S.input.charCodeAt(S.position);if(kt!==34)return!1;S.kind="scalar",S.result="",S.position++,ut=mt=S.position;while((kt=S.input.charCodeAt(S.position))!==0)if(kt===34)return $t(S,ut,S.position,!0),S.position++,!0;else if(kt===92){if($t(S,ut,S.position,!0),kt=S.input.charCodeAt(++S.position),A(kt))Rt(S,!1,et);else if(kt<256&&ot[kt])S.result+=R[kt],S.position++;else if((ht=Z(kt))>0){let O=ht,it=0;for(;O>0;O--)if(kt=S.input.charCodeAt(++S.position),(ht=G(kt))>=0)it=(it<<4)+ht;else N(S,"expected hexadecimal character");S.result+=lt(it),S.position++}else N(S,"unknown escape sequence");ut=mt=S.position}else if(A(kt))$t(S,ut,mt,!0),re(S,Rt(S,!1,et)),ut=mt=S.position;else if(S.position===S.lineStart&&ie(S))N(S,"unexpected end of the document within a double quoted scalar");else if(S.position++,!I(kt))mt=S.position;N(S,"unexpected end of the stream within a double quoted scalar")}t(qe,"readDoubleQuotedScalar");function di(S,et){let ut=!0,mt,ht,kt,O=S.tag,it,xt=S.anchor,dt,pt,bt,yt,Mt=Object.create(null),vt,It,Pt,Kt=S.input.charCodeAt(S.position);if(Kt===91)dt=93,yt=!1,it=[];else if(Kt===123)dt=125,yt=!0,it={};else return!1;if(S.anchor!==null)st(S,S.anchor,it);Kt=S.input.charCodeAt(++S.position);while(Kt!==0){if(Rt(S,!0,et),Kt=S.input.charCodeAt(S.position),Kt===dt)return S.position++,S.tag=O,S.anchor=xt,S.kind=yt?"mapping":"sequence",S.result=it,!0;else if(!ut)N(S,"missed comma between flow collection entries");else if(Kt===44)N(S,"expected the node content, but found ','");if(It=vt=Pt=null,pt=bt=!1,Kt===63){let oe=S.input.charCodeAt(S.position+1);if(D(oe))pt=bt=!0,S.position++,Rt(S,!0,et)}if(mt=S.line,ht=S.lineStart,kt=S.position,Ee(S,et,a,!1,!0),It=S.tag,vt=S.result,Rt(S,!0,et),Kt=S.input.charCodeAt(S.position),(bt||S.line===mt)&&Kt===58)pt=!0,Kt=S.input.charCodeAt(++S.position),Rt(S,!0,et),Ee(S,et,a,!1,!0),Pt=S.result;if(yt)Dt(S,it,Mt,It,vt,Pt,mt,ht,kt);else if(pt)it.push(Dt(S,null,Mt,It,vt,Pt,mt,ht,kt));else it.push(vt);if(Rt(S,!0,et),Kt=S.input.charCodeAt(S.position),Kt===44)ut=!0,Kt=S.input.charCodeAt(++S.position);else ut=!1}N(S,"unexpected end of the stream within a flow collection")}t(di,"readFlowCollection");function fi(S,et){let ut,mt=f,ht=!1,kt=!1,O=et,it=0,xt=!1,dt,pt=S.input.charCodeAt(S.position);if(pt===124)ut=!1;else if(pt===62)ut=!0;else return!1;S.kind="scalar",S.result="";while(pt!==0)if(pt=S.input.charCodeAt(++S.position),pt===43||pt===45)if(f===mt)mt=pt===43?p:u;else N(S,"repeat of a chomping mode identifier");else if((dt=J(pt))>=0)if(dt===0)N(S,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!kt)O=et+dt-1,kt=!0;else N(S,"repeat of an indentation width identifier");else break;if(I(pt)){do pt=S.input.charCodeAt(++S.position);while(I(pt));if(pt===35)do pt=S.input.charCodeAt(++S.position);while(!A(pt)&&pt!==0)}while(pt!==0){zt(S),S.lineIndent=0,pt=S.input.charCodeAt(S.position);while((!kt||S.lineIndent<O)&&pt===32)S.lineIndent++,pt=S.input.charCodeAt(++S.position);if(!kt&&S.lineIndent>O)O=S.lineIndent;if(A(pt)){it++;continue}if(!kt&&O===0)N(S,"missing indentation for block scalar");if(S.lineIndent<O){if(mt===p)S.result+=r.repeat(`
|
|
136
|
+
`,ht?1+it:it);else if(mt===f){if(ht)S.result+=`
|
|
137
|
+
`}break}if(ut)if(I(pt))xt=!0,S.result+=r.repeat(`
|
|
138
|
+
`,ht?1+it:it);else if(xt)xt=!1,S.result+=r.repeat(`
|
|
139
|
+
`,it+1);else if(it===0){if(ht)S.result+=" "}else S.result+=r.repeat(`
|
|
140
|
+
`,it);else S.result+=r.repeat(`
|
|
141
|
+
`,ht?1+it:it);ht=!0,kt=!0,it=0;let bt=S.position;while(!A(pt)&&pt!==0)pt=S.input.charCodeAt(++S.position);$t(S,bt,S.position,!1)}return!0}t(fi,"readBlockScalar");function We(S,et){let{tag:ut,anchor:mt}=S,ht=[],kt=!1;if(S.firstTabInLine!==-1)return!1;if(S.anchor!==null)st(S,S.anchor,ht);let O=S.input.charCodeAt(S.position);while(O!==0){if(S.firstTabInLine!==-1)S.position=S.firstTabInLine,N(S,"tab characters must not be used in indentation");if(O!==45)break;let it=S.input.charCodeAt(S.position+1);if(!D(it))break;if(kt=!0,S.position++,Rt(S,!0,-1)){if(S.lineIndent<=et){ht.push(null),O=S.input.charCodeAt(S.position);continue}}let xt=S.line;if(Ee(S,et,n,!1,!0),ht.push(S.result),Rt(S,!0,-1),O=S.input.charCodeAt(S.position),(S.line===xt||S.lineIndent>et)&&O!==0)N(S,"bad indentation of a sequence entry");else if(S.lineIndent<et)break}if(kt)return S.tag=ut,S.anchor=mt,S.kind="sequence",S.result=ht,!0;return!1}t(We,"readBlockSequence");function Or(S,et,ut){let mt,ht,kt,O,{tag:it,anchor:xt}=S,dt={},pt=Object.create(null),bt=null,yt=null,Mt=null,vt=!1,It=!1;if(S.firstTabInLine!==-1)return!1;if(S.anchor!==null)st(S,S.anchor,dt);let Pt=S.input.charCodeAt(S.position);while(Pt!==0){if(!vt&&S.firstTabInLine!==-1)S.position=S.firstTabInLine,N(S,"tab characters must not be used in indentation");let Kt=S.input.charCodeAt(S.position+1),oe=S.line;if((Pt===63||Pt===58)&&D(Kt)){if(Pt===63){if(vt)Dt(S,dt,pt,bt,yt,null,ht,kt,O),bt=yt=Mt=null;It=!0,vt=!0,mt=!0}else if(vt)vt=!1,mt=!0;else N(S,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");S.position+=1,Pt=Kt}else{if(ht=S.line,kt=S.lineStart,O=S.position,!Ee(S,ut,c,!1,!0))break;if(S.line===oe){Pt=S.input.charCodeAt(S.position);while(I(Pt))Pt=S.input.charCodeAt(++S.position);if(Pt===58){if(Pt=S.input.charCodeAt(++S.position),!D(Pt))N(S,"a whitespace character is expected after the key-value separator within a block mapping");if(vt)Dt(S,dt,pt,bt,yt,null,ht,kt,O),bt=yt=Mt=null;It=!0,vt=!1,mt=!1,bt=S.tag,yt=S.result}else if(It)N(S,"can not read an implicit mapping pair; a colon is missed");else return S.tag=it,S.anchor=xt,!0}else if(It)N(S,"can not read a block mapping entry; a multiline key may not be an implicit key");else return S.tag=it,S.anchor=xt,!0}if(S.line===oe||S.lineIndent>et){if(vt)ht=S.line,kt=S.lineStart,O=S.position;if(Ee(S,et,d,!0,mt))if(vt)yt=S.result;else Mt=S.result;if(!vt)Dt(S,dt,pt,bt,yt,Mt,ht,kt,O),bt=yt=Mt=null;Rt(S,!0,-1),Pt=S.input.charCodeAt(S.position)}if((S.line===oe||S.lineIndent>et)&&Pt!==0)N(S,"bad indentation of a mapping entry");else if(S.lineIndent<et)break}if(vt)Dt(S,dt,pt,bt,yt,null,ht,kt,O);if(It)S.tag=it,S.anchor=xt,S.kind="mapping",S.result=dt;return It}t(Or,"readBlockMapping");function pi(S){let et=!1,ut=!1,mt,ht,kt=S.input.charCodeAt(S.position);if(kt!==33)return!1;if(S.tag!==null)N(S,"duplication of a tag property");if(kt=S.input.charCodeAt(++S.position),kt===60)et=!0,kt=S.input.charCodeAt(++S.position);else if(kt===33)ut=!0,mt="!!",kt=S.input.charCodeAt(++S.position);else mt="!";let O=S.position;if(et){do kt=S.input.charCodeAt(++S.position);while(kt!==0&&kt!==62);if(S.position<S.length)ht=S.input.slice(O,S.position),kt=S.input.charCodeAt(++S.position);else N(S,"unexpected end of the stream within a verbatim tag")}else{while(kt!==0&&!D(kt)){if(kt===33)if(!ut){if(mt=S.input.slice(O-1,S.position+1),!B.test(mt))N(S,"named tag handle cannot contain such characters");ut=!0,O=S.position+1}else N(S,"tag suffix cannot contain exclamation marks");kt=S.input.charCodeAt(++S.position)}if(ht=S.input.slice(O,S.position),T.test(ht))N(S,"tag suffix cannot contain flow indicator characters")}if(ht&&!_.test(ht))N(S,"tag name cannot contain such characters: "+ht);try{ht=decodeURIComponent(ht)}catch(it){N(S,"tag name is malformed: "+ht)}if(et)S.tag=ht;else if(o.call(S.tagMap,mt))S.tag=S.tagMap[mt]+ht;else if(mt==="!")S.tag="!"+ht;else if(mt==="!!")S.tag="tag:yaml.org,2002:"+ht;else N(S,'undeclared tag handle "'+mt+'"');return!0}t(pi,"readTagProperty");function Dr(S){let et=S.input.charCodeAt(S.position);if(et!==38)return!1;if(S.anchor!==null)N(S,"duplication of an anchor property");et=S.input.charCodeAt(++S.position);let ut=S.position;while(et!==0&&!D(et)&&!P(et))et=S.input.charCodeAt(++S.position);if(S.position===ut)N(S,"name of an anchor node must contain at least one character");return S.anchor=S.input.slice(ut,S.position),!0}t(Dr,"readAnchorProperty");function Pr(S){let et=S.input.charCodeAt(S.position);if(et!==42)return!1;et=S.input.charCodeAt(++S.position);let ut=S.position;while(et!==0&&!D(et)&&!P(et))et=S.input.charCodeAt(++S.position);if(S.position===ut)N(S,"name of an alias node must contain at least one character");let mt=S.input.slice(ut,S.position);if(!o.call(S.anchorMap,mt))N(S,'unidentified alias "'+mt+'"');return S.result=S.anchorMap[mt],Rt(S,!0,-1),!0}t(Pr,"readAlias");function gi(S,et,ut,mt){let ht=Nt(S);if(St(S),jt(S,et),S.tag=null,S.anchor=null,S.kind=null,S.result=null,Or(S,ut,mt)&&S.kind==="mapping")return _t(S),!0;return Wt(S),jt(S,ht),!1}t(gi,"tryReadBlockMappingFromProperty");function Ee(S,et,ut,mt,ht){let kt,O,it=1,xt=!1,dt=!1,pt=null,bt,yt,Mt;if(S.depth>=S.maxDepth)N(S,"nesting exceeded maxDepth ("+S.maxDepth+")");if(S.depth+=1,S.listener!==null)S.listener("open",S);S.tag=null,S.anchor=null,S.kind=null,S.result=null;let vt=kt=O=d===ut||n===ut;if(mt){if(Rt(S,!0,-1)){if(xt=!0,S.lineIndent>et)it=1;else if(S.lineIndent===et)it=0;else if(S.lineIndent<et)it=-1}}if(it===1)while(!0){let It=S.input.charCodeAt(S.position),Pt=Nt(S);if(xt&&(It===33&&S.tag!==null||It===38&&S.anchor!==null))break;if(!pi(S)&&!Dr(S))break;if(pt===null)pt=Pt;if(Rt(S,!0,-1)){if(xt=!0,O=vt,S.lineIndent>et)it=1;else if(S.lineIndent===et)it=0;else if(S.lineIndent<et)it=-1}else O=!1}if(O)O=xt||ht;if(it===1||d===ut){if(a===ut||c===ut)yt=et;else yt=et+1;if(Mt=S.position-S.lineStart,it===1)if(O&&(We(S,Mt)||Or(S,Mt,yt))||di(S,yt))dt=!0;else{let It=S.input.charCodeAt(S.position);if(pt!==null&&vt&&!O&&It!==124&&It!==62&&gi(S,pt,pt.position-pt.lineStart,yt))dt=!0;else if(kt&&fi(S,yt)||Ir(S,yt)||qe(S,yt))dt=!0;else if(Pr(S)){if(dt=!0,S.tag!==null||S.anchor!==null)N(S,"alias node should not have any properties")}else if(Ze(S,yt,a===ut)){if(dt=!0,S.tag===null)S.tag="?"}if(S.anchor!==null)st(S,S.anchor,S.result)}else if(it===0)dt=O&&We(S,Mt)}if(S.tag===null){if(S.anchor!==null)st(S,S.anchor,S.result)}else if(S.tag==="?"){if(S.result!==null&&S.kind!=="scalar")N(S,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+S.kind+'"');for(let It=0,Pt=S.implicitTypes.length;It<Pt;It+=1)if(bt=S.implicitTypes[It],bt.resolve(S.result)){if(S.result=bt.construct(S.result),S.tag=bt.tag,S.anchor!==null)st(S,S.anchor,S.result);break}}else if(S.tag!=="!"){if(o.call(S.typeMap[S.kind||"fallback"],S.tag))bt=S.typeMap[S.kind||"fallback"][S.tag];else{bt=null;let It=S.typeMap.multi[S.kind||"fallback"];for(let Pt=0,Kt=It.length;Pt<Kt;Pt+=1)if(S.tag.slice(0,It[Pt].tag.length)===It[Pt].tag){bt=It[Pt];break}}if(!bt)N(S,"unknown tag !<"+S.tag+">");if(S.result!==null&&bt.kind!==S.kind)N(S,"unacceptable node kind for !<"+S.tag+'> tag; it should be "'+bt.kind+'", not "'+S.kind+'"');if(!bt.resolve(S.result,S.tag))N(S,"cannot resolve a node with !<"+S.tag+"> explicit tag");else if(S.result=bt.construct(S.result,S.tag),S.anchor!==null)st(S,S.anchor,S.result)}if(S.listener!==null)S.listener("close",S);return S.depth-=1,S.tag!==null||S.anchor!==null||dt}t(Ee,"composeNode");function mi(S){let et=S.position,ut=!1,mt;S.version=null,S.checkLineBreaks=S.legacy,S.tagMap=Object.create(null),S.anchorMap=Object.create(null);while((mt=S.input.charCodeAt(S.position))!==0){if(Rt(S,!0,-1),mt=S.input.charCodeAt(S.position),S.lineIndent>0||mt!==37)break;ut=!0,mt=S.input.charCodeAt(++S.position);let ht=S.position;while(mt!==0&&!D(mt))mt=S.input.charCodeAt(++S.position);let kt=S.input.slice(ht,S.position),O=[];if(kt.length<1)N(S,"directive name must not be less than one character in length");while(mt!==0){while(I(mt))mt=S.input.charCodeAt(++S.position);if(mt===35){do mt=S.input.charCodeAt(++S.position);while(mt!==0&&!A(mt));break}if(A(mt))break;ht=S.position;while(mt!==0&&!D(mt))mt=S.input.charCodeAt(++S.position);O.push(S.input.slice(ht,S.position))}if(mt!==0)zt(S);if(o.call(Xt,kt))Xt[kt](S,kt,O);else at(S,'unknown document directive "'+kt+'"')}if(Rt(S,!0,-1),S.lineIndent===0&&S.input.charCodeAt(S.position)===45&&S.input.charCodeAt(S.position+1)===45&&S.input.charCodeAt(S.position+2)===45)S.position+=3,Rt(S,!0,-1);else if(ut)N(S,"directives end mark is expected");if(Ee(S,S.lineIndent-1,d,!1,!0),Rt(S,!0,-1),S.checkLineBreaks&&k.test(S.input.slice(et,S.position)))at(S,"non-ASCII line breaks are interpreted as content");if(S.documents.push(S.result),S.position===S.lineStart&&ie(S)){if(S.input.charCodeAt(S.position)===46)S.position+=3,Rt(S,!0,-1);return}if(S.position<S.length-1)N(S,"end of the stream or a document separator is expected")}t(mi,"readDocument");function Rr(S,et){if(S=String(S),et=et||{},S.length!==0){if(S.charCodeAt(S.length-1)!==10&&S.charCodeAt(S.length-1)!==13)S+=`
|
|
142
|
+
`;if(S.charCodeAt(0)===65279)S=S.slice(1)}let ut=new X(S,et),mt=S.indexOf("\x00");if(mt!==-1)ut.position=mt,N(ut,"null byte is not allowed in input");ut.input+="\x00";while(ut.input.charCodeAt(ut.position)===32)ut.lineIndent+=1,ut.position+=1;while(ut.position<ut.length-1)mi(ut);return ut.documents}t(Rr,"loadDocuments");function qr(S,et,ut){if(et!==null&&typeof et==="object"&&typeof ut>"u")ut=et,et=null;let mt=Rr(S,ut);if(typeof et!=="function")return mt;for(let ht=0,kt=mt.length;ht<kt;ht+=1)et(mt[ht])}t(qr,"loadAll2");function yi(S,et){let ut=Rr(S,et);if(ut.length===0)return;else if(ut.length===1)return ut[0];throw new e("expected a single document in the stream, but found more")}return t(yi,"load2"),ws.loadAll=qr,ws.load=yi,ws}t(Xd,"requireLoader");var Rl={},Hd;function Gd(){if(Hd)return Rl;Hd=1;let r=ti(),e=ei(),i=Ss(),s=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,c=9,n=10,d=13,f=32,u=33,p=34,x=35,k=37,T=38,B=39,_=42,v=44,A=45,I=58,D=61,P=62,G=63,Z=64,J=91,rt=93,lt=96,nt=123,ot=124,R=125,X={};X[0]="\\0",X[7]="\\a",X[8]="\\b",X[9]="\\t",X[10]="\\n",X[11]="\\v",X[12]="\\f",X[13]="\\r",X[27]="\\e",X[34]="\\\"",X[92]="\\\\",X[133]="\\N",X[160]="\\_",X[8232]="\\L",X[8233]="\\P";let tt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function at(O,it){if(it===null)return{};let xt={},dt=Object.keys(it);for(let pt=0,bt=dt.length;pt<bt;pt+=1){let yt=dt[pt],Mt=String(it[yt]);if(yt.slice(0,2)==="!!")yt="tag:yaml.org,2002:"+yt.slice(2);let vt=O.compiledTypeMap.fallback[yt];if(vt&&o.call(vt.styleAliases,Mt))Mt=vt.styleAliases[Mt];xt[yt]=Mt}return xt}t(at,"compileStyleMap");function st(O){let it,xt,dt=O.toString(16).toUpperCase();if(O<=255)it="x",xt=2;else if(O<=65535)it="u",xt=4;else if(O<=4294967295)it="U",xt=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+it+r.repeat("0",xt-dt.length)+dt}t(st,"encodeHex");let St=1,_t=2;function Wt(O){this.schema=O.schema||i,this.indent=Math.max(1,O.indent||2),this.noArrayIndent=O.noArrayIndent||!1,this.skipInvalid=O.skipInvalid||!1,this.flowLevel=r.isNothing(O.flowLevel)?-1:O.flowLevel,this.styleMap=at(this.schema,O.styles||null),this.sortKeys=O.sortKeys||!1,this.lineWidth=O.lineWidth||80,this.noRefs=O.noRefs||!1,this.noCompatMode=O.noCompatMode||!1,this.condenseFlow=O.condenseFlow||!1,this.quotingType=O.quotingType==='"'?_t:St,this.forceQuotes=O.forceQuotes||!1,this.replacer=typeof O.replacer==="function"?O.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}t(Wt,"State");function Nt(O,it){let xt=r.repeat(" ",it),dt=0,pt="",bt=O.length;while(dt<bt){let yt,Mt=O.indexOf(`
|
|
143
|
+
`,dt);if(Mt===-1)yt=O.slice(dt),dt=bt;else yt=O.slice(dt,Mt+1),dt=Mt+1;if(yt.length&&yt!==`
|
|
144
|
+
`)pt+=xt;pt+=yt}return pt}t(Nt,"indentString");function jt(O,it){return`
|
|
145
|
+
`+r.repeat(" ",O.indent*it)}t(jt,"generateNextLine");function Xt(O,it){for(let xt=0,dt=O.implicitTypes.length;xt<dt;xt+=1)if(O.implicitTypes[xt].resolve(it))return!0;return!1}t(Xt,"testImplicitResolving");function $t(O){return O===f||O===c}t($t,"isWhitespace");function Lt(O){return O>=32&&O<=126||O>=161&&O<=55295&&O!==8232&&O!==8233||O>=57344&&O<=65533&&O!==a||O>=65536&&O<=1114111}t(Lt,"isPrintable");function Dt(O){return Lt(O)&&O!==a&&O!==d&&O!==n}t(Dt,"isNsCharOrWhitespace");function zt(O,it,xt){let dt=Dt(O),pt=dt&&!$t(O);return(xt?dt:dt&&O!==v&&O!==J&&O!==rt&&O!==nt&&O!==R)&&O!==x&&!(it===I&&!pt)||Dt(it)&&!$t(it)&&O===x||it===I&&pt}t(zt,"isPlainSafe");function Rt(O){return Lt(O)&&O!==a&&!$t(O)&&O!==A&&O!==G&&O!==I&&O!==v&&O!==J&&O!==rt&&O!==nt&&O!==R&&O!==x&&O!==T&&O!==_&&O!==u&&O!==ot&&O!==D&&O!==P&&O!==B&&O!==p&&O!==k&&O!==Z&&O!==lt}t(Rt,"isPlainSafeFirst");function ie(O){return!$t(O)&&O!==I}t(ie,"isPlainSafeLast");function re(O,it){let xt=O.charCodeAt(it),dt;if(xt>=55296&&xt<=56319&&it+1<O.length){if(dt=O.charCodeAt(it+1),dt>=56320&&dt<=57343)return(xt-55296)*1024+dt-56320+65536}return xt}t(re,"codePointAt");function Ze(O){return/^\n* /.test(O)}t(Ze,"needIndentIndicator");let Ir=1,qe=2,di=3,fi=4,We=5;function Or(O,it,xt,dt,pt,bt,yt,Mt){let vt,It=0,Pt=null,Kt=!1,oe=!1,kc=dt!==-1,xi=-1,bi=Rt(re(O,0))&&ie(re(O,O.length-1));if(it||yt)for(vt=0;vt<O.length;It>=65536?vt+=2:vt++){if(It=re(O,vt),!Lt(It))return We;bi=bi&&zt(It,Pt,Mt),Pt=It}else{for(vt=0;vt<O.length;It>=65536?vt+=2:vt++){if(It=re(O,vt),It===n){if(Kt=!0,kc)oe=oe||vt-xi-1>dt&&O[xi+1]!==" ",xi=vt}else if(!Lt(It))return We;bi=bi&&zt(It,Pt,Mt),Pt=It}oe=oe||kc&&(vt-xi-1>dt&&O[xi+1]!==" ")}if(!Kt&&!oe){if(bi&&!yt&&!pt(O))return Ir;return bt===_t?We:qe}if(xt>9&&Ze(O))return We;if(!yt)return oe?fi:di;return bt===_t?We:qe}t(Or,"chooseScalarStyle");function pi(O,it,xt,dt,pt){O.dump=function(){if(it.length===0)return O.quotingType===_t?'""':"''";if(!O.noCompatMode){if(tt.indexOf(it)!==-1||N.test(it))return O.quotingType===_t?'"'+it+'"':"'"+it+"'"}let bt=O.indent*Math.max(1,xt),yt=O.lineWidth===-1?-1:Math.max(Math.min(O.lineWidth,40),O.lineWidth-bt),Mt=dt||O.flowLevel>-1&&xt>=O.flowLevel;function vt(It){return Xt(O,It)}switch(t(vt,"testAmbiguity"),Or(it,Mt,O.indent,yt,vt,O.quotingType,O.forceQuotes&&!dt,pt)){case Ir:return it;case qe:return"'"+it.replace(/'/g,"''")+"'";case di:return"|"+Dr(it,O.indent)+Pr(Nt(it,bt));case fi:return">"+Dr(it,O.indent)+Pr(Nt(gi(it,yt),bt));case We:return'"'+mi(it)+'"';default:throw new e("impossible error: invalid scalar style")}}()}t(pi,"writeScalar");function Dr(O,it){let xt=Ze(O)?String(it):"",dt=O[O.length-1]===`
|
|
146
|
+
`,bt=dt&&(O[O.length-2]===`
|
|
147
|
+
`||O===`
|
|
148
|
+
`)?"+":dt?"":"-";return xt+bt+`
|
|
149
|
+
`}t(Dr,"blockHeader");function Pr(O){return O[O.length-1]===`
|
|
150
|
+
`?O.slice(0,-1):O}t(Pr,"dropEndingNewline");function gi(O,it){let xt=/(\n+)([^\n]*)/g,dt=function(){let Mt=O.indexOf(`
|
|
151
|
+
`);return Mt=Mt!==-1?Mt:O.length,xt.lastIndex=Mt,Ee(O.slice(0,Mt),it)}(),pt=O[0]===`
|
|
152
|
+
`||O[0]===" ",bt,yt;while(yt=xt.exec(O)){let Mt=yt[1],vt=yt[2];bt=vt[0]===" ",dt+=Mt+(!pt&&!bt&&vt!==""?`
|
|
153
|
+
`:"")+Ee(vt,it),pt=bt}return dt}t(gi,"foldString");function Ee(O,it){if(O===""||O[0]===" ")return O;let xt=/ [^ ]/g,dt,pt=0,bt,yt=0,Mt=0,vt="";while(dt=xt.exec(O)){if(Mt=dt.index,Mt-pt>it)bt=yt>pt?yt:Mt,vt+=`
|
|
154
|
+
`+O.slice(pt,bt),pt=bt+1;yt=Mt}if(vt+=`
|
|
155
|
+
`,O.length-pt>it&&yt>pt)vt+=O.slice(pt,yt)+`
|
|
156
|
+
`+O.slice(yt+1);else vt+=O.slice(pt);return vt.slice(1)}t(Ee,"foldLine");function mi(O){let it="",xt=0;for(let dt=0;dt<O.length;xt>=65536?dt+=2:dt++){xt=re(O,dt);let pt=X[xt];if(!pt&&Lt(xt)){if(it+=O[dt],xt>=65536)it+=O[dt+1]}else it+=pt||st(xt)}return it}t(mi,"escapeString");function Rr(O,it,xt){let dt="",pt=O.tag;for(let bt=0,yt=xt.length;bt<yt;bt+=1){let Mt=xt[bt];if(O.replacer)Mt=O.replacer.call(xt,String(bt),Mt);if(ut(O,it,Mt,!1,!1)||typeof Mt>"u"&&ut(O,it,null,!1,!1)){if(dt!=="")dt+=","+(!O.condenseFlow?" ":"");dt+=O.dump}}O.tag=pt,O.dump="["+dt+"]"}t(Rr,"writeFlowSequence");function qr(O,it,xt,dt){let pt="",bt=O.tag;for(let yt=0,Mt=xt.length;yt<Mt;yt+=1){let vt=xt[yt];if(O.replacer)vt=O.replacer.call(xt,String(yt),vt);if(ut(O,it+1,vt,!0,!0,!1,!0)||typeof vt>"u"&&ut(O,it+1,null,!0,!0,!1,!0)){if(!dt||pt!=="")pt+=jt(O,it);if(O.dump&&n===O.dump.charCodeAt(0))pt+="-";else pt+="- ";pt+=O.dump}}O.tag=bt,O.dump=pt||"[]"}t(qr,"writeBlockSequence");function yi(O,it,xt){let dt="",pt=O.tag,bt=Object.keys(xt);for(let yt=0,Mt=bt.length;yt<Mt;yt+=1){let vt="";if(dt!=="")vt+=", ";if(O.condenseFlow)vt+='"';let It=bt[yt],Pt=xt[It];if(O.replacer)Pt=O.replacer.call(xt,It,Pt);if(!ut(O,it,It,!1,!1))continue;if(O.dump.length>1024)vt+="? ";if(vt+=O.dump+(O.condenseFlow?'"':"")+":"+(O.condenseFlow?"":" "),!ut(O,it,Pt,!1,!1))continue;vt+=O.dump,dt+=vt}O.tag=pt,O.dump="{"+dt+"}"}t(yi,"writeFlowMapping");function S(O,it,xt,dt){let pt="",bt=O.tag,yt=Object.keys(xt);if(O.sortKeys===!0)yt.sort();else if(typeof O.sortKeys==="function")yt.sort(O.sortKeys);else if(O.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Mt=0,vt=yt.length;Mt<vt;Mt+=1){let It="";if(!dt||pt!=="")It+=jt(O,it);let Pt=yt[Mt],Kt=xt[Pt];if(O.replacer)Kt=O.replacer.call(xt,Pt,Kt);if(!ut(O,it+1,Pt,!0,!0,!0))continue;let oe=O.tag!==null&&O.tag!=="?"||O.dump&&O.dump.length>1024;if(oe)if(O.dump&&n===O.dump.charCodeAt(0))It+="?";else It+="? ";if(It+=O.dump,oe)It+=jt(O,it);if(!ut(O,it+1,Kt,!0,oe))continue;if(O.dump&&n===O.dump.charCodeAt(0))It+=":";else It+=": ";It+=O.dump,pt+=It}O.tag=bt,O.dump=pt||"{}"}t(S,"writeBlockMapping");function et(O,it,xt){let dt=xt?O.explicitTypes:O.implicitTypes;for(let pt=0,bt=dt.length;pt<bt;pt+=1){let yt=dt[pt];if((yt.instanceOf||yt.predicate)&&(!yt.instanceOf||typeof it==="object"&&it instanceof yt.instanceOf)&&(!yt.predicate||yt.predicate(it))){if(xt)if(yt.multi&&yt.representName)O.tag=yt.representName(it);else O.tag=yt.tag;else O.tag="?";if(yt.represent){let Mt=O.styleMap[yt.tag]||yt.defaultStyle,vt;if(s.call(yt.represent)==="[object Function]")vt=yt.represent(it,Mt);else if(o.call(yt.represent,Mt))vt=yt.represent[Mt](it,Mt);else throw new e("!<"+yt.tag+'> tag resolver accepts not "'+Mt+'" style');O.dump=vt}return!0}}return!1}t(et,"detectType");function ut(O,it,xt,dt,pt,bt,yt){if(O.tag=null,O.dump=xt,!et(O,xt,!1))et(O,xt,!0);let Mt=s.call(O.dump),vt=dt;if(dt)dt=O.flowLevel<0||O.flowLevel>it;let It=Mt==="[object Object]"||Mt==="[object Array]",Pt,Kt;if(It)Pt=O.duplicates.indexOf(xt),Kt=Pt!==-1;if(O.tag!==null&&O.tag!=="?"||Kt||O.indent!==2&&it>0)pt=!1;if(Kt&&O.usedDuplicates[Pt])O.dump="*ref_"+Pt;else{if(It&&Kt&&!O.usedDuplicates[Pt])O.usedDuplicates[Pt]=!0;if(Mt==="[object Object]"){if(dt&&Object.keys(O.dump).length!==0){if(S(O,it,O.dump,pt),Kt)O.dump="&ref_"+Pt+O.dump}else if(yi(O,it,O.dump),Kt)O.dump="&ref_"+Pt+" "+O.dump}else if(Mt==="[object Array]"){if(dt&&O.dump.length!==0){if(O.noArrayIndent&&!yt&&it>0)qr(O,it-1,O.dump,pt);else qr(O,it,O.dump,pt);if(Kt)O.dump="&ref_"+Pt+O.dump}else if(Rr(O,it,O.dump),Kt)O.dump="&ref_"+Pt+" "+O.dump}else if(Mt==="[object String]"){if(O.tag!=="?")pi(O,O.dump,it,bt,vt)}else if(Mt==="[object Undefined]")return!1;else{if(O.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Mt)}if(O.tag!==null&&O.tag!=="?"){let oe=encodeURI(O.tag[0]==="!"?O.tag.slice(1):O.tag).replace(/!/g,"%21");if(O.tag[0]==="!")oe="!"+oe;else if(oe.slice(0,18)==="tag:yaml.org,2002:")oe="!!"+oe.slice(18);else oe="!<"+oe+">";O.dump=oe+" "+O.dump}}return!0}t(ut,"writeNode");function mt(O,it){let xt=[],dt=[];ht(O,xt,dt);let pt=dt.length;for(let bt=0;bt<pt;bt+=1)it.duplicates.push(xt[dt[bt]]);it.usedDuplicates=Array(pt)}t(mt,"getDuplicateReferences");function ht(O,it,xt){if(O!==null&&typeof O==="object"){let dt=it.indexOf(O);if(dt!==-1){if(xt.indexOf(dt)===-1)xt.push(dt)}else if(it.push(O),Array.isArray(O))for(let pt=0,bt=O.length;pt<bt;pt+=1)ht(O[pt],it,xt);else{let pt=Object.keys(O);for(let bt=0,yt=pt.length;bt<yt;bt+=1)ht(O[pt[bt]],it,xt)}}}t(ht,"inspectNode");function kt(O,it){it=it||{};let xt=new Wt(it);if(!xt.noRefs)mt(O,xt);let dt=O;if(xt.replacer)dt=xt.replacer.call({"":dt},"",dt);if(ut(xt,0,dt,!0,!0))return xt.dump+`
|
|
157
|
+
`;return""}return t(kt,"dump2"),Rl.dump=kt,Rl}t(Gd,"requireDumper");var Yd;function Vd(){if(Yd)return be;Yd=1;let r=Xd(),e=Gd();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=ke(),be.Schema=ql(),be.FAILSAFE_SCHEMA=Hl(),be.JSON_SCHEMA=Gl(),be.CORE_SCHEMA=Vl(),be.DEFAULT_SCHEMA=Ss(),be.load=r.load,be.loadAll=r.loadAll,be.dump=e.dump,be.YAMLException=ei(),be.types={binary:Ql(),float:Xl(),map:zl(),null:Yl(),pairs:th(),set:eh(),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(Vd,"requireJsYaml");var XC=Vd(),GC=jd(XC),{Type:r5,Schema:i5,FAILSAFE_SCHEMA:o5,JSON_SCHEMA:yr,CORE_SCHEMA:s5,DEFAULT_SCHEMA:a5,load:vr,loadAll:n5,dump:l5,YAMLException:h5,types:c5,safeLoad:u5,safeLoadAll:d5,safeDump:f5}=GC;var ym=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,k)=>r.append("defs").append("filter").attr("id",p).attr("height",x).attr("width",x).append("feDropShadow").attr("dx",k).attr("dy",k).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 Kd=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"),VC=t((r)=>{if(Array.isArray(r))return r;if(!r)return[];return r.split(";").map((e)=>e.trim()).filter(Boolean)},"normalizeStyleList"),je=t((r)=>{let e=KC([...r.cssCompiledStyles||[],...r.cssStyles||[],...VC(r.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),KC=t((r)=>{let e=new Map;return r.forEach((i)=>{let[s,o]=i.split(":");e.set(s.trim(),o?.trim())}),e},"styles2Map"),Nd=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"),M=t((r)=>{let{stylesArray:e}=je(r),i=[],s=[],o=[],a=[];return e.forEach((c)=>{let n=c[0];if(Nd(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"),Bt=t((r,e)=>{let{themeVariables:i,handDrawnSeed:s}=m(),{nodeBorder:o,mainBkg:a}=i,{stylesMap:c}=je(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:ZC(c.get("stroke-dasharray"))},e)},"userNodeOverrides"),ZC=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 rh=(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&&!Ts(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&&!Ts(n)?null:n}if(i&&s===""){let n={provider:s,prefix:"",name:a};return e&&!Ts(n,i)?null:n}return null},Ts=(r,e)=>{if(!r)return!1;return!!((e&&r.prefix===""||!!r.prefix)&&!!r.name)};var QC=Object.freeze({left:0,top:0,width:16,height:16}),ri=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ih=Object.freeze({...QC,...ri}),Zd=Object.freeze({...ih,body:"",hidden:!1});function Jd(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 oh(r,e){let i=Jd(r,e);for(let s in Zd)if(s in ri){if(s in r&&!(s in i))i[s]=ri[s]}else if(s in e)i[s]=e[s];else if(s in r)i[s]=r[s];return i}function tf(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 ef(r,e,i){let s=r.icons,o=r.aliases||Object.create(null),a={};function c(n){a=oh(s[n]||o[n],a)}return c(e),i.forEach(c),oh(r,a)}function sh(r,e){if(r.icons[e])return ef(r,e,[]);let i=tf(r,[e])[e];return i?ef(r,e,i):null}var JC=Object.freeze({width:null,height:null}),rf=Object.freeze({...JC,...ri});var tb=/(-?[0-9.]*[0-9]+[0-9.]*)/g,eb=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ah(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(tb);if(s===null||!s.length)return r;let o=[],a=s.shift(),c=eb.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 rb(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 ib(r,e){return r?"<defs>"+r+"</defs>"+e:e}function of(r,e,i){let s=rb(r);return ib(s.defs,e+s.content+i)}var ob=(r)=>r==="unset"||r==="undefined"||r==="none";function nh(r,e){let i={...ih,...r},s={...rf,...e},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach((B)=>{let _=[],{hFlip:v,vFlip:A,rotate:I}=B;if(v)if(A)I+=2;else _.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),_.push("scale(-1 1)"),o.top=o.left=0;else if(A)_.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),_.push("scale(1 -1)"),o.top=o.left=0;let D;if(I<0)I-=Math.floor(I/4)*4;switch(I=I%4,I){case 1:D=o.height/2+o.top,_.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:_.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:D=o.width/2+o.left,_.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")")}if(I%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(_.length)a=of(a,'<g transform="'+_.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=ah(p,d/f);else u=c==="auto"?d:c,p=n===null?ah(u,f/d):n==="auto"?f:n;let x={},k=(B,_)=>{if(!ob(_))x[B]=_.toString()};k("width",u),k("height",p);let T=[o.left,o.top,d,f];return x.viewBox=T.join(" "),{attributes:x,viewBox:T,body:a}}var sb=/\sid="(\S+)"/g,sf=new Map;function ab(r){r=r.replace(/[0-9]+$/,"")||"a";let e=sf.get(r)||0;return sf.set(r,e+1),e?`${r}${e}`:r}function lh(r){let e=[],i;while(i=sb.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=ab(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 hh(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 gA={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},ch=new Map,af=new Map,fs=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)af.set(e.name,e.loader);else if("icons"in e)ch.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"),nf=t(async(r,e)=>{let i=rh(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=ch.get(s);if(!o){let c=af.get(s);if(!c)throw Error(`Icon set not found: ${i.prefix}`);try{o={...await c(),prefix:s},ch.set(s,o)}catch(n){throw l.error(n),Error(`Failed to load icon set: ${i.prefix}`)}}let a=sh(o,i.name);if(!a)throw Error(`Icon not found: ${r}`);return a},"getRegisteredIconData"),Bs=t(async(r)=>{try{return await nf(r),!0}catch{return!1}},"isIconAvailable"),xr=t(async(r,e,i)=>{let s;try{s=await nf(r,e?.fallbackPrefix)}catch(c){l.error(c),s=gA}let o=nh(s,e),a=hh(lh(o.body),{...o.attributes,...i});return te(a,C())},"getIconSVG");var Sf=wn(Cl(),1);function Lr(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(Lr.Cache||Map),i}Lr.Cache=Map;function gs(r){return r==null||typeof r!=="object"&&typeof r!=="function"}function Bi(r){if(r==null)return r===void 0?"[object Undefined]":"[object Null]";return Object.prototype.toString.call(r)}var vm="[object RegExp]",Qc="[object String]",Rc="[object Number]",Lc="[object Boolean]",Mc="[object Arguments]",xm="[object Symbol]",km="[object Date]",wm="[object Map]",Cm="[object Set]",Em="[object Array]";var Bm="[object ArrayBuffer]",Im="[object Object]";var _m="[object DataView]",Sm="[object Uint8Array]",Tm="[object Uint8ClampedArray]",Dm="[object Uint16Array]",Nm="[object Uint32Array]";var Qm="[object Int8Array]",Rm="[object Int16Array]",Lm="[object Int32Array]";var Mm="[object Float32Array]",Fm="[object Float64Array]";function ii(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Ii(r){return ii(r)}function ff(){}function pf(r){if(gs(r))return r;if(Array.isArray(r)||ii(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 _s(r){return Object.getOwnPropertySymbols(r).filter((e)=>Object.prototype.propertyIsEnumerable.call(r,e))}var uh=typeof globalThis==="object"&&globalThis||typeof window==="object"&&window||typeof self==="object"&&self||typeof global==="object"&&global||function(){return this}();function Fc(r){return typeof uh.Buffer<"u"&&uh.Buffer.isBuffer(r)}function gf(r){return r==="__proto__"}function vs(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 mf(r,e){return oi(r,void 0,r,new Map,e)}function oi(r,e,i,s=new Map,o=void 0){let a=o?.(r,e,i,s);if(a!==void 0)return a;if(gs(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]=oi(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,oi(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(oi(n,void 0,i,s,o));return c}if(Fc(r))return r.subarray();if(ii(r)){let c=new(Object.getPrototypeOf(r)).constructor(r.length);s.set(r,c);for(let n=0;n<r.length;n++)c[n]=oi(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),Ae(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),Ae(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),Ae(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,Ae(c,r,i,s,o),c}if(r instanceof Boolean){let c=new Boolean(r.valueOf());return s.set(r,c),Ae(c,r,i,s,o),c}if(r instanceof Number){let c=new Number(r.valueOf());return s.set(r,c),Ae(c,r,i,s,o),c}if(r instanceof String){let c=new String(r.valueOf());return s.set(r,c),Ae(c,r,i,s,o),c}if(typeof r==="object"&&Cb(r)){let c=Object.create(Object.getPrototypeOf(r));return s.set(r,c),Ae(c,r,i,s,o),c}return r}function Ae(r,e,i=r,s,o){let a=[...Object.keys(e),..._s(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]=oi(e[n],n,i,s,o)}}function Cb(r){switch(Bi(r)){case Mc:case Em:case Bm:case _m:case Lc:case km:case Mm:case Fm:case Qm:case Rm:case Lm:case wm:case Rc:case Im:case vm:case Cm:case Qc:case xm:case Sm:case Tm:case Dm:case Nm:return!0;default:return!1}}function yf(r,e){return mf(r,(i,s,o,a)=>{let c=e?.(i,s,o,a);if(c!==void 0)return c;if(typeof r!=="object")return;if(Bi(r)==="[object Object]"&&typeof r.constructor!=="function"){let n={};return a.set(r,n),Ae(n,r,o,a),n}switch(Object.prototype.toString.call(r)){case Rc:case Qc:case Lc:{let n=new r.constructor(r?.valueOf());return Ae(n,r),n}case Mc:{let n={};return Ae(n,r),n.length=r.length,n[Symbol.iterator]=r[Symbol.iterator],n}default:return}})}function dh(r){return yf(r)}function Qd(r){return r!==null&&typeof r==="object"&&Bi(r)==="[object Arguments]"}function oo(r){return typeof r==="object"&&r!==null}function xf(r){return Number.isSafeInteger(r)&&r>=0}function Pm(r){return r!=null&&typeof r!=="function"&&xf(r.length)}function Cf(r){return oo(r)&&Pm(r)}function bf(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=Ls(o,c,s,new Map)}return o}function Ls(r,e,i,s){if(gs(r))r=Object(r);if(e==null||typeof e!=="object")return r;if(s.has(e))return pf(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),..._s(e)];for(let a=0;a<o.length;a++){let c=o[a];if(gf(c))continue;let n=e[c],d=r[c];if(Qd(n))n={...n};if(Qd(d))d={...d};if(Fc(n))n=dh(n);if(Array.isArray(n))if(Array.isArray(d)){let u=[],p=Reflect.ownKeys(d);for(let x=0;x<p.length;x++){let k=p[x];u[k]=d[k]}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]=Ls(d,n,i,s);else if(oo(d)&&oo(n)&&(vs(d)||vs(n)||Ii(d)||Ii(n)))r[c]=Ls(d,n,i,s);else if(d==null&&vs(n))r[c]=Ls({},n,i,s);else if(d==null&&Ii(n))r[c]=dh(n);else if(d===void 0||n!==void 0)r[c]=n}return r}function fh(r,...e){return bf(r,...e,ff)}var AA="",bb={curveBasis:_r,curveBasisClosed:ls,curveBasisOpen:hs,curveBumpX:Gi,curveBumpY:Vi,curveBundle:rl,curveCardinalClosed:il,curveCardinalOpen:ol,curveCardinal:Zi,curveCatmullRomClosed:sl,curveCatmullRomOpen:al,curveCatmullRom:Ji,curveLinear:Da,curveLinearClosed:Cs,curveMonotoneX:to,curveMonotoneY:eo,curveNatural:Qr,curveStep:Jr,curveStepAfter:io,curveStepBefore:ro},kb=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wb=t(function(r,e){let i=Tf(r,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(i)){let c=i.map((n)=>n.args);_i(c),s=ct(s,[...c])}else s=i.args;if(!s)return;let o=Ec(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"),Tf=t(function(r,e=null){try{let i=new RegExp(`[%]{2}(?![{]${kb.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=Wr.exec(r))!==null){if(s.index===Wr.lastIndex)Wr.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"),Gh=t(function(r){return r.replace(Wr,"")},"removeDirectives"),Sb=t(function(r,e){for(let[i,s]of e.entries())if(s.match(r))return i;return-1},"isSubstringInArray");function Ms(r,e){if(!r)return e;let i=`curve${r.charAt(0).toUpperCase()+r.slice(1)}`;return bb[i]??e}t(Ms,"interpolateToCurve");function Bf(r,e){let i=r.trim();if(!i)return;if(e.securityLevel!=="loose")return Sf.sanitizeUrl(i);return i}t(Bf,"formatUrl");var Tb=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 ph(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(ph,"distance");function _f(r){let e,i=0;r.forEach((o)=>{i+=ph(o,e),e=o});let s=i/2;return gh(r,s)}t(_f,"traverseEdge");function vf(r){if(r.length===1)return r[0];return _f(r)}t(vf,"calcLabelPosition");var kf=t((r,e=2)=>{let i=Math.pow(10,e);return Math.round(r*i)/i},"roundNumber"),gh=t((r,e)=>{let i=void 0,s=e;for(let o of r){if(i){let a=ph(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:kf((1-c)*i.x+c*o.x,5),y:kf((1-c)*i.y+c*o.y,5)}}}i=o}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),Bb=t((r,e,i)=>{if(l.info(`our points ${JSON.stringify(e)}`),e[0]!==i)e=e.reverse();let o=gh(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 Lf(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=gh(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(Lf,"calcTerminalLabelPosition");function Om(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(Om,"getStylesFromArray");var wf=0,hA=t(()=>(wf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+wf),"generateId");function Ff(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(Ff,"makeRandomHex");var bA=t((r)=>Ff(r.length),"random"),_b=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"),vb=t(function(r,e){let i=e.text.replace(w.lineBreakRegex," "),[,s]=Hn(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"),As=Lr((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=or(`${c} `,i),f=or(a,i);if(d>e){let{hyphenatedStrings:x,remainingWord:k}=Lb(c,e,"-",i);o.push(a,...x),a=k}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}`),Lb=Lr((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(or(f,s)>=e){let p=d+1,x=o.length===p,k=`${f}${i}`;a.push(x?f:k),c=""}else c=f}),{hyphenatedStrings:a,remainingWord:c}},(r,e,i="-",s)=>`${r}${e}${i}${s.fontSize}${s.fontWeight}${s.fontFamily}`);function Rd(r,e){return Ld(r,e).height}t(Rd,"calculateTextHeight");function or(r,e){return Ld(r,e).width}t(or,"calculateTextWidth");var Ld=Lr((r,e)=>{let{fontSize:i=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!r)return{width:0,height:0};let[,a]=Hn(i),c=["sans-serif",s],n=r.split(w.lineBreakRegex),d=[],f=b("body");if(!f.remove)return{width:0,height:0,lineHeight:0};let u=f.append("svg");for(let x of c){let k=0,T={width:0,height:0,lineHeight:0};for(let B of n){let _=_b();_.text=B||AA;let v=vb(u,_).style("font-size",a).style("font-weight",o).style("font-family",x),A=(v._groups||v)[0][0].getBBox();if(A.width===0&&A.height===0)throw Error("svg element not in render tree");T.width=Math.round(Math.max(T.width,A.width)),k=Math.round(A.height),T.height+=k,T.lineHeight=Math.round(Math.max(T.lineHeight,k))}d.push(T)}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}`),Fb=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")}},Fs,Mb=t(function(r){return Fs=Fs||document.createElement("div"),r=escape(r).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Fs.innerHTML=r,unescape(Fs.textContent)},"entityDecode");function $m(r){return"str"in r}t($m,"isDetailedError");var Ab=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"),Hn=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 ue(r,e){return fh({},r,e)}t(ue,"cleanAndMerge");var V={assignWithDepth:ct,wrapLabel:As,calculateTextHeight:Rd,calculateTextWidth:or,calculateTextDimensions:Ld,cleanAndMerge:ue,detectInit:wb,detectDirective:Tf,isSubstringInArray:Sb,interpolateToCurve:Ms,calcLabelPosition:vf,calcCardinalityPosition:Bb,calcTerminalLabelPosition:Lf,formatUrl:Bf,getStylesFromArray:Om,generateId:hA,random:bA,runFunc:Tb,entityDecode:Mb,insertTitle:Ab,isLabelCoordinateInPath:Mf,parseFontSize:Hn,InitIDGenerator:Fb},Hh=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"),co=t(function(r){return r.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Fn=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 ne(r){return r??null}t(ne,"handleUndefinedAttr");function Mf(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(Mf,"isLabelCoordinateInPath");function yh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=yh();function Pf(r){Mr=r}var ho={exec:()=>null};function Qt(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(Be.caret,"$1"),i=i.replace(o,c),s},getRegex:()=>new RegExp(i,e)};return s}var Eb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Be={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")},$b=/^(?:[ \t]*(?:\n|$))+/,Ib=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ob=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,uo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Db=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xh=/(?:[*+-]|\d{1,9}[.)])/,Rf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qf=Qt(Rf).replace(/bull/g,xh).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(),Pb=Qt(Rf).replace(/bull/g,xh).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(),Ch=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Rb=/^[^\n]+/,bh=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qb=Qt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",bh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Wb=Qt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xh).getRegex(),Ds="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",kh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nb=Qt("^ {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",kh).replace("tag",Ds).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Wf=Qt(Ch).replace("hr",uo).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",Ds).getRegex(),zb=Qt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Wf).getRegex(),wh={blockquote:zb,code:Ib,def:qb,fences:Ob,heading:Db,hr:uo,html:Nb,lheading:qf,list:Wb,newline:$b,paragraph:Wf,table:ho,text:Rb},Af=Qt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",uo).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",Ds).getRegex(),Hb={...wh,lheading:Pb,table:Af,paragraph:Qt(Ch).replace("hr",uo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Af).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",Ds).getRegex()},Yb={...wh,html:Qt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",kh).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:ho,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Qt(Ch).replace("hr",uo).replace("heading",` *#{1,6} *[^
|
|
159
|
+
]`).replace("lheading",qf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ub=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Nf=/^( {2,}|\\)\n(?!\s*$)/,Xb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ps=/[\p{P}\p{S}]/u,Sh=/[\s\p{P}\p{S}]/u,zf=/[^\s\p{P}\p{S}]/u,Gb=Qt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Sh).getRegex(),Hf=/(?!~)[\p{P}\p{S}]/u,Vb=/(?!~)[\s\p{P}\p{S}]/u,Kb=/(?:[^\s\p{P}\p{S}]|~)/u,Zb=Qt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Eb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Yf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qb=Qt(Yf,"u").replace(/punct/g,Ps).getRegex(),Jb=Qt(Yf,"u").replace(/punct/g,Hf).getRegex(),jf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tk=Qt(jf,"gu").replace(/notPunctSpace/g,zf).replace(/punctSpace/g,Sh).replace(/punct/g,Ps).getRegex(),ek=Qt(jf,"gu").replace(/notPunctSpace/g,Kb).replace(/punctSpace/g,Vb).replace(/punct/g,Hf).getRegex(),rk=Qt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zf).replace(/punctSpace/g,Sh).replace(/punct/g,Ps).getRegex(),ik=Qt(/\\(punct)/,"gu").replace(/punct/g,Ps).getRegex(),ok=Qt(/^<(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(),sk=Qt(kh).replace("(?:-->|$)","-->").getRegex(),ak=Qt("^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",sk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$s=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,nk=Qt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$s).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Uf=Qt(/^!?\[(label)\]\[(ref)\]/).replace("label",$s).replace("ref",bh).getRegex(),Xf=Qt(/^!?\[(ref)\](?:\[\])?/).replace("ref",bh).getRegex(),lk=Qt("reflink|nolink(?!\\()","g").replace("reflink",Uf).replace("nolink",Xf).getRegex(),Ef=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Th={_backpedal:ho,anyPunctuation:ik,autolink:ok,blockSkip:Zb,br:Nf,code:Ub,del:ho,emStrongLDelim:Qb,emStrongRDelimAst:tk,emStrongRDelimUnd:rk,escape:jb,link:nk,nolink:Xf,punctuation:Gb,reflink:Uf,reflinkSearch:lk,tag:ak,text:Xb,url:ho},hk={...Th,link:Qt(/^!?\[(label)\]\((.*?)\)/).replace("label",$s).getRegex(),reflink:Qt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$s).getRegex()},mh={...Th,emStrongRDelimAst:ek,emStrongLDelim:Jb,url:Qt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ef).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:Qt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ef).getRegex()},ck={...mh,br:Qt(Nf).replace("{2,}","*").getRegex(),text:Qt(mh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Es={normal:wh,gfm:Hb,pedantic:Yb},so={normal:Th,gfm:mh,breaks:ck,pedantic:hk},uk={"&":"&","<":"<",">":">",'"':""","'":"'"},$f=(r)=>uk[r];function Ue(r,e){if(e){if(Be.escapeTest.test(r))return r.replace(Be.escapeReplace,$f)}else if(Be.escapeTestNoEncode.test(r))return r.replace(Be.escapeReplaceNoEncode,$f);return r}function If(r){try{r=encodeURI(r).replace(Be.percentDecode,"%")}catch{return null}return r}function Of(r,e){let i=r.replace(Be.findPipe,(a,c,n)=>{let d=!1,f=c;for(;--f>=0&&n[f]==="\\";)d=!d;return d?"|":" |"}),s=i.split(Be.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(Be.slashPipe,"|");return s}function ao(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 dk(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 Df(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 fk(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 Is=class{options;rules;lexer;constructor(r){this.options=r||Mr}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:ao(i,`
|
|
162
|
+
`)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],s=fk(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=ao(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:ao(e[0],`
|
|
163
|
+
`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=ao(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 k=x,T=k.raw+`
|
|
170
|
+
`+i.join(`
|
|
171
|
+
`),B=this.blockquote(T);a[a.length-1]=B,s=s.substring(0,s.length-k.raw.length)+B.raw,o=o.substring(0,o.length-k.text.length)+B.text;break}else if(x?.type==="list"){let k=x,T=k.raw+`
|
|
172
|
+
`+i.join(`
|
|
173
|
+
`),B=this.list(T);a[a.length-1]=B,s=s.substring(0,s.length-x.raw.length)+B.raw,o=o.substring(0,o.length-k.raw.length)+B.raw,i=T.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,(v)=>" ".repeat(3*v.length)),x=r.split(`
|
|
176
|
+
`,1)[0],k=!p.trim(),T=0;if(this.options.pedantic?(T=2,u=p.trimStart()):k?T=e[1].length+1:(T=e[2].search(this.rules.other.nonSpaceChar),T=T>4?1:T,u=p.slice(T),T+=e[1].length),k&&this.rules.other.blankLine.test(x)&&(f+=x+`
|
|
177
|
+
`,r=r.substring(x.length+1),d=!0),!d){let v=this.rules.other.nextBulletRegex(T),A=this.rules.other.hrRegex(T),I=this.rules.other.fencesBeginRegex(T),D=this.rules.other.headingBeginRegex(T),P=this.rules.other.htmlBeginRegex(T);for(;r;){let G=r.split(`
|
|
178
|
+
`,1)[0],Z;if(x=G,this.options.pedantic?(x=x.replace(this.rules.other.listReplaceNesting," "),Z=x):Z=x.replace(this.rules.other.tabCharGlobal," "),I.test(x)||D.test(x)||P.test(x)||v.test(x)||A.test(x))break;if(Z.search(this.rules.other.nonSpaceChar)>=T||!x.trim())u+=`
|
|
179
|
+
`+Z.slice(T);else{if(k||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||I.test(p)||D.test(p)||A.test(p))break;u+=`
|
|
180
|
+
`+x}!k&&!x.trim()&&(k=!0),f+=G+`
|
|
181
|
+
`,r=r.substring(G.length+1),p=Z.slice(T)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(c=!0));let B=null,_;this.options.gfm&&(B=this.rules.other.listIsTask.exec(u),B&&(_=B[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:f,task:!!B,checked:_,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=Of(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(Of(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=ao(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=dk(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)),Df(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 Df(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 k=p.slice(1,-1);return{type:"em",raw:p,text:k,tokens:this.lexer.inlineTokens(k)}}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}}}},Oe=class r{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mr,this.options.tokenizer=this.options.tokenizer||new Is,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:Be,block:Es.normal,inline:so.normal};this.options.pedantic?(i.block=Es.pedantic,i.inline=so.pedantic):this.options.gfm&&(i.block=Es.gfm,this.options.breaks?i.inline=so.breaks:i.inline=so.gfm),this.tokenizer.rules=i}static get rules(){return{block:Es,inline:so}}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(Be.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(Be.tabCharGlobal," ").replace(Be.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((k)=>{x=k.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}},Os=class{options;parser;constructor(r){this.options=r||Mr}space(r){return""}code({text:r,lang:e,escaped:i}){let s=(e||"").match(Be.notSpaceStart)?.[0],o=r.replace(Be.endingNewline,"")+`
|
|
198
|
+
`;return s?'<pre><code class="language-'+Ue(s)+'">'+(i?o:Ue(o,!0))+`</code></pre>
|
|
199
|
+
`:"<pre><code>"+(i?o:Ue(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+" "+Ue(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>${Ue(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=If(r);if(o===null)return s;r=o;let a='<a href="'+r+'"';return e&&(a+=' title="'+Ue(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=If(r);if(o===null)return Ue(i);r=o;let a=`<img src="${r}" alt="${i}"`;return e&&(a+=` title="${Ue(e)}"`),a+=">",a}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):("escaped"in r)&&r.escaped?r.text:Ue(r.text)}},Bh=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""}},Pe=class r{options;renderer;textRenderer;constructor(e){this.options=e||Mr,this.options.renderer=this.options.renderer||new Os,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bh}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}},no=class{options;block;constructor(r){this.options=r||Mr}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?Oe.lex:Oe.lexInline}provideParser(){return this.block?Pe.parse:Pe.parseInline}},pk=class{defaults=yh();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Pe;Renderer=Os;TextRenderer=Bh;Lexer=Oe;Tokenizer=Is;Hooks=no;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 Os(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 Is(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 no;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];no.passThroughHooks.has(a)?o[c]=(f)=>{if(this.defaults.async&&no.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 Oe.lex(r,e??this.defaults)}parser(r,e){return Pe.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?Oe.lex:Oe.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?Pe.parse:Pe.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?Oe.lex:Oe.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?Pe.parse:Pe.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>"+Ue(i.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(i);throw i}}},Fr=new pk;function Jt(r,e){return Fr.parse(r,e)}Jt.options=Jt.setOptions=function(r){return Fr.setOptions(r),Jt.defaults=Fr.defaults,Pf(Jt.defaults),Jt};Jt.getDefaults=yh;Jt.defaults=Mr;Jt.use=function(...r){return Fr.use(...r),Jt.defaults=Fr.defaults,Pf(Jt.defaults),Jt};Jt.walkTokens=function(r,e){return Fr.walkTokens(r,e)};Jt.parseInline=Fr.parseInline;Jt.Parser=Pe;Jt.parser=Pe.parse;Jt.Renderer=Os;Jt.TextRenderer=Bh;Jt.Lexer=Oe;Jt.lexer=Oe.lex;Jt.Tokenizer=Is;Jt.Hooks=no;Jt.parse=Jt;var{options:pz,setOptions:gz,use:mz,walkTokens:yz,parseInline:xz}=Jt;var Cz=Pe.parse,bz=Oe.lex;function zm(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,k){return k===0?x:"".concat(u).concat(x)}).join(`
|
|
222
|
+
`);c+=p+s[d+1]}),c}var vh=typeof performance<"u"&&typeof performance.now==="function",si=t(()=>vh?performance.now():0,"now"),_h="\uD83E\uDDDC ",gk="Mermaid render",mk="Mermaid",yk={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=si();try{return e()}finally{this.buckets[r]=(this.buckets[r]??0)+(si()-i)}}async tick(r,e){if(!this.enabled)return e();let i=si();try{return await e()}finally{this.buckets[r]=(this.buckets[r]??0)+(si()-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:si(),duration:-1,children:[]},i=this.stack.at(-1);if(i)i.children.push(e);else this.roots.push(e);if(this.stack.push(e),vh&&typeof performance.mark==="function")try{performance.mark(`${_h}${r} ▶`)}catch{}}end(){if(!this.enabled)return;let r=this.stack.pop();if(!r)return;let e=si();if(r.duration=e-r.start,vh&&typeof performance.measure==="function")try{performance.measure(`${_h}${r.name}`,{start:r.start,end:e,detail:{devtools:{dataType:"track-entry",track:gk,trackGroup:mk,color:yk[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((T,B)=>T+B.duration,0),k=n.duration-x;if(k>0.5){let T=k.toFixed(1).padStart(8);o.push(`${T} ${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(`${_h}mermaid render profile · ${s}
|
|
223
|
+
${o.join(`
|
|
224
|
+
`)}`)}};globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Vf(r,{markdownAutoWrap:e}){let s=r.replace(/<br\/>/g,`
|
|
225
|
+
`).replace(/\n{2,}/g,`
|
|
226
|
+
`);return zm(s)}t(Vf,"preprocessMarkdown");function Kf(r){return r.split(/\\n|\n|<br\s*\/?>/gi).map((e)=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((i)=>({content:i,type:"normal"}))??[])}t(Kf,"nonMarkdownToLines");function Um(r,e={}){let i=Vf(r,e),s=Jt.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(Um,"markdownToLines");function Zf(r){if(!r)return"";return`<p>${r.replace(/\\n|\n/g,"<br />")}</p>`}t(Zf,"nonMarkdownToHTML");function Qf(r,{markdownAutoWrap:e}={}){let i=Jt.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(Qf,"markdownToHTML");var xk=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(k){x=k}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),Jf={initialize:t(function(){this._tasks=new Map},"initialize"),mutate:t(function(r,e){return Ah(this,"mutate",r,e)},"mutate"),measure:t(function(r,e){return Ah(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 Ah(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(Ah,"create");var{initialize:Dz,mutate:Pz,measure:Rz,clear:qz}=Jf,Ck=Jf,bk=xk.extend({raf(r){if(typeof queueMicrotask==="function")queueMicrotask(r);else setTimeout(r,0)}}).extend(Ck),lr=bk;function tp(r){if(Intl.Segmenter)return[...new Intl.Segmenter().segment(r)].map((e)=>e.segment);return[...r]}t(tp,"splitTextToChars");function ep(r,e){let i=tp(e.content);return Dh(r,[],i,e.type)}t(ep,"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 rp(r,e){if(r.some(({content:i})=>i.includes(`
|
|
228
|
+
`)))throw Error("splitLineToFitWidth does not support newlines in the line");return Rs(r,e)}t(rp,"splitLineToFitWidth");function Rs(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 Rs(r,e,i,c);if(s.length>0)i.push(s),r.unshift(a);else if(a.content){let[n,d]=ep(e,a);if(i.push([n]),d.content)r.unshift(d)}return Rs(r,e,i)}t(Rs,"splitLineToFitWidthRecursion");function Eh(r,e){if(e)r.attr("style",e)}t(Eh,"applyStyle");var Gf=16384;async function ip(r,e,i,s,o=!1,a=C(),c=0){let n=r.append("foreignObject");n.attr("width",`${Math.min(10*i,Gf)}px`),n.attr("height",`${Math.min(10*i,Gf)}px`);let d=n.append("xhtml:div"),f=Ft(e.label)?await Ic(e.label.replace(w.lineBreakRegex,`
|
|
229
|
+
`),a):te(e.label,a),u=e.isNode?"nodeLabel":"edgeLabel",p=d.append("span");if(p.html(f),Eh(p,e.labelStyle),p.attr("class",`${u} ${s}`),Eh(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 lr.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(ip,"addHtmlSpan");function qs(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(qs,"createTspan");function op(r,e,i){let s=r.append("text"),o=qs(s,1,e);Ws(o,i);let a=o.node().getComputedTextLength();return s.remove(),a}t(op,"computeWidthOfText");function yA(r,e,i){let s=r.append("text"),o=qs(s,1,e);Ws(o,[{content:i,type:"normal"}]);let a=o.node()?.getBoundingClientRect();if(a)s.remove();return a}t(yA,"computeDimensionOfText");function sp(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((k)=>op(c,1.1,k)<=r,"checkWidth"),x=p(u)?[u]:rp(u,p);for(let k of x){let T=qs(d,f,1.1,o);Ws(T,k),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(sp,"createFormattedText");function Ih(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(Ih,"decodeHTMLEntities");function Ws(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(Ih(i.content));else o.text(" "+Ih(i.content))})}t(Ws,"updateTextContentAndStyles");async function ap(r,e={}){let i=[];r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(o,a,c)=>(i.push((async()=>{let n=`${a}:${c}`;if(await Bs(n))return await xr(n,void 0,{class:"label-icon"});else return`<i class='${te(o,e).replace(":"," ")}'></i>`})()),o));let s=await Promise.all(i);return r.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}t(ap,"replaceIconSubstring");var yn=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?Qf(e,p):Zf(e),k=await ap(co(x),p),T=e.replace(/\\\\/g,"\\"),B={isNode:n,label:Ft(e)?T:k,labelStyle:i.replace("fill:","color:")};return await ip(r,B,d,o,u,p,f)}else{let x=co(e.replace(/<br\s*\/?>/g,"<br/>")),k=c?Um(x.replace("<br>","<br/>"),p):Kf(x),T=sp(d,r,k,e?u:!1,!n);if(n){if(/stroke:/.exec(i))i=i.replace("stroke:","lineColor:");let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(T).attr("style",B)}else{let B=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");b(T).select("rect").attr("style",B.replace(/background:/g,"fill:"));let _=i.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");b(T).select("text").attr("style",_)}if(s)b(T).selectAll("tspan.text-outer-tspan").classed("title-row",!0);else b(T).selectAll("tspan.text-outer-tspan").classed("row",!0);return T}},"createText");var Md=new Set(["redux-color","redux-dark-color"]),kk=12,wk=64,Ct=t((r)=>Array.isArray(r)&&r.length>0,"hasPalette"),ft=t((r,e)=>r!=null&&Md.has(r)&&Ct(e),"isColorTheme"),Sk=/^[\w-]+$/,gt=t((r)=>{let e=typeof r==="string"||typeof r==="number"?String(r):"";return Sk.test(e)?e:"classic"},"safeLook"),ca=t((r)=>Ct(r)?r.length:0,"paletteSlotCount"),ir=t((r,e)=>{if(Ct(e))return ca(e);return typeof r==="number"&&Number.isInteger(r)&&r>0&&r<=wk?r:kk},"colorSlotCount"),sr=t((r,e,i,s)=>{if(e===void 0||!ft(i,s))return;let o=e%ca(s);r.attr("data-color-id",`color-${o}`)},"stampColorSlot");function Rh(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 Tk(r,e){return r[0]===e[0]&&r[1]===e[1]}function Bk(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)Rh(f,n,o);let d=function(f,u,p){let x=[];for(let A of f){let I=[...A];Tk(I[0],I[I.length-1])||I.push([I[0][0],I[0][1]]),I.length>2&&x.push(I)}let k=[];u=Math.max(u,0.1);let T=[];for(let A of x)for(let I=0;I<A.length-1;I++){let D=A[I],P=A[I+1];if(D[1]!==P[1]){let G=Math.min(D[1],P[1]);T.push({ymin:G,ymax:Math.max(D[1],P[1]),x:G===D[1]?D[0]:P[0],islope:(P[0]-D[0])/(P[1]-D[1])})}}if(T.sort((A,I)=>A.ymin<I.ymin?-1:A.ymin>I.ymin?1:A.x<I.x?-1:A.x>I.x?1:A.ymax===I.ymax?0:(A.ymax-I.ymax)/Math.abs(A.ymax-I.ymax)),!T.length)return k;let B=[],_=T[0].ymin,v=0;for(;B.length||T.length;){if(T.length){let A=-1;for(let I=0;I<T.length&&!(T[I].ymin>_);I++)A=I;T.splice(0,A+1).forEach((I)=>{B.push({s:_,edge:I})})}if(B=B.filter((A)=>!(A.edge.ymax<=_)),B.sort((A,I)=>A.edge.x===I.edge.x?0:(A.edge.x-I.edge.x)/Math.abs(A.edge.x-I.edge.x)),(p!==1||v%u==0)&&B.length>1)for(let A=0;A<B.length;A+=2){let I=A+1;if(I>=B.length)break;let D=B[A].edge,P=B[I].edge;k.push([[Math.round(D.x),_],[Math.round(P.x),_]])}_+=p,B.forEach((A)=>{A.edge.x=A.edge.x+p*A.edge.islope}),v++}return k}(c,a,s);if(o){for(let f of c)Rh(f,n,-o);(function(f,u,p){let x=[];f.forEach((k)=>x.push(...k)),Rh(x,u,p)})(d,n,-o)}return d}function mo(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),Bk(r,o,s,a||1)}class Vs{constructor(r){this.helper=r}fillPolygons(r,e){return this._fillPolygons(r,e)}_fillPolygons(r,e){let i=mo(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 Ks(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 gp extends Vs{fillPolygons(r,e){let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,0.1);let s=mo(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)Ks([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 mp extends Vs{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 yp{constructor(r){this.helper=r}fillPolygons(r,e){let i=mo(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=Ks(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 k=0;k<f;k++){let T=x+u+k*s,B=p-a+2*Math.random()*a,_=T-a+2*Math.random()*a,v=this.helper.ellipse(B,_,o,o,e);i.push(...v.ops)}}return{type:"fillSketch",ops:i}}}class xp{constructor(r){this.helper=r}fillPolygons(r,e){let i=mo(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=Ks(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 k=x*(i+s),T=k+i,B=[f[0]+k*Math.cos(p)+d*Math.cos(p),f[1]+k*Math.sin(p)+d*Math.sin(p)],_=[f[0]+T*Math.cos(p)+d*Math.cos(p),f[1]+T*Math.sin(p)+d*Math.sin(p)];o.push(...this.helper.doubleLineOps(B[0],B[1],_[0],_[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=mo(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=Ks(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,k=Math.sqrt(2*Math.pow(e,2)),T=[n[0]+p*Math.cos(f),n[1]+p*Math.sin(f)],B=[n[0]+x*Math.cos(f),n[1]+x*Math.sin(f)],_=[T[0]+k*Math.cos(f+Math.PI/4),T[1]+k*Math.sin(f+Math.PI/4)];s.push(...this.helper.doubleLineOps(T[0],T[1],_[0],_[1],i),...this.helper.doubleLineOps(_[0],_[1],B[0],B[1],i))}}),s}}var _e={};class bp{constructor(r){this.seed=r}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}var _k=0,Nh=1,np=2,Ns={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 Yh(r,e){return r.type===e}function tc(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:_k,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:Nh,text:`${parseFloat(RegExp.$1)}`},c=c.substr(RegExp.$1.length)}return n[n.length]={type:np,text:""},n}(r),s="BOD",o=0,a=i[o];for(;!Yh(a,np);){let c=0,n=[];if(s==="BOD"){if(a.text!=="M"&&a.text!=="m")return tc("M0,0"+r);o++,c=Ns[a.text],s=a.text}else Yh(a,Nh)?c=Ns[s]:(o++,c=Ns[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(!Yh(f,Nh))throw Error("Param not a number: "+s+","+f.text);n[n.length]=+f.text}if(typeof Ns[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 kp(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 wp(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,k=0,T=0;i==="Q"||i==="T"?(k=s+(s-n),T=o+(o-d)):(k=s,T=o);let B=s+2*(k-s)/3,_=o+2*(T-o)/3,v=p+2*(k-p)/3,A=x+2*(T-x)/3;e.push({key:"C",data:[B,_,v,A,p,x]}),n=k,d=T,s=p,o=x;break}case"Q":{let[p,x,k,T]=u,B=s+2*(p-s)/3,_=o+2*(x-o)/3,v=k+2*(p-k)/3,A=T+2*(x-T)/3;e.push({key:"C",data:[B,_,v,A,k,T]}),n=p,d=x,s=k,o=T;break}case"A":{let p=Math.abs(u[0]),x=Math.abs(u[1]),k=u[2],T=u[3],B=u[4],_=u[5],v=u[6];if(p===0||x===0)e.push({key:"C",data:[s,o,_,v,_,v]}),s=_,o=v;else if(s!==_||o!==v)Sp(s,o,_,v,p,x,k,T,B).forEach(function(A){e.push({key:"C",data:A})}),s=_,o=v;break}case"Z":e.push({key:"Z",data:[]}),s=a,o=c}i=f}return e}function fo(r,e,i){return[r*Math.cos(i)-e*Math.sin(i),r*Math.sin(i)+e*Math.cos(i)]}function Sp(r,e,i,s,o,a,c,n,d,f){let u=(p=c,Math.PI*p/180);var p;let x=[],k=0,T=0,B=0,_=0;if(f)[k,T,B,_]=f;else{[r,e]=fo(r,e,-u),[i,s]=fo(i,s,-u);let R=(r-i)/2,X=(e-s)/2,tt=R*R/(o*o)+X*X/(a*a);tt>1&&(tt=Math.sqrt(tt),o*=tt,a*=tt);let N=o*o,at=a*a,st=N*at-N*X*X-at*R*R,St=N*X*X+at*R*R,_t=(n===d?-1:1)*Math.sqrt(Math.abs(st/St));B=_t*o*X/a+(r+i)/2,_=_t*-a*R/o+(e+s)/2,k=Math.asin(parseFloat(((e-_)/a).toFixed(9))),T=Math.asin(parseFloat(((s-_)/a).toFixed(9))),r<B&&(k=Math.PI-k),i<B&&(T=Math.PI-T),k<0&&(k=2*Math.PI+k),T<0&&(T=2*Math.PI+T),d&&k>T&&(k-=2*Math.PI),!d&&T>k&&(T-=2*Math.PI)}let v=T-k;if(Math.abs(v)>120*Math.PI/180){let R=T,X=i,tt=s;T=d&&T>k?k+120*Math.PI/180*1:k+120*Math.PI/180*-1,x=Sp(i=B+o*Math.cos(T),s=_+a*Math.sin(T),X,tt,o,a,c,0,d,[T,R,B,_])}v=T-k;let A=Math.cos(k),I=Math.sin(k),D=Math.cos(T),P=Math.sin(T),G=Math.tan(v/4),Z=1.3333333333333333*o*G,J=1.3333333333333333*a*G,rt=[r,e],lt=[r+Z*I,e-J*A],nt=[i+Z*P,s-J*D],ot=[i,s];if(lt[0]=2*rt[0]-lt[0],lt[1]=2*rt[1]-lt[1],f)return[lt,nt,ot].concat(x);{x=[lt,nt,ot].concat(x);let R=[];for(let X=0;X<x.length;X+=3){let tt=fo(x[X][0],x[X][1],u),N=fo(x[X+1][0],x[X+1][1],u),at=fo(x[X+2][0],x[X+2][1],u);R.push([tt[0],tt[1],N[0],N[1],at[0],at[1]])}return R}}var vk={randOffset:function(r,e){return qt(r,e)},randOffsetWithRange:function(r,e,i){return Us(r,e,i)},ellipse:function(r,e,i,s,o){let a=Bp(i,s,o);return Zh(r,e,o,a).opset},doubleLineOps:function(r,e,i,s,o){return Cr(r,e,i,s,o,!0)}};function Tp(r,e,i,s,o){return{type:"path",ops:Cr(r,e,i,s,o)}}function Ys(r,e,i){let s=(r||[]).length;if(s>2){let o=[];for(let a=0;a<s-1;a++)o.push(...Cr(r[a][0],r[a][1],r[a+1][0],r[a+1][1],i));return e&&o.push(...Cr(r[s-1][0],r[s-1][1],r[0][0],r[0][1],i)),{type:"path",ops:o}}return s===2?Tp(r[0][0],r[0][1],r[1][0],r[1][1],i):{type:"path",ops:[]}}function Lk(r,e,i,s,o){return function(a,c){return Ys(a,!0,c)}([[r,e],[r+i,e],[r+i,e+s],[r,e+s]],o)}function lp(r,e){if(r.length){let i=typeof r[0][0]=="number"?[r]:r,s=zs(i[0],1*(1+0.2*e.roughness),e),o=e.disableMultiStroke?[]:zs(i[0],1.5*(1+0.22*e.roughness),up(e));for(let a=1;a<i.length;a++){let c=i[a];if(c.length){let n=zs(c,1*(1+0.2*e.roughness),e),d=e.disableMultiStroke?[]:zs(c,1.5*(1+0.22*e.roughness),up(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 Bp(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+=qt(c*d,i),n+=qt(n*d,i),{increment:a,rx:c,ry:n}}function Zh(r,e,i,s){let[o,a]=dp(s.increment,r,e,s.rx,s.ry,1,s.increment*Us(0.1,Us(0.4,1,i),i),i),c=Xs(o,null,i);if(!i.disableMultiStroke&&i.roughness!==0){let[n]=dp(s.increment,r,e,s.rx,s.ry,1.5,0,i),d=Xs(n,null,i);c=c.concat(d)}return{estimatedPoints:a,opset:{type:"path",ops:c}}}function hp(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+=qt(0.01*p,d),x+=qt(0.01*x,d);let k=o,T=a;for(;k<0;)k+=2*Math.PI,T+=2*Math.PI;T-k>2*Math.PI&&(k=0,T=2*Math.PI);let B=2*Math.PI/d.curveStepCount,_=Math.min(B/2,(T-k)/2),v=fp(_,f,u,p,x,k,T,1,d);if(!d.disableMultiStroke){let A=fp(_,f,u,p,x,k,T,1.5,d);v.push(...A)}return c&&(n?v.push(...Cr(f,u,f+p*Math.cos(k),u+x*Math.sin(k),d),...Cr(f,u,f+p*Math.cos(T),u+x*Math.sin(T),d)):v.push({op:"lineTo",data:[f,u]},{op:"lineTo",data:[f+p*Math.cos(k),u+x*Math.sin(k)]})),{type:"path",ops:v}}function cp(r,e){let i=wp(kp(tc(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(...Cr(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{let[d,f,u,p,x,k]=n;s.push(...Fk(d,f,u,p,x,k,a,e)),a=[x,k];break}case"Z":s.push(...Cr(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:s}}function Xh(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]+qt(o,e),s[0][1]+qt(o,e)]});for(let c=1;c<a;c++)i.push({op:"lineTo",data:[s[c][0]+qt(o,e),s[c][1]+qt(o,e)]})}}return{type:"fillPath",ops:i}}function ai(r,e){return function(i,s){let o=i.fillStyle||"hachure";if(!_e[o])switch(o){case"zigzag":_e[o]||(_e[o]=new gp(s));break;case"cross-hatch":_e[o]||(_e[o]=new mp(s));break;case"dots":_e[o]||(_e[o]=new yp(s));break;case"dashed":_e[o]||(_e[o]=new xp(s));break;case"zigzag-line":_e[o]||(_e[o]=new Cp(s));break;default:o="hachure",_e[o]||(_e[o]=new Vs(s))}return _e[o]}(e,vk).fillPolygons(r,e)}function up(r){let e=Object.assign({},r);return e.randomizer=void 0,r.seed&&(e.seed=r.seed+1),e}function _p(r){return r.randomizer||(r.randomizer=new bp(r.seed||0)),r.randomizer.next()}function Us(r,e,i,s=1){return i.roughness*s*(_p(i)*(e-r)+r)}function qt(r,e,i=1){return Us(-r,r,e,i)}function Cr(r,e,i,s,o,a=!1){let c=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Qh(r,e,i,s,o,!0,!1);if(c)return n;let d=Qh(r,e,i,s,o,!0,!0);return n.concat(d)}function Qh(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*_p(o),k=o.bowing*o.maxRandomnessOffset*(s-e)/200,T=o.bowing*o.maxRandomnessOffset*(r-i)/200;k=qt(k,o,f),T=qt(T,o,f);let B=[],_=()=>qt(p,o,f),v=()=>qt(u,o,f),A=o.preserveVertices;return a&&(c?B.push({op:"move",data:[r+(A?0:_()),e+(A?0:_())]}):B.push({op:"move",data:[r+(A?0:qt(u,o,f)),e+(A?0:qt(u,o,f))]})),c?B.push({op:"bcurveTo",data:[k+r+(i-r)*x+_(),T+e+(s-e)*x+_(),k+r+2*(i-r)*x+_(),T+e+2*(s-e)*x+_(),i+(A?0:_()),s+(A?0:_())]}):B.push({op:"bcurveTo",data:[k+r+(i-r)*x+v(),T+e+(s-e)*x+v(),k+r+2*(i-r)*x+v(),T+e+2*(s-e)*x+v(),i+(A?0:v()),s+(A?0:v())]}),B}function zs(r,e,i){if(!r.length)return[];let s=[];s.push([r[0][0]+qt(e,i),r[0][1]+qt(e,i)]),s.push([r[0][0]+qt(e,i),r[0][1]+qt(e,i)]);for(let o=1;o<r.length;o++)s.push([r[o][0]+qt(e,i),r[o][1]+qt(e,i)]),o===r.length-1&&s.push([r[o][0]+qt(e,i),r[o][1]+qt(e,i)]);return Xs(s,null,i)}function Xs(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]+qt(n,i),e[1]+qt(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(...Qh(r[0][0],r[0][1],r[1][0],r[1][1],i,!0,!0));return o}function dp(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=qt(0.5,n)-Math.PI/2;f.push([qt(a,n)+e+0.9*s*Math.cos(u-r),qt(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 k=[qt(a,n)+e+s*Math.cos(x),qt(a,n)+i+o*Math.sin(x)];d.push(k),f.push(k)}f.push([qt(a,n)+e+s*Math.cos(u+2*Math.PI+0.5*c),qt(a,n)+i+o*Math.sin(u+2*Math.PI+0.5*c)]),f.push([qt(a,n)+e+0.98*s*Math.cos(u+c),qt(a,n)+i+0.98*o*Math.sin(u+c)]),f.push([qt(a,n)+e+0.9*s*Math.cos(u+0.5*c),qt(a,n)+i+0.9*o*Math.sin(u+0.5*c)])}return[f,d]}function fp(r,e,i,s,o,a,c,n,d){let f=a+qt(0.1,d),u=[];u.push([qt(n,d)+e+0.9*s*Math.cos(f-r),qt(n,d)+i+0.9*o*Math.sin(f-r)]);for(let p=f;p<=c;p+=r)u.push([qt(n,d)+e+s*Math.cos(p),qt(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)]),Xs(u,null,d)}function Fk(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 k=0;k<p;k++)k===0?d.push({op:"move",data:[c[0],c[1]]}):d.push({op:"move",data:[c[0]+(x?0:qt(f[0],n)),c[1]+(x?0:qt(f[0],n))]}),u=x?[o,a]:[o+qt(f[k],n),a+qt(f[k],n)],d.push({op:"bcurveTo",data:[r+qt(f[k],n),e+qt(f[k],n),i+qt(f[k],n),s+qt(f[k],n),u[0],u[1]]});return d}function po(r){return[...r]}function pp(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(po(r[0]),po(r[1]),po(r[2]),po(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(po(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 js(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)}function Mk(r,e,i){let s=js(e,i);if(s===0)return js(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)),js(r,Ar(e,i,o))}function Ar(r,e,i){return[r[0]+(e[0]-r[0])*i,r[1]+(e[1]-r[1])*i]}function Jh(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],k=3*u[0]-2*f[0]-x[0];k*=k;let T=3*u[1]-2*f[1]-x[1];T*=T;let B=3*p[0]-2*x[0]-f[0];B*=B;let _=3*p[1]-2*x[1]-f[1];return _*=_,k<B&&(k=B),T<_&&(T=_),k+T}(r,e)<i){let n=r[e+0];if(o.length)(a=o[o.length-1],c=n,Math.sqrt(js(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=Ar(d,f,0.5),k=Ar(f,u,0.5),T=Ar(u,p,0.5),B=Ar(x,k,0.5),_=Ar(k,T,0.5),v=Ar(B,_,0.5);Jh([d,x,B,v],0,i,o),Jh([v,_,T,p],0,i,o)}var a,c;return o}function Ak(r,e){return Gs(r,0,r.length,e)}function Gs(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=Mk(r[u],c,n);p>d&&(d=p,f=u)}return Math.sqrt(d)>s?(Gs(r,e,f+1,s,a),Gs(r,f,i,s,a)):(a.length||a.push(c),a.push(n)),a}function Vh(r,e=0.15,i){let s=[],o=(r.length-1)/3;for(let a=0;a<o;a++)Jh(r,3*a,e,s);return i&&i>0?Gs(s,0,s.length,i):s}var Fe="none";class go{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",[Tp(r,e,i,s,a)],a)}rectangle(r,e,i,s,o){let a=this._o(o),c=[],n=Lk(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(Xh([d],a)):c.push(ai([d],a))}return a.stroke!==Fe&&c.push(n),this._d("rectangle",c,a)}ellipse(r,e,i,s,o){let a=this._o(o),c=[],n=Bp(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(ai([d.estimatedPoints],a));return a.stroke!==Fe&&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",[Ys(r,!1,i)],i)}arc(r,e,i,s,o,a,c=!1,n){let d=this._o(n),f=[],u=hp(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=hp(r,e,i,s,o,a,!0,!1,p);x.type="fillPath",f.push(x)}else f.push(function(p,x,k,T,B,_,v){let A=p,I=x,D=Math.abs(k/2),P=Math.abs(T/2);D+=qt(0.01*D,v),P+=qt(0.01*P,v);let G=B,Z=_;for(;G<0;)G+=2*Math.PI,Z+=2*Math.PI;Z-G>2*Math.PI&&(G=0,Z=2*Math.PI);let J=(Z-G)/v.curveStepCount,rt=[];for(let lt=G;lt<=Z;lt+=J)rt.push([A+D*Math.cos(lt),I+P*Math.sin(lt)]);return rt.push([A+D*Math.cos(Z),I+P*Math.sin(Z)]),rt.push([A,I]),ai([rt],v)}(r,e,i,s,o,a,d));return d.stroke!==Fe&&f.push(u),this._d("arc",f,d)}curve(r,e){let i=this._o(e),s=[],o=lp(r,i);if(i.fill&&i.fill!==Fe)if(i.fillStyle==="solid"){let a=lp(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(...Vh(pp([d[0],d[0],d[1],d[2]]),10,(1+i.roughness)/2)):a.push(...Vh(pp(d),10,(1+i.roughness)/2))}a.length&&s.push(ai([a],i))}return i.stroke!==Fe&&s.push(o),this._d("curve",s,i)}polygon(r,e){let i=this._o(e),s=[],o=Ys(r,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Xh([r],i)):s.push(ai([r],i))),i.stroke!==Fe&&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!==Fe,a=i.stroke!==Fe,c=!!(i.simplification&&i.simplification<1),n=function(f,u,p){let x=wp(kp(tc(f))),k=[],T=[],B=[0,0],_=[],v=()=>{_.length>=4&&T.push(...Vh(_,u)),_=[]},A=()=>{v(),T.length&&(k.push(T),T=[])};for(let{key:D,data:P}of x)switch(D){case"M":A(),B=[P[0],P[1]],T.push(B);break;case"L":v(),T.push([P[0],P[1]]);break;case"C":if(!_.length){let G=T.length?T[T.length-1]:B;_.push([G[0],G[1]])}_.push([P[0],P[1]]),_.push([P[2],P[3]]),_.push([P[4],P[5]]);break;case"Z":v(),T.push([B[0],B[1]])}if(A(),!p)return k;let I=[];for(let D of k){let P=Ak(D,p);P.length&&I.push(P)}return I}(r,1,c?4-4*(i.simplification||1):(1+i.roughness)/2),d=cp(r,i);if(o)if(i.fillStyle==="solid")if(n.length===1){let f=cp(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(Xh(n,i));else s.push(ai(n,i));return a&&(c?n.forEach((f)=>{s.push(Ys(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:Fe};break;case"fillPath":a={d:this.opsToPath(o),stroke:Fe,strokeWidth:0,fill:i.fill||Fe};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||Fe,strokeWidth:i,fill:Fe}}_mergedShape(r){return r.filter((e,i)=>i===0||e.op!=="move")}}class vp{constructor(r,e){this.canvas=r,this.ctx=this.canvas.getContext("2d"),this.gen=new go(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 Hs="http://www.w3.org/2000/svg";class Lp{constructor(r,e){this.svg=r,this.gen=new go(e)}draw(r){let e=r.sets||[],i=r.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Hs,"g"),a=r.options.fixedDecimalPlaceDigits;for(let c of e){let n=null;switch(c.type){case"path":n=s.createElementNS(Hs,"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(Hs,"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(Hs,"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 vp(r,e),svg:(r,e)=>new Lp(r,e),generator:(r)=>new go(r),newSeed:()=>go.newSeed()};var Ek=1,$k=3;async function dc(r){let e=r.getElementsByTagName("img");if(!e||e.length===0)return;let i=!fc(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]=Hn(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(dc,"configureLabelImages");function fc(r){if(r.nodeType===$k)return r.textContent?.trim()!=="";if(r.nodeType!==Ek)return!1;if(r.tagName.toLowerCase()==="img")return!1;return[...r.childNodes].some(fc)}t(fc,"hasTextBesidesImages");var Fp=3,Ik=32,Ok=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",ne(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((v)=>({text:v,cssClass:"c4-descr"}))].filter((v)=>v.text),d=e.width?Math.max(e.width-2*(e.padding??0),Ik):m().flowchart?.wrappingWidth??200,u=s.c4?.wrap??!0?d:Number.POSITIVE_INFINITY,p=await Promise.all(n.map(async(v)=>{let A=a.append("g").attr("class",v.cssClass),I=await yn(A,te(co(v.text??""),s),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:e.labelStyle},s);return b(I).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),b(I).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:A,box:A.node().getBBox()}})),x=Math.max(...p.map(({box:v})=>v.width),0),k=0;for(let{el:v,box:A}of p)v.attr("transform",`translate(${x/2-A.x-A.width/2}, ${k-A.y})`),k+=A.height+Fp;let T=p.length>0?k-Fp:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-x/2}, ${-T/2})`);let B=a.node().getBBox(),_=(e.padding??0)/2;return{shapeSvg:o,bbox:B,halfPadding:_,label:a}},"c4LabelHelper"),Mp=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"),ee=t(async(r,e,i)=>{if(e.stereotype!==void 0)return Ok(r,e,i);let s,o=e.useHtmlLabels||ia(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",ne(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 yn(c,te(co(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,k;if(o){let T=p.children[0],B=b(p);await dc(T),k=await lr.measure(()=>T.getBoundingClientRect()),k=Mp(k,u),B.attr("width",k.width),B.attr("height",k.height)}else k=await lr.measure(()=>p.getBBox()),k=Mp(k,u);if(o)c.attr("transform","translate("+-k.width/2+", "+-k.height/2+")");else c.attr("transform","translate(0, "+-k.height/2+")");if(e.centerLabel)c.attr("transform","translate("+-k.width/2+", "+-k.height/2+")");return c.insert("rect",":first-child"),{shapeSvg:a,bbox:k,halfPadding:x,label:c}},"labelHelper"),$r=t(async(r,e,i)=>{let s=i.useHtmlLabels??nn(m()),o=r.insert("g").attr("class","label").attr("style",i.labelStyle||""),a=await yn(o,te(co(e),m()),{useHtmlLabels:s,width:i.width||m()?.flowchart?.wrappingWidth,style:i.labelStyle,addSvgBackground:!!i.icon||!!i.img}),c=i.padding/2,n;if(nn(m())){let d=a.children[0],f=b(a);n=await lr.measure(()=>d.getBoundingClientRect()),f.attr("width",n.width),f.attr("height",n.height)}else n=await lr.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"),K=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"),At=t((r,e)=>(r.look==="handDrawn"?"rough-node":"node")+" "+r.cssClasses+" "+(e||""),"getNodeClasses");function Zt(r){let e=r.map((i,s)=>`${s===0?"M":"L"}${i.x},${i.y}`);return e.push("Z"),e.join(" ")}t(Zt,"createPathFromPoints");function br(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 k=0;k<=50;k++){let T=k/50,B=r+T*d,_=x+o*Math.sin(p*(B-r));c.push({x:B,y:_})}return c}t(br,"generateFullSineWavePoints");function Ge(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,k=r+i*Math.cos(x),T=e+i*Math.sin(x);c.push({x:-k,y:-T})}return c}t(Ge,"generateCirclePoints");function lc(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(lc,"mergePaths");var Dk=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"),Ve=Dk;function Qp(r,e){return r.intersect(e)}t(Qp,"intersectNode");var Pk=Qp;function Jp(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(Jp,"intersectEllipse");var tg=Jp;function eg(r,e,i){return tg(r,e,e,i)}t(eg,"intersectCircle");var Rk=eg;function rg(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&&hc(n,d))return;let u=s.y-i.y,p=i.x-s.x,x=s.x*i.y-i.x*s.y,k=u*r.x+p*r.y+x,T=u*e.x+p*e.y+x;if(Math.abs(k)<0.000001&&Math.abs(T)<0.000001&&hc(k,T))return;let B=o*p-u*a;if(B===0)return;let _=(a*x-p*c)/B,v=(u*c-o*x)/B;return{x:_,y:v}}}t(rg,"intersectLine");function hc(r,e){return r*e>0}t(hc,"sameSign");var qk=rg;function ig(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],k=qk(r,i,{x:d+p.x,y:f+p.y},{x:d+x.x,y:f+x.y});if(k)a.push(k)}if(!a.length)return r;if(a.length>1)a.sort(function(u,p){let x=u.x-i.x,k=u.y-i.y,T=Math.sqrt(x*x+k*k),B=p.x-i.x,_=p.y-i.y,v=Math.sqrt(B*B+_*_);return T<v?-1:T===v?0:1});return a[0]}t(ig,"intersectPolygon");var Wk=ig,L={node:Pk,circle:Rk,ellipse:tg,polygon:Wk,rect:Ve},ve=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"),Nk=t(async(r,e,i,s=!1,o=!1)=>{let a=e||"";if(typeof a==="object")a=a[0];let c=m(),n=nn(c);return await yn(r,a,{style:i,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},c)},"createLabel"),Re=Nk;function og(r,e){let{labelStyles:i}=M(e);e.labelStyle=i;let s=At(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=Bt(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",ne(n)),K(e,p),e.intersect=function(x){return l.info("Circle intersect",e,c,x),L.circle(e,c,x)},a}t(og,"anchor");function cc(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,k=p/o,T=x/a,B=Math.sqrt(k**2+T**2);if(B>1)throw Error("The given radii are too small to create an arc between the points.");let _=Math.sqrt(1-B**2),v=d+_*a*Math.sin(u)*(c?-1:1),A=f-_*o*Math.cos(u)*(c?-1:1),I=Math.atan2((e-A)/a,(r-v)/o),P=Math.atan2((s-A)/a,(i-v)/o)-I;if(c&&P<0)P+=2*Math.PI;if(!c&&P>0)P-=2*Math.PI;let G=[];for(let Z=0;Z<20;Z++){let J=Z/19,rt=I+J*P,lt=v+o*Math.cos(rt),nt=A+a*Math.sin(rt);G.push({x:lt,y:nt})}return G}t(cc,"generateArcPoints");function sg(r,e,i){let[s,o]=[e,i].sort((a,c)=>c-a);return o*(1-Math.sqrt(1-(r/s/2)**2))}t(sg,"calculateArcSagitta");async function ag(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=e.look==="neo"?16:o,c=e.look==="neo"?12:o,n=t((rt)=>rt+c,"calcTotalHeight"),d=t((rt)=>{let lt=rt/2;return[lt/(2.5+rt/50),lt]},"calcEllipseRadius"),{shapeSvg:f,bbox:u}=await ee(r,e,At(e)),p=n(e?.height?e?.height:u.height),[x,k]=d(p),T=sg(p,x,k),_=(e?.width?e?.width:u.width)+a*2+T-T,v=p,{cssStyles:A}=e,I=[{x:_/2,y:-v/2},{x:-_/2,y:-v/2},...cc(-_/2,-v/2,-_/2,v/2,x,k,!1),{x:_/2,y:v/2},...cc(_/2,v/2,_/2,-v/2,x,k,!0)],D=y.svg(f),P=Bt(e,{});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let G=Zt(I),Z=D.path(G,P),J=f.insert(()=>Z,":first-child");if(J.attr("class","basic label-container outer-path"),A&&e.look!=="handDrawn")J.selectAll("path").attr("style",A);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(${x/2}, 0)`),K(e,J),e.intersect=function(rt){return L.polygon(e,I,rt)},f}t(ag,"bowTieRect");async function ng(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await ee(r,e,At(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),k=-x/2+p,T=x/2,B=u*0.72,_=[`M${-u/2},${k}`,`L${-B/2},${T}`,`A${B/2},${p} 0 0 0 ${B/2},${T}`,`L${u/2},${k}`,`A${u/2},${p} 0 0 0 ${-u/2},${k}`,"Z"].join(" "),{cssStyles:v}=e,A=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let J=y.svg(a).path(_,Bt(e,{}));if(A.node()?.appendChild(J),v)A.attr("style",v)}else A.append("path").attr("d",_).attr("style",o);A.append("ellipse").attr("cx",0).attr("cy",k).attr("rx",u/2).attr("ry",p).attr("style",`fill:none;stroke:${d};stroke-width:1px`),K(e,A);let I=k+(T-k)/2;n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${I-c.height/2-(c.y-(c.top??0))})`);let D=12,P=t((Z,J,rt)=>Array.from({length:D+1},(lt,nt)=>{let ot=Math.PI-nt*Math.PI/D;return{x:Z*Math.cos(ot),y:J+rt*p*Math.sin(ot)}}),"arc"),G=[...P(u/2,k,-1),...P(B/2,T,1).reverse()];return e.intersect=function(Z){return L.polygon(e,G,Z)},a}t(ng,"bucket");var ec=20,rc=8,zk=80,Hk=8;function lg(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:Hk,fill:i,stroke:s,cssClass:"collapsed-group"}}}t(lg,"getCollapsedStyle");async function hg(r,e){let i=lg(e.metadata?.containerType),{fill:s,stroke:o}=i,{nodeStyles:a}=M(e),{shapeSvg:c,bbox:n}=await ee(r,e,At(e)),{theme:d,themeVariables:f}=m();sr(c,e.colorIndex,d,f.borderColorArray);let u=e.padding??8,p=n.height,x=Math.max(n.width+u*2,zk,e?.width??0),k=Math.max(p+rc+ec+u*2,e?.height??0),T=-x/2,B=-k/2,_=-(rc+ec)/2,v=c.select(".label");if(v)if(e.useHtmlLabels??nn(m()))v.attr("transform",`translate(${-n.width/2}, ${-n.height/2+_})`);else v.attr("transform",`translate(0, ${-n.height/2+_})`);let A;if(e.look==="handDrawn"){let Z=y.svg(c),J=Bt(e,{fill:s,stroke:o,...i.strokeWidth===void 0?{}:{strokeWidth:i.strokeWidth},...s==="none"?{fillWeight:0}:{fillStyle:"solid"}}),rt=Z.path(ve(T,B,x,k,i.rx),J);A=c.insert(()=>rt,":first-child"),A.attr("class","basic label-container "+i.cssClass).attr("style",ne(e.cssStyles))}else if(A=c.insert("rect",":first-child"),A.attr("class","basic label-container "+i.cssClass).attr("style",a).attr("rx",i.rx).attr("ry",i.rx).attr("x",T).attr("y",B).attr("width",x).attr("height",k).attr("fill",s).attr("stroke",o),i.strokeWidth!==void 0)A.attr("stroke-width",i.strokeWidth+"px");let I=B+u+p+rc;c.append("line").attr("class","collapsed-separator").attr("x1",T+8).attr("y1",I).attr("x2",T+x-8).attr("y2",I).attr("stroke",o).attr("stroke-dasharray","3, 3");let D=I+ec/2,P=2.5,G=10;for(let Z=-1;Z<=1;Z++)c.append("circle").attr("class","collapsed-indicator").attr("cx",Z*G).attr("cy",D).attr("r",P).attr("fill",o);return K(e,A),e.calcIntersect=function(Z,J){return L.rect(Z,J)},e.intersect=function(Z){return L.rect(e,Z)},c}t(hg,"collapsedGroup");function Ke(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(Ke,"insertPolygonShape");var Yk=["right","left","up","down"],pc="point",jk=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"),Uk=t((r)=>Yk.filter((e)=>r.has(e)).join("|")||pc,"getDirectionKey"),Ap={"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"),[pc]:()=>[{x:0,y:0}]},Xk=t((r,e,i,s)=>{let o=jk(r),a=(i.padding??0)/2,c=e.height+4*a,n=c/2,d=s??e.width+2*n+2*a,f=Uk(o);return(Ap[f]??Ap[pc])({height:c,midpoint:n,padding:a,width:d})},"getArrowPoints");async function cg(r,e){let i=e,{shapeSvg:s,bbox:o}=await ee(r,i,At(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=Xk(i.directions??[],o,i,p),k=Ke(s,p,c,x);return k.attr("style",i.style??null),K(i,k),i.intersect=function(T){return L.polygon(i,x,T)},s}t(cg,"block_arrow");async function ug(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await ee(r,e,At(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),k=Math.max(c.height+f*2+u,e.height??0),T=-k/2,{cssStyles:B}=e,_=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let I=y.svg(a).path(ve(-x/2,T,x,k,p),Bt(e,{}));if(_.node()?.appendChild(I),B)_.attr("style",B)}else _.append("rect").attr("x",-x/2).attr("y",T).attr("width",x).attr("height",k).attr("rx",p).attr("ry",p).attr("style",o);_.append("line").attr("x1",-x/2).attr("y1",T+u).attr("x2",x/2).attr("y2",T+u).attr("style",`stroke:${d};stroke-width:1px`);for(let A=0;A<3;A++)_.append("circle").attr("cx",-x/2+12+A*9).attr("cy",T+u/2).attr("r",2.5).attr("style",`fill:${d};stroke:none`);_.append("rect").attr("class","browser-address-bar").attr("x",-x/2+44).attr("y",T+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`),K(e,_);let v=T+u+(k-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${v-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(A){return L.rect(e,A)},a}t(ug,"browser");var Zs=12;async function dg(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),f=(e?.width??d.width)+(e.look==="neo"?a*2:a+Zs),u=(e?.height??d.height)+(e.look==="neo"?c*2:c),p=0,x=f,k=-u,T=0,B=[{x:p+Zs,y:k},{x,y:k},{x,y:T},{x:p,y:T},{x:p,y:k+Zs},{x:p+Zs,y:k}],_,{cssStyles:v}=e;if(e.look==="handDrawn"){let A=y.svg(n),I=Bt(e,{}),D=Zt(B),P=A.path(D,I);if(_=n.insert(()=>P,":first-child").attr("transform",`translate(${-f/2}, ${u/2})`),v)_.attr("style",v)}else _=Ke(n,f,u,B);if(s)_.attr("style",s);return K(e,_),e.intersect=function(A){return L.polygon(e,B,A)},n}t(dg,"card");function fg(r,e){let{nodeStyles:i}=M(e);e.label="";let s=r.insert("g").attr("class",At(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=Bt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=Zt(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 L.polygon(e,c,x)},s}t(fg,"choice");async function gc(r,e,i){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,halfPadding:n}=await ee(r,e,At(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:k}=e;if(e.look==="handDrawn"){let T=y.svg(a),B=Bt(e,{}),_=T.circle(0,0,p*2,B);x=a.insert(()=>_,":first-child"),x.attr("class","basic label-container").attr("style",ne(k))}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 K(e,x),e.calcIntersect=function(T,B){let _=T.width/2;return L.circle(T,_,B)},e.intersect=function(T){return l.info("Circle intersect",e,p,T),L.circle(e,p,T)},a}t(gc,"circle");async function pg(r,e){let i=e,s=["node",i.cssClasses,i.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:c}=await ee(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),K(i,n),i.intersect=function(k){return L.rect(i,k)},o}t(pg,"composite");async function gg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:c,label:n}=await ee(r,e,At(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),k=Math.max(c.height+f*2+u,e.height??0),T=-k/2,{cssStyles:B}=e,_=a.insert("g",":first-child").attr("class","basic label-container");if(e.look==="handDrawn"){let I=y.svg(a).path(ve(-x/2,T,x,k,p),Bt(e,{}));if(_.node()?.appendChild(I),B)_.attr("style",B)}else _.append("rect").attr("x",-x/2).attr("y",T).attr("width",x).attr("height",k).attr("rx",p).attr("ry",p).attr("style",o);_.append("text").attr("x",-x/2+12).attr("y",T+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${d}`).text(">_"),K(e,_);let v=T+u+(k-u)/2;return n.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${v-c.height/2-(c.y-(c.top??0))})`),e.intersect=function(A){return L.rect(e,A)},a}t(gg,"consoleWindow");function mg(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(mg,"createLine");function yg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i,e.label="";let o=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:c}=e,n=y.svg(o),d=Bt(e,{});if(e.look!=="handDrawn")d.roughness=0,d.fillStyle="solid";let f=n.circle(0,0,a*2,d),u=mg(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 K(e,x),e.intersect=function(k){return l.info("crossedCircle intersect",e,{radius:a,point:k}),L.circle(e,a,k)},o}t(yg,"crossedCircle");function hr(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,k=r+i*Math.cos(x),T=e+i*Math.sin(x);c.push({x:-k,y:-T})}return c}t(hr,"generateCirclePoints");async function xg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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,k=[...hr(f/2,-u/2,p,30,-90,0),{x:-f/2-p,y:p},...hr(f/2+p*2,-p,p,20,-180,-270),...hr(f/2+p*2,p,p,20,-90,-180),{x:-f/2-p,y:-u/2},...hr(f/2,u/2,p,20,0,90)],T=[{x:f/2,y:-u/2-p},{x:-f/2,y:-u/2-p},...hr(f/2,-u/2,p,20,-90,0),{x:-f/2-p,y:-p},...hr(f/2+f*0.1,-p,p,20,-180,-270),...hr(f/2+f*0.1,p,p,20,-90,-180),{x:-f/2-p,y:u/2},...hr(f/2,u/2,p,20,0,90),{x:-f/2,y:u/2+p},{x:f/2,y:u/2+p}],B=y.svg(o),_=Bt(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let A=Zt(k).replace("Z",""),I=B.path(A,_),D=Zt(T),P=B.path(D,{..._}),G=o.insert("g",":first-child");if(G.insert(()=>P,":first-child").attr("stroke-opacity",0),G.insert(()=>I,":first-child"),G.attr("class","text"),x&&e.look!=="handDrawn")G.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.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))})`),K(e,G),e.intersect=function(Z){return L.polygon(e,T,Z)},o}t(xg,"curlyBraceLeft");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,k=r+i*Math.cos(x),T=e+i*Math.sin(x);c.push({x:k,y:T})}return c}t(cr,"generateCirclePoints");async function Cg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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,k=[...cr(f/2,-u/2,p,20,-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)],T=[{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+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),{x:f/2,y:u/2+p},{x:-f/2,y:u/2+p}],B=y.svg(o),_=Bt(e,{fill:"none"});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let A=Zt(k).replace("Z",""),I=B.path(A,_),D=Zt(T),P=B.path(D,{..._}),G=o.insert("g",":first-child");if(G.insert(()=>P,":first-child").attr("stroke-opacity",0),G.insert(()=>I,":first-child"),G.attr("class","text"),x&&e.look!=="handDrawn")G.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")G.selectAll("path").attr("style",s);return G.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))})`),K(e,G),e.intersect=function(Z){return L.polygon(e,T,Z)},o}t(Cg,"curlyBraceRight");function Ce(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,k=r+i*Math.cos(x),T=e+i*Math.sin(x);c.push({x:-k,y:-T})}return c}t(Ce,"generateCirclePoints");async function bg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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,k=[...Ce(f/2,-u/2,p,30,-90,0),{x:-f/2-p,y:p},...Ce(f/2+p*2,-p,p,20,-180,-270),...Ce(f/2+p*2,p,p,20,-90,-180),{x:-f/2-p,y:-u/2},...Ce(f/2,u/2,p,20,0,90)],T=[...Ce(-f/2+p+p/2,-u/2,p,20,-90,-180),{x:f/2-p/2,y:p},...Ce(-f/2-p/2,-p,p,20,0,90),...Ce(-f/2-p/2,p,p,20,-90,0),{x:f/2-p/2,y:-p},...Ce(-f/2+p+p/2,u/2,p,30,-180,-270)],B=[{x:f/2,y:-u/2-p},{x:-f/2,y:-u/2-p},...Ce(f/2,-u/2,p,20,-90,0),{x:-f/2-p,y:-p},...Ce(f/2+p*2,-p,p,20,-180,-270),...Ce(f/2+p*2,p,p,20,-90,-180),{x:-f/2-p,y:u/2},...Ce(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},...Ce(-f/2+p+p/2,-u/2,p,20,-90,-180),{x:f/2-p/2,y:p},...Ce(-f/2-p/2,-p,p,20,0,90),...Ce(-f/2-p/2,p,p,20,-90,0),{x:f/2-p/2,y:-p},...Ce(-f/2+p+p/2,u/2,p,30,-180,-270)],_=y.svg(o),v=Bt(e,{fill:"none"});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let I=Zt(k).replace("Z",""),D=_.path(I,v),G=Zt(T).replace("Z",""),Z=_.path(G,v),J=Zt(B),rt=_.path(J,{...v}),lt=o.insert("g",":first-child");if(lt.insert(()=>rt,":first-child").attr("stroke-opacity",0),lt.insert(()=>D,":first-child"),lt.insert(()=>Z,":first-child"),lt.attr("class","text"),x&&e.look!=="handDrawn")lt.selectAll("path").attr("style",x);if(s&&e.look!=="handDrawn")lt.selectAll("path").attr("style",s);return lt.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))})`),K(e,lt),e.intersect=function(nt){return L.polygon(e,B,nt)},o}t(bg,"curlyBraces");async function kg(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),p=Math.max(d,u.height+c*2,e?.height??0),x=p/2,k=x-Math.sqrt(Math.max(0,x**2-(u.height/2)**2)),T=Math.max(p/4,k),B=Math.max(n,u.width+a*2+T*2,(u.width+a*2)*1.25,e?.width??0),{cssStyles:_}=e,v=y.svg(f),A=Bt(e,{});if(e.look!=="handDrawn")A.roughness=0,A.fillStyle="solid";let I=B,D=p,P=I-x,G=D/4,Z=[{x:P,y:0},{x:G,y:0},{x:0,y:D/2},{x:G,y:D},{x:P,y:D},...Ge(-P,-D/2,x,50,270,90)],J=Zt(Z),rt=v.path(J,A),lt=f.insert(()=>rt,":first-child");if(lt.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")lt.selectChildren("path").attr("style",_);if(s&&e.look!=="handDrawn")lt.selectChildren("path").attr("style",s);return lt.attr("transform",`translate(${-B/2}, ${-p/2})`),K(e,lt),e.intersect=function(nt){return L.polygon(e,Z,nt)},f}t(kg,"curvedTrapezoid");async function wg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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),k=p+2*f-u,T=-k/2,B=T+2*f-u,_=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:v}=e;if(e.look==="handDrawn"){let J=y.svg(o),rt=Bt(e,{}),lt=J.path(ve(-d/2,B,d,p,x),rt),nt=J.circle(0,T+f,f*2,rt);if(_.insert(()=>nt,":first-child"),_.insert(()=>lt,":first-child"),v)_.attr("style",v)}else _.append("rect").attr("x",-d/2).attr("y",B).attr("width",d).attr("height",p).attr("rx",x).attr("ry",x).attr("style",s),_.append("circle").attr("cx",0).attr("cy",T+f).attr("r",f).attr("style",s);K(e,_);let A=B+p/2;c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${A-a.height/2-(a.y-(a.top??0))})`);let I=T+f,D=Math.asin(Math.min(1,(B-I)/f))*180/Math.PI,P=24,Z=[...Ge(0,-I,f,P,180+D,-D),...Ge(-(-d/2+x),-(B+x),x,12,90,0),...Ge(-(-d/2+x),-(k/2-x),x,12,360,270),...Ge(-(d/2-x),-(k/2-x),x,12,270,180),...Ge(-(d/2-x),-(B+x),x,12,180,90)];return e.intersect=function(J){return L.polygon(e,Z,J)},o}t(wg,"person");var Gk=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"),Vk=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"),Kk=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Ep=8,$p=8;async function Sg(r,e){let{labelStyles:i,nodeStyles:s}=M(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<$p)e.width=$p}if(e.height){let A=n/2/(2.5+n/50);if(e.height=e.height-a-A*3,e.height<Ep)e.height=Ep}let{shapeSvg:d,bbox:f,label:u}=await ee(r,e,At(e)),p=Math.max(e.width??0,f.width)+c,x=p/2,k=x/(2.5+p/50),T=Math.max(e.height??0,f.height)+a+k,B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(d),A=Vk(0,0,p,T,x,k),I=Kk(0,k,p,T,x,k),D=Bt(e,{}),P=v.path(A,D),G=v.path(I,Bt(e,{fill:"none"}));if(B=d.insert(()=>G,":first-child"),B=d.insert(()=>P,":first-child"),B.attr("class","basic label-container"),_)B.attr("style",_)}else{let v=Gk(0,0,p,T,x,k);B=d.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",ne(_)).attr("style",s)}return B.attr("label-offset-y",k),B.attr("transform",`translate(${-p/2}, ${-(T/2+k)})`),K(e,B),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(v){let A=L.rect(e,v),I=A.x-(e.x??0);if(x!=0&&(Math.abs(I)<(e.width??0)/2||Math.abs(I)==(e.width??0)/2&&Math.abs(A.y-(e.y??0))>(e.height??0)/2-k)){let D=k*k*(1-I*I/(x*x));if(D>0)D=Math.sqrt(D);if(D=k-D,v.y-(e.y??0)>0)D=-D;A.y+=D}return A},d}t(Sg,"cylinder");async function ui(r,e,i){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let{shapeSvg:a,bbox:c}=await ee(r,e,At(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:k}=e,{cssStyles:T}=e;if(i?.rx&&i.ry)x=i.rx,k=i.ry;if(e.look==="handDrawn"){let B=y.svg(a),_=Bt(e,{}),v=x||k?B.path(ve(f,u,n,d,x||0),_):B.rectangle(f,u,n,d,_);p=a.insert(()=>v,":first-child"),p.attr("class","basic label-container").attr("style",ne(T))}else p=a.insert("rect",":first-child"),p.attr("class","basic label-container").attr("style",o).attr("rx",ne(x)).attr("ry",ne(k)).attr("x",f).attr("y",u).attr("width",n).attr("height",d);return K(e,p,e.look==="handDrawn"?void 0:{width:n,height:d}),e.calcIntersect=function(B,_){return L.rect(B,_)},e.intersect=function(B){return L.rect(e,B)},a}t(ui,"drawRect");async function Tg(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 ui(r,e,d);if(e.look==="handDrawn"){let k=y.svg(f),T=Bt(e,{}),B=f.select(".basic.label-container > path:nth-child(2)"),_=B.node();if(!_)return f;let v=null;if(_ instanceof SVGGraphicsElement)v=_.getBBox();else return f;return f.insert(()=>k.line(v.x,v.y,v.x+v.width,v.y,T),".basic.label-container g.label"),f.insert(()=>k.line(v.x,v.y+v.height,v.x+v.width,v.y+v.height,T),".basic.label-container g.label"),B.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(Tg,"datastore");async function Bg(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),f=n.width+o,u=n.height+a,p=u*0.2,x=-f/2,k=-u/2-p/2,{cssStyles:T}=e,B=y.svg(c),_=Bt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x,y:k+p},{x:-x,y:k+p},{x:-x,y:-k},{x,y:-k},{x,y:k},{x:-x,y:k},{x:-x,y:k+p}],A=B.polygon(v.map((D)=>[D.x,D.y]),_),I=c.insert(()=>A,":first-child");if(I.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")I.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return d.attr("transform",`translate(${x+(e.padding??0)/2-(n.x-(n.left??0))}, ${k+p+(e.padding??0)/2-(n.y-(n.top??0))})`),K(e,I),e.intersect=function(D){return L.rect(e,D)},c}t(Bg,"dividedRectangle");async function _g(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(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:k}=e;if(e.look==="handDrawn"){let T=y.svg(n),B=Bt(e,{roughness:0.2,strokeWidth:2.5}),_=Bt(e,{roughness:0.2,strokeWidth:1.5}),v=T.circle(0,0,p*2,B),A=T.circle(0,0,u*2,_);x=n.insert("g",":first-child"),x.attr("class",ne(e.cssClasses)).attr("style",ne(k)),x.node()?.appendChild(v),x.node()?.appendChild(A)}else{x=n.insert("g",":first-child");let T=x.insert("circle",":first-child"),B=x.insert("circle");x.attr("class","basic label-container").attr("style",s),T.attr("class","outer-circle").attr("style",s).attr("r",p).attr("cx",0).attr("cy",0),B.attr("class","inner-circle").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0)}return K(e,x),e.intersect=function(T){return l.info("DoubleCircle intersect",e,p,T),L.circle(e,p,T)},n}t(_g,"doublecircle");async function vg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c}=await ee(r,e,At(e)),{theme:n,themeVariables:d}=m();sr(o,e.colorIndex,n,d.borderColorArray);let f=c??10,u=a.width/2+f*2,p=a.height/2+f*2,x,{cssStyles:k}=e;if(e.look==="handDrawn"){let T=y.svg(o),B=Bt(e,{}),_=T.ellipse(0,0,u*2,p*2,B);if(x=o.insert(()=>_,":first-child"),x.attr("class","basic label-container"),k)x.attr("style",k)}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,K(e,x),e.calcIntersect=function(T,B){let _=T.width/2,v=T.height/2;return L.ellipse(T,_,v,B)},e.intersect=function(T){return L.ellipse(e,u,p,T)},o}t(vg,"usecaseEllipse");function Lg(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);e.label="",e.labelStyle=s;let a=r.insert("g").attr("class",At(e)).attr("id",e.domId??e.id),c=7,{cssStyles:n}=e,d=y.svg(a),{nodeBorder:f}=i,u=Bt(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 K(e,x),e.intersect=function(k){return l.info("filledCircle intersect",e,{radius:c,point:k}),L.circle(e,c,k)},a}t(Lg,"filledCircle");var Ip=10,Op=10;async function Fg(r,e){let{labelStyles:i,nodeStyles:s}=M(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<Ip)e.height=Ip;if(e.width=(e?.width??0)-a-a/2,e.width<Op)e.width=Op}let{shapeSvg:c,bbox:n,label:d}=await ee(r,e,At(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:k}=e,T=y.svg(c),B=Bt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=Zt(x),v=T.path(_,B),A=c.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");if(k&&e.look!=="handDrawn")A.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")A.selectChildren("path").attr("style",s);return e.width=f,e.height=u,K(e,A),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(I){return l.info("Triangle intersect",e,x,I),L.polygon(e,x,I)},c}t(Fg,"flippedTriangle");async function Mg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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,k=Math.max(d*0.38,28),T=-p/2,B=[{x:-d/2,y:T},{x:-d/2+k,y:T},{x:-d/2+k,y:T+u},{x:d/2,y:T+u},{x:d/2,y:p/2},{x:-d/2,y:p/2}],_=[`M${B[0].x},${B[0].y}`,...B.slice(1).map((D)=>`L${D.x},${D.y}`),"Z"].join(" "),{cssStyles:v}=e,A;if(e.look==="handDrawn"){let P=y.svg(o).path(_,Bt(e,{}));if(A=o.insert(()=>P,":first-child").attr("class","basic label-container"),v)A.attr("style",v)}else A=o.insert("path",":first-child").attr("d",_).attr("class","basic label-container").attr("style",s);if(e.look==="handDrawn")K(e,A);else K(e,A,{width:d,height:p});let I=T+u+x/2;return c.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${I-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(D){return L.polygon(e,B,D)},o}t(Mg,"folder");function Ag(r,e,{dir:i,config:{state:s,themeVariables:o}}){let{nodeStyles:a}=M(e);e.label="";let c=r.insert("g").attr("class",At(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),k=Bt(e,{stroke:o.lineColor,fill:o.lineColor});if(e.look!=="handDrawn")k.roughness=0,k.fillStyle="solid";let T=x.rectangle(u,p,d,f,k),B=c.insert(()=>T,":first-child");if(n&&e.look!=="handDrawn")B.selectAll("path").attr("style",n);if(a&&e.look!=="handDrawn")B.selectAll("path").attr("style",a);K(e,B);let _=s?.padding??0;if(e.width&&e.height)e.width+=_/2||0,e.height+=_/2||0;return e.intersect=function(v){return L.rect(e,v)},c}t(Ag,"forkJoin");async function Eg(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(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)),k=(e?.width?e?.width:Math.max(o,f.width)+x*2)+c*2,{cssStyles:T}=e,B=y.svg(d),_=Bt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:-k/2,y:-u/2},{x:k/2-p,y:-u/2},...Ge(-k/2+p,0,p,50,90,270),{x:k/2-p,y:u/2},{x:-k/2,y:u/2}],A=Zt(v),I=B.path(A,_),D=d.insert(()=>I,":first-child");if(D.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")D.selectChildren("path").attr("style",T);if(s&&e.look!=="handDrawn")D.selectChildren("path").attr("style",s);return K(e,D),e.intersect=function(P){return l.info("Pill intersect",e,{radius:p,point:P}),L.polygon(e,v,P)},d}t(Eg,"halfRoundedRectangle");var Zk=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 $g(r,e){let{labelStyles:i,nodeStyles:s}=M(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 I=(e.height??0)/o;e.width=(e?.width??0)-2*I-f,e.height=(e.height??0)-d}let{shapeSvg:u,bbox:p}=await ee(r,e,At(e)),x=(e?.height?e?.height:p.height)+d,k=x/o,T=(e?.width?e?.width:p.width)+2*k+f,B=[{x:k,y:0},{x:T-k,y:0},{x:T,y:-x/2},{x:T-k,y:-x},{x:k,y:-x},{x:0,y:-x/2}],_,{cssStyles:v}=e;if(e.look==="handDrawn"){let A=y.svg(u),I=Bt(e,{}),D=Zk(0,0,T,x,k),P=A.path(D,I);if(_=u.insert(()=>P,":first-child").attr("transform",`translate(${-T/2}, ${x/2})`),v)_.attr("style",v)}else _=Ke(u,T,x,B);if(s)_.attr("style",s);return e.width=T,e.height=x,K(e,_),e.intersect=function(A){return L.polygon(e,B,A)},u}t($g,"hexagon");async function Ig(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.label="",e.labelStyle=i;let{shapeSvg:o}=await ee(r,e,At(e)),a=Math.max(30,e?.width??0),c=Math.max(30,e?.height??0),{cssStyles:n}=e,d=y.svg(o),f=Bt(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=Zt(u),x=d.path(p,f),k=o.insert(()=>x,":first-child");if(k.attr("class","basic label-container outer-path"),n&&e.look!=="handDrawn")k.selectChildren("path").attr("style",n);if(s&&e.look!=="handDrawn")k.selectChildren("path").attr("style",s);return k.attr("transform",`translate(${-a/2}, ${-c/2})`),K(e,k),e.intersect=function(T){return l.info("Pill intersect",e,{points:u}),L.polygon(e,u,T)},o}t(Ig,"hourglass");async function Og(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(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 ee(r,e,"icon-shape default"),x=e.pos==="t",k=n,T=n,{nodeBorder:B}=i,{stylesMap:_}=je(e),v=-T/2,A=-k/2,I=e.label?8:0,D=y.svg(f),P=Bt(e,{stroke:"none",fill:"none"});if(e.look!=="handDrawn")P.roughness=0,P.fillStyle="solid";let G=D.rectangle(v,A,T,k,P),Z=Math.max(T,u.width),J=k+u.height+I,rt=D.rectangle(-Z/2,-J/2,Z,J,{...P,fill:"transparent",stroke:"none"}),lt=f.insert(()=>G,":first-child"),nt=f.insert(()=>rt);if(e.icon){let ot=f.append("g");ot.html(`<g>${await xr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let R=ot.node().getBBox(),{width:X,height:tt,x:N,y:at}=R;ot.attr("transform",`translate(${-X/2-N},${x?u.height/2+I/2-tt/2-at:-u.height/2-I/2-tt/2-at})`),ot.attr("style",`color: ${_.get("stroke")??B};`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${x?-J/2:J/2-u.height})`),lt.attr("transform",`translate(0,${x?u.height/2+I/2:-u.height/2-I/2})`),K(e,nt),e.intersect=function(ot){if(l.info("iconSquare intersect",e,ot),!e.label)return L.rect(e,ot);let R=e.x??0,X=e.y??0,tt=e.height??0,N=[];if(x)N=[{x:R-u.width/2,y:X-tt/2},{x:R+u.width/2,y:X-tt/2},{x:R+u.width/2,y:X-tt/2+u.height+I},{x:R+T/2,y:X-tt/2+u.height+I},{x:R+T/2,y:X+tt/2},{x:R-T/2,y:X+tt/2},{x:R-T/2,y:X-tt/2+u.height+I},{x:R-u.width/2,y:X-tt/2+u.height+I}];else N=[{x:R-T/2,y:X-tt/2},{x:R+T/2,y:X-tt/2},{x:R+T/2,y:X-tt/2+k},{x:R+u.width/2,y:X-tt/2+k},{x:R+u.width/2/2,y:X+tt/2},{x:R-u.width/2,y:X+tt/2},{x:R-u.width/2,y:X-tt/2+k},{x:R-T/2,y:X-tt/2+k}];return L.polygon(e,N,ot)},f}t(Og,"icon");async function Dg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(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 ee(r,e,"icon-shape default"),x=20,k=e.label?8:0,T=e.pos==="t",{nodeBorder:B,mainBkg:_}=i,{stylesMap:v}=je(e),A=y.svg(f),I=Bt(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let D=v.get("fill");I.stroke=D??_;let P=f.append("g");if(e.icon)P.html(`<g>${await xr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let G=P.node().getBBox(),{width:Z,height:J,x:rt,y:lt}=G,nt=Math.max(Z,J)*Math.SQRT2+x*2,ot=A.circle(0,0,nt,I),R=Math.max(nt,u.width),X=nt+u.height+k,tt=A.rectangle(-R/2,-X/2,R,X,{...I,fill:"transparent",stroke:"none"}),N=f.insert(()=>ot,":first-child"),at=f.insert(()=>tt);return P.attr("transform",`translate(${-Z/2-rt},${T?u.height/2+k/2-J/2-lt:-u.height/2-k/2-J/2-lt})`),P.attr("style",`color: ${v.get("stroke")??B};`),p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${T?-X/2:X/2-u.height})`),N.attr("transform",`translate(0,${T?u.height/2+k/2:-u.height/2-k/2})`),K(e,at),e.intersect=function(st){return l.info("iconSquare intersect",e,st),L.rect(e,st)},f}t(Dg,"iconCircle");async function Pg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(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 ee(r,e,"icon-shape default"),k=e.pos==="t",T=n+p*2,B=n+p*2,{nodeBorder:_,mainBkg:v}=i,{stylesMap:A}=je(e),I=-B/2,D=-T/2,P=e.label?8:0,G=y.svg(f),Z=Bt(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let J=A.get("fill");Z.stroke=J??v;let rt=G.path(ve(I,D,B,T,5),Z),lt=Math.max(B,u.width),nt=T+u.height+P,ot=G.rectangle(-lt/2,-nt/2,lt,nt,{...Z,fill:"transparent",stroke:"none"}),R=f.insert(()=>rt,":first-child").attr("class","icon-shape2"),X=f.insert(()=>ot);if(e.icon){let tt=f.append("g");tt.html(`<g>${await xr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=tt.node().getBBox(),{width:at,height:st,x:St,y:_t}=N;tt.attr("transform",`translate(${-at/2-St},${k?u.height/2+P/2-st/2-_t:-u.height/2-P/2-st/2-_t})`),tt.attr("style",`color: ${A.get("stroke")??_};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${k?-nt/2:nt/2-u.height})`),R.attr("transform",`translate(0,${k?u.height/2+P/2:-u.height/2-P/2})`),K(e,X),e.intersect=function(tt){if(l.info("iconSquare intersect",e,tt),!e.label)return L.rect(e,tt);let N=e.x??0,at=e.y??0,st=e.height??0,St=[];if(k)St=[{x:N-u.width/2,y:at-st/2},{x:N+u.width/2,y:at-st/2},{x:N+u.width/2,y:at-st/2+u.height+P},{x:N+B/2,y:at-st/2+u.height+P},{x:N+B/2,y:at+st/2},{x:N-B/2,y:at+st/2},{x:N-B/2,y:at-st/2+u.height+P},{x:N-u.width/2,y:at-st/2+u.height+P}];else St=[{x:N-B/2,y:at-st/2},{x:N+B/2,y:at-st/2},{x:N+B/2,y:at-st/2+T},{x:N+u.width/2,y:at-st/2+T},{x:N+u.width/2/2,y:at+st/2},{x:N-u.width/2,y:at+st/2},{x:N-u.width/2,y:at-st/2+T},{x:N-B/2,y:at-st/2+T}];return L.polygon(e,St,tt)},f}t(Pg,"iconRounded");async function Rg(r,e,{config:{themeVariables:i,flowchart:s}}){let{labelStyles:o}=M(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 ee(r,e,"icon-shape default"),k=e.pos==="t",T=n+p*2,B=n+p*2,{nodeBorder:_,mainBkg:v}=i,{stylesMap:A}=je(e),I=-B/2,D=-T/2,P=e.label?8:0,G=y.svg(f),Z=Bt(e,{});if(e.look!=="handDrawn")Z.roughness=0,Z.fillStyle="solid";let J=A.get("fill");Z.stroke=J??v;let rt=G.path(ve(I,D,B,T,0.1),Z),lt=Math.max(B,u.width),nt=T+u.height+P,ot=G.rectangle(-lt/2,-nt/2,lt,nt,{...Z,fill:"transparent",stroke:"none"}),R=f.insert(()=>rt,":first-child"),X=f.insert(()=>ot);if(e.icon){let tt=f.append("g");tt.html(`<g>${await xr(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);let N=tt.node().getBBox(),{width:at,height:st,x:St,y:_t}=N;tt.attr("transform",`translate(${-at/2-St},${k?u.height/2+P/2-st/2-_t:-u.height/2-P/2-st/2-_t})`),tt.attr("style",`color: ${A.get("stroke")??_};`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${k?-nt/2:nt/2-u.height})`),R.attr("transform",`translate(0,${k?u.height/2+P/2:-u.height/2-P/2})`),K(e,X),e.intersect=function(tt){if(l.info("iconSquare intersect",e,tt),!e.label)return L.rect(e,tt);let N=e.x??0,at=e.y??0,st=e.height??0,St=[];if(k)St=[{x:N-u.width/2,y:at-st/2},{x:N+u.width/2,y:at-st/2},{x:N+u.width/2,y:at-st/2+u.height+P},{x:N+B/2,y:at-st/2+u.height+P},{x:N+B/2,y:at+st/2},{x:N-B/2,y:at+st/2},{x:N-B/2,y:at-st/2+u.height+P},{x:N-u.width/2,y:at-st/2+u.height+P}];else St=[{x:N-B/2,y:at-st/2},{x:N+B/2,y:at-st/2},{x:N+B/2,y:at-st/2+T},{x:N+u.width/2,y:at-st/2+T},{x:N+u.width/2/2,y:at+st/2},{x:N-u.width/2,y:at+st/2},{x:N-u.width/2,y:at-st/2+T},{x:N-B/2,y:at-st/2+T}];return L.polygon(e,St,tt)},f}t(Rg,"iconSquare");async function qg(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}=M(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:k}=await ee(r,e,"image-shape default"),T=e.pos==="t",B=-f/2,_=-u/2,v=e.label?8:0,A=y.svg(p),I=Bt(e,{});if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let D=A.rectangle(B,_,f,u,I),P=Math.max(f,x.width),G=u+x.height+v,Z=A.rectangle(-P/2,-G/2,P,G,{...I,fill:"none",stroke:"none"}),J=p.insert(()=>D,":first-child"),rt=p.insert(()=>Z);if(e.img){let lt=p.append("image");lt.attr("href",e.img),lt.attr("width",f),lt.attr("height",u),lt.attr("preserveAspectRatio","none"),lt.attr("transform",`translate(${-f/2},${T?G/2-u:-G/2})`)}return k.attr("transform",`translate(${-x.width/2-(x.x-(x.left??0))},${T?-u/2-x.height/2-v/2:u/2-x.height/2+v/2})`),J.attr("transform",`translate(0,${T?x.height/2+v/2:-x.height/2-v/2})`),K(e,rt),e.intersect=function(lt){if(l.info("iconSquare intersect",e,lt),!e.label)return L.rect(e,lt);let nt=e.x??0,ot=e.y??0,R=e.height??0,X=[];if(T)X=[{x:nt-x.width/2,y:ot-R/2},{x:nt+x.width/2,y:ot-R/2},{x:nt+x.width/2,y:ot-R/2+x.height+v},{x:nt+f/2,y:ot-R/2+x.height+v},{x:nt+f/2,y:ot+R/2},{x:nt-f/2,y:ot+R/2},{x:nt-f/2,y:ot-R/2+x.height+v},{x:nt-x.width/2,y:ot-R/2+x.height+v}];else X=[{x:nt-f/2,y:ot-R/2},{x:nt+f/2,y:ot-R/2},{x:nt+f/2,y:ot-R/2+u},{x:nt+x.width/2,y:ot-R/2+u},{x:nt+x.width/2/2,y:ot+R/2},{x:nt-x.width/2,y:ot+R/2},{x:nt-x.width/2,y:ot-R/2+u},{x:nt-f/2,y:ot-R/2+u}];return L.polygon(e,X,lt)},p}t(qg,"imageSquare");async function Wg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await ee(r,e,At(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:k}=e;if(e.look==="handDrawn"){let T=y.svg(n),B=Bt(e,{}),_=Zt(p),v=T.path(_,B);if(x=n.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)x.attr("style",k)}else x=Ke(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,K(e,x),e.intersect=function(T){return L.polygon(e,p,T)},n}t(Wg,"inv_trapezoid");async function Ng(r,e){let{shapeSvg:i,bbox:s,label:o}=await ee(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))})`),K(e,a),e.intersect=function(d){return L.rect(e,d)},i}t(Ng,"labelRect");async function zg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await ee(r,e,At(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:k}=e;if(e.look==="handDrawn"){let T=y.svg(n),B=Bt(e,{}),_=Zt(p),v=T.path(_,B);if(x=n.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)x.attr("style",k)}else x=Ke(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,K(e,x),e.intersect=function(T){return L.polygon(e,p,T)},n}t(zg,"lean_left");async function Hg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e.padding??0,a=o,c=e.look==="neo"?o*2:o,{shapeSvg:n,bbox:d}=await ee(r,e,At(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:k}=e;if(e.look==="handDrawn"){let T=y.svg(n),B=Bt(e,{}),_=Zt(p),v=T.path(_,B);if(x=n.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)x.attr("style",k)}else x=Ke(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,K(e,x),e.intersect=function(T){return L.polygon(e,p,T)},n}t(Hg,"lean_right");function Yg(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.label="",e.labelStyle=i;let o=r.insert("g").attr("class",At(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=Bt(e,{});if(e.look!=="handDrawn")p.roughness=0,p.fillStyle="solid";let x=Zt(f),k=u.path(x,p),T=o.insert(()=>k,":first-child");if(T.attr("class","outer-path"),a&&e.look!=="handDrawn")T.selectAll("path").attr("style",a);if(s&&e.look!=="handDrawn")T.selectAll("path").attr("style",s);return T.attr("transform",`translate(-${c/2},${-n})`),K(e,T),e.intersect=function(B){return l.info("lightningBolt intersect",e,B),L.polygon(e,f,B)},o}t(Yg,"lightningBolt");var Qk=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"),Jk=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"),t1=t((r,e,i,s,o,a)=>[`M${r-i/2},${-s/2}`,`a${o},${a} 0,0,0 ${i},0`].join(" "),"createInnerCylinderPathD"),Dp=10,Pp=10;async function jg(r,e){let{labelStyles:i,nodeStyles:s}=M(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 v=e.width??0;if(e.width=(e.width??0)-a,e.width<Pp)e.width=Pp;let I=v/2/(2.5+v/50);if(e.height=(e.height??0)-c-I*3,e.height<Dp)e.height=Dp}let{shapeSvg:n,bbox:d,label:f}=await ee(r,e,At(e)),u=(e?.width?e?.width:d.width)+a*2,p=u/2,x=p/(2.5+u/50),k=(e?.height?e?.height:d.height)+x+c*2,T=k*0.1,B,{cssStyles:_}=e;if(e.look==="handDrawn"){let v=y.svg(n),A=Jk(0,0,u,k,p,x,T),I=t1(0,x,u,k,p,x),D=Bt(e,{}),P=v.path(A,D),G=v.path(I,D);if(n.insert(()=>G,":first-child").attr("class","line"),B=n.insert(()=>P,":first-child"),B.attr("class","basic label-container"),_)B.attr("style",_)}else{let v=Qk(0,0,u,k,p,x,T);B=n.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",ne(_)).attr("style",s)}return B.attr("label-offset-y",x),B.attr("transform",`translate(${-u/2}, ${-(k/2+x)})`),K(e,B),f.attr("transform",`translate(${-(d.width/2)-(d.x-(d.left??0))}, ${-(d.height/2)+x-(d.y-(d.top??0))})`),e.intersect=function(v){let A=L.rect(e,v),I=A.x-(e.x??0);if(p!=0&&(Math.abs(I)<(e.width??0)/2||Math.abs(I)==(e.width??0)/2&&Math.abs(A.y-(e.y??0))>(e.height??0)/2-x)){let D=x*x*(1-I*I/(p*p));if(D>0)D=Math.sqrt(D);if(D=x-D,v.y-(e.y??0)>0)D=-D;A.y+=D}return A},n}t(jg,"linedCylinder");async function Ug(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(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,k=p+x,{cssStyles:T}=e,B=y.svg(n),_=Bt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=[{x:-u/2-u/2*0.1,y:-k/2},{x:-u/2-u/2*0.1,y:k/2},...br(-u/2-u/2*0.1,k/2,u/2+u/2*0.1,k/2,x,0.8),{x:u/2+u/2*0.1,y:-k/2},{x:-u/2-u/2*0.1,y:-k/2},{x:-u/2,y:-k/2},{x:-u/2,y:k/2*1.1},{x:-u/2,y:-k/2}],A=B.polygon(v.map((D)=>[D.x,D.y]),_),I=n.insert(()=>A,":first-child");if(I.attr("class","basic label-container outer-path"),T&&e.look!=="handDrawn")I.selectAll("path").attr("style",T);if(s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return I.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))})`),K(e,I),e.intersect=function(D){return L.polygon(e,v,D)},n}t(Ug,"linedWaveEdgedRect");var e1=56,ic=72,Rp=8,qp=2,r1=8,i1={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Wp=Math.PI/3,Np=0.6,oc=t((r,e)=>{let i=e*Np,s=e*Math.sqrt(1-Np**2),o=Math.cos(Wp),a=-Math.sin(Wp),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"),o1={normal:oc(-24,12),hollow:oc(-23,9),awesome:oc(-21,13),icon:"M 12 -8 L 26 -26"},zp=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"),mc=t((r,e,i,s,o=!1)=>{if(e.look==="handDrawn"){let n=y.svg(r).path(i,Bt(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"),s1=t((r,e,i,s,o,a,c=!1)=>{if(e.look==="handDrawn"){let f=y.svg(r).circle(i,s,o*2,Bt(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 a1=t((r,e,i)=>{if(!e.business)return;r.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",o1[i]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function xo(r,e,i,s){let{labelStyles:o,nodeStyles:a}=M(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 ee(r,c,At(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();sr(n,e.colorIndex,p,x.borderColorArray);let k,T;if(e.stereotype){let J=await $r(n,`«${e.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});k=J.label.attr("class","label usecase-stereotype"),T=J.bbox}let B=n.append("g").attr("class",`usecase-actor-glyph ${i1[i]}`).attr("style",a||null);await s(B,e),a1(B,e,i);let _=e.padding??r1,v=T?.height??0,A=ic+Rp+d.height+(T?v+qp:0),I=Math.max(e1,d.width,T?.width??0)+_*2,D=A+_*2,P=-A/2;B.attr("transform",`translate(0,${P+ic/2})`);let G=P+ic+Rp;if(k&&T)G+=v/2,zp(k,T,G),G+=v/2+qp;zp(f,d,G+d.height/2);let Z=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-I/2).attr("y",-D/2).attr("width",I).attr("height",D).attr("opacity",0).attr("aria-hidden","true");return K(e,Z),e.intersect=(J)=>L.rect(e,J),n}t(xo,"renderUsecaseActor");var n1=["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 Xg(r,e){return xo(r,e,"normal",(i,s)=>{mc(i,s,n1,"usecase-actor-stick")})}t(Xg,"usecaseActor");var l1=["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 Gg(r,e){return xo(r,e,"awesome",(i,s)=>{mc(i,s,l1,"usecase-actor-awesome-silhouette")})}t(Gg,"usecaseActorAwesome");var h1=["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 Vg(r,e){return xo(r,e,"hollow",(i,s)=>{s1(i,s,0,-23,9,"usecase-actor-hollow-head",!0),mc(i,s,h1,"usecase-actor-hollow-body",!0)})}t(Vg,"usecaseActorHollow");var ni=52,Hp=42,Yp=-2,c1=t(async(r,e)=>{let i=-ni/2,s=Yp-ni/2;if(e.look==="handDrawn"){let u=y.svg(r).rectangle(i,s,ni,ni,Bt(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",ni).attr("height",ni).attr("rx",4).attr("ry",4);let o=e.icon??"",a=await Bs(o.includes(":")?o:`fa:${o}`),c=await xr(o,{height:Hp,width:Hp,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},${Yp-d.height/2-d.y})`)},"drawIconActor");async function Kg(r,e){return xo(r,e,"icon",c1)}t(Kg,"usecaseActorIcon");var jp=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 Zg(r,e){let i=e,{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s;let a=i.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:n,halfPadding:d,label:f}=await ee(r,a,At(e,"usecase-business-shape"));f.attr("class","label usecase-label");let{theme:u,themeVariables:p}=m();sr(c,e.colorIndex,u,p.borderColorArray);let x,k;if(i.stereotype){let R=await $r(c,`«${i.stereotype}»`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});x=R.label.attr("class","label usecase-stereotype"),k=R.bbox}let T=k?2:0,B=n.height+(k?.height??0)+T,_=Math.max(n.width,k?.width??0),v=d??10,A=_/2+v*2,I=B/2+v*2,D=Math.min(Math.max(v/5,1),v/2),P=_/2+D,G=A-D,Z=P/A,J=G/A,rt=I*Math.sqrt(Math.max(0,1-Z*Z)),lt=-I*Math.sqrt(Math.max(0,1-J*J));if(x&&k)jp(x,k,-B/2+k.height/2);jp(f,n,B/2-n.height/2);let nt;if(e.look==="handDrawn"){let X=y.svg(c).ellipse(0,0,A*2,I*2,Bt(e,{}));nt=c.insert(()=>X,":first-child").attr("class","basic label-container usecase-business-ellipse")}else nt=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",o).attr("rx",A).attr("ry",I).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${P} ${rt} L ${G} ${lt}`).attr("fill","none").attr("style",o||null);let ot=i.accessibleName??i.label;if(ot)c.attr("role","img").attr("aria-label",ot);return K(e,nt),e.calcIntersect=(R,X)=>L.ellipse(R,R.width/2,R.height/2,X),e.intersect=(R)=>L.ellipse(e,A,I,R),c}t(Zg,"usecaseBusiness");var sc=8,Up=4,u1=1,ac=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"),d1=t((r)=>{let e=Number.parseFloat(r??"");return Number.isFinite(e)&&e>=0?e:u1},"numericStrokeWidth");async function Qg(r,e){let i=e,{labelStyles:s,nodeStyles:o}=M(e),{stylesMap:a}=je(e);e.labelStyle=s;let{shapeSvg:c,bbox:n,label:d}=await ee(r,e,At(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 R of i.jsonRows??[]){let X=await $r(f,R.key,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),tt=await $r(f,R.value,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});u.push({key:{label:X.label.attr("class","label usecase-json-key"),bbox:X.bbox},value:{label:tt.label.attr("class","label usecase-json-value"),bbox:tt.bbox}})}let p=Math.max(0,...u.map(({key:R})=>R.bbox.width))+sc*2,x=Math.max(0,...u.map(({value:R})=>R.bbox.width))+sc*2,k=n.width+sc*2,T=Math.max(k,p+x),B=x+Math.max(0,T-p-x),_=n.height+Up*2,v=u.map(({key:R,value:X})=>Math.max(R.bbox.height,X.bbox.height)+Up*2),A=_+v.reduce((R,X)=>R+X,0),I=d1(a.get("stroke-width")),D=T+I*2,P=A+I*2,G=-T/2,Z=-A/2,J=e.look==="handDrawn"?y.svg(c):void 0,rt=J?Bt(e,{}):void 0,lt=t((R,X,tt,N,at,st)=>{if(J&&rt){let St=J.rectangle(tt,N,at,st,rt);return R.insert(()=>St,":first-child").attr("class",X)}return R.insert("rect",":first-child").attr("class",X).attr("x",tt).attr("y",N).attr("width",at).attr("height",st).attr("style",o)},"insertCell"),nt=lt(c,"label-container usecase-json-border",-D/2,-P/2,D,P);lt(f,"usecase-json-cell usecase-json-title-cell",G,Z,T,_),f.node()?.append(d.node()),ac(d,n,0,Z+_/2);let ot=Z+_;return u.forEach(({key:R,value:X},tt)=>{let N=v[tt],at=f.append("g").attr("class","usecase-json-row").attr("data-row-index",tt).attr("transform",`translate(0,${ot})`);lt(at,"usecase-json-cell usecase-json-key-cell",G,0,p,N),lt(at,"usecase-json-cell usecase-json-value-cell",G+p,0,B,N),at.node()?.append(R.label.node(),X.label.node()),ac(R.label,R.bbox,G+p/2,N/2),ac(X.label,X.bbox,G+p+B/2,N/2),ot+=N}),K(e,nt),e.intersect=(R)=>L.rect(e,R),c}t(Qg,"usecaseJsonTable");async function Jg(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),p=(e?.width?e?.width:f.width)+a*2+2*n,x=(e?.height?e?.height:f.height)+c*2+2*n,k=p-2*n,T=x-2*n,B=-k/2,_=-T/2,{cssStyles:v}=e,A=y.svg(d),I=Bt(e,{}),D=[{x:B-n,y:_+n},{x:B-n,y:_+T+n},{x:B+k-n,y:_+T+n},{x:B+k-n,y:_+T},{x:B+k,y:_+T},{x:B+k,y:_+T-n},{x:B+k+n,y:_+T-n},{x:B+k+n,y:_-n},{x:B+n,y:_-n},{x:B+n,y:_},{x:B,y:_},{x:B,y:_+n}],P=[{x:B,y:_+n},{x:B+k-n,y:_+n},{x:B+k-n,y:_+T},{x:B+k,y:_+T},{x:B+k,y:_},{x:B,y:_}];if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let G=Zt(D),Z=A.path(G,I),J=Zt(P),rt=A.path(J,I);if(e.look!=="handDrawn")Z=lc(Z),rt=lc(rt);let lt=d.insert("g",":first-child");if(lt.insert(()=>Z),lt.insert(()=>rt),lt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")lt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")lt.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))})`),K(e,lt),e.intersect=function(nt){return L.polygon(e,D,nt)},d}t(Jg,"multiRect");async function tm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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,k=e.look==="neo"?x/4:x/8,T=x+(u?k/2:-k/2),B=-p/2,_=-T/2,v=10,{cssStyles:A}=e,I=br(B-v,_+T+v,B+p-v,_+T+v,k,0.8),D=I?.[I.length-1],P=[{x:B-v,y:_+v},{x:B-v,y:_+T+v},...I,{x:B+p-v,y:D.y-v},{x:B+p,y:D.y-v},{x:B+p,y:D.y-2*v},{x:B+p+v,y:D.y-2*v},{x:B+p+v,y:_-v},{x:B+v,y:_-v},{x:B+v,y:_},{x:B,y:_},{x:B,y:_+v}],G=[{x:B,y:_+v},{x:B+p-v,y:_+v},{x:B+p-v,y:D.y-v},{x:B+p,y:D.y-v},{x:B+p,y:_},{x:B,y:_}],Z=y.svg(o),J=Bt(e,{});if(e.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let rt=Zt(P),lt=Z.path(rt,J),nt=Zt(G),ot=Z.path(nt,J),R=o.insert(()=>lt,":first-child");if(R.insert(()=>ot),R.attr("class","basic label-container outer-path"),A&&e.look!=="handDrawn")R.selectAll("path").attr("style",A);if(s&&e.look!=="handDrawn")R.selectAll("path").attr("style",s);return R.attr("transform",`translate(0,${-k/2})`),c.attr("transform",`translate(${-(a.width/2)-v-(a.x-(a.left??0))}, ${-(a.height/2)+v-k-(a.y-(a.top??0))})`),K(e,R),e.intersect=function(X){return L.polygon(e,P,X)},o}t(tm,"multiWaveEdgedRectangle");async function em(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(e);if(e.labelStyle=s,!(e.useHtmlLabels||nn(C())))e.centerLabel=!0;let{shapeSvg:c,bbox:n,label:d}=await ee(r,e,At(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:k}=e,T=y.svg(c),B=Bt(e,{fill:i.noteBkgColor,stroke:i.noteBorderColor});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=T.rectangle(p,x,f,u,B),v=c.insert(()=>_,":first-child");if(v.attr("class","basic label-container outer-path"),d.attr("class","label noteLabel"),k&&e.look!=="handDrawn")v.selectAll("path").attr("style",k);if(o&&e.look!=="handDrawn")v.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))})`),K(e,v),e.intersect=function(A){return L.rect(e,A)},c}t(em,"note");var f1=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 rm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await ee(r,e,At(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 k=y.svg(o),T=Bt(e,{}),B=f1(0,0,d),_=k.path(B,T);if(p=o.insert(()=>_,":first-child").attr("transform",`translate(${-d/2+f}, ${d/2})`),x)p.attr("style",x)}else p=Ke(o,d,d,u),p.attr("transform",`translate(${-d/2+f}, ${d/2})`);if(s)p.attr("style",s);return K(e,p),e.calcIntersect=function(k,T){let B=k.width,_=[{x:B/2,y:0},{x:B,y:-B/2},{x:B/2,y:-B},{x:0,y:-B/2}];return L.polygon(k,_,T)},e.intersect=function(k){return this.calcIntersect(e,k)},o}t(rm,"question");async function im(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(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,T=-Math.max(u,(e.width??0)-x)/2,B=-p/2,_=B/2,v=[{x:T+_,y:B},{x:T,y:0},{x:T+_,y:-B},{x:-T,y:-B},{x:-T,y:B}],{cssStyles:A}=e,I=y.svg(n),D=Bt(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=Zt(v),G=I.path(P,D),Z=n.insert(()=>G,":first-child");if(Z.attr("class","basic label-container outer-path"),A&&e.look!=="handDrawn")Z.selectAll("path").attr("style",A);if(s&&e.look!=="handDrawn")Z.selectAll("path").attr("style",s);return Z.attr("transform",`translate(${-_/2},0)`),f.attr("transform",`translate(${-_/2-d.width/2-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),K(e,Z),e.intersect=function(J){return L.polygon(e,v,J)},n}t(im,"rect_left_inv_arrow");async function om(r,e){let{labelStyles:i,nodeStyles:s}=M(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 Re(n,f,e.labelStyle,!0,!0),p={width:0,height:0};if(nn(m())){let J=u.children[0],rt=b(u);p=J.getBoundingClientRect(),rt.attr("width",p.width),rt.attr("height",p.height)}l.info("Text 2",d);let x=d||[],k=u.getBBox(),T=await Re(n,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),B=T.children[0],_=b(T);p=B.getBoundingClientRect(),_.attr("width",p.width),_.attr("height",p.height);let v=(e.padding||0)/2;b(T).attr("transform","translate( "+(p.width>k.width?0:(k.width-p.width)/2)+", "+(k.height+v+5)+")"),b(u).attr("transform","translate( "+(p.width<k.width?0:-(k.width-p.width)/2)+", 0)"),p=n.node().getBBox(),n.attr("transform","translate("+-p.width/2+", "+(-p.height/2-v+3)+")");let A=p.width+(e.padding||0),I=p.height+(e.padding||0),D=-p.width/2-v,P=-p.height/2-v,G,Z;if(e.look==="handDrawn"){let J=y.svg(a),rt=Bt(e,{}),lt=J.path(ve(D,P,A,I,e.rx||0),rt),nt=J.line(-p.width/2-v,-p.height/2-v+k.height+v,p.width/2+v,-p.height/2-v+k.height+v,rt);Z=a.insert(()=>(l.debug("Rough node insert CXC",lt),nt),":first-child"),G=a.insert(()=>(l.debug("Rough node insert CXC",lt),lt),":first-child")}else G=c.insert("rect",":first-child"),Z=c.insert("line"),G.attr("class","outer title-state").attr("style",s).attr("x",-p.width/2-v).attr("y",-p.height/2-v).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),Z.attr("class","divider").attr("x1",-p.width/2-v).attr("x2",p.width/2+v).attr("y1",-p.height/2-v+k.height+v).attr("y2",-p.height/2-v+k.height+v);return K(e,G),e.intersect=function(J){return L.rect(e,J)},a}t(om,"rectWithTitle");async function sm(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 ui(r,e,o)}t(sm,"roundedRect");var Er=8;async function am(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),f=(e?.width??n.width)+o*2+(e.look==="neo"?Er:Er*2),u=(e?.height??n.height)+a*2,p=f-Er,x=u,k=Er-f/2,T=-u/2,{cssStyles:B}=e,_=y.svg(c),v=Bt(e,{});if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let A=[{x:k,y:T},{x:k+p,y:T},{x:k+p,y:T+x},{x:k-Er,y:T+x},{x:k-Er,y:T},{x:k,y:T},{x:k,y:T+x}],I=_.polygon(A.map((P)=>[P.x,P.y]),v),D=c.insert(()=>I,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",ne(B)),s&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);if(B&&e.look!=="handDrawn")D.selectAll("path").attr("style",s);return d.attr("transform",`translate(${Er/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),K(e,D),e.intersect=function(P){return L.rect(e,P)},c}t(am,"shadedProcess");async function nm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),u=(e?.width?e?.width:d.width)+a*2,p=((e?.height?e?.height:d.height)+c*2)*1.5,x=u,k=p/1.5,T=-x/2,B=-k/2,{cssStyles:_}=e,v=y.svg(n),A=Bt(e,{});if(e.look!=="handDrawn")A.roughness=0,A.fillStyle="solid";let I=[{x:T,y:B},{x:T,y:B+k},{x:T+x,y:B+k},{x:T+x,y:B-k/2}],D=Zt(I),P=v.path(D,A),G=n.insert(()=>P,":first-child");if(G.attr("class","basic label-container outer-path"),_&&e.look!=="handDrawn")G.selectChildren("path").attr("style",_);if(s&&e.look!=="handDrawn")G.selectChildren("path").attr("style",s);return G.attr("transform",`translate(0, ${k/4})`),f.attr("transform",`translate(${-x/2+(e.padding??0)-(d.x-(d.left??0))}, ${-k/4+(e.padding??0)-(d.y-(d.top??0))})`),K(e,G),e.intersect=function(Z){return L.polygon(e,I,Z)},n}t(nm,"slopedRect");async function lm(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 ui(r,e,a);if(e.colorIndex!==void 0){let{theme:n,themeVariables:d}=m();sr(c,e.colorIndex,n,d.borderColorArray)}return c}t(lm,"squareRect");var uc=50,p1=t((r,e,i)=>{let s=r.height+i,o=s*Math.cos(Math.PI/(2*(uc-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 cm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),{w:f,h:u}=p1(d,a,c),p=u/2,{cssStyles:x}=e,k=y.svg(n),T=Bt(e,{});if(e.look!=="handDrawn")T.roughness=0,T.fillStyle="solid";let B=[{x:-f/2+p,y:-u/2},{x:f/2-p,y:-u/2},...Ge(-f/2+p,0,p,uc,90,270),{x:f/2-p,y:u/2},...Ge(f/2-p,0,p,uc,270,450)],_=Zt(B),v=k.path(_,T),A=n.insert(()=>v,":first-child");if(A.attr("class","basic label-container outer-path"),x&&e.look!=="handDrawn")A.selectChildren("path").attr("style",x);if(s&&e.look!=="handDrawn")A.selectChildren("path").attr("style",s);return K(e,A),e.intersect=function(I){return L.polygon(e,B,I)},n}t(cm,"stadium");async function um(r,e){let i={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5,classes:"flowchart-node"};return ui(r,e,i)}t(um,"state");function dm(r,e,{config:{themeVariables:i}}){let{labelStyles:s,nodeStyles:o}=M(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=Bt(e,{});if(e.look!=="handDrawn")x.roughness=0,x.fillStyle="solid";let k=p.circle(0,0,e.width,{...x,stroke:c,strokeWidth:2}),T=n??d,B=(e.width??0)*5/14,_=p.circle(0,0,B,{...x,fill:T,stroke:T,strokeWidth:2,fillStyle:"solid"}),v=u.insert(()=>k,":first-child");if(v.insert(()=>_),e.look!=="handDrawn")v.attr("class","outer-path");if(a)v.selectAll("path").attr("style",a);if(o)v.selectAll("path").attr("style",o);if(e.width<25&&f&&e.look!=="handDrawn"){let A=r.node()?.ownerSVGElement?.id??"",I=A?`${A}-drop-shadow-small`:"drop-shadow-small";v.attr("style",`filter:url(#${I})`)}return K(e,v),e.intersect=function(A){return L.circle(e,(e.width??0)/2,A)},u}t(dm,"stateEnd");function pm(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,Kd(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 K(e,c),e.intersect=function(n){return L.circle(e,(e.width??7)/2,n)},a}t(pm,"stateStart");var li=8;async function qm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),f=Math.max(d.width+2*li+a,e.width??0),u=Math.max(d.height+c,e.height??0),p=f-2*li,x=u,k=-f/2,T=-u/2,B=[{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 _=y.svg(n),v=Bt(e,{}),A=_.rectangle(k,T,p+16,x,v),I=_.line(k+li,T,k+li,T+x,v),D=_.line(k+li+p,T,k+li+p,T+x,v);n.insert(()=>I,":first-child"),n.insert(()=>D,":first-child");let P=n.insert(()=>A,":first-child"),{cssStyles:G}=e;P.attr("class","basic label-container").attr("style",ne(G)),K(e,P)}else{let _=Ke(n,p,x,B);if(s)_.attr("style",s);K(e,_)}return e.intersect=function(_){return L.polygon(e,B,_)},n}t(qm,"subroutine");var nc=0.2;async function Wm(r,e){let{labelStyles:i,nodeStyles:s}=M(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-nc*(e.height+c*2),10);let{shapeSvg:n,bbox:d}=await ee(r,e,At(e)),f=(e?.height?e?.height:d.height)+c*2,u=nc*f,p=nc*f,k=(e?.width?e?.width:d.width)+a*2+u-u,T=f,B=-k/2,_=-T/2,{cssStyles:v}=e,A=y.svg(n),I=Bt(e,{}),D=[{x:B-u/2,y:_},{x:B+k+u/2,y:_},{x:B+k+u/2,y:_+T},{x:B-u/2,y:_+T}],P=[{x:B+k-u/2,y:_+T},{x:B+k+u/2,y:_+T},{x:B+k+u/2,y:_+T-p}];if(e.look!=="handDrawn")I.roughness=0,I.fillStyle="solid";let G=Zt(D),Z=A.path(G,I),J=Zt(P),rt=A.path(J,{...I,fillStyle:"solid"}),lt=n.insert(()=>rt,":first-child");if(lt.insert(()=>Z,":first-child"),lt.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn")lt.selectAll("path").attr("style",v);if(s&&e.look!=="handDrawn")lt.selectAll("path").attr("style",s);return K(e,lt),e.intersect=function(nt){return L.polygon(e,D,nt)},n}t(Wm,"taggedRect");async function Hm(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,label:c}=await ee(r,e,At(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:k}=e,T=y.svg(o),B=Bt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-n/2-n/2*0.1,y:x/2},...br(-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}],v=-n/2+n/2*0.1,A=-x/2-p*0.4,I=[{x:v+n-u,y:(A+d)*1.3},{x:v+n,y:A+d-p},{x:v+n,y:(A+d)*0.9},...br(v+n,(A+d)*1.25,v+n-u,(A+d)*1.3,-d*0.02,0.5)],D=Zt(_),P=T.path(D,B),G=Zt(I),Z=T.path(G,{...B,fillStyle:"solid"}),J=o.insert(()=>Z,":first-child");if(J.insert(()=>P,":first-child"),J.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")J.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.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))})`),K(e,J),e.intersect=function(rt){return L.polygon(e,_,rt)},o}t(Hm,"taggedWaveEdgedRectangle");async function Ym(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a}=await ee(r,e,At(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),K(e,u),e.intersect=function(p){return L.rect(e,p)},o}t(Ym,"text");var g1=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"),m1=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"),y1=t((r,e,i,s,o,a)=>[`M${r+i/2},${-s/2}`,`a${o},${a} 0,0,0 0,${s}`].join(" "),"createInnerCylinderPathD"),Xp=5,Gp=10;async function jm(r,e){let{labelStyles:i,nodeStyles:s}=M(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<Xp)e.height=Xp}if(e.width){let v=c/2/(2.5+c/50);if(e.width=e.width-a-v*3,e.width<Gp)e.width=Gp}let{shapeSvg:n,bbox:d,label:f}=await ee(r,e,At(e)),u=Math.max(e.height??0,d.height)+a,p=u/2,x=p/(2.5+u/50),k=Math.max(e.width??0,d.width)+x+a,{cssStyles:T}=e,B;if(e.look==="handDrawn"){let _=y.svg(n),v=m1(0,0,k,u,x,p),A=y1(0,0,k,u,x,p),I=_.path(v,Bt(e,{})),D=_.path(A,Bt(e,{fill:"none"}));if(B=n.insert(()=>D,":first-child"),B=n.insert(()=>I,":first-child"),B.attr("class","basic label-container"),T)B.attr("style",T)}else{let _=g1(0,0,k,u,x,p);if(B=n.insert("path",":first-child").attr("d",_).attr("class","basic label-container").attr("style",ne(T)).attr("style",s),B.attr("class","basic label-container outer-path"),T)B.selectAll("path").attr("style",T);if(s)B.selectAll("path").attr("style",s)}return B.attr("label-offset-x",x),B.attr("transform",`translate(${-k/2}, ${u/2} )`),f.attr("transform",`translate(${-(d.width/2)-x-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),K(e,B),e.intersect=function(_){let v=L.rect(e,_),A=v.y-(e.y??0);if(p!=0&&(Math.abs(A)<(e.height??0)/2||Math.abs(A)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-x)){let I=x*x*(1-A*A/(p*p));if(I!=0)I=Math.sqrt(Math.abs(I));if(I=x-I,_.x-(e.x??0)>0)I=-I;v.x+=I}return v},n}t(jm,"tiltedCylinder");async function Xm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(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:k}=e;if(e.look==="handDrawn"){let T=y.svg(n),B=Bt(e,{}),_=Zt(p),v=T.path(_,B);if(x=n.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${f/2})`),k)x.attr("style",k)}else x=Ke(n,u,f,p);if(s)x.attr("style",s);return e.width=u,e.height=f,K(e,x),e.intersect=function(T){return L.polygon(e,p,T)},n}t(Xm,"trapezoid");async function Vm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),p=(e?.width?e?.width:u.width)+a*2,x=(e?.height?e?.height:u.height)+c*2,{cssStyles:k}=e,T=y.svg(f),B=Bt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{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}],v=Zt(_),A=T.path(v,B),I=f.insert(()=>A,":first-child");if(I.attr("class","basic label-container outer-path"),k&&e.look!=="handDrawn")I.selectChildren("path").attr("style",k);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return K(e,I),e.intersect=function(D){return L.polygon(e,_,D)},f}t(Vm,"trapezoidalPentagon");var Vp=10,Kp=10;async function Km(r,e){let{labelStyles:i,nodeStyles:s}=M(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<Kp)e.width=Kp;if(e.height=e?.height??0,e.height<Vp)e.height=Vp}let{shapeSvg:c,bbox:n,label:d}=await ee(r,e,At(e)),f=ia(m().flowchart?.htmlLabels),u=(e?.width?e?.width:n.width)+a,p=e?.height?e?.height:u+n.height,x=p,k=[{x:0,y:0},{x,y:0},{x:x/2,y:-p}],{cssStyles:T}=e,B=y.svg(c),_=Bt(e,{});if(e.look!=="handDrawn")_.roughness=0,_.fillStyle="solid";let v=Zt(k),A=B.path(v,_),I=c.insert(()=>A,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");if(T&&e.look!=="handDrawn")I.selectChildren("path").attr("style",T);if(s&&e.look!=="handDrawn")I.selectChildren("path").attr("style",s);return e.width=u,e.height=p,K(e,I),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,k,D),L.polygon(e,k,D)},c}t(Km,"triangle");async function Zm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(e)),p=(e?.width?e?.width:f.width)+(a??0)*2,x=(e?.height?e?.height:f.height)+(c??0)*2,k=e.look==="neo"?x/4:x/8,T=x+(n?k:-k),{cssStyles:B}=e,v=14-p,A=v>0?v/2:0,I=y.svg(d),D=Bt(e,{});if(e.look!=="handDrawn")D.roughness=0,D.fillStyle="solid";let P=[{x:-p/2-A,y:T/2},...br(-p/2-A,T/2,p/2+A,T/2,k,0.8),{x:p/2+A,y:-T/2},{x:-p/2-A,y:-T/2}],G=Zt(P),Z=I.path(G,D),J=d.insert(()=>Z,":first-child");if(J.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")J.selectAll("path").attr("style",B);if(s&&e.look!=="handDrawn")J.selectAll("path").attr("style",s);return J.attr("transform",`translate(0,${-k/2})`),u.attr("transform",`translate(${-p/2+(e.padding??0)-(f.x-(f.left??0))},${-x/2+(e.padding??0)-k-(f.y-(f.top??0))})`),K(e,J),e.intersect=function(rt){return L.polygon(e,P,rt)},d}t(Zm,"waveEdgedRectangle");async function Jm(r,e){let{labelStyles:i,nodeStyles:s}=M(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 ee(r,e,At(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:k}=e,T=y.svg(n),B=Bt(e,{});if(e.look!=="handDrawn")B.roughness=0,B.fillStyle="solid";let _=[{x:-f/2,y:x/2},...br(-f/2,x/2,f/2,x/2,p,1),{x:f/2,y:-x/2},...br(f/2,-x/2,-f/2,-x/2,p,-1)],v=Zt(_),A=T.path(v,B),I=n.insert(()=>A,":first-child");if(I.attr("class","basic label-container"),k&&e.look!=="handDrawn")I.selectAll("path").attr("style",k);if(s&&e.look!=="handDrawn")I.selectAll("path").attr("style",s);return K(e,I),e.intersect=function(D){return L.polygon(e,_,D)},n}t(Jm,"waveRectangle");var ce=10;async function ty(r,e){let{labelStyles:i,nodeStyles:s}=M(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-ce,10),e.height=Math.max((e?.height??0)-a*2-ce,10);let{shapeSvg:c,bbox:n,label:d}=await ee(r,e,At(e)),f=(e?.width?e?.width:n.width)+o*2+ce,u=(e?.height?e?.height:n.height)+a*2+ce,p=f-ce,x=u-ce,k=-p/2,T=-x/2,{cssStyles:B}=e,_=y.svg(c),v=Bt(e,{}),A=[{x:k-ce,y:T-ce},{x:k-ce,y:T+x},{x:k+p,y:T+x},{x:k+p,y:T-ce}],I=`M${k-ce},${T-ce} L${k+p},${T-ce} L${k+p},${T+x} L${k-ce},${T+x} L${k-ce},${T-ce}
|
|
237
|
+
M${k-ce},${T} L${k+p},${T}
|
|
238
|
+
M${k},${T-ce} L${k},${T+x}`;if(e.look!=="handDrawn")v.roughness=0,v.fillStyle="solid";let D=_.path(I,v),P=c.insert(()=>D,":first-child");if(P.attr("transform",`translate(${ce/2}, ${ce/2})`),P.attr("class","basic label-container outer-path"),B&&e.look!=="handDrawn")P.selectAll("path").attr("style",B);if(s&&e.look!=="handDrawn")P.selectAll("path").attr("style",s);return d.attr("transform",`translate(${-(n.width/2)+ce/2-(n.x-(n.left??0))}, ${-(n.height/2)+ce/2-(n.y-(n.top??0))})`),K(e,P),e.intersect=function(G){return L.polygon(e,A,G)},c}t(ty,"windowPane");var Zp=new Set(["redux-color","redux-dark-color"]),x1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function yc(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:Lt}=C(),{background:Dt}=Lt,zt={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Dt}`]};await yc(r,zt)}let f=C();e.useHtmlLabels=f.htmlLabels;let u=f.er?.diagramPadding??10,p=f.er?.entityPadding??6,{cssStyles:x}=e,{labelStyles:k,nodeStyles:T}=M(e);if(i.attributes.length===0&&e.label){let Lt={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:""};if(or(e.label,f)+Lt.labelPaddingX*2<f.er.minEntityWidth)e.width=f.er.minEntityWidth;let Dt=await ui(r,e,Lt);if(s!=null&&Zp.has(s)){let zt=i.colorIndex??0;Dt.attr("data-color-id",`color-${zt%d.length}`)}if(!ia(f.htmlLabels)){let zt=Dt.select("text"),Rt=zt.node()?.getBBox();zt.attr("transform",`translate(${-Rt.width/2}, 0)`)}return Dt}if(!f.htmlLabels)u*=1.25,p*=1.25;let B=At(e);if(!B)B="node default";let _=r.insert("g").attr("class",B).attr("id",e.domId||e.id),v=await hi(_,e.label??"",f,0,0,["name"],k);v.height+=p;let A=0,I=[],D=[],P=0,G=0,Z=0,J=0,rt=!0,lt=!0;for(let Lt of i.attributes){let Dt=await hi(_,Lt.type,f,0,A,["attribute-type"],k);P=Math.max(P,Dt.width+u);let zt=await hi(_,Lt.name,f,0,A,["attribute-name"],k);G=Math.max(G,zt.width+u);let Rt=await hi(_,Lt.keys.join(),f,0,A,["attribute-keys"],k);Z=Math.max(Z,Rt.width+u);let ie=await hi(_,Lt.comment,f,0,A,["attribute-comment"],k);J=Math.max(J,ie.width+u);let re=Math.max(Dt.height,zt.height,Rt.height,ie.height)+p;D.push({yOffset:A,rowHeight:re}),A+=re}let nt=4;if(Z<=u)rt=!1,Z=0,nt--;if(J<=u)lt=!1,J=0,nt--;let ot=_.node().getBBox();if(v.width+u*2-(P+G+Z+J)>0){let Lt=v.width+u*2-(P+G+Z+J);if(P+=Lt/nt,G+=Lt/nt,Z>0)Z+=Lt/nt;if(J>0)J+=Lt/nt}let R=P+G+Z+J,X=y.svg(_),tt=Bt(e,{});if(e.look!=="handDrawn")tt.roughness=0,tt.fillStyle="solid";let N=0;if(D.length>0)N=D.reduce((Lt,Dt)=>Lt+(Dt?.rowHeight??0),0);let at=Math.max(ot.width+u*2,e?.width||0,R),st=Math.max((N??0)+v.height,e?.height||0),St=-at/2,_t=-st/2;if(_.selectAll("g:not(:first-child)").each((Lt,Dt,zt)=>{let Rt=b(zt[Dt]),ie=Rt.attr("transform"),re=0,Ze=0;if(ie){let qe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ie);if(qe){if(re=parseFloat(qe[1]),Ze=parseFloat(qe[2]),Rt.attr("class").includes("attribute-name"))re+=P;else if(Rt.attr("class").includes("attribute-keys"))re+=P+G;else if(Rt.attr("class").includes("attribute-comment"))re+=P+G+Z}}Rt.attr("transform",`translate(${St+u/2+re}, ${Ze+_t+v.height+p/2})`)}),_.select(".name").attr("transform","translate("+-v.width/2+", "+(_t+p/2)+")"),s!=null&&Zp.has(s)){let Lt=i.colorIndex??0;_.attr("data-color-id",`color-${Lt%d.length}`)}let Wt=X.rectangle(St,_t,at,st,tt),Nt=_.insert(()=>Wt,":first-child").attr("class","outer-path").attr("style",x.join(""));I.push(0);for(let[Lt,Dt]of D.entries()){let Rt=(Lt+1)%2===0&&Dt.yOffset!==0,ie=X.rectangle(St,v.height+_t+Dt?.yOffset,at,Dt?.rowHeight,{...tt,fill:Rt?a:c,stroke:n});_.insert(()=>ie,"g.label").attr("style",x.join("")).attr("class",`row-rect-${Rt?"even":"odd"}`)}let jt=0.0001,Xt=ci(St,v.height+_t,at+St,v.height+_t,jt),$t=X.polygon(Xt.map((Lt)=>[Lt.x,Lt.y]),tt);if(_.insert(()=>$t).attr("class","divider"),Xt=ci(P+St,v.height+_t,P+St,st+_t,jt),$t=X.polygon(Xt.map((Lt)=>[Lt.x,Lt.y]),tt),_.insert(()=>$t).attr("class","divider"),rt){let Lt=P+G+St;Xt=ci(Lt,v.height+_t,Lt,st+_t,jt),$t=X.polygon(Xt.map((Dt)=>[Dt.x,Dt.y]),tt),_.insert(()=>$t).attr("class","divider")}if(lt){let Lt=P+G+Z+St;Xt=ci(Lt,v.height+_t,Lt,st+_t,jt),$t=X.polygon(Xt.map((Dt)=>[Dt.x,Dt.y]),tt),_.insert(()=>$t).attr("class","divider")}for(let Lt of I){let Dt=v.height+_t+Lt;Xt=ci(St,Dt,at+St,Dt,jt),$t=X.polygon(Xt.map((zt)=>[zt.x,zt.y]),tt),_.insert(()=>$t).attr("class","divider")}if(K(e,Nt),T&&e.look!=="handDrawn")if(s!=null&&x1.has(s))_.selectAll("path").attr("style",T);else{let Dt=T.split(";")?.filter((zt)=>zt.includes("stroke"))?.map((zt)=>`${zt}`).join("; ");_.selectAll("path").attr("style",Dt??""),_.selectAll(".row-rect-even path").attr("style",T)}return e.intersect=function(Lt){return L.rect(e,Lt)},_}t(yc,"erBox");async function hi(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!==Fo(e))e=Fo(e),e=e.replaceAll("<","<").replaceAll(">",">");let d=n.node().appendChild(await yn(n,e,{width:or(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(ia(i.htmlLabels)){let u=d.children[0];u.style.textAlign="start";let p=b(d);f=u.getBoundingClientRect(),p.attr("width",f.width),p.attr("height",f.height)}return f}t(hi,"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 ey(r,e,i,s,o=i.class.padding??12){let a=!s?3:0,c=r.insert("g").attr("class",At(e)).attr("id",e.domId||e.id),n=null,d=null,f=null,u=null,p=0,x=0,k=0;if(n=c.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let A=e.annotations[0];await yo(n,{text:`«${A}»`},0),p=n.node().getBBox().height}d=c.insert("g").attr("class","label-group text"),await yo(d,e,0,["font-weight: bolder"]);let T=d.node().getBBox();x=T.height,f=c.insert("g").attr("class","members-group text");let B=0;for(let A of e.members){let I=await yo(f,A,B,[A.parseClassifier()]);B+=I+a}if(k=f.node().getBBox().height,k<=0)k=o/2;u=c.insert("g").attr("class","methods-group text");let _=0;for(let A of e.methods){let I=await yo(u,A,_,[A.parseClassifier()]);_+=I+a}let v=c.node().getBBox();if(n!==null){let A=n.node().getBBox();n.attr("transform",`translate(${-A.width/2})`)}return d.attr("transform",`translate(${-T.width/2}, ${p})`),v=c.node().getBBox(),f.attr("transform",`translate(0, ${p+x+o*2})`),v=c.node().getBBox(),u.attr("transform",`translate(0, ${p+x+(k?k+o*4:o*2)})`),v=c.node().getBBox(),{shapeSvg:c,bbox:v}}t(ey,"textHelper");async function yo(r,e,i,s=[]){let o=r.insert("g").attr("class","label").attr("style",s.join("; ")),a=C(),c="useHtmlLabels"in e?e.useHtmlLabels:ia(a.htmlLabels)??!0,n="";if("text"in e)n=e.text;else n=e.label;if(!c&&n.startsWith("\\"))n=n.substring(1);if(Ft(n))c=!0;let d=await yn(o,qo(co(n)),{width:or(n,a)+50,classes:"markdown-node-label",useHtmlLabels:c},a),f,u=1;if(!c){if(s.includes("font-weight: bolder"))b(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=b(d);if(u=p.innerHTML.split("<br>").length,p.innerHTML.includes("</math>"))u+=p.innerHTML.split("<mrow>").length-1;await dc(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(yo,"addText");async function ry(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??ia(i.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:p,bbox:x}=await ey(r,e,i,f,d);sr(p,e.colorIndex,s,c);let{labelStyles:k,nodeStyles:T}=M(e);e.labelStyle=k,e.cssStyles=u.styles||"";let B=u.styles?.join(";")||T||"";if(!e.cssStyles)e.cssStyles=B.replaceAll("!important","").split(";");let _=u.members.length===0&&u.methods.length===0&&!i.class?.hideEmptyMembersBox,v=y.svg(p),A=Bt(e,{});if(e.look!=="handDrawn")A.roughness=0,A.fillStyle="solid";let I=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 G=-I/2,Z=-D/2,J=_?n*2:u.members.length===0&&u.methods.length===0?-n:0;if(P)J=n*2;let rt=v.rectangle(G-n,Z-n-(_?n:u.members.length===0&&u.methods.length===0?-n/2:0),I+2*n,D+2*n+J,A),lt=p.insert(()=>rt,":first-child");lt.attr("class","basic label-container outer-path");let nt=lt.node().getBBox(),ot=p.select(".annotation-group").node().getBBox().height-(_?n/2:0)||0,R=p.select(".label-group").node().getBBox().height-(_?n/2:0)||0,X=p.select(".members-group").node().getBBox().height-(_?n/2:0)||0,tt=(ot+R+Z+n-(Z-n-(_?n:u.members.length===0&&u.methods.length===0?-n/2:0)))/2;if(p.selectAll(".text").each((N,at,st)=>{let St=b(st[at]),_t=St.attr("transform"),Wt=0;if(_t){let $t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_t);if($t)Wt=parseFloat($t[2])}let Nt=Wt+Z+n-(_?n:u.members.length===0&&u.methods.length===0?-n/2:0);if(St.attr("class").includes("methods-group")){let Xt=Math.max(X,d/2);if(P)Nt=Math.max(tt,ot+R+Xt+Z+d*2+n)+d*2;else Nt=ot+R+Xt+Z+d*4+n}if(u.members.length===0&&u.methods.length===0&&i.class?.hideEmptyMembersBox)if(u.annotations.length>0)Nt=Wt-d;else Nt=Wt;if(!f)Nt-=4;let jt=G;if(St.attr("class").includes("label-group")||St.attr("class").includes("annotation-group"))jt=-St.node()?.getBBox().width/2||0,p.selectAll("text").each(function(Xt,$t,Lt){if(window.getComputedStyle(Lt[$t]).textAnchor==="middle")jt=0});St.attr("transform",`translate(${jt}, ${Nt})`)}),u.members.length>0||u.methods.length>0||_){let N=ot+R+Z+n,at=v.line(nt.x,N,nt.x+nt.width,N+0.001,A);p.insert(()=>at).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",B)}if(_||u.members.length>0||u.methods.length>0){let N=ot+R+X+Z+d*2+n,at=v.line(nt.x,P?Math.max(tt,N):N,nt.x+nt.width,(P?Math.max(tt,N):N)+0.001,A);p.insert(()=>at).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",B)}if(u.look!=="handDrawn")p.selectAll("path").attr("style",B);if(lt.select(":nth-child(2)").attr("style",B),p.selectAll(".divider").select("path").attr("style",B),e.labelStyle)p.selectAll("span").attr("style",e.labelStyle);else p.selectAll("span").attr("style",B);if(!f){let N=RegExp(/color\s*:\s*([^;]*)/),at=N.exec(B);if(at){let st=at[0].replace("color","fill");p.selectAll("tspan").attr("style",st)}else if(k){let st=N.exec(k);if(st){let St=st[0].replace("color","fill");p.selectAll("tspan").attr("style",St)}}}return K(e,lt),e.intersect=function(N){return L.rect(e,N)},p}t(ry,"classBox");async function iy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let o=e,a=e,c=20,n=20,d="verifyMethod"in e,f=At(e),u=m(),{themeVariables:p}=u,{borderColorArray:x,requirementEdgeLabelBackground:k}=p,T=u.layout==="elk"?"start":"center",B=r.insert("g").attr("class",f).attr("id",e.domId??e.id),_;if(d)_=await Xe(B,`<<${o.type}>>`,0,e.labelStyle);else _=await Xe(B,"<<Element>>",0,e.labelStyle);let v=_,A=await Xe(B,o.name,v,e.labelStyle+"; font-weight: bold;");if(v+=A+n,d){let nt=await Xe(B,`${o.requirementId?`ID: ${o.requirementId}`:""}`,v,e.labelStyle,T);v+=nt;let ot=await Xe(B,`${o.text?`Text: ${o.text}`:""}`,v,e.labelStyle,T);v+=ot;let R=await Xe(B,`${o.risk?`Risk: ${o.risk}`:""}`,v,e.labelStyle,T);v+=R,await Xe(B,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:""}`,v,e.labelStyle,T)}else{let nt=await Xe(B,`${a.type?`Type: ${a.type}`:""}`,v,e.labelStyle,T);v+=nt,await Xe(B,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,v,e.labelStyle,T)}let I=(B.node()?.getBBox().width??200)+c,D=(B.node()?.getBBox().height??200)+c,P=-I/2,G=-D/2,Z=y.svg(B),J=Bt(e,{});if(e.look!=="handDrawn")J.roughness=0,J.fillStyle="solid";let rt=Z.rectangle(P,G,I,D,J),lt=B.insert(()=>rt,":first-child");if(lt.attr("class","basic label-container outer-path").attr("style",s),x?.length){let nt=e.colorIndex??0;B.attr("data-color-id",`color-${nt%x.length}`)}if(B.selectAll(".label").each((nt,ot,R)=>{let X=b(R[ot]),tt=X.attr("transform"),N=0,at=0;if(tt){let Wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(tt);if(Wt)N=parseFloat(Wt[1]),at=parseFloat(Wt[2])}let st=at-D/2,St=P+c/2;if(ot===0||ot===1)St=N;X.attr("transform",`translate(${St}, ${st+c})`)}),v>_+A+n){let nt=G+_+A+n,ot;if(e.look==="neo"){let tt=[[P,nt],[P+I,nt],[P+I,nt+0.001],[P,nt+0.001]];ot=Z.polygon(tt,J)}else ot=Z.line(P,nt,P+I,nt,J);B.insert(()=>ot).attr("class","divider")}if(K(e,lt),e.intersect=function(nt){return L.rect(e,nt)},s&&e.look!=="handDrawn"&&(k||x?.length))B.selectAll("path").attr("style",s);return B}t(iy,"requirementBox");async function Xe(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 yn(a,qo(co(e)),{width:or(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=b(d);if(o==="start")b(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(Xe,"addText");var C1=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 oy(r,e,{config:i}){let{labelStyles:s,nodeStyles:o}=M(e);e.labelStyle=s||"";let a=10,c=e.width;e.width=(e.width??200)-10;let{shapeSvg:n,bbox:d,label:f}=await ee(r,e,At(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 k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},T,B;if(x)({label:T,bbox:B}=await $r(x,"ticket"in e&&e.ticket||"",k));else({label:T,bbox:B}=await $r(n,"ticket"in e&&e.ticket||"",k));let{label:_,bbox:v}=await $r(n,"assigned"in e&&e.assigned||"",k);e.width=c;let A=10,I=e?.width||0,D=Math.max(B.height,v.height)/2,P=Math.max(d.height+A*2,e?.height||0)+D,G=-I/2,Z=-P/2;f.attr("transform","translate("+(u-I/2)+", "+(-D-d.height/2)+")"),T.attr("transform","translate("+(u-I/2)+", "+(-D+d.height/2)+")"),_.attr("transform","translate("+(u+I/2-v.width-2*a)+", "+(-D+d.height/2)+")");let J,{rx:rt,ry:lt}=e,{cssStyles:nt}=e;if(e.look==="handDrawn"){let ot=y.svg(n),R=Bt(e,{}),X=rt||lt?ot.path(ve(G,Z,I,P,rt||0),R):ot.rectangle(G,Z,I,P,R);J=n.insert(()=>X,":first-child"),J.attr("class","basic label-container").attr("style",nt?nt:null)}else{J=n.insert("rect",":first-child"),J.attr("class","basic label-container __APA__").attr("style",o).attr("rx",rt??5).attr("ry",lt??5).attr("x",G).attr("y",Z).attr("width",I).attr("height",P);let ot="priority"in e&&e.priority;if(ot){let R=n.append("line"),X=G+2,tt=Z+Math.floor((rt??0)/2),N=Z+P-Math.floor((rt??0)/2);R.attr("x1",X).attr("y1",tt).attr("x2",X).attr("y2",N).attr("stroke-width","4").attr("stroke",C1(ot))}}return K(e,J),e.height=P,e.intersect=function(ot){return L.rect(e,ot)},n}t(oy,"kanbanItem");async function sy(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await ee(r,e,At(e)),d=a.width+10*c,f=a.height+8*c,u=0.15*d,{cssStyles:p}=e,x=a.width+20,k=a.height+20,T=Math.max(d,x),B=Math.max(f,k);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0
|
|
239
|
+
a${u},${u} 1 0,0 ${T*0.25},${-1*B*0.1}
|
|
240
|
+
a${u},${u} 1 0,0 ${T*0.25},0
|
|
241
|
+
a${u},${u} 1 0,0 ${T*0.25},0
|
|
242
|
+
a${u},${u} 1 0,0 ${T*0.25},${B*0.1}
|
|
243
|
+
|
|
244
|
+
a${u},${u} 1 0,0 ${T*0.15},${B*0.33}
|
|
245
|
+
a${u*0.8},${u*0.8} 1 0,0 0,${B*0.34}
|
|
246
|
+
a${u},${u} 1 0,0 ${-1*T*0.15},${B*0.33}
|
|
247
|
+
|
|
248
|
+
a${u},${u} 1 0,0 ${-1*T*0.25},${B*0.15}
|
|
249
|
+
a${u},${u} 1 0,0 ${-1*T*0.25},0
|
|
250
|
+
a${u},${u} 1 0,0 ${-1*T*0.25},0
|
|
251
|
+
a${u},${u} 1 0,0 ${-1*T*0.25},${-1*B*0.15}
|
|
252
|
+
|
|
253
|
+
a${u},${u} 1 0,0 ${-1*T*0.1},${-1*B*0.33}
|
|
254
|
+
a${u*0.8},${u*0.8} 1 0,0 0,${-1*B*0.34}
|
|
255
|
+
a${u},${u} 1 0,0 ${T*0.1},${-1*B*0.33}
|
|
256
|
+
H0 V0 Z`;if(e.look==="handDrawn"){let A=y.svg(o),I=Bt(e,{}),D=A.path(v,I);_=o.insert(()=>D,":first-child"),_.attr("class","basic label-container").attr("style",ne(p))}else _=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",v);return _.attr("transform",`translate(${-T/2}, ${-B/2})`),K(e,_),e.calcIntersect=function(A,I){return L.rect(A,I)},e.intersect=function(A){return l.info("Bang intersect",e,A),L.rect(e,A)},o}t(sy,"bang");async function ay(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await ee(r,e,At(e)),d=a.width+2*c,f=a.height+2*c,u=0.15*d,p=0.25*d,x=0.35*d,k=0.2*d,{cssStyles:T}=e,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${k},${k} 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${k},${k} 1 0,1 ${d*0.1},${-1*f*0.65}
|
|
270
|
+
H0 V0 Z`;if(e.look==="handDrawn"){let v=y.svg(o),A=Bt(e,{}),I=v.path(_,A);B=o.insert(()=>I,":first-child"),B.attr("class","basic label-container").attr("style",ne(T))}else B=o.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",_);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),B.attr("transform",`translate(${-d/2}, ${-f/2})`),K(e,B),e.calcIntersect=function(v,A){return L.rect(v,A)},e.intersect=function(v){return l.info("Cloud intersect",e,v),L.rect(e,v)},o}t(ay,"cloud");async function ny(r,e){let{labelStyles:i,nodeStyles:s}=M(e);e.labelStyle=i;let{shapeSvg:o,bbox:a,halfPadding:c,label:n}=await ee(r,e,At(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()),K(e,x),e.calcIntersect=function(k,T){return L.rect(k,T)},e.intersect=function(k){return L.rect(e,k)},o}t(ny,"defaultMindmapNode");async function ly(r,e){let i={padding:e.padding??0};return gc(r,e,i)}t(ly,"mindmapCircle");var b1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:lm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:sm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:cm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:qm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Sg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Tg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Mg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ng},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:gg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ug},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:wg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:gc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:sy},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ay},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:rm},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:$g},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Hg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:zg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Xm},{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:Wg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_g},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ym},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:dg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:am},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:pm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:dm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ag},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ig},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:xg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Cg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:bg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Yg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Zm},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Eg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:jg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Bg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Km},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ty},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Lg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Vm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Fg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:nm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tm},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Jg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ag},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:yg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Hm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Wm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Jm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:im},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ug}],k1=t(()=>{let e=[...Object.entries({state:um,choice:fg,note:em,composite:pg,rectWithTitle:om,labelRect:Ng,block_arrow:cg,collapsedGroup:hg,iconSquare:Rg,iconCircle:Dg,icon:Og,iconRounded:Pg,imageSquare:qg,anchor:og,kanbanItem:oy,mindmapCircle:ly,defaultMindmapNode:ny,classBox:ry,erBox:yc,requirementBox:iy,usecaseActor:Xg,usecaseActorHollow:Vg,usecaseActorAwesome:Gg,usecaseActorIcon:Kg,usecaseBusiness:Zg,usecaseEllipse:vg,usecaseJsonTable:Qg}),...b1.flatMap((i)=>[i.shortName,..."aliases"in i?i.aliases:[],..."internalAliases"in i?i.internalAliases:[]].map((o)=>[o,i.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Fd=k1();function Pc(r){return r in Fd}t(Pc,"isValidShape");var Na=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"),Qs=new Map;async function Qa(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?Fd[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",ne(e.look)),e.tooltip)o.attr("title",e.tooltip);if(Qs.set(e.id,s),e.haveCallback)s.attr("class",s.attr("class")+" clickable");return s}t(Qa,"insertNode");var jh=t((r,e)=>{Qs.set(e.id,r)},"setNodeElem"),qh=t(()=>{Qs.clear()},"clear"),ua=t((r)=>{let e=Qs.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 w1=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:k}=M(e),T=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);sr(T,e.colorIndex,s,d);let B=ia(i.flowchart.htmlLabels),_=e.direction==="LR",v=T.insert("g").attr("class","cluster-label swimlane-label"),A=await yn(v,e.label,{style:e.labelStyle,useHtmlLabels:B,isNode:!0,width:e.width}),I=A.getBBox();if(B){let tt=A.children[0],N=b(A);I=tt.getBoundingClientRect(),N.attr("width",I.width),N.attr("height",I.height)}let D=e.padding??0,P=e.width<=I.width+D?I.width+D:e.width;if(e.width<=I.width+D)e.diff=(P-e.width)/2-D;else e.diff=-D;let G=e.height,Z=e.y-G/2,J=e.y+G/2,rt=e.x-P/2,lt=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:Z+G/3,nt=_?4:0,ot=I.height+2*nt,R,X;if(_){let tt=Math.max(ot,I.height+2*nt),N=rt+tt,at=Math.max(0,P-tt);if(e.look==="handDrawn"){let _t=y.svg(T),Wt=Bt(e,{roughness:0.7,fill:c,stroke:f,seed:a}),Nt=Bt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),jt=_t.rectangle(rt,Z,tt,G,Wt);R=T.insert(()=>jt,":first-child").attr("class","swimlane-title");let Xt=_t.rectangle(N,Z,at,G,Nt);X=T.insert(()=>Xt,":first-child").attr("class","swimlane-body"),R.select("path:nth-child(2)").attr("style",x.join(";")),R.select("path").attr("style",k.join(";").replace("fill","stroke"))}else R=T.insert("rect",":first-child"),X=T.insert("rect",":first-child"),R.attr("class","swimlane-title").attr("style",p).attr("x",rt).attr("y",Z).attr("width",tt).attr("height",G).attr("fill",c).attr("stroke",f),X.attr("class","swimlane-body").attr("style",p).attr("x",N).attr("y",Z).attr("width",at).attr("height",G).attr("fill","none").attr("stroke",f);let st=rt+tt/2,St=e.y;v.attr("transform",`translate(${st}, ${St}) rotate(-90) translate(${-I.width/2}, ${-I.height/2})`)}else{let tt=Math.max(0,lt-Z),N=Math.min(ot,tt),at=Z+N,st=Math.max(0,J-at),St=e.x-P/2;if(e.look==="handDrawn"){let Nt=y.svg(T),jt=Bt(e,{roughness:0.7,fill:c,stroke:f,fillWeight:3,seed:a}),Xt=Bt(e,{roughness:0.7,fill:"none",stroke:f,seed:a}),$t=Nt.rectangle(St,Z,P,N,jt);R=T.insert(()=>$t,":first-child").attr("class","swimlane-title");let Lt=Nt.rectangle(St,at,P,st,Xt);X=T.insert(()=>Lt,":first-child").attr("class","swimlane-body"),R.select("path:nth-child(2)").attr("style",x.join(";")),R.select("path").attr("style",k.join(";").replace("fill","stroke"))}else R=T.insert("rect",":first-child"),X=T.insert("rect",":first-child"),R.attr("class","swimlane-title").attr("style",p).attr("x",St).attr("y",Z).attr("width",P).attr("height",N).attr("fill",c).attr("stroke",f),X.attr("class","swimlane-body").attr("style",p).attr("x",St).attr("y",at).attr("width",P).attr("height",st).attr("fill","none").attr("stroke",f);let _t=e.x-I.width/2,Wt=Z+(N-I.height)/2;v.attr("transform",`translate(${_t}, ${Wt})`)}if(l.trace("Swimlane data ",e,JSON.stringify(e)),u){let tt=v.select("span");if(tt)tt.attr("style",u)}return e.offsetX=0,e.width=P,e.height=G,e.offsetY=I.height-D/2,e.intersect=function(tt){return Ve(e,tt)},{cluster:T,labelBBox:I}},"swimlane"),hy=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}=M(e),k=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);sr(k,e.colorIndex,s,d);let T=nn(i),B=k.insert("g").attr("class","cluster-label "),_;if(e.labelType==="markdown")_=await yn(B,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width});else _=await Re(B,e.label,e.labelStyle||"",!1,!0);let v=_.getBBox();if(nn(i)){let rt=_.children[0],lt=b(_);v=rt.getBoundingClientRect(),lt.attr("width",v.width),lt.attr("height",v.height)}let A=e.width<=v.width+e.padding?v.width+e.padding:e.width;if(e.width<=v.width+e.padding)e.diff=(A-e.width)/2-e.padding;else e.diff=-e.padding;let I=e.height,D=e.x-A/2,P=e.y-I/2;l.trace("Data ",e,JSON.stringify(e));let G;if(e.look==="handDrawn"){let rt=y.svg(k),lt=Bt(e,{roughness:0.7,fill:c,stroke:n,fillWeight:3,seed:a}),nt=rt.path(ve(D,P,A,I,0),lt);G=k.insert(()=>(l.debug("Rough node insert CXC",nt),nt),":first-child"),G.select("path:nth-child(2)").attr("style",p.join(";")),G.select("path").attr("style",x.join(";").replace("fill","stroke"))}else G=k.insert("rect",":first-child"),G.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",D).attr("y",P).attr("width",A).attr("height",I);let{subGraphTitleTopMargin:Z}=Na(i);if(B.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+Z})`),f){let rt=B.select("span");if(rt)rt.attr("style",f)}let J=G.node().getBBox();return e.offsetX=0,e.width=J.width,e.height=J.height,e.offsetY=v.height-e.padding/2,e.intersect=function(rt){return Ve(e,rt)},{cluster:k,labelBBox:v}},"rect"),S1=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 Ve(e,n)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),T1=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);sr(p,e.colorIndex,s,n);let x=p.insert("g",":first-child"),k=p.insert("g").attr("class","cluster-label"),T=p.append("rect"),B=await Re(k,e.label,e.labelStyle,void 0,!0),_=B.getBBox();if(nn(i)){let nt=B.children[0],ot=b(B);_=nt.getBoundingClientRect(),ot.attr("width",_.width),ot.attr("height",_.height)}let v=0*e.padding,A=v/2,I=(e.width<=_.width+e.padding?_.width+e.padding:e.width)+v;if(e.width<=_.width+e.padding)e.diff=(I-e.width)/2-e.padding;else e.diff=-e.padding;let D=e.height+v,P=e.height+v-_.height-6,G=e.x-I/2,Z=e.y-D/2;e.width=I;let J=e.y-e.height/2-A+_.height+2,rt;if(e.look==="handDrawn"){let nt=e.cssClasses.includes("statediagram-cluster-alt"),ot=y.svg(p),R=e.rx||e.ry?ot.path(ve(G,Z,I,D,10),{roughness:0.7,fill:f,fillStyle:"solid",stroke:u,seed:a}):ot.rectangle(G,Z,I,D,{seed:a});rt=p.insert(()=>R,":first-child");let X=ot.rectangle(G,J,I,P,{fill:nt?c:d,fillStyle:nt?"hachure":"solid",stroke:u,seed:a});rt=p.insert(()=>R,":first-child"),T=p.insert(()=>X),rt.attr("class","outer"),T.attr("class","inner")}else{rt=x.insert("rect",":first-child");let nt="outer";rt.attr("class",nt).attr("x",G).attr("y",Z).attr("width",I).attr("height",D).attr("data-look",e.look),T.attr("class","inner").attr("x",G).attr("y",J).attr("width",I).attr("height",P)}k.attr("transform",`translate(${e.x-_.width/2}, ${Z+1-(nn(i)?0:3)})`);let lt=rt.node().getBBox();return e.height=lt.height,e.offsetX=0,e.offsetY=_.height-e.padding/2,e.labelBBox=_,e.intersect=function(nt){return Ve(e,nt)},{cluster:p,labelBBox:_}},"roundedWithTitle"),B1=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}=M(e),p=r.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),x=nn(i),k=p.insert("g").attr("class","cluster-label "),T=await yn(k,e.label,{style:e.labelStyle,useHtmlLabels:x,isNode:!0,width:e.width}),B=T.getBBox();if(nn(i)){let Z=T.children[0],J=b(T);B=Z.getBoundingClientRect(),J.attr("width",B.width),J.attr("height",B.height)}let _=e.width<=B.width+e.padding?B.width+e.padding:e.width;if(e.width<=B.width+e.padding)e.diff=(_-e.width)/2-e.padding;else e.diff=-e.padding;let v=e.height,A=e.x-_/2,I=e.y-v/2;l.trace("Data ",e,JSON.stringify(e));let D;if(e.look==="handDrawn"){let Z=y.svg(p),J=Bt(e,{roughness:0.7,fill:a,stroke:c,fillWeight:4,seed:o}),rt=Z.path(ve(A,I,_,v,e.rx),J);D=p.insert(()=>(l.debug("Rough node insert CXC",rt),rt),":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",A).attr("y",I).attr("width",_).attr("height",v);let{subGraphTitleTopMargin:P}=Na(i);if(k.attr("transform",`translate(${e.x-B.width/2}, ${e.y-e.height/2+P})`),n){let Z=k.select("span");if(Z)Z.attr("style",n)}let G=D.node().getBBox();return e.offsetX=0,e.width=G.width,e.height=G.height,e.offsetY=B.height-e.padding/2,e.intersect=function(Z){return Ve(e,Z)},{cluster:p,labelBBox:B}},"kanbanSection"),_1=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);sr(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 k=e.height+p,T=e.x-x/2,B=e.y-k/2;e.width=x;let _;if(e.look==="handDrawn"){let I=y.svg(f).rectangle(T,B,x,k,{fill:c??"#efefef",fillStyle:"solid",roughness:0.5,strokeLineDash:[5],stroke:n,seed:a});_=f.insert(()=>I,":first-child").attr("class","divider")}else{_=u.insert("rect",":first-child");let A="outer";if(e.look==="neo")A="divider";else A="divider";_.attr("class",A).attr("x",T).attr("y",B).attr("width",x).attr("height",k).attr("data-look",e.look)}let v=_.node().getBBox();return e.height=v.height,e.offsetX=0,e.offsetY=0,e.intersect=function(A){return Ve(e,A)},{cluster:f,labelBBox:{}}},"divider"),v1=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}=M(e),u=r.insert("g").attr("class","cluster "+i.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);sr(u,e.colorIndex,o,n);let p=nn(s),x=u.insert("g").attr("class","cluster-label"),k={width:0,height:0},T=e.label?.trim();if(T){let P;if(e.labelType==="markdown")P=await yn(x,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width});else P=await Re(x,e.label,e.labelStyle||"",!1,!0);if(k=P.getBBox(),p){let G=P.children[0],Z=b(P);k=G.getBoundingClientRect(),Z.attr("width",k.width),Z.attr("height",k.height)}}let B=e.width<=k.width+e.padding?k.width+e.padding:e.width;if(e.width<=k.width+e.padding)e.diff=(B-e.width)/2-e.padding;else e.diff=-e.padding;let _=e.height,v=e.x-B/2,A=e.y-_/2,I;if(e.look==="handDrawn"){let P=y.svg(u),G=Bt(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}:{}}),Z=P.path(ve(v,A,B,_,i.rx),G);I=u.insert(()=>Z,":first-child"),I.select("path:nth-child(2)").attr("style",f.join(";"))}else if(I=u.insert("rect",":first-child"),I.attr("rx",i.rx).attr("ry",i.rx).attr("x",v).attr("y",A).attr("width",B).attr("height",_).attr("fill",i.fill).attr("stroke",i.stroke).attr("stroke-width",i.strokeWidth+"px"),i.strokeDash)I.attr("stroke-dasharray",i.strokeDash.join(", "));if(T){let{subGraphTitleTopMargin:P}=Na(s);if(x.attr("transform",`translate(${e.x-k.width/2}, ${e.y-e.height/2+P})`),d){let G=x.select("span");if(G)G.attr("style",d)}}let D=I.node().getBBox();return e.offsetX=0,e.width=D.width,e.height=D.height,e.offsetY=k.height-e.padding/2,e.intersect=function(P){return Ve(e,P)},{cluster:u,labelBBox:k}},"createContainerGroup"),L1=t(async(r,e)=>{let{themeVariables:i}=m(),s=i.flowContainerStroke||i.secondaryBorderColor;return v1(r,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:s,strokeWidth:0.75,roughness:0.7})},"flowGroup"),F1=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"),M1=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}=M(e),{stylesMap:p}=je(e),x=e.boundaryType||"rect",k=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);sr(k,e.colorIndex,s,d);let T=nn(i),B=k.insert("g").attr("class","cluster-label system-boundary-title"),_=await yn(B,e.label,{style:f,useHtmlLabels:T,isNode:!0}),v=_.getBBox();if(T){let R=_.children[0],X=b(_);v=R.getBoundingClientRect(),X.attr("width",v.width),X.attr("height",v.height)}let A=F1(e,v),{width:I,height:D,x:P,y:G,bodyY:Z,bodyHeight:J,tabHeight:rt,tabWidth:lt}=A;e.diff=e.width<=v.width+e.padding?(I-e.width)/2-e.padding:-e.padding;let nt=Bt(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 R=y.svg(k),X=R.rectangle(P,Z,I,J,nt);if(k.insert(()=>X,":first-child").attr("class","boundary-body label-container"),x==="package"){let tt=R.rectangle(P,G,lt,rt,nt);k.insert(()=>tt,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else if(k.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",u).attr("x",P).attr("y",Z).attr("width",I).attr("height",J),x==="package")k.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",u).attr("x",P).attr("y",G).attr("width",lt).attr("height",rt);let{subGraphTitleTopMargin:ot}=Na(i);if(x==="package")B.attr("transform",`translate(${P+(lt-v.width)/2}, ${G+(rt-v.height)/2})`);else B.attr("transform",`translate(${e.x-v.width/2}, ${G+ot})`);if(f)B.attr("style",f),B.select("span").attr("style",f);return e.offsetX=0,e.width=I,e.height=D,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(R){return Ve(e,R)},{cluster:k,labelBBox:v}},"usecaseSystemBoundary"),A1=hy,E1={rect:hy,squareRect:A1,roundedWithTitle:T1,noteGroup:S1,divider:_1,kanbanSection:B1,flowGroup:L1,usecaseSystemBoundary:M1,swimlane:w1},$1=new Set(["noteGroup","divider"]),vA=t((r)=>!$1.has(r??"rect"),"clusterPaintsTitle"),cy=new Map,Oo=t(async(r,e)=>{let i=e.shape||"rect",s=await E1[i](r,e);return cy.set(e.id,s),s},"insertCluster"),Wh=t(()=>{cy=new Map},"clear");var Co=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"),rn={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},Gm={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ko(r,e){if(r===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};r=se(r),e=se(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(ko,"calculateDeltaAndAngle");var se=t((r)=>{if(Array.isArray(r))return{x:r[0],y:r[1]};return r},"pointTransformer"),I1=t((r)=>({x:t(function(e,i,s){let o=0,a=se(s[0]).x<se(s[s.length-1]).x?"left":"right";if(i===0&&Object.hasOwn(rn,r.arrowTypeStart)){let{angle:k,deltaX:T}=ko(s[0],s[1]);o=rn[r.arrowTypeStart]*Math.cos(k)*(T>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(rn,r.arrowTypeEnd)){let{angle:k,deltaX:T}=ko(s[s.length-1],s[s.length-2]);o=rn[r.arrowTypeEnd]*Math.cos(k)*(T>=0?1:-1)}let c=Math.abs(se(e).x-se(s[s.length-1]).x),n=Math.abs(se(e).y-se(s[s.length-1]).y),d=Math.abs(se(e).x-se(s[0]).x),f=Math.abs(se(e).y-se(s[0]).y),u=rn[r.arrowTypeStart],p=rn[r.arrowTypeEnd],x=1;if(c<p&&c>0&&n<p){let k=p+x-c;k*=a==="right"?-1:1,o-=k}if(d<u&&d>0&&f<u){let k=u+x-d;k*=a==="right"?-1:1,o+=k}return se(e).x+o},"x"),y:t(function(e,i,s){let o=0,a=se(s[0]).y<se(s[s.length-1]).y?"down":"up";if(i===0&&Object.hasOwn(rn,r.arrowTypeStart)){let{angle:k,deltaY:T}=ko(s[0],s[1]);o=rn[r.arrowTypeStart]*Math.abs(Math.sin(k))*(T>=0?1:-1)}else if(i===s.length-1&&Object.hasOwn(rn,r.arrowTypeEnd)){let{angle:k,deltaY:T}=ko(s[s.length-1],s[s.length-2]);o=rn[r.arrowTypeEnd]*Math.abs(Math.sin(k))*(T>=0?1:-1)}let c=Math.abs(se(e).y-se(s[s.length-1]).y),n=Math.abs(se(e).x-se(s[s.length-1]).x),d=Math.abs(se(e).y-se(s[0]).y),f=Math.abs(se(e).x-se(s[0]).x),u=rn[r.arrowTypeStart],p=rn[r.arrowTypeEnd],x=1;if(c<p&&c>0&&n<p){let k=p+x-c;k*=a==="up"?-1:1,o-=k}if(d<u&&d>0&&f<u){let k=u+x-d;k*=a==="up"?-1:1,o+=k}return se(e).y+o},"y")}),"getLineFunctionsWithOffset"),O1=t((r,e,i,s,o,a=!1,c)=>{if(e.arrowTypeStart)uy(r,"start",e.arrowTypeStart,i,s,o,a,c);if(e.arrowTypeEnd)uy(r,"end",e.arrowTypeEnd,i,s,o,a,c)},"addEdgeMarkers"),D1={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}},P1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],uy=t((r,e,i,s,o,a,c=!1,n)=>{if(!i||i==="none")return;let d=D1[i],f=d&&P1.includes(d.type);if(!d){l.warn(`Unknown arrow type: ${i}`);return}let u=d.type,k=`${o}_${a}-${u}${e==="start"?"Start":"End"}${c&&f?"-margin":""}`;if(n&&n.trim()!==""){let T=n.replace(/[^\dA-Za-z]/g,"_"),B=`${k}_${T}`;if(!document.getElementById(B)){let _=document.getElementById(k);if(_){let v=_.cloneNode(!0);v.id=B,v.querySelectorAll("path, circle, line").forEach((I)=>{if(I.setAttribute("stroke",n),d.fill)I.setAttribute("fill",n)}),_.parentNode?.appendChild(v)}}r.attr(`marker-${e}`,`url(${s}#${B})`)}else r.attr(`marker-${e}`,`url(${s}#${k})`)},"addEdgeMarker"),R1=t((r)=>typeof r==="string"?r:m()?.flowchart?.curve,"resolveEdgeCurveType"),El=new Map,an=new Map,Kh=t(()=>{El.clear(),an.clear()},"clear"),xA=t((r)=>Boolean(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),bo=t((r)=>{if(!r)return"";if(typeof r==="string")return r;return r.reduce((e,i)=>e+";"+i,"")},"getLabelStyles"),Ra=t(async(r,e)=>{let i=m(),s=nn(i),{labelStyles:o}=M(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 yn(r,e.label,{style:bo(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 k=f.children[0],T=b(f);u=await lr.measure(()=>k.getBoundingClientRect()),p=u,T.attr("width",u.width),T.attr("height",u.height)}else{let k=b(f).select("text").node();await lr.measure(()=>{if(u=f.getBBox(),k&&typeof k.getBBox==="function")p=k.getBBox();else p=u})}c.attr("transform",Co(p,s)),El.set(e.id,a),e.width=u.width,e.height=u.height;let x;if(e.startLabelLeft){let k=r.insert("g").attr("class","edgeTerminals"),T=k.insert("g").attr("class","inner"),B=await Re(T,e.startLabelLeft,bo(e.labelStyle)||"",!1,!1);x=B;let _=B.getBBox();if(s){let v=B.children[0],A=b(B);_=v.getBoundingClientRect(),A.attr("width",_.width),A.attr("height",_.height)}if(T.attr("transform",Co(_,s)),!an.get(e.id))an.set(e.id,{});an.get(e.id).startLeft=k,wo(x,e.startLabelLeft)}if(e.startLabelRight){let k=r.insert("g").attr("class","edgeTerminals"),T=k.insert("g").attr("class","inner"),B=await Re(T,e.startLabelRight,bo(e.labelStyle)||"",!1,!1);x=B;let _=B.getBBox();if(s){let v=B.children[0],A=b(B);_=v.getBoundingClientRect(),A.attr("width",_.width),A.attr("height",_.height)}if(T.attr("transform",Co(_,s)),!an.get(e.id))an.set(e.id,{});an.get(e.id).startRight=k,wo(x,e.startLabelRight)}if(e.endLabelLeft){let k=r.insert("g").attr("class","edgeTerminals"),T=k.insert("g").attr("class","inner"),B=await Re(k,e.endLabelLeft,bo(e.labelStyle)||"",!1,!1);x=B;let _=B.getBBox();if(s){let v=B.children[0],A=b(B);_=v.getBoundingClientRect(),A.attr("width",_.width),A.attr("height",_.height)}if(T.attr("transform",Co(_,s)),!an.get(e.id))an.set(e.id,{});an.get(e.id).endLeft=k,wo(x,e.endLabelLeft)}if(e.endLabelRight){let k=r.insert("g").attr("class","edgeTerminals"),T=k.insert("g").attr("class","inner"),B=await Re(k,e.endLabelRight,bo(e.labelStyle)||"",!1,!1);x=B;let _=B.getBBox();if(s){let v=B.children[0],A=b(B);_=v.getBoundingClientRect(),A.attr("width",_.width),A.attr("height",_.height)}if(T.attr("transform",Co(_,s)),!an.get(e.id))an.set(e.id,{});an.get(e.id).endRight=k,wo(x,e.endLabelRight)}return f},"insertEdgeLabel");function wo(r,e){if(nn(m())&&r)r.style.width=e.length*9+"px",r.style.height="12px"}t(wo,"setTerminalWidth");var Bl=t((r,e)=>{l.debug("Moving label abc88 ",r.id,r.label,El.get(r.id),e);let i=e.updatedPath?e.updatedPath:e.originalPath,s=m(),{subGraphTitleTotalMargin:o}=Na(s);if(r.label){let a=El.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=an.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=an.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=an.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=an.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"),q1=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"),W1=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"),N1=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,k=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:k}),n===0)x=e.x,k=e.y;if(u===0)x=e.x;if(f===0)k=e.y;return{x,y:k}}},"intersection"),dy=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),!W1(e,a)&&!o){let c=N1(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 py(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(py,"extractCornerPoints");var fy=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"),z1=t(function(r){let{cornerPointPositions:e}=py(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=fy(o,c,5),d=fy(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 k=5;if(c.x===n.x)x={x:f<0?n.x-k+p:n.x+k-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-k+p:n.y+k-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"),H1=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"),$o=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 k=a;let T=[];for(let st in e.cssCompiledStyles){if(Nd(st))continue;T.push(e.cssCompiledStyles[st])}if(f==="swimlane"){if(k.intersect&&x.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[x.intersect(u[0]),k.intersect(u[1])];else{let st=u.slice(1,-1),St=st[0],_t=st[st.length-1],Wt=0.5,Nt=Math.abs(u[u.length-1].x-_t.x)<0.5&&Math.abs(u[u.length-1].y-_t.y)<0.5,jt=x.intersect(St),Xt=Nt?_t:k.intersect(_t),$t=Math.abs(Xt.x-_t.x)<0.5&&Math.abs(Xt.y-_t.y)<0.5,Dt=Math.abs(jt.x-St.x)<0.5&&Math.abs(jt.y-St.y)<0.5?[]:[jt],zt=$t?[]:[Xt];u=[...Dt,...st,...zt]}u=q1(e,u)}else if(k.intersect&&x.intersect&&!n)u=u.slice(1,e.points.length-1),u.unshift(x.intersect(u[0])),u.push(k.intersect(u[u.length-1]));let B=btoa(JSON.stringify(u));if(e.toCluster)l.info("to cluster abc88",i.get(e.toCluster)),u=dy(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=dy(u.reverse(),i.get(e.fromCluster).node).reverse(),p=!0;let _=u.filter((st)=>!Number.isNaN(st.y)),v=R1(e.curve);if(v!=="rounded")_=z1(_);let A=Da;switch(v){case"linear":A=Da;break;case"basis":A=_r;break;case"cardinal":A=Zi;break;case"bumpX":A=Gi;break;case"bumpY":A=Vi;break;case"catmullRom":A=Ji;break;case"monotoneX":A=to;break;case"monotoneY":A=eo;break;case"natural":A=Qr;break;case"step":A=Jr;break;case"stepAfter":A=io;break;case"stepBefore":A=ro;break;case"rounded":A=Da;break;default:A=_r}let{x:I,y:D}=I1(e),P=wl().x(I).y(D).curve(A),G;switch(e.thickness){case"normal":G="edge-thickness-normal";break;case"thick":G="edge-thickness-thick";break;case"invisible":G="edge-thickness-invisible";break;default:G="edge-thickness-normal"}switch(e.pattern){case"solid":G+=" edge-pattern-solid";break;case"dotted":G+=" edge-pattern-dotted";break;case"dashed":G+=" edge-pattern-dashed";break;default:G+=" edge-pattern-solid"}let Z,J=v==="rounded"?gy(my(_,e),5):P(_),rt=Array.isArray(e.style)?e.style:[e.style],lt=rt.find((st)=>st?.startsWith("stroke:")),nt="";if(e.animate)nt="edge-animation-fast";if(e.animation)nt="edge-animation-"+e.animation;let ot=!1;if(e.look==="handDrawn"){let st=y.svg(r);Object.assign([],_);let St=st.path(J,{roughness:0.3,seed:d});G+=" transition",Z=b(St).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+G+(e.classes?" "+e.classes:"")+(nt?" "+nt:"")).attr("style",rt?rt.reduce((Wt,Nt)=>Wt+";"+Nt,""):"");let _t=Z.attr("d");Z.attr("d",_t),r.node().appendChild(Z.node())}else{let st=T.join(";"),St=rt?rt.reduce(($t,Lt)=>$t+Lt+";",""):"",_t=(st?st+";"+St+";":St)+";"+(rt?rt.reduce(($t,Lt)=>$t+";"+Lt,""):"");Z=r.append("path").attr("d",J).attr("id",`${c}-${e.id}`).attr("class"," "+G+(e.classes?" "+e.classes:"")+(nt?" "+nt:"")).attr("style",_t),lt=_t.match(/stroke:([^;]+)/)?.[1],ot=e.animate===!0||!!e.animation||st.includes("animation");let Wt=Z.node(),Nt=typeof Wt.getTotalLength==="function"?Wt.getTotalLength():0,jt=Gm[e.arrowTypeStart]||0,Xt=Gm[e.arrowTypeEnd]||0;if(e.look==="neo"&&!ot){let Lt=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?H1(Nt,jt,Xt):`0 ${jt} ${Nt-jt-Xt} ${Xt}`}; stroke-dashoffset: 0;`;Z.attr("style",Lt+Z.attr("style"))}}if(Z.attr("data-edge",!0),Z.attr("data-et","edge"),Z.attr("data-id",e.id),Z.attr("data-points",B),Z.attr("data-look",ne(e.look)),e.showPoints)_.forEach((st)=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",st.x).attr("cy",st.y)});let R="";if(m().flowchart.arrowMarkerAbsolute||m().state.arrowMarkerAbsolute)R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)");l.info("arrowTypeStart",e.arrowTypeStart),l.info("arrowTypeEnd",e.arrowTypeEnd);let X=!ot&&e?.look==="neo";O1(Z,e,R,c,s,X,lt);let tt=Math.floor(u.length/2),N=u[tt];if(!V.isLabelCoordinateInPath(N,Z.attr("d")))p=!0;let at={};if(p)at.updatedPath=u;return at.originalPath=e.points,at},"insertEdge");function gy(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,k=Math.hypot(f,u),T=Math.hypot(p,x);if(k<o||T<o){i+=`L${c.x},${c.y}`;continue}let B=f/k,_=u/k,v=p/T,A=x/T,I=B*v+_*A,D=Math.max(-1,Math.min(1,I)),P=Math.acos(D);if(P<o||Math.abs(Math.PI-P)<o){i+=`L${c.x},${c.y}`;continue}let G=Math.min(e/Math.sin(P/2),k/2,T/2),Z=c.x-B*G,J=c.y-_*G,rt=c.x+v*G,lt=c.y+A*G;i+=`L${Z},${J}`,i+=`Q${c.x},${c.y} ${rt},${lt}`}}return i}t(gy,"generateRoundedPath");function xc(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(xc,"calculateDeltaAndAngle");function my(r,e){let i=r.map((o)=>({...o}));if(r.length>=2&&rn[e.arrowTypeStart]){let o=rn[e.arrowTypeStart],a=r[0],c=r[1],{angle:n}=xc(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&&rn[e.arrowTypeEnd]){let o=rn[e.arrowTypeEnd],a=r[s-1],c=r[s-2],{angle:n}=xc(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(my,"applyMarkerOffsetsToPoints");var Y1=t((r,e,i,s)=>{e.forEach((o)=>{p2[o](r,i,s)})},"insertMarkers"),j1=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"),U1=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"),X1=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"),G1=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"),V1=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"),K1=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"),Z1=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"),Q1=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"),J1=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"),t2=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"),e2=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"),r2=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"),i2=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"),o2=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"),s2=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"),a2=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"),n2=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"),l2=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"),h2=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"),c2=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"),u2=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"),d2=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"),f2=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"),p2={extension:j1,composition:U1,aggregation:X1,dependency:G1,lollipop:V1,point:K1,circle:Z1,cross:Q1,barb:J1,barbNeo:t2,hierarchy:f2,only_one:e2,zero_or_one:r2,one_or_more:i2,zero_or_more:o2,only_one_neo:s2,zero_or_one_neo:a2,one_or_more_neo:n2,zero_or_more_neo:l2,requirement_arrow:h2,requirement_contains:u2,requirement_arrow_neo:c2,requirement_contains_neo:d2},Il=Y1;var g2={common:w,getConfig:C,insertCluster:Oo,insertEdge:$o,insertEdgeLabel:Ra,insertMarkers:Il,insertNode:Qa,interpolateToCurve:Ms,labelHelper:ee,log:l,positionEdgeLabel:Bl},m2=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],So=Object.create(null),kA=t((r)=>{for(let e of r)So[e.name]=e},"registerLayoutLoaders"),y2=t(()=>{let r=t(async()=>await import("./elk-276RUBZZ-nej6yy1c.js"),"loader");return[{name:"elk",loader:r,algorithm:"elk.layered"},...m2.map((e)=>({name:e,loader:r,algorithm:e}))]},"elkLayoutLoaders"),x2=t(()=>{kA([{name:"dagre",loader:t(async()=>await import("./dagre-6A5THRUB-qzshg1vs.js"),"loader")},{name:"swimlane",loader:t(async()=>await import("./swimlanes-2SLR337P-eshg5fjy.js"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-JH36ORCC-k54mmydp.js"),"loader")},...y2()])},"registerDefaultLayoutLoaders");x2();var Ut=t(async(r,e)=>{if(!Object.hasOwn(So,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=So[r.layoutAlgorithm],s=await i.loader();return ym(e,r.config),s.render(r,e,g2,{algorithm:i.algorithm})},"render"),bc="dagre",Gt=t((r="",{fallback:e=bc}={})=>{if(Object.hasOwn(So,r))return r;for(let i of[e,bc])if(Object.hasOwn(So,i))return l.warn(`Layout algorithm ${r} is not registered. Using ${i} as fallback.`),i;throw Error(`Neither layout algorithm ${r}, ${e}, nor ${bc} is registered.`)},"getRegisteredLayoutAlgorithm");var jn=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 Ht=t((r,e)=>{let i;if(e==="sandbox")i=b("#i"+r);return(e==="sandbox"?b(i.nodes()[0].contentDocument.body):b("body")).select(`[id="${r}"]`)},"getDiagramElement");var Et=t((r,e,i,s)=>{r.attr("class",i);let{width:o,height:a,x:c,y:n}=C2(r,e);ae(r,a,o,s);let d=b2(c,n,o,a,e);r.attr("viewBox",d),l.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),C2=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"),b2=t((r,e,i,s,o)=>`${r-o} ${e-o} ${i} ${s}`,"createViewBox");
|
|
314
|
+
export{t,Lo,mm,l,_d,wt,Sa,De,Cc,g,h,lA,cA,us,Ec,fm,Lh,ct,tn,Mo,Y,uA,Ci,ia,gm,Mh,Fh,Ph,dA,pA,C,Oh,Sd,$h,nn,xl,te,mA,Fo,Ft,Bc,Ic,w,ae,sa,Am,zh,hm,F,z,H,U,j,W,q,m,Ta,ds,_c,Td,bm,b,ps,Sc,ms,lo,fA,Gn,Tc,Uh,Ei,kl,Mn,Dc,Po,ar,Tt,Nc,la,Dd,Da,wl,he,yr,vr,ym,Nd,M,gA,fs,xr,Cl,gs,Bi,vm,Qc,Rc,Lc,Mc,xm,km,wm,Cm,Em,Bm,Im,_m,Sm,Tm,Dm,Nm,Qm,Rm,Lm,Mm,Fm,Ii,Fc,Qd,Pm,AA,Gh,Om,hA,bA,As,Rd,or,Ld,$m,Hn,ue,V,Hh,co,Fn,zm,Um,yA,yn,Md,Ct,ft,gt,ca,ir,sr,y,ee,K,L,Fd,Pc,Na,Qa,jh,qh,ua,vA,Oo,Wh,rn,Gm,El,an,Kh,xA,Ra,Bl,$o,Il,kA,Ut,Gt,jn,Ht,Et};
|